Created
March 7, 2014 20:41
-
-
Save martinwells/9419622 to your computer and use it in GitHub Desktop.
Launch image for android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main extends Sprite | |
{ | |
private var doneFrame:Bool; | |
public function new() | |
{ | |
super(); | |
doneFrame = false; | |
graphics.beginFill(0xff5555); | |
graphics.drawRect(100,100,100,100); | |
graphics.endFill(); | |
// wait till we've displayed a frame (loading screen) before starting for reals | |
addEventListener(Event.ENTER_FRAME, start); | |
} | |
private function start(e:Event) | |
{ | |
if (!doneFrame) | |
{ | |
doneFrame = true; | |
return; | |
} | |
removeEventListener(Event.ENTER_FRAME, start); | |
// ... start your game | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment