0
我想添加一个ContextMenu项目菜单在Flash中。这是代码。但它不会调用showVideoInfo函数。我错过了什么?Flash自定义右键快捷菜单
var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var customItem:ContextMenuItem = new ContextMenuItem("Show info");
myMenu.customItems.push(customItem);
customItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, showInfo);
this.contextMenu = myMenu;
public function showInfo(){
ExternalInterface.call("showAlert","Showing Information");
}