Hi,
I’m trying to do a really simple mp3-player for a website and I’ve stumbled on a small problem.
I’v created two buttons, Start and Stop, that I’ve have put into a movieclip. I’ve done so beacause I only want the user so see one button at a time. (I’ve managed to make it work with 2 buttons, but I’d like to know why it doesn’t work with a movieclip and 2 buttons)
So when the user clicks the “Start” button the sound starts playing and the movieclip is set to frame 2 where the stop button is. So far so good, but when I’m trying to click the “Stop” button nothing happens. Here’s the AS:
stop();
current_mp3 = "audio.mp3";
function primeSound() {
mySound = new Sound();
mySound.loadSound(current_mp3, true);
}
playing = false;
_root.control_mc.play_btn.onRelease = function() {
primeSound();
_root.control_mc.gotoAndStop(2);
};
_root.control_mc.stop_btn.onRelease = function() {
mySound.stop();
playing = false;
_root.control_mc.gotoAndStop(1);
};
I would be thrilled to learn why this does not work … kind regards Olki