最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
flash cs3添加右键菜单
时间:2022-07-02 17:16:33 编辑:袖梨 来源:一聚教程网
cs3添加右键菜单
flash cs3的右键菜单 ContextMenu 对象附加到特定的按钮、影片剪辑或文本字段对象,也可以附加到整个影片级别。
所以这里设置一个背景影片剪辑st,然后添加如下代码:
var menuItem:ContextMenuItem = new ContextMenuItem("浪子设计");
menuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,gotoAuthorPage);
var customContextMenu:ContextMenu = new ContextMenu();
customContextMenu.hideBuiltInItems();
customContextMenu.customItems.push(menuItem);
st.contextMenu = customContextMenu;
function gotoAuthorPage(event:ContextMenuEvent):void {
var targetURL:URLRequest = new URLRequest("http://www.*f**lasc.cn/");
navigateToURL(targetURL);
}
所以这里设置一个背景影片剪辑st,然后添加如下代码:
var menuItem:ContextMenuItem = new ContextMenuItem("浪子设计");
menuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,gotoAuthorPage);
var customContextMenu:ContextMenu = new ContextMenu();
customContextMenu.hideBuiltInItems();
customContextMenu.customItems.push(menuItem);
st.contextMenu = customContextMenu;
function gotoAuthorPage(event:ContextMenuEvent):void {
var targetURL:URLRequest = new URLRequest("http://www.*f**lasc.cn/");
navigateToURL(targetURL);
}
相关文章
- mcjs网页版即点即玩-mcjs极速秒玩入口 10-23
- 超星学习通网页版登录-超星学习通官网入口 10-23
- poki免费游戏大全-poki免费游戏在线畅玩入口 10-23
- mc.js官方在线入口 10-23
- 海角haijiao社区2025全新网址一键直达-海角社区最新官方入口地址 10-23
- 王者荣耀世界体力上限与恢复方法详解 王者荣耀世界体力机制全面解析 10-20