I have this play/pause button for a simple mp3 plater and it’s almost working I am just having a small issue. here is the player.
I want the audio to start “paused” any ideas on how to do this?
Here is the AS
stop();
x = new Sound();
x.loadSound("test_audio.mp3", true);
x.start(0, 0);
musicplay = true;
x.onSoundComplete = function() {
streemer.gotoAndStop(1);
}
Here is the AS on the button.
on (release) {
if (musicplay == true) {
p = Math.round(x.position / 1000);
x.stop();
streemer.gotoAndStop(1)
play_pause.gotoAndStop(2);
musicplay = false;
} else {
x.start(p, 0);
streemer.gotoAndPlay(2);
play_pause.gotoAndStop(1);
musicplay = true;
}
}
any idea on how to make this work?