« enterFrame イベントの管理 | メイン | Functionの呼び出し元(caller)のスコープを調べる »

2007年8月26日

[as3] スクリプトでのイージングアニメーション

Motion クラスと Ease クラス
  サンプル
  サンプルソース
  ドキュメント
使用例:
import com.seyself.controls.Motion;
import com.seyself.controls.Ease;
import flash.display.Sprite;

var motion:Motion = new Motion();
var easing:Array = Ease.cubic( "out" , 30 );

for(var i=0;i<10;i++){
  creater(i);
}

function creater( i )
{
  var sprite:Sprite = new Sprite();
  sprite.graphics.beginFill( 0x666666 , 1 );
  sprite.graphics.drawRect( 0, 0, 20 , 20 );
  sprite.y = i*30+5;
  sprite.x = 10;
  motion.start( sprite , { x:550 } , easing , i*3 );
  this.addChild( sprite );
}

投稿者 michi : 2007年8月26日 22:01

« enterFrame イベントの管理 | メイン | Functionの呼び出し元(caller)のスコープを調べる »

トラックバック

このエントリーのトラックバックURL:
http://system.seyself.com/mt-tb.cgi/103

コメント

コメントしてください




保存しますか?