Re: [flexcoders] 3 questions: Context menu, graphing component and XmlRpc

2006-11-28 Thread Adam Royle
With the context menu example you gave below, it would be easy enough to 
replicate the functionality. Most of the trickery is in the HTML of the page 
the swf is hosted in, intercepting the right mouse click and executing a 
function in the swf. I'm not sure how stable the JS code is, and if it 
supports all browsers - might want to test/tweak this.

function onNsRightClick(e){
 if(e.which == 3){
  Test9.openRightClick();
  e.stopPropagation();
 }
 return false;
}

function onIeRightClick(e){
 if(event.button > 1){
  Test9.openRightClick();
  parent.frames.location.replace('javascript: parent.falseframe');
 }
 return false;
}

If you look further down the HTML source, you'll find that Test9 is the name 
of the Flash movie being embedded. So obviously, in those functions listed 
above, you would just have a function in the swf that responds to 
openRightClick() and shows your menu. It won't work in the same fashion as 
the current context menu, you'd have to customise that a bit.

I was wondering how something like this could be done a while back, so 
thanks for the example. If I end up writing the code before you do, I'll 
share it, but you'll prob need it before then.

Cheers,
Adam
- Original Message - 
From: chuvakgu
To: flexcoders@yahoogroups.com
Sent: Tuesday, November 28, 2006 5:22 AM
Subject: [flexcoders] 3 questions: Context menu, graphing component and 
XmlRpc


Hi all,

I am new to Flex 2, and I have looked for answers to these
but haven't found much. Here they are:

1. Context menu (right-click) - I am looking for a way to
kill the actual flash context menu and have my own. Kind of
like the one shown at
http://www.flex-flex.net/flex/RightClickMenu/RightClick.html, but of
course :) there's no right-click show source code. It is discussed at
http://www.flex-flex.net/blog/article.asp?id=12, but only says "code
later", and comments are full of spam (I guess I am just showing that
I've done some homework here).

2. Open-source graph component - by this I mean not graphs like pie
charts, but creation of graphs with nodes, edges, layouts (ideally -
drag/drop/snapping support). I've only dug out
http://mark-shepherd.com/blog/springgraph-flex-component/, but this is
a bit too much (plus it's non-directional). I guess it's worth
hacking if I don't dig up something more along the lines of
http://www.mxgraph.com/pages/en/index.html.

3. Finally, for an XmlRpc way to talk to the server (I already have a
server that serves that:). I've been able to find
http://sourceforge.net/projects/xmlrpcflash and
http://probertson.com/projects/xmlrpc/, both for AS 2.0. I am guessing
it shouldn't be hard to make it work with 3.0, but which one would
you recommend?


 



[flexcoders] 3 questions: Context menu, graphing component and XmlRpc

2006-11-27 Thread chuvakgu
Hi all,

I am new to Flex 2, and I have looked for answers to these
but haven't found much. Here they are:

1. Context menu (right-click) - I am looking for a way to
kill the actual flash context menu and have my own. Kind of
like the one shown at
http://www.flex-flex.net/flex/RightClickMenu/RightClick.html, but of
course :) there's no right-click show source code. It is discussed at
http://www.flex-flex.net/blog/article.asp?id=12, but only says "code
later", and comments are full of spam (I guess I am just showing that
I've done some homework here).

2. Open-source graph component - by this I mean not graphs like pie
charts, but creation of graphs with nodes, edges, layouts (ideally -
drag/drop/snapping support). I've only dug out
http://mark-shepherd.com/blog/springgraph-flex-component/, but this is
a  bit too much (plus it's non-directional). I guess it's worth
hacking if I don't dig up something more along the lines of
http://www.mxgraph.com/pages/en/index.html. 

3. Finally, for an XmlRpc way to talk to the server (I already have a
server that serves that:). I've been able to find
http://sourceforge.net/projects/xmlrpcflash and
http://probertson.com/projects/xmlrpc/, both for AS 2.0. I am guessing
 it shouldn't be hard to make it work with 3.0, but which one would
you  recommend?