Need help with sound buttons
I'm learning as3 for the 1st time, trying to make a soundboard. I got the 1st sound to work great, but cant get a 2nd sound to play.
Here is my code, and these are saved as buttons, not movie clips:
//1.
var my_sound:s1 = new s1();
var my_channel:SoundChannel = new SoundChannel();
//2.
btn1.addEventListener(MouseEvent.CLICK, playSound);
stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
//3.
function playSound(event:MouseEvent):void{
my_channel = my_sound.play();
}
//4.
function stopSound(event:MouseEvent):void{
my_channel.stop();
}
how do I get "btn2" button instance to play "s2" sound instance?
This code below gives errors, so I must not be changing the right part:
var my_sound:s2 = new s2();
