This content has been marked as final. Show 3 replies
Haven't worked too much with that, but is this something that could be done with the generic 'data' Object assuming the contextMenuItem has one?
sorry, I don't understand ?
Context menus have llimited functionality in Flex, meaning you cannot just add whatever you want to them whenever you would like.
See this FB3 help topic: About context menus
If you use the ContextMenu class, you must use the ContextMenuItem class with it; you cannot add NativeMenuItem objects to a ContextMenu object, nor can you add ContextMenuItem objects to a NativeMenu object.
The primary drawback to using the context menu API is that it does not support submenus.
Although the ContextMenu class includes methods, such as addItem(), that are inherited from the NativeMenu class, these methods add items to the incorrect items array.
In a context menu, all items must be added to the customItems array, not the items array. Either use NativeMenu objects for context menus, or use only the non-inherited ContextMenu methods and properties for adding and managing items in the menu.