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

Command Error

Prog4のコマンドのエラーのテストコード
Get Adobe Flash player
by yd_niku 15 Sep 2010
    Embed
/**
 * 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/gJtt
 */

package {
    import flash.text.TextField;
    import flash.display.Sprite;
    import jp.progression.commands.*;
    import jp.progression.commands.lists.*;
    import jp.progression.commands.display.*;
    import jp.progression.commands.tweens.*;
    import jp.progression.commands.net.*;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            var debug:TextField = addChild( new TextField() ) as TextField;
            debug.width = debug.height = 465;
            debug.text = 'TESTing...\n';
            
            var test:Sprite;
            
            new SerialList(
                // initObject
                {
                    catchError:function(com:Command,err:Error):void{
                        if( com is AddChild ) {
                            debug.appendText('error Addchild\n');
                            com.executeComplete();
                        }
                        else{
                            debug.appendText('error Others:'+err.message+'\n');
                            throw err;
                        }
                    },
                    onInterrupt:function():void{
                        debug.appendText('interrupted\n');
                    },
                    onComplete:function():void{
                        debug.appendText('completed\n');
                    }
                },
                new AddChild( this, test),
                new DoTweener( test, { x:1, time:1 } )
            ).execute();
            
        }
    }
}