FLASH右键菜单设置
var menuItem1:ContextMenuItem = new ContextMenuItem("访问xxx官网");
var menuItem2:ContextMenuItem = new ContextMenuItem("联系我们");
menuItem1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,reg);
menuItem2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,F);
var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();
myMenu.customItems.push(menuItem1);
myMenu.customItems.push(menuItem2);
contextMenu = myMenu;
function reg(e:ContextMenuEvent) {
var tagetURL:URLRequest = new URLRequest("http://www.xxx.com");
navigateToURL(tagetURL);
}
function F(e:ContextMenuEvent) {
var tagetURL:URLRequest = new URLRequest("http://wpa.qq.com/msgrd?v=1&Uin=350680869&Site=&Menu=yes");
navigateToURL(tagetURL);
}
==================================================
var mymenu:ContextMenu = new ContextMenu();
var myitem:ContextMenuItem = new ContextMenuItem("www.xxx.com");
mymenu.customItems.push(myitem);
mymenu.hideBuiltInItems();
this.contextMenu = mymenu;
myitem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,selectedHandler);
private function selectedHandler(event:ContextMenuEvent):void
{
var url:URLRequest = new URLRequest("http://www.xxx.com");
navigateToURL(url,"_blank");
}