• 【设为首页】
  • 【收藏闪客居】
当前位置:主页>AS 应用>文章内容
  • FLASH右键菜单的应用
  • 来源:网络 作者:不详 2006-07-05 【

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

核心代码如下:

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;



上一篇:互动Flash动画:跟随鼠标移动拉伸的蜘蛛丝   下一篇:超真实火焰效果
  • 用户名:新注册) 密码: 匿名评论
  • 评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规)

Copyright © 2006-2008 flashas.net All Rights Reserved.
网站内容咨询: admin#flashas.net (#为@) 联系QQ:40777822 浙ICP备06033001号
(本网站最佳浏览解析度为1024*768, 建议使用IE 6.0或以上版本浏览器。)