来源:http://blog.sina.com.cn/s/blog_7264c84401014fmd.html
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
import flash.events.ContextMenuEvent;
import flash.net.URLRequest;
var menu:ContextMenu = new ContextMenu();
var menuItem:ContextMenuItem = new ContextMenuItem("屏蔽方法");
var menuItem1:ContextMenuItem = new ContextMenuItem("再次添加")
// 隐藏内建菜单
menu.hideBuiltInItems()
//设置右键菜单为自定义菜单
this.contextMenu = menu;
// 在菜单数组中添加一个选项;
menu.customItems.push(menuItem,menuItem1);
// 给菜单选项添加事件;
menuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menuItem_click);
function menuItem_click(event:ContextMenuEvent):void
{
navigateToURL(new URLRequest("http://blog.sina.com.cn/s/blog_7264c8440100s9ax.html"))
}