实例:
labelMenu.hideBuiltInItems();
var copyItem:ContextMenuItem = new ContextMenuItem("copy");
copyItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler);
labelMenu.customItems.push(copyItem);
this.contextMenu = labelMenu;
}
private function menuItemSelectHandler(e:ContextMenuEvent):void {
System.setClipboard(toolTip.toString());
}
没有评论:
发表评论