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

tweensy demo

tweensy version of this
http://gihyo.jp/dev/feature/01/flash-sdk/0006
Get Adobe Flash player
by Ver5.1.0 27 Aug 2010
    Embed
/**
 * Copyright Ver5.1.0 ( http://wonderfl.net/user/Ver5.1.0 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/oi5X
 */

// tweensy version of this
// http://gihyo.jp/dev/feature/01/flash-sdk/0006
package{
  import flash.display.Sprite;
  import flash.events.MouseEvent;
  import com.flashdynamix.motion.Tweensy;

  public class Anime2 extends Sprite{
    public function Anime2():void{
      // クリックイベントを監視する
      stage.addEventListener("click", clickHandler);
    }
    private function clickHandler(event:MouseEvent):void {
        var i:int;
//        for ( i=0; i < 5; i++){
          // 円を作成
          var s:Sprite = new Sprite();
          addChild(s);
          s.graphics.beginFill(Math.random() * 0x2000000);
          s.graphics.drawCircle(0, 0, 10);
          s.graphics.endFill();
          

          // 円をクリックされた位置に移動
          s.x = event.stageX;
          s.y = event.stageY;
          s.scaleX = s.scaleY = 0;

          Tweensy.to(s, {
            scaleX: 5,  // s の scaleX を 5 まで遷移
            scaleY: 5   // s の scaleY を 5 まで遷移
          }, 1 ); // 第3引数がduration
 //       }
    }
  }
}