home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / staticshock.swf / scripts / DefineSprite_968 / frame_5 / DoAction.as
Encoding:
Text File  |  2005-11-09  |  1.1 KB  |  47 lines

  1. _parent.titleMod.start(0,9999);
  2. _parent.titleMod.setVolume(0);
  3. _parent.titleMusicFlag = true;
  4. this.onEnterFrame = function()
  5. {
  6.    var _loc1_ = _parent;
  7.    if(_loc1_.titleMod.position == 0 or _loc1_.titleMod.position == _loc1_.titleMod.duration)
  8.    {
  9.       _loc1_.titleMod.start(0,9999);
  10.    }
  11.    var _loc2_ = _loc1_.titleMod.getVolume();
  12.    if(_loc2_ < _loc1_._parent.masterVolume)
  13.    {
  14.       _loc2_ += 2;
  15.       _loc1_.titleMod.setVolume(_loc2_);
  16.    }
  17.    else
  18.    {
  19.       _loc1_.titleMod.setVolume(100);
  20.       delete this.onEnterFrame;
  21.    }
  22. };
  23. playButton.onPress = function()
  24. {
  25.    var _loc1_ = _parent;
  26.    _loc1_.skipSFX.start();
  27.    this.onEnterFrame = function()
  28.    {
  29.       var _loc1_ = _parent;
  30.       var _loc2_ = _loc1_.titleMod.getVolume();
  31.       if(_loc2_ > 0)
  32.       {
  33.          _loc2_ -= 10;
  34.          _loc1_.titleMod.setVolume(_loc2_);
  35.       }
  36.       else
  37.       {
  38.          _loc1_.titleMusicFlag = false;
  39.          _loc1_.titleMod.setVolume(0);
  40.          _loc1_.titleMod.stop();
  41.          delete this.onEnterFrame;
  42.          _root.attract();
  43.       }
  44.    };
  45. };
  46. stop();
  47.