tweenerいっぱい
重いかも、とりあえず いっぱい使ってみた。
tweenerのトランジションは何秒かおきに変更
/**
* Copyright teageek ( http://wonderfl.net/user/teageek )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/KIfr
*/
// forked from teageek's tweenerの練習
//重いかも、とりあえず いっぱい使ってみた。
//tweenerのトランジションは何秒かおきに変更
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import caurina.transitions.Tweener;
import caurina.transitions.properties.*;
[SWF(width="464", height="464",backgroundColor="#ffffff",frameRate="45")]
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" ];
private var date:Date= new Date();
private var ball:Sprite;
public function delme():void{
caurina.transitions.properties.FilterShortcuts.init();
mc=this;
this.addEventListener(Event.ENTER_FRAME,makeme);
}
private function makeme(e:Event=null):void{
var num:int= int((Number(new Date)-Number(date))*0.00005);
if(c>45) c=0;
if(num>=tn.length) date= new Date();
for(var i:int=0;i<10;i++){
ball = new Sprite();
ball.graphics.beginFill(0xffffff*Math.random());
ball.graphics.drawCircle(0,0,10);
ball.graphics.endFill();
ball.x = -100*(i+1);
ball.y = c*10;
mc.addChild(ball);
/*tf = new TextField();tf.width=200; tf.text=c+" "+num+" "+tn[num]
tf.y = c*10;tf.x = -100*(i+1);//mc.addChild(tf);*/
Tweener.addTween(ball,{x:480,width:5,height:5,time:3,delay:0.5,transition:tn[num]});
Tweener.addTween(ball,{delay:4,onComplete:function():void{mc.removeChild(this);}}); }
c++;
}
}
}