5 Replies Latest reply on Jul 7, 2006 5:24 PM by kglad

    Some volume control help please.

    Henry_Flash
      Hi,

      First of all I will explain that I am very new to ActionScript and have never tried to control sound volume. Also, I have a deadline looming so, I ask these questions prior to even trying anything so I make sure I am on track to a feasable solution. So, here goes:

      I have a SWF that makes extensive use of images tightly synchronized to sounds. To ease the complexity of editing, I have broken the animation into several movieclips, each with their own sound track, that play sequentially in a "master" movieclip. To the viewer, this is seamless. There are no transitions between the different clips. This all works very well, but I want to add a volume control. I am concerned that the volume control will control only one sound at a time. Then, when the next clip starts, the sound will be a different volume.

      Is my assumption right or wrong? Any suggestions on how to approach this? I am working on tutorials and help files as I await any help.

      Regards,

      Henry
        • 1. Re: Some volume control help please.
          kglad Adobe Community Professional & MVP
          did you use the sound object (ie, actionscript) to instantiate your sounds or did you attach your sounds to movieclips frames?

          if you did the former you can control your sounds volume (and other properties) otherwise, you can't.

          if you used the sound object, store the sound volume desired in a variable and use that variable in the setVolume() method of your sound objects.
          • 2. Re: Some volume control help please.
            Henry_Flash Level 1
            Sound directly in frames, not in variable. From reading Help, I figured sound would need to be in variable to control volume. So, what about the multiple sounds. I suppose these will all have to be controlled seperately in code? Or can I set a default so that they will all play at the same volume initially?
            • 3. Re: Some volume control help please.
              kglad Adobe Community Professional & MVP
              you can't control your sound with actionscript using your current set-up. you'll either need to change the way you instantiate your sounds or forego controlling your sounds.
              • 4. Re: Some volume control help please.
                Henry_Flash Level 1
                kglad,

                OK, so now I have learned how to load sound with code and control volume. Since my presentation is made up of many movie clips with their own sounds within a swf and links to other swf I think I will not be able to control all sounds from one sound control button. Looks like I will have no sound control. It would be a good thing if Flash included a method to control the OS volume control instead of only each instantiated sound.

                Thanks for you replies though.

                Regards,

                Henry
                • 5. Re: Some volume control help please.
                  kglad Adobe Community Professional & MVP
                  instantiated is flash lingo which approximately means, "created properly in flash".

                  you can control all sound objects from any location, IF those sound objects are created (instantiated) using actionscript.