时间: 2021-07-31 作者:daque
看到旁人作了一个右键菜单.发觉不错.其它大师不妨多多运用他.以是作个小例子出来. 大师不妨运用于多媒介演练等场合.
中心代码如次:
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;