I am creating a slide presentation which has audio playing over each sequential MC. I am using one button to pause and resume my audio tracks. This has generated a problem on the resume function of the play button. If I press the play button after the stop button, all audio tracks begin to play. I’m not sure why?
I want to be able to only resume the audio track which was stopped temporarily.
This is the code I have used:
// sound object defined in _root level. This code is used twice more to progress the audio sequentially
audio1 = new Sound(this);
audio1.attachSound(“1.WAV”);
audio1.start(0,1);
audio1.onSoundComplete = function(){
audio2.play();
}
// stop button
on (release) {
playing = false;
myMusicPosition1 = audio1.position/1000;
audio1.stop(“1.WAV”);
myMusicPosition2 = audio2.position/1000;
audio2.stop(“2.WAV”);
myMusicPosition3 = audio3.position/1000;
audio3.stop(“3.WAV”);
}
// play button
on (release, keyPress “<Enter>”) {
if (playing != true) {
audio1.start(myMusicPosition1, 0);
audio2.start(myMusicPosition2, 0);
audio3.start(myMusicPosition3, 0);
playing = true;
}
}
I desperately need to find a solution. Can any one help?
Thanks in advance