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");
}