var contextMenu:ContextMenu = new ContextMenu(); contextMenu.hideBuiltInItems(); var editNode:ContextMenuItem = new ContextMenuItem("右键菜单名称"); editNode.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, editNodeItemClick); contextMenu.customItems.push(editNode);