flash右键自定义

var menuItem1:ContextMenuItem = new ContextMenuItem("欢迎访问中国陆航论坛");
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.chinaluhang.cn/bbs/");
navigateToURL(tagetURL);
}
function F(e:ContextMenuEvent) {
var tagetURL:URLRequest = new URLRequest("http://wpa.qq.com/msgrd?v=1&Uin=692499304&Site=&Menu=yes");
navigateToURL(tagetURL);
}
posted @ 2010-02-12 10:52  与时俱进  阅读(187)  评论(0编辑  收藏  举报
友情链接:同里老宅院民居客栈