Name

stopAllSounds( ) Global Function — silence a movie

Availability

Flash 3 and later

Synopsis

stopAllSounds( )

Description

The stopAllSounds( ) function mutes all the sounds currently playing in a movie, no matter how deeply 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. There is no way to permanently mute a movie.

See Also

Sound.setVolume( ), Sound.stop( )

Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.