flash on 2009-7-11

by yd_niku
♥0 | Line 26 | Modified 2009-07-11 16:25:49 | MIT License
play

ActionScript3 source code

/**
 * Copyright yd_niku ( http://wonderfl.net/user/yd_niku )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/1ys7
 */

package {
    import flash.display.Sprite;
    import caurina.transitions.Tweener;
import jp.progression.commands.*;
    
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            
            var ball :Sprite = new Sprite();
            ball.graphics.beginFill( 0x66FF66 );
            ball.graphics.drawCircle( 0, 0, 20 );
            ball.graphics.endFill();
            addChild(ball);
            //
            
            ball.x = 0;
            ball.y = 0;
            
            //Tweener.addTween( ball, { alpha: 0, x: 100, y: 200, time: 3 } );

            //Tweener.addTween( ball, { alpha: 0, x: 100, y: 200, time: 3 } );
            var tweeen1	:DoTweener = new DoTweener( ball, { alpha: 0, x: 100, y: 200, time: 3 } );
            var tweeen2	:DoTweener = new DoTweener( ball, { alpha: 1, x: 400, y: 300, time: 1 } );
            var tweeen3	:DoTweener = new DoTweener( ball, { alpha: 0.5, rotation:180, time: 2 } );
            var tweeen4	:DoTweener = new DoTweener( ball, { alpha: 1, x: 100, y: 200, time: 3 } );

            var com = new SerialList();
            com.addCommand( tweeen1 );
            com.addCommand( tweeen2);
            com.addCommand( tweeen3);
            com.addCommand( tweeen4);
            // [ tweeen1, tweeen2, tweeen3, tweeen4 ]
            com.execute();


        }
    }
}