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

forked from: tweensy demo

Get Adobe Flash player
by furutsan 22 Dec 2010
    Embed
package{
    import flash.events.TimerEvent;
    import flash.display.Sprite;
    import flash.utils.*;
    import com.flashdynamix.motion.Tweensy;

    public class Ao extends Sprite{
        public function Ao(){
            var ttt:Timer = new Timer(10,10000);
            ttt.addEventListener(TimerEvent.TIMER, click);
            ttt.start();
        }

        private function click(e:TimerEvent):void {
            // 円を作成
            var s:Sprite = new Sprite();
            s.graphics.beginFill(Math.random() * 0x00FFFF);
            s.graphics.drawCircle(0, 0, 10);
            s.graphics.endFill();
            addChild(s);

            // 円をクリックされた位置に移動
            s.x = Math.random()*450;
            s.y = Math.random()*450;
            s.scaleX = s.scaleY = 0;
            
            var i:int = Math.random()*5
            // 変形に要する時間
            Tweensy.to(s, {scaleX:i,scaleY:i,alpha:0.3}, 1 );
        }
    }
}