home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / grannyinparadise.swf / scripts / frame_57 / DoAction.as
Encoding:
Text File  |  2007-03-12  |  957 b   |  36 lines

  1. stop();
  2. trace("Granny Died");
  3. _root.Localizer.Localize("_root.GrannyDieMC.ui.ContinueButton.ButtonText","continue");
  4. _root.Localizer.Localize("_root.GrannyDieMC.ui.ContinueButton.ButtonTextShadow","continue");
  5. _root.Localizer.Localize("_root.GrannyDieMC.ui.GrannyFellText","grannyfell");
  6. _root.Localizer.Localize("_root.GrannyDieMC.ui.DieMessageText",_global.DieReason);
  7. var spaceListener = new Object();
  8. spaceListener.onKeyDown = function()
  9. {
  10.    if(Key.isDown(32))
  11.    {
  12.       Key.removeListener(spaceListener);
  13.       if(_global.IsGameOver == true)
  14.       {
  15.          _root.EndGame();
  16.       }
  17.       else
  18.       {
  19.          _root.PlayCurrentLevel();
  20.       }
  21.    }
  22. };
  23. Key.addListener(spaceListener);
  24. _root.GrannyDieMC.ui.ContinueButton.onGrannyButtonPress = function()
  25. {
  26.    Key.removeListener(spaceListener);
  27.    if(_global.IsGameOver == true)
  28.    {
  29.       _root.EndGame();
  30.    }
  31.    else
  32.    {
  33.       _root.PlayCurrentLevel();
  34.    }
  35. };
  36.