3 Replies Latest reply on May 19, 2006 6:01 AM by gorco

    Mute Sound

    gorco
      Hi,
      I purchased a flash intro template and it did not include a Sound Off button. Most of the programming consists of movies but there is a time line with sound. Couldn't find the answer in my Flash MX book. Would I put the sound off action script at the start of the layer with the sound? What if I then want to display Sound ON, if the sound is turned off? Assistance is appreciated.
      Gordco
        • 1. Re: Mute Sound
          Jim_Esteban
          Not familiar with flash intro template but I'll take a stab at what I think your trying to do. My guess is that you have two buttons one's instance is called soundOff_btn and the others instance is name soundOn_btn. Then I'm guessing you have a Off Sound in you library and an On Sound in your library. I put all my scripts on the same layer ("actions"). So here's a program that might work if I don't make any typing errors.
          var mysound:Sound = new Sound();

          soundOff_btn.onRelease=function()
          {
          mysound.attachsound("Off");
          mysound.setVolume(50);
          mysound.start();
          }
          soundOn_btn.onRelease=function()
          {
          mysound.attachsound("On");
          mysound.setVolume(50);
          mysound.start();
          }
          • 2. Re: Mute Sound
            NSurveyor Level 2
            The easiest way is to use the Sound class with a sound object to control the volume of the entire movie. Turning the volume to 100 turns all the sound on, and likewise, 0 to turn all the sound off:

            A little advertising for David Stiller's great blog....

            http://www.quip.net/blog/2006/flash/how-to-toggle-sound-globally
            • 3. Re: Mute Sound
              gorco Level 1
              Thx