In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

tweenerの練習

Get Adobe Flash player
by teageek 22 Jul 2009
/**
 * Copyright teageek ( http://wonderfl.net/user/teageek )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/hPr7
 */

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++;
		}
	}
}