# Someone pls HELP!

**URL:** <https://forum.kirupa.com/t/someone-pls-help/33603>\
**Category:** Uncategorized\
**Created:** [October 21, 2003, 1:55pm UTC](https://forum.kirupa.com/t/someone-pls-help/33603 "2003-10-21T13:55:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xcute](https://avatars.discourse-cdn.com/v4/letter/x/71e660/32.png) [@xcute](https://forum.kirupa.com/u/xcute)\
**Post date:** [October 21, 2003, 1:55pm UTC](https://forum.kirupa.com/t/someone-pls-help/33603/1 "2003-10-21T13:55:54Z")

</div>

Here’s the pseudocode of practically what i want to do.  
I have a few buttons, each attached with a different sound. Lets say i’ve clicked button A and then i click on button B…the sound must stop…and its the same for the other rest.  
I cannot use stopAllSounds for each button when they are clicked because there will be a background music running. Does anyone know how to do this and could tell me how ???

Really need help desperately…Please please please… :(((

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 21, 2003, 2:37pm UTC](https://forum.kirupa.com/t/someone-pls-help/33603/2 "2003-10-21T14:37:58Z")

</div>

you could try this:  
[AS]on (release) {  
this.mySound.stop(current);  
this.mySound = new Sound();  
this.mySound.attachSound(“newsong”);  
current = “newsong”;  
this.mySound.start("", 99);  
}  
[/AS]

it was working for me:)

scotty

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 21, 2003, 2:39pm UTC](https://forum.kirupa.com/t/someone-pls-help/33603/3 "2003-10-21T14:39:39Z")

</div>

Thats for more than 1 song on just one button or all the buttons ?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 21, 2003, 2:52pm UTC](https://forum.kirupa.com/t/someone-pls-help/33603/4 "2003-10-21T14:52:20Z")

</div>

place the code on the buttons.  
on each button, change “newsong” in the sound you want.

scotty

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 21, 2003, 2:53pm UTC](https://forum.kirupa.com/t/someone-pls-help/33603/5 "2003-10-21T14:53:50Z")

</div>

i think you didn’t get what i meant…i don’t want to change the sounds on the buttons…i want them to stop when the other button is pressed…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 21, 2003, 3:16pm UTC](https://forum.kirupa.com/t/someone-pls-help/33603/6 "2003-10-21T15:16:42Z")

</div>

maybe i wasn’t clear.  
there’s button A with my code. it tells the current sound to stop en “newsongA” to play and it sets “newsongA” to current.  
on buttonB the same, if you press this it will stop current (newsongA) and play newsongB and sets this to current…  
ad so on.

btw i used the attach sound, made a fla with all the sound in it and load that in my main movie.

hope i was more clear now.

scotty

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 21, 2003, 3:42pm UTC](https://forum.kirupa.com/t/someone-pls-help/33603/7 "2003-10-21T15:42:18Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=7457](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=7457)
