FLASH右键菜单的应用

王朝other·作者佚名  2006-11-24
窄屏简体版  字體: |||超大  

演示效果:

看到别人作了一个右键菜单.感觉不错.其它大家可以多多应用他.所以作个小例子出来. 大家可以应用于多媒体演示等地方.

核心代码如下:

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.webjx.com/", "_blank");

}

_root.menu = empiremue;

源文件下载

来源:闪客帝国

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航