# How to make an On/Off sound button that works for multiple streaming audio?

**URL:** <https://forum.kirupa.com/t/how-to-make-an-on-off-sound-button-that-works-for-multiple-streaming-audio/258830>\
**Category:** flash\
**Created:** [April 28, 2008, 7:03pm UTC](https://forum.kirupa.com/t/how-to-make-an-on-off-sound-button-that-works-for-multiple-streaming-audio/258830 "2008-04-28T19:03:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maragoes](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/maragoes/32/2760_2.png) [@maragoes](https://forum.kirupa.com/u/maragoes)\
**Post date:** [April 28, 2008, 7:03pm UTC](https://forum.kirupa.com/t/how-to-make-an-on-off-sound-button-that-works-for-multiple-streaming-audio/258830/1 "2008-04-28T19:03:15Z")

</div>

Hello Flashmeisters! :pleased:

I am having some trouble making a button that will resume the sound in my Flash Animation.

I have an animation that is spread over several Layers and several Scenes. I also have sound clips (mp3s) placed on different layers, in many different areas. I was able to make a button that when pressed stops all the sound by using this simple actionscript:

on (release) {  
stopAllSounds();  
}

My goal is to have a button so users can stop and resume streaming sound at any time throught the animation.

However I can’t seem to make a button that after it stops the sound, when pressed again would resume the sound. I have seen some tutorials that explain how to stop and start a **single** audio file, but how can I make a button that will stop and resume multiple streaming audio files that are placed in several different places?

I made the script below up and was wondering if there is an existing simple actionscript code that would be similar to it that would work for when a button is pressed it would resume the sound?

on (release) {  
PlayAllSounds();  
}

Many thanks! And any help will be _ **HUGELY** _ apprecaited!

Marsy
