Not sure why you'd need to pass parameters, since the context menu is established by your code and doesn't allow sub-menus (from what I've read). Whatever parameter you need to pass, I assume it's a result of something else happening in the movie, so why not store it in a variable in the movie and then access it as part of the function _test? If the parameter varies depending where the user right-clicks, you'd need a new context menu for that area of the stage, or you could evaluate where the mouse cursor is and use that to generate the parameter. If you need variations on the function from a single context menu, just create more custom items (up to 15 are allowed).

Or am I missing something?

Marc Hoffman

At 12:38 PM 12/7/2006, you wrote:

Hi!
I have this code:
var cm:ContextMenu = new ContextMenu();
cm.hideBuiltInItems();
cm.customItems.push(new ContextMenuItem("My menu", _test));
my_dg["menu"] = cm;//my_dg is an data grid component

How i can pass parameters to function _test


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to