home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / flameout.swf / scripts / __Packages / HelpPanel.as < prev    next >
Encoding:
Text File  |  2006-06-13  |  1.3 KB  |  51 lines

  1. class HelpPanel extends LRG.LRGMovieClip
  2. {
  3.    var m_kBackground;
  4.    var m_kOkButton;
  5.    var onKeyUp;
  6.    var onRelease;
  7.    function HelpPanel()
  8.    {
  9.       super();
  10.    }
  11.    function init()
  12.    {
  13.       super.init();
  14.    }
  15.    function onShow()
  16.    {
  17.       _global.getApplicationState().setPaused(true);
  18.       this.m_kBackground.onPress = function()
  19.       {
  20.       };
  21.       this.m_kBackground.onRelease = function()
  22.       {
  23.       };
  24.       this.m_kBackground.useHandCursor = false;
  25.       this.m_kOkButton.onRelease = function()
  26.       {
  27.          _global.playSound("fma_button.wav",1,_global.g_kApplication);
  28.          this.onKeyUp = undefined;
  29.          Key.removeListener(this);
  30.          _global.g_kApplication.m_kGui.m_kHelpPanel.gotoAndStop("Hide");
  31.          _global.g_kApplication.m_kGui.m_kHelpPanel._visible = false;
  32.          if(_global.getApplicationState().isCurrentState(_global.getApplicationState().AS_PRE_GAME))
  33.          {
  34.             _global.g_kApplication.m_kGameScreen.startGame();
  35.          }
  36.          else
  37.          {
  38.             _global.g_kApplication.m_kGameScreen.startGame();
  39.          }
  40.       };
  41.       Key.addListener(this.m_kOkButton);
  42.       this.m_kOkButton.onKeyUp = function()
  43.       {
  44.          if(Key.getCode() == 13)
  45.          {
  46.             this.onRelease();
  47.          }
  48.       };
  49.    }
  50. }
  51.