25Jul

Actionscript 3 Method to Stop All Sounds within Flash Player

2 comments so far

So I have some audio playing on one of my pages within my Flash movie, but I wanted it to stop playing when the user travels away from the audio page. I know in Actionscript 1 and possibly Actionscript 2 the stopAllSounds() method was available. I soon discovered that in Actionscript 3 you can achieve the same results by:

1. Include the SoundMixer class

// make sure you import this class:
import flash.media.SoundMixer;

2. Call the Method within your code:

SoundMixer.stopAll();

Share/Save/Bookmark

Categories: Actionscript 3, Audio

Friday, July 25th, 2008 at 10:08 am and is filed under Actionscript 3, Audio. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses to “Actionscript 3 Method to Stop All Sounds within Flash Player”

  1. Posted by MADAWEB 21st August, 2008 at 1:53 pm

    Thank you very much. It works.
    Regards.

  2. Posted by alp 1st September, 2008 at 10:16 am

    thanks a lot :)
    I have been looking for it.

Leave a reply