Here is what I want to do. If you want to see the site I need to attach the music to it is located at www.buildingbodiestv.com.
The menu is created in Flash and I want to add a play and stop button so that the theme music can be stopped if necessary. The issue that I always have is that when I would change a page lets say from home to bios, the music would stop and restart from the beginning. What I am trying to accomplish is that it does not do that but when changing pages it continues to play the music from where it left off, or just continue playing the current audio.
Is there a way that I can get the position of the music playing then pass that to start where it left off. This is the code I have so far.
var soundPos = 0;
if (soundPos == 0){
plpSound = new Sound(this);
plpSound.attachSound("theme");
plpSound.start(soundPos, 99);
plpSound.setVolume(30);
}else{
plpSound.start(soundPos,1);
}
play_btn.onRelease = function() {
trace(soundPos);
if (soundPos == 0){
stopAllSounds();
plpSound.start(0, 99);
plpSound.setVolume(30);
}else{
plpSound.start(soundPos/100,1);
}
};
stop_btn.onRelease = function() {
soundPos = plpSound.position;
trace(soundPos);
stopAllSounds();
}
Thanks in advance.