home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Esportes / abyss01.swf / scripts / frame_2 / DoAction.as
Encoding:
Text File  |  2008-03-12  |  1.2 KB  |  42 lines

  1. function soundOn()
  2. {
  3.    _root.openingSound = new Sound();
  4.    _root.gameOverSound = new Sound();
  5.    _root.gameClearSound = new Sound();
  6.    _root.backSound = new Sound();
  7.    _root.buttonSound = new Sound();
  8.    _root.knockSound = new Sound();
  9.    _root.fishSound = new Sound();
  10.    _root.jumpSound = new Sound();
  11.    _root.openingSound.attachSound("openingSoundM");
  12.    _root.gameOverSound.attachSound("gameOverSoundM");
  13.    _root.gameClearSound.attachSound("gameClearSoundM");
  14.    _root.backSound.attachSound("backSoundM");
  15.    _root.buttonSound.attachSound("buttonSoundM");
  16.    _root.knockSound.attachSound("knockSoundM");
  17.    _root.fishSound.attachSound("fishSoundM");
  18.    _root.jumpSound.attachSound("jumpSoundM");
  19. }
  20. function soundOff()
  21. {
  22.    _root.backSound.stop();
  23.    delete _root.openingSound;
  24.    delete _root.gameOverSound;
  25.    delete _root.gameClearSound;
  26.    delete _root.backSound;
  27.    delete _root.buttonSound;
  28.    delete _root.knockSound;
  29.    delete _root.fishSound;
  30.    delete _root.jumpSound;
  31. }
  32. stop();
  33. _root.screen_mc.swapDepths(1000001);
  34. if(gameFirstValue)
  35. {
  36.    soundOn();
  37.    _root.backSound.start(0,999);
  38.    _root.backSound.setVolume(50);
  39.    _root.gameFirstValue = false;
  40. }
  41. soundOnOff = "";
  42.