本文主要是介绍TweenLite的优点,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
网上关于TweenLite的优点和中文说明及使用教程一堆,但是没几个可跑的例子,请查看以下代码产生的简单的效果,其中TweenLite的包请到http://www.TweenLite.com 下载
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:local="gs.*"
>
<mx:Script>
<![CDATA[
import gs.TweenMax;
import gs.TweenLite;
import mx.events.SliderEvent;
import mx.controls.Alert;
//记录当前放大的ImageBox
private var currentZoonInBox:ImageBox;
private function resize(value:int):void {
switch(value)
{
case 1:
TweenLite.to(btn1, 1, { width:150, height:100 } );
TweenLite.to(btn2, 1, { width:80, height:50 } );
TweenLite.to(btn3, 1, { width:80, height:50 });
break;
case 2:
TweenLite.to(btn2, 1, { width:150, height:100 } );
TweenLite.to(btn1, 1, { width:80, height:50 } );
TweenLite.to(btn3, 1, { width:80,height:50});
break;
case 3:
TweenLite.to(btn3, 1, { width:150, height:100 } );
TweenLite.to(btn2, 1, { width:80, height:50 } );
TweenLite.to(btn1, 1, { width:80,height:50});
break;
}
}
]]>
</mx:Script>
<mx:Button id="btn1" width="80" height="50" label="AAAA" mouseOver="resize(1)" />
<mx:Button id="btn2" width="80" height="50" label="BBBB" mouseOver="resize(2)"/>
<mx:Button id="btn3" width="80" height="50" label="CCCC" mouseOver="resize(3)"/>
</mx:Application>
//出处:http://www.favzone.com/article.asp?id=86
这篇关于TweenLite的优点的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!