Is there any way to globally mute all sounds in an application?

I have an application with several short, embedded MP3 sound effects plus
NetStream video that has audio. Note: In our application play() is executed
programmatically via ActionScript for all Sounds and NetStream videos.

My sense is that sound must be controlled on an object by object basis. That
is, that there is no global property that can be set to adjust volume for
all objects that might play() sounds

Can anyone point me to examples using a single property for muting all
sounds in an application?

In Flex, the top level Application class does have a property soundTransform
of type SoundTransform. However, in my experience (ran a few tests), setting
the value on this Application-level property does not effect the individual
Sound and NetStream instances.

The closest I have come to having a global property is adding an instance of
SoundTransform as a property of the top level application. Then for the
embedded MP3s, having the return value from each Sound.play() execution
assigned to an instance of SoundChannel and then immediately assigning the
top level app's SoundTransform property as the SoundChannel.soundTransform
property. Likewise for the NetStream, after executign NetStream.play()
setting NetStream.soundTransform property to the top level app's
SoundTransform property.

Thanks,

g

Reply via email to