Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import us.benic.matt.App;
- /**
- * Menu for the Flash Workflow demonstration.
- * @author Matt Benic
- */
- class us.benic.matt.Menu extends MovieClip
- {
- /**
- * Play button.
- */
- var playBtn:MovieClip;
- /**
- * Quit button.
- */
- var quitBtn:MovieClip;
- /**
- * The Menu instance.
- */
- private static var instance:Menu;
- /**
- * Singleton accessor.
- */
- public static function getInstance():Menu
- {
- return instance;
- }
- /**
- * Creates a new Menu and sets the singleton pointer.
- */
- public function Menu()
- {
- instance = this;
- }
- /**
- * Handles an onRelease event.
- * @param source The MovieClip that triggered the onRelease event.
- */
- public function onButtonReleaseHandler(source:MovieClip):Void
- {
- switch(source) {
- case playBtn:
- App.getInstance().playGame();
- break;
- case quitBtn:
- fscommand ("quit");
- break;
- }
- }
- }
Add Comment
Please, Sign In to add comment