tweenerの練習 teageek forked:4favorite:3lines:28license : MIT License modified : 2009-07-22 11:59:34 Embed Tweet package { import flash.events.*; import flash.display.*; import flash.text.*; import caurina.transitions.Tweener; [SWF(width="464", height="464",backgroundColor="#ffffff",frameRate="30")] public class delme extends MovieClip{ private var mc:MovieClip; private var tf:TextField; private var c:Number=new Number(); private var tn:Array = [ "linear", "easeinquad", "easeoutquad", "easeinoutquad", "easeoutinquad", "easeincubic", "easeoutcubic", "easeinoutcubic", "easeoutincubic", "easeinquart", "easeoutquart", "easeinoutquart", "easeoutinquart", "easeinquint", "easeoutquint", "easeinoutquint", "easeoutinquint", "easeinsine", "easeoutsine", "easeinoutsine", "easeoutinsine", "easeincirc", "easeoutcirc", "easeinoutcirc", "easeoutincirc", "easeinexpo", "easeoutexpo", "easeinoutexpo", "easeoutinexpo", "easeinelastic", "easeoutelastic", "easeinoutelastic", "easeoutinelastic", "easeinback", "easeoutback", "easeinoutback", "easeoutinback", "easeinbounce", "easeoutbounce", "easeinoutbounce", "easeoutinbounce" ]; public function delme():void{ mc=this; this.addEventListener(Event.ENTER_FRAME,makeme); } private function makeme(e:Event=null):void{ if(c>=tn.length) c=0; tf = new TextField(); tf.width=200; tf.text=c+" "+tn[c] tf.y = c*10; mc.addChild(tf); Tweener.addTween(tf,{x:380,time:3,delay:0.5,transition:tn[c]}); Tweener.addTween(tf,{delay:4,onComplete:function():void{mc.removeChild(this);}}); c++; } } } Code Fullscreen Preview Fullscreen kidaipu hacker_yblow.. : tweener tenchiwang2 : funtweener fun tweener Tweener.addTween MovieClip removeChild addEventListener width time TextField text addChild length Event.ENTER_FRAME Event Array Number sort new page view favorite forked pv154 forked from: tweenerの練習 c80609a forked:1 favorite:1lines:28 (diff:1) pv577 tweenerいっぱい teageek forked:0 favorite:3lines:37 (diff:28) tag: Learn 超炫的線條效果 pv0 forked from: tweenerの練習 hacker_7zqj22gq forked:0 favorite:0lines:28 (diff:2) pv143 forked from: tweenerの練習 popcorn77 forked:0 favorite:0lines:28 (diff:1)