ErrorTest

by yd_niku
♥0 | Line 34 | Modified 2009-05-14 14:36:14 | 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/yw7c
 */

package {
    import flash.display.*;
    import jp.progression.core.commands.*;
    import jp.progression.commands.*;
    
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var ball:Sprite = new Ball();
            
            new SerialList( null,
                new Prop( ball, { x:250, y: 250, alpha:0 } ),
                new AddChild( this, ball ),
                new SerialList( null,
                    new DoTweener( ball, { alpha:1.0, time:3 } ),
                    new DoTweener( ball, { x:400, y: 350, time:3 } ),
                    new Func( function():void {
                        throw new Error("FAILD!!!!!");
                    })
                ).error( function(e:Error):void {
                        trace(e);
                        //this.executeComplete();
                }),
                new DoTweener( ball, { x:100, y: 200, time:3 } ),
                new DoTweener( ball, { alpha:0.0, time:3 } ),
                new RemoveChild( this, ball )
            ).execute();
        }
    }
}
import flash.display.*;

internal class Ball extends Sprite{
    public function Ball(){
        graphics.beginFill(0x99CC66);
        graphics.drawCircle( 0, 0, 10 );
        graphics.endFill();
    }
}

Forked