home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / beaverblast.swf / scripts / DefineSprite_100 / frame_1 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  478 b   |  31 lines

  1. music = new Sound();
  2. music.attachSound("backsound");
  3. music.start(0,999999);
  4. music.setVolume(0);
  5. vol = 0;
  6. step = 3;
  7. fade = setInterval(fadeIn,100);
  8. Fade = 0;
  9. this.onEnterFrame = function()
  10. {
  11.    if(Fade == 1)
  12.    {
  13.       vol -= step;
  14.       if(vol < 0)
  15.       {
  16.          vol = 0;
  17.       }
  18.       music.setVolume(vol);
  19.    }
  20.    else
  21.    {
  22.       vol += step;
  23.       if(vol > 100)
  24.       {
  25.          vol = 100;
  26.       }
  27.       music.setVolume(vol);
  28.    }
  29. };
  30. stop();
  31.