Skip to content

Instantly share code, notes, and snippets.

@martinwells
Created March 7, 2014 20:41
Show Gist options
  • Save martinwells/9419622 to your computer and use it in GitHub Desktop.
Save martinwells/9419622 to your computer and use it in GitHub Desktop.
Launch image for android
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