Hello Ashok you can enable and disable the context menu option from the context menu. Check the below example
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="onInit()"> <mx:Script> <![CDATA[ import mx.managers.FocusManager; import mx.core.UIComponent; private var _spr:Sprite; private var _contextMenu:ContextMenu; private function onInit():void { var ui:UIComponent = new UIComponent(); _spr = new Sprite(); _spr.graphics.clear(); _spr.graphics.beginFill(0xFF0000,0.8); _spr.graphics.drawRect(0,0,200,200); _spr.graphics.endFill(); ui.addChild(_spr); _spr.x = 20; _spr.y = 20; addChild(ui); loadContextMenu(); } private function loadContextMenu():void { _contextMenu = new ContextMenu(); _contextMenu.hideBuiltInItems(); var _selAll:ContextMenuItem = new ContextMenuItem("Select All Hotspot"); var _deSelAll:ContextMenuItem = new ContextMenuItem("Deselect All Hotspot"); var _delAll:ContextMenuItem = new ContextMenuItem("Delete All Hotspot"); _contextMenu.customItems.push(_selAll); _contextMenu.customItems.push(_deSelAll); _contextMenu.customItems.push(_delAll); _contextMenu.customItems[1].enabled = false; _contextMenu.customItems[2].enabled = false; _selAll.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menuItemSelect); _delAll.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menuItemSelect); _deSelAll.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menuItemSelect); _spr.contextMenu = _contextMenu; } private function menuItemSelect(evt:ContextMenuEvent):void { var _custMenu:ContextMenuItem = evt.target as ContextMenuItem; if(_custMenu.caption == "Select All Hotspot") { _contextMenu.customItems[0].enabled = false; _contextMenu.customItems[1].enabled = true; _contextMenu.customItems[2].enabled = true; } else { _contextMenu.customItems[0].enabled = true; _contextMenu.customItems[1].enabled = false; _contextMenu.customItems[2].enabled = false; } } ]]> </mx:Script> </mx:Application> On Thu, Nov 1, 2012 at 11:26 AM, Ashok Laishram <ashok.laish...@gmail.com>wrote: > It's not working if I set this property also , the default right click > option still exists > > On Wed, Oct 31, 2012 at 2:49 PM, Komal H <krhar...@gmail.com> wrote: > > Set the property--> mouseEnabled="false" > > > > -- > > You received this message because you are subscribed to the Google > Groups "Flex India Community" group. > > To post to this group, send email to flex_india@googlegroups.com. > > To unsubscribe from this group, send email to > flex_india+unsubscr...@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/flex_india?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Flex India Community" group. > To post to this group, send email to flex_india@googlegroups.com. > To unsubscribe from this group, send email to > flex_india+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/flex_india?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to flex_india@googlegroups.com. To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.