In 2.1, I was able to add a context menu by doing the following (see code below).
I moved to 2.3.1 and added the same code to the new MapManager.MXML
Now, the items do not show up when I right click. Am I forgetting something?
import mx.core.FlexGlobals;
[Bindable]
private var cm:ContextMenu;
Private Function Init(): void
{
...
// Added for Context menu
var cmi:ContextMenuItem = new ContextMenuItem("Copy Lat, Long to clipboard", true);
cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_menuItemSelect);
cm = FlexGlobals.topLevelApplication.contextMenu;
cm.hideBuiltInItems();
MovieClip(systemManager).contextMenu = cm;
cm.customItems = [cmi,cmi3];
cm.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelect);
}