当前位置: 首页 > 图文教程 > Flash动画 > Flash动画制作 > FLASH右键菜单的应用

Flash动画制作
Flash 3d效果精彩实例(5)
贺新年 制作五彩缤纷焰火动画
FlashMX2004中的XML应用之原理篇
制作一个骄艳的鲜花情人Flash贺卡
有趣 用Flash制作互动的小人
Flash制作鸡年新春动画贺卡
Flash MX 2004 UI组件系列教程(3)
Flash加载外部文件(5)
Flash MX 2004 UI组件系列教程(4)
Flash加载外部文件(2)
Flash加载外部文件(3)
一个最简便的代码实现任意数字和0的来回跳转
让Flash课件中测试题信手拈来
MX中如何实现swf文件的完美跳转
三分钟理解Flash中的级别关系
flash与ASP通信的几种方法
flashMX2004视频插件的应用教程
如何做好一个多人配合的flash项目
AS计算方面的错误
如何防止SWF文件被反编译

Flash动画制作 中的 FLASH右键菜单的应用


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-22   浏览: 48 ::
收藏到网摘: n/a

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

核心代码如下:

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;