LoginSignup
2
2

More than 5 years have passed since last update.

おらがProgressionのindex.as

Posted at

俺らがよくこしらえるindex.asのスケルトンを晒してみるだよ。
Progressionだよ。
IndexSceneからいきなりPRMLで読み込めて嬉しいよ。

index.as
package {
    import flash.events.Event;
    import flash.net.URLRequest;

    import jp.progression.casts.CastDocument;
    import jp.progression.config.WebConfig;
    import jp.progression.debug.Debugger;
    import jp.progression.loader.PRMLLoader;

    import scenes.IndexScene;

    [SWF(backgroundColor="#FFFFFF", width="800", height="600", frameRate="30")]
    public class Index extends CastDocument {
        IndexScene;
        public function Index() {
            super(null, null, new WebConfig());
        }

        protected override function atReady():void
        {
            var loader:PRMLLoader = new PRMLLoader(stage);
            loader.addEventListener(Event.COMPLETE, function(e:Event):void{
                loader.removeEventListener(Event.COMPLETE, arguments.callee);
                Debugger.addTarget(manager);
                manager.sync = true;
                manager.goto(manager.syncedSceneId);
            });
            loader.load(new URLRequest("scenes.xml"));
        }

    }
}
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2