1202/090
Flash -Rotation Menu 一款旋转菜单效果
Demo:
Core Codes:
import gs.TweenLite;
import gs.easing.Back;
//总菜单数
var numItemTotal:Number = 5;
//当前选中菜单,预设值为1,也就是第2个菜单
var numItenNow:Number = 1;
//存放菜单位置的数组
var aryItemDis:Array = new Array(55, 0, -56, -96, -152);
init();
function init()
{
//block的初始位置是第2帧
mc_block.gotoAndStop(2);
for (var i:Number = 0; i < numItemTotal; i++)
{
//每个菜单项的点击事件
mc_menuItem["btn" + i].onRelease = function()
{
//trace(this._name);
var numItemClk:Number = this._name.substr(3, 1);
//this._parent._rotation = aryItemDis[numItemClk];
//旋转选中的菜单到数组对应索引的位置
TweenLite.to(this._parent, 0.3, {_rotation:aryItemDis[numItemClk] + 360, ease:Back.easeInOut});
mc_block.gotoAndStop(int(numItemClk) + 1);
TweenLite.from(mc_block, 0.8, {_alpha:0, ease:Back.easeOut});
//设置选中菜单为当前选中项
numItenNow = aryItemDis[numItemClk];
};
}
}
菜单项的选中,onRollOver,onRollOut效果等都木有做,就这样丢着吧,哈哈。
Some Related Posts
- 2009/07/16 -- AS2-System.capabilities (0)
- 2009/06/24 -- Flash-Adobe’s Flash to ship on new Android phone (0)
- 2009/06/18 -- Flash-Transparent时在FF和Safari下无法输入中文的解决方案 (0)
- 2009/05/28 -- AAS3WDP-Chapter 8 Composite 组合模式(下) (0)
- 2009/05/27 -- AAS3WDP-Chapter 8 Composite 组合模式(上) (0)
- 2009/05/22 -- About Flash (1)
- 2009/05/19 -- AAS3WDP-Chapter 7 Iterator 迭代模式 (0)
- 2009/05/15 -- AAS3WDP-Chapter 6 Remote Proxy 远程代理 (0)
- 2009/05/14 -- AAS3WDP-Chapter 6 Virtual Proxy 虚拟代理模式 (0)
- 2009/05/13 -- AAS3WDP-Chapter 5 Factory 工厂模式 (0)
Tag: AS2, Flash, Menu, Rotation
Leave a comment
听说你要找我?
- QQ:104357575
- Gmail:k5angle9527@gmail.com
Categories
- AIR+FB+AS3 (168)
- Android (26)
- Demo (78)
- fDEV (3)
- Flash AS2 (66)
- Game (22)
- iPhone (1)
- jQuery (14)
- Others (95)
- PHP (43)
- Wordpress (60)
Recent Comments
- DFdou says under Flash-一个另类的反破解方法:leilei ,原来素这样子啊
- Anonymous says under Flex-AMFPHP数据交互:wuwu
- Anonymous says under AS3-用addEventListener()方法的useCapture参数控制事件流:jrjr
- Microspaze! says under jQuery Plugins-ListNav 列表导航插件:meinv 哈哈,找到一个也用相同主题的兄弟!
- RainVision says under AS3-类似于机战的角色移动(基于Tile):leilei 源文件我也想要.. bzjn@sohu.com
- Anonymous says under AS3-Effect explode 图片爆炸效果:zhuang
- sam319 says under 《程序员》精彩推荐:Android程序创意过滤与失败经验谈很宝贵的经验,谢谢分享:)
- lea says under Flex/AS3/Air参考书籍及小工具:loveu
- Lightoy says under FP10-FileReference.save()@DFdou, 还要外挂一个 jpg_encoder_download.php,恩 FileRefe...
- kitouaya says under WordPress Plugins-External Links我来试下显示对方博客内容的功能。
Blogroll
Archive
- July 2010 (3)
- June 2010 (3)
- May 2010 (4)
- April 2010 (4)
- March 2010 (8)
- February 2010 (13)
- January 2010 (9)
- December 2009 (19)
- November 2009 (23)
- October 2009 (17)
- September 2009 (22)
- August 2009 (13)
- July 2009 (20)
- June 2009 (18)
- May 2009 (18)
- April 2009 (29)
- March 2009 (31)
- February 2009 (46)
- January 2009 (37)
- December 2008 (16)
- November 2008 (12)
- October 2008 (21)
- September 2008 (10)
- August 2008 (12)
- July 2008 (14)
- June 2008 (8)
- May 2008 (11)