查看: 1170|回复: 0

FLASH右键菜单的应用

[复制链接]
发表于 2009-5-15 02:05:21 | 显示全部楼层 |阅读模式
看到别人作了一个右键菜单.感觉不错.其它大家可以多多应用他.所以作个小例子出来. 大家可以应用于多媒体演示等地方.<br /><br />核心代码如下:<br /><br />var empiremue = new ContextMenu();<br />//删除原始菜单状态!<br />empiremue.hideBuiltInItems();<br />//自定义菜单项目!<br />empiremue.customItems.push(new ContextMenuItem(&quot;返回首界面&quot;, home));<br />empiremue.customItems.push(new ContextMenuItem(&quot;返回到一副&quot;, h1));<br />empiremue.customItems.push(new ContextMenuItem(&quot;返回到二副&quot;, h2));<br />empiremue.customItems.push(new ContextMenuItem(&quot;返回到三副&quot;, h3));<br />empiremue.customItems.push(new ContextMenuItem(&quot;返回到四副&quot;, h4));<br />empiremue.customItems.push(new ContextMenuItem(&quot;返回到五副&quot;, h5));<br />empiremue.customItems.push(new ContextMenuItem(&quot;返回到六副&quot;, h6));<br />empiremue.customItems.push(new ContextMenuItem(&quot;去[闪客帝国]学习&quot;, gotoempire));<br />//菜单子程序执行目标...<br />function home() {<br />  _root.gotoAndStop(1);<br />}<br />function h1() {<br />  _root.gotoAndStop(2);<br />}<br />function h2() {<br />  _root.gotoAndStop(3);<br />}<br />function h3() {<br />  _root.gotoAndStop(4);<br />}<br />function h4() {<br />  _root.gotoAndStop(5);<br />}<br />function h5() {<br />  _root.gotoAndStop(6);<br />}<br />function h6() {<br />  _root.gotoAndStop(7);<br />}<br />function gotoempire() {<br />  getURL(&quot;http://www.flashempire.com/school/&quot;, &quot;_blank&quot;);<br />}<br />_root.menu = empiremue;<br /><br /><br /><blockquote class="blockquote">From: http://www.photoep.cn/read.php?tid=121  Powered by PHPWind.com</blockquote>
回复

使用道具 举报

本版积分规则

关注公众号

相关侵权、举报、投诉及建议等,请发 E-mail:admin@discuz.vip

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖
关注公众号
QQ客服返回顶部