I think the problem here is that you are using the same name for your
menu item as one of the built in menu items. These include
forwardAndBack, loop, play, print, quality, rewind, save and zoom.
Set the label of your menu item to anything but these and it should work.

-Adam

--- In flexcoders@yahoogroups.com, "vipinck" <[EMAIL PROTECTED]> wrote:
>
> I am trying to add a custom context menu in my flex app. I am writing
> below code in a method which i am calling on applicationComplete event
> of the main application.
> 
> //
> customMenu = new ContextMenu();
> var saveItem:ContextMenuItem = new
> ContextMenuItem("Save",true,true,true);
> saveItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
> doSaveCommand);
> customMenu.hideBuiltInItems();
> customMenu.customItems.push(saveItem);
> Application.application.contextMenu = customMenu;
> 
> //
> 
> I am able to hide the default menu items when using the
> customMenu.hideBuiltInItems(); code, but the custom 'Save' item is not
> getting added.
> 
> What could be wrong?
> 
> Thnx
> Vipin
>


Reply via email to