home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / staticshock.swf / scripts / DefineSprite_977 / frame_24 / DoAction.as
Encoding:
Text File  |  2005-11-09  |  1.2 KB  |  50 lines

  1. if(_parent.level != 9)
  2. {
  3.    if(_parent.bgNumber != 1)
  4.    {
  5.       if(_parent.levelsLoaded[_parent.bgNumber - 2] == true)
  6.       {
  7.          pressAnyKey = new Object();
  8.          pressAnyKey.onKeyDown = function()
  9.          {
  10.             gotoAndStop("getReadyDone");
  11.             play();
  12.          };
  13.          Key.addListener(pressAnyKey);
  14.       }
  15.       else
  16.       {
  17.          delete pressAnyKeyMC.onEnterFrame;
  18.          loadingText._visible = true;
  19.          loadingText.play();
  20.          loadingText.onEnterFrame = function()
  21.          {
  22.             if(_parent.levelsLoaded[_parent.bgNumber - 2] == true)
  23.             {
  24.                delete this.onEnterFrame;
  25.                this._visible = false;
  26.                pressAnyKeyMC._visible = true;
  27.                pressAnyKey = new Object();
  28.                pressAnyKey.onKeyDown = function()
  29.                {
  30.                   gotoAndStop("getReadyDone");
  31.                   play();
  32.                };
  33.                Key.addListener(pressAnyKey);
  34.             }
  35.          };
  36.       }
  37.    }
  38.    else
  39.    {
  40.       pressAnyKey = new Object();
  41.       pressAnyKey.onKeyDown = function()
  42.       {
  43.          gotoAndStop("getReadyDone");
  44.          play();
  45.       };
  46.       Key.addListener(pressAnyKey);
  47.    }
  48. }
  49. stop();
  50.