stopAllSounds( ) Global Function

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
stopAllSounds( ) Global Function Flash 3

silence a movie
stopAllSounds()

Description

The stopAllSounds( ) function mutes all the sounds currently playing in a movie, no matter how deeply the sounds are nested in movie clips. This applies to every sound in a movie, including programmatically generated Sound objects. For more precise control over stopping, starting, and setting the volume of sounds, see the Sound class.

Note that stopAllSounds( ) has only a temporary effect. Any sound that starts after a stopAllSounds( ) invocation will play normally. Because button sounds are not controllable via the Sound class, there is no way to mute an entire movie permanently. However, a Player-wide Sound object with a volume of 0 will silence all nonbutton sounds.

See Also

Sound.setVolume( ), Sound.stop( )



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net