initial commit, kind of working.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
package com.arc.dh.state
|
||||
{
|
||||
import flash.display.Loader;
|
||||
import flash.events.Event;
|
||||
import flash.media.SoundMixer;
|
||||
import flash.system.ApplicationDomain;
|
||||
import flash.system.LoaderContext;
|
||||
import org.flixel.FlxG;
|
||||
import org.flixel.FlxState;
|
||||
|
||||
public class MaxGames extends FlxState
|
||||
{
|
||||
|
||||
private static var AG:Class = MaxGames_AG;
|
||||
|
||||
private var len:Number = 180;
|
||||
|
||||
private var zoomFactor:int = 1;
|
||||
|
||||
private var movie:Loader;
|
||||
|
||||
public function MaxGames()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
override public function create() : void
|
||||
{
|
||||
this.movie = new Loader();
|
||||
var _loc1_:LoaderContext = new LoaderContext(false,ApplicationDomain.currentDomain);
|
||||
this.movie.loadBytes(new AG(),_loc1_);
|
||||
this.movie.contentLoaderInfo.addEventListener(Event.COMPLETE,this.contentsRetrieve);
|
||||
}
|
||||
|
||||
private function contentsRetrieve(param1:Event) : void
|
||||
{
|
||||
this.movie.scaleX = 1 / this.zoomFactor;
|
||||
this.movie.scaleY = 1 / this.zoomFactor;
|
||||
this.movie.x = 90;
|
||||
this.movie.y = 40;
|
||||
FlxG.stage.addChildAt(this.movie,0);
|
||||
this.movie.addEventListener(Event.EXIT_FRAME,this.next);
|
||||
}
|
||||
|
||||
private function next(param1:Event) : void
|
||||
{
|
||||
--this.len;
|
||||
if(this.len <= 0)
|
||||
{
|
||||
this.movie.removeEventListener(Event.EXIT_FRAME,this.next);
|
||||
this.movie.unloadAndStop(true);
|
||||
FlxG.stage.removeChildAt(0);
|
||||
SoundMixer.stopAll();
|
||||
FlxG.switchState(new MainMenu());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user