Skip to content

Instantly share code, notes, and snippets.

@adnissen
Created May 31, 2013 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adnissen/5685739 to your computer and use it in GitHub Desktop.
Save adnissen/5685739 to your computer and use it in GitHub Desktop.
package
{
import flash.display.MovieClip;
import org.flixel.*;
/**
* ...
* @author Andrew Nissen
*/
public class AddictingGamesState extends FlxState
{
[Embed(source = "AG_splash_bike_v8.swf")] private var sniper:Class;
public function AddictingGamesState()
{
var symbol:MovieClip = new sniper();
FlxG.stage.addChild(symbol);
symbol.width = 480;
symbol.height = 480;
symbol.soundTransform.volume = .5;
symbol.play();
}
private var counter:int;
override public function update():void
{
counter++;
if (counter >= 200)
{
FlxG.switchState(new MenuState());
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment