home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Puzzle / Easter_Eggs.swf / scripts / __Packages / com / novelgames / flashgames / commonAS2 / MainDevelopment.as < prev    next >
Text File  |  2008-09-04  |  3KB  |  88 lines

  1. class com.novelgames.flashgames.commonAS2.MainDevelopment extends MovieClip
  2. {
  3.    function MainDevelopment()
  4.    {
  5.       super();
  6.    }
  7.    static function initialize(movieClip)
  8.    {
  9.       movieClip.__proto__ = com.novelgames.flashgames.commonAS2.MainDevelopment.prototype;
  10.       movieClip.onEnterFrame = movieClip.checkTitle;
  11.    }
  12.    function gotoTitlePage()
  13.    {
  14.       this.removePage();
  15.       this.title = com.novelgames.flashgames.commonAS2.Title(this.attachMovie("Title","title",this.titleDepth));
  16.    }
  17.    function gotoInstructionsPage()
  18.    {
  19.       this.removePage();
  20.       this.instructions = com.novelgames.flashgames.commonAS2.Instructions(this.attachMovie("Instructions","instructions",this.titleDepth));
  21.       this.instructions.initialize();
  22.    }
  23.    function gotoGamePage()
  24.    {
  25.       this.removePage();
  26.       this.game = this.attachMovie("Game","game",this.titleDepth);
  27.       this.musicGame = new com.novelgames.flashgames.commonAS2.NewSound(this,"musicGame");
  28.       this.musicGame.start(0,2147483647);
  29.    }
  30.    function showInstructionsFromGame()
  31.    {
  32.       this.game.pause();
  33.       this.game._visible = false;
  34.       this.instructions = com.novelgames.flashgames.commonAS2.Instructions(this.attachMovie("Instructions","instructions",this.getNextHighestDepth()));
  35.       this.instructions.swapDepths(this.titleDepth);
  36.       this.instructions.initialize(true);
  37.    }
  38.    function hideInstructionsFromGame()
  39.    {
  40.       this.instructions.swapDepths(this.game.getDepth());
  41.       this.instructions.removeMovieClip();
  42.       this.instructions = null;
  43.       this.game._visible = true;
  44.       this.game.unpause();
  45.    }
  46.    function showHighScores()
  47.    {
  48.       this.highScores.showHighScores();
  49.    }
  50.    function showEnterHighScore(score)
  51.    {
  52.       this.highScores.showEnterHighScore(score);
  53.    }
  54.    function checkTitle()
  55.    {
  56.       if(!this.title)
  57.       {
  58.          return undefined;
  59.       }
  60.       this.onEnterFrame = null;
  61.       this.titleDepth = this.title.getDepth();
  62.       this.stop();
  63.    }
  64.    function removePage()
  65.    {
  66.       if(this.title)
  67.       {
  68.          this.title.removeMovieClip();
  69.          this.title = null;
  70.       }
  71.       if(this.instructions)
  72.       {
  73.          this.instructions.removeMovieClip();
  74.          this.instructions = null;
  75.       }
  76.       if(this.game)
  77.       {
  78.          this.game.removeMovieClip();
  79.          this.game = null;
  80.       }
  81.       if(this.musicGame)
  82.       {
  83.          this.musicGame.stop();
  84.          this.musicGame = null;
  85.       }
  86.    }
  87. }
  88.