FLASH右键菜单的应用

看到别人作了一个右键菜单.感觉不错.其它大家可以多多应用他.所以作个小例子出来. 大家可以应用于多媒体演示等地方.核心代码如下:
var empiremue = new ContextMenu();//删除原始菜单状态!
empiremue.hideBuiltInItems();//自定义菜单项目!
empiremue.customItems.push(new ContextMenuItem("返回首界面", home));
empiremue.customItems.push(new ContextMenuItem("返回到一副", h1));
empiremue.customItems.push(new ContextMenuItem("返回到二副", h2));
empiremue.customItems.push(new ContextMenuItem("返回到三副", h3));
empiremue.customItems.push(new ContextMenuItem("返回到四副", h4));
empiremue.customItems.push(new ContextMenuItem("返回到五副", h5));
empiremue.customItems.push(new ContextMenuItem("返回到六副", h6));
empiremue.customItems.push(new ContextMenuItem("去[闪客帝国]学习", gotoempire));//菜单子程序执行目标...
function home() { _root.gotoAndStop(1);}
function h1() { _root.gotoAndStop(2);}
function h2() { _root.gotoAndStop(3);}
function h3() { _root.gotoAndStop(4);}
function h4() { _root.gotoAndStop(5);}
function h5() { _root.gotoAndStop(6);}
function h6() { _root.gotoAndStop(7);}
function gotoempire() { getURL("http://www.flashempire.com/school/", "_blank");}
_root.menu = empiremue;

转载于:https://www.cnblogs.com/savageworld/archive/2006/07/20/455825.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值