home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / the_beard.swf / scripts / frame_2 / DoAction.as
Encoding:
Text File  |  2008-09-23  |  920 b   |  48 lines

  1. function goAhead()
  2. {
  3.    if(this.rdy)
  4.    {
  5.       stopAllSounds();
  6.       coming._visible = true;
  7.       bgmusic.start(0,999);
  8.       coming.gotoAndPlay(1);
  9.       coming.onPress = function()
  10.       {
  11.          this.gotoAndPlay(100);
  12.          delete this.onPress;
  13.       };
  14.       delete this.onEnterFrame;
  15.       this.onEnterFrame = function()
  16.       {
  17.          if(!Key.isDown(65))
  18.          {
  19.             aup = true;
  20.          }
  21.          if(Key.isDown(65) && aup)
  22.          {
  23.             coming.gotoAndPlay(100);
  24.             delete this.onEnterFrame;
  25.          }
  26.       };
  27.    }
  28. }
  29. bgmusic = new Sound(this);
  30. bgmusic.attachSound("bgmusic");
  31. delete this.onEnterFrame;
  32. stop();
  33. coming._visible = false;
  34. coming.stop();
  35. aup = false;
  36. this.onEnterFrame = function()
  37. {
  38.    if(!Key.isDown(65))
  39.    {
  40.       aup = true;
  41.    }
  42.    if(Key.isDown(65) && aup)
  43.    {
  44.       goAhead();
  45.       aup = false;
  46.    }
  47. };
  48.