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