# Sound button with multiple sound

**URL:** https://forum.kirupa.com/t/sound-button-with-multiple-sound/270410
**Category:** Uncategorized
**Created:** [September 9, 2008, 4:45pm UTC](https://forum.kirupa.com/t/sound-button-with-multiple-sound/270410 "2008-09-09T16:45:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![spark067](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@spark067](https://forum.kirupa.com/u/spark067)
#### Post date: [September 9, 2008, 4:45pm UTC](https://forum.kirupa.com/t/sound-button-with-multiple-sound/270410/1 "2008-09-09T16:45:27Z")

</div>

[SIZE=2][FONT=Arial]Hello everyone,

I used the below actionscript for one button with one sound so how to write as3 three different buttons with three different sound?

Any help would be greatly appreciated.

[/FONT][/SIZE][SIZE=2][FONT=Arial] Thanks,

var loadSnd:URLRequest = new URLRequest(“SORTER.mp3, GUITAR.mp3, STACKER.mps”);  
var thisSnd:Sound = new Sound();  
var sndTrans:SoundChannel = new SoundChannel();

thisSnd.load(loadSnd);

```
play_btn.addEventListener(MouseEvent.CLICK, playF);
stop_btn.visible = false;
stop_btn.addEventListener(MouseEvent.CLICK, stopF);

```

function playF(event:MouseEvent):void{  
SoundMixer.stopAll();  
sndTrans = thisSnd.play();  
play\_btn.visible = false;  
stop\_btn.visible = true;  
}

function stopF(event:MouseEvent):void{  
sndTrans.stop();  
stop\_btn.visible = false;  
play\_btn.visible = true;

[/FONT][/SIZE]
