Hello,
hope this will make some sense.
(Flash CS4 with Action Script3)
I want to have 2 lots of buttons, 2 play and 2 stop to control 2 different mp3 files within the same frame(page).
I use the code underneath that works just fine with one sound.
But, how do I apply action script to control the play stop of the second Mp3 file.
I tried creating new buttons with action script in a new Movie clip but, I get a bunch of errors
Can anyone help?
Regards
M
var req:URLRequest = new URLRequest(“Pounding.mp3”);
var sound:Sound = new Sound();
var controller:SoundChannel;
function soundLoaded(event:Event):void
{
controller = sound.play();
controller.stop();
play_btn.addEventListener(MouseEvent.CLICK, playSound);
stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
}
function playSound(event:MouseEvent):void
{
controller = sound.play();
}
function stopSound(event:MouseEvent):void
{
controller.stop();
}
sound.addEventListener(Event.COMPLETE, soundLoaded);
sound.load(req);