您的位置:首页 > 其它

AS3 如何设置右键菜单

2012-04-25 13:23 253 查看
function tab() {
}
//End of the function
function toJave_Lin_BaiDu_Home() {
getURL("http://hi.baidu.com/linrao", "_blank");
}
//End of the function
function toJave_Lin_CSDN_Home() {
getURL("http://blog.csdn.net/linjf520", "_blank");
}
//End of the function
function showMenuHandler():Object
{
trace("test");
return "test";
}
//End of the function
var expandmenu = new ContextMenu();
expandmenu.hideBuiltInItems();
var item1 = new ContextMenuItem("toJave_Lin_BaiDu_Home", toJave_Lin_BaiDu_Home, true, true, true);
var item2 = new ContextMenuItem("toJave_Lin_CSDN_Home", toJave_Lin_CSDN_Home, true, true, true);
expandmenu.customItems.push(item1, item2);//添加菜单
expandmenu.onSelect = showMenuHandler;//显示菜单时的事件
_root.menu = expandmenu;//设置主时间轴右键关联菜单
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: