当前页面位置: » 丰搜网 » 文档中心 » 详细内容
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; |
|