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

Flash动画制作
关于FLASH中音乐的部分设置
Flash 8 新特性之线条属性的改变
FLASH中响应键盘事件的四种方法
Flash 8中文版视频教程 滤镜-投影
Flash 8中文版视频教程 滤镜-模糊
Flash 8中文版视频教程 滤镜-发光
Flash 三招两式“瘦”下来
Flash 中雪花效果的三种制作方法
课件制作 初中历史课件《秦王扫六合》实例
急速闪电:强大的Flash播放利器
自己动手制作手机Flash主题动画
flash 打开我的文档等特殊文件夹
Flash教程:教你实现水波效果的一个实例
音效的处理
教你做一个Flash的时钟
经典的动画理念:迪士尼名句摘选
用Flash软件制作遥控小汽车
flash制作过程中避免占用CPU资源过度的几种方法
Action Script初级用户基础教程—第一讲
用AS2解决中文ID3的乱码

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-22   浏览: 79 ::
收藏到网摘: 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;