Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-29-2011, 10:14 AM   #1
navin4ru
Registered User
 
Join Date: May 2011
Posts: 24
Default Right click functionality not working...

Below is my sample code

ActionScript Code:
private function init():void{ var cmi1:ContextMenuItem = new ContextMenuItem("PPPPP", true);        cmi1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_propertiesSelect);    var cmi2:ContextMenuItem = new ContextMenuItem("DDDDD", true); cmi2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_deleteItem);          var cmi3:ContextMenuItem = new ContextMenuItem("VVVVV", true); cmi3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_viewXMLSelect);            var cmi4:ContextMenuItem = new ContextMenuItem("SSSSS", true); cmi4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_savedListSelect);                 var contextMenuCustomItems:Array = FlexGlobals.topLevelApplication.contextMenu.customItems;                 contextMenuCustomItems.push(cmi1); contextMenuCustomItems.push(cmi2); contextMenuCustomItems.push(cmi3); contextMenuCustomItems.push(cmi4)}

Can anyone sort out my problem.

Last edited by pixelwit; 06-30-2011 at 12:40 PM.
navin4ru is offline   Reply With Quote
Old 06-29-2011, 10:58 AM   #2
Barna Biro
Senior Member
 
Barna Biro's Avatar
 
Join Date: Nov 2009
Location: LU, Switzerland
Posts: 1,406
Default

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.
__________________
Titus M. Plautus - Not by age but by capacity is wisdom acquired.
Barna Biro is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:48 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.