# Stop all sounds except

**URL:** <https://forum.kirupa.com/t/stop-all-sounds-except/261561>\
**Category:** flash\
**Created:** [May 28, 2008, 9:12pm UTC](https://forum.kirupa.com/t/stop-all-sounds-except/261561 "2008-05-28T21:12:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![magicmule](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@magicmule](https://forum.kirupa.com/u/magicmule)\
**Post date:** [May 28, 2008, 9:12pm UTC](https://forum.kirupa.com/t/stop-all-sounds-except/261561/1 "2008-05-28T21:12:01Z")

</div>

Is there a way to use the stopallsounds command with an exception? I want to stop all narrations (in a presentation) when a button is clicked but keep the background music going. So i want to stopallsounds except the background sound. any ideas?

---

<div class="post-metadata">

**Author:** ![neilmmm](https://avatars.discourse-cdn.com/v4/letter/n/ee7513/32.png) [@neilmmm](https://forum.kirupa.com/u/neilmmm)\
**Post date:** [May 28, 2008, 9:45pm UTC](https://forum.kirupa.com/t/stop-all-sounds-except/261561/2 "2008-05-28T21:45:12Z")

</div>

you could find the exceptions postion in milliseconds

pauseAmount=s.position;

// s being the sound;

then stop the sounds

then start playing the exception

s.start(pauseAmount/1000,0);

the only thind to remember is that position is in milliseconds

and the offset to start is seconds

so divide pauseAmount/1000

you should hear no stop in sound

---

<div class="post-metadata">

**Author:** ![magicmule](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@magicmule](https://forum.kirupa.com/u/magicmule)\
**Post date:** [May 29, 2008, 1:24pm UTC](https://forum.kirupa.com/t/stop-all-sounds-except/261561/3 "2008-05-29T13:24:49Z")

</div>

thanks, but i’m not entirely sure what you mean. Here’s my code for the button:

on (release) {  
stopAllSounds();  
\_root.mc\_btn1.gotoAndStop(1);  
\_root.mc\_btn2.gotoAndStop(1);  
\_root.mc\_btn3.gotoAndStop(1);  
\_root.mc\_btn4.gotoAndStop(1);  
\_root.mc\_btn5.gotoAndStop(1);  
\_root.mc\_btn6.gotoAndStop(1);  
\_root.mc\_btn7.gotoAndStop(1);  
\_root.mc\_btn8.gotoAndStop(1);  
\_root.mc\_btn9.gotoAndStop(1);  
\_root.mc\_btn10.gotoAndStop(1);  
gotoAndStop(2);  
\_root.gotoAndStop(2);  
}

can you clarify?

---

<div class="post-metadata">

**Author:** ![neilmmm](https://avatars.discourse-cdn.com/v4/letter/n/ee7513/32.png) [@neilmmm](https://forum.kirupa.com/u/neilmmm)\
**Post date:** [May 29, 2008, 4:40pm UTC](https://forum.kirupa.com/t/stop-all-sounds-except/261561/4 "2008-05-29T16:40:07Z")

</div>

is your sound dynamic or is it embedded in the timeline?

---

<div class="post-metadata">

**Author:** ![magicmule](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@magicmule](https://forum.kirupa.com/u/magicmule)\
**Post date:** [May 29, 2008, 7:23pm UTC](https://forum.kirupa.com/t/stop-all-sounds-except/261561/5 "2008-05-29T19:23:52Z")

</div>

embedded in the timeline. i select a blank layer and add the sound from the properties panel.

---

<div class="post-metadata">

**Author:** ![neilmmm](https://avatars.discourse-cdn.com/v4/letter/n/ee7513/32.png) [@neilmmm](https://forum.kirupa.com/u/neilmmm)\
**Post date:** [June 5, 2008, 4:51pm UTC](https://forum.kirupa.com/t/stop-all-sounds-except/261561/6 "2008-06-05T16:51:03Z")

</div>

i am sorry magicmule

but the code i gave you was for code for sound added by actionscript

i suggest you google kenny bellows sound flash

for some sound tut
