View Full Version : Right click functionality not working...

06-29-2011, 10:14 AM
Below is my sample code

private function init():void{
var cmi1:ContextMenuItem = new ContextMenuItem("PPPPP", true);
cmi1.addEventListener(ContextMenuEvent.MENU_ITEM_S ELECT, contextMenuItem_propertiesSelect);
var cmi2:ContextMenuItem = new ContextMenuItem("DDDDD", true);
cmi2.addEventListener(ContextMenuEvent.MENU_ITEM_S ELECT, contextMenuItem_deleteItem);
var cmi3:ContextMenuItem = new ContextMenuItem("VVVVV", true);
cmi3.addEventListener(ContextMenuEvent.MENU_ITEM_S ELECT, contextMenuItem_viewXMLSelect);
var cmi4:ContextMenuItem = new ContextMenuItem("SSSSS", true);
cmi4.addEventListener(ContextMenuEvent.MENU_ITEM_S ELECT, contextMenuItem_savedListSelect);

var contextMenuCustomItems:Array = FlexGlobals.topLevelApplication.contextMenu.custom Items;


Can anyone sort out my problem.

Barna Biro
06-29-2011, 10:58 AM
What's not working more exactly?
The items are showing up just fine on my side...
Also please use [as] or [code] tags next time you post code.

PS: Are you actually calling that init(); method anywhere?
Other than that, I can't think of a reason for the above not to work.