jtrory
08-07-2005, 09:44 PM
First, let me commend all of you on a great forum full of valuable resources. I wouldn't have gotten as far as I have without the forums here. I am a Flash newbie with experience in web design using good ol' HTML and Java. ActionScripts are still fairly new to me.
Okay, to my question. Here is what I have and what I want to do:
Currently, I have one streaming .mp3 that loops from the beginning:
s = new Sound();
s.loadSound("http://www.freelands.net/lull/bdg/mus_MainTheme.mp3",true);
s.onSoundComplete = function() {
s.start(0, 99);
}
This .mp3 is controlled by two buttons, Pause and Play.
Pause:
on(release){
cue = Math.round(s.position/1000);
s.stop();
}
Play:
on(release){
s.start(cue,1);
}
Everything works fine. But here's where I'm stuck.
I want to add multiple .mp3's that play in order and then loop back to the first .mp3. I don't want the user to control this, it is background music, not an MP3 player. I don't even know what the ActionScript would be for adding multiple .mp3's. More to the point, I haven't the slightest idea how to adjust my buttons so that they know which .mp3 they're supposed to be pausing and playing.
So far I have tried simply adding in URL's, but that doesn't seem to work. I have tried making an .m3u playlist file that I use to replace the .mp3 file, but Flash doesn't recognize .m3u files, so that doesn't work either.
I have searched your forums, I have looked on http://www.kennybellew.com/tutorial/ and numerous other websites, but nothing really addresses this specific issue. Any assistance would be greatly appreciated.
Okay, to my question. Here is what I have and what I want to do:
Currently, I have one streaming .mp3 that loops from the beginning:
s = new Sound();
s.loadSound("http://www.freelands.net/lull/bdg/mus_MainTheme.mp3",true);
s.onSoundComplete = function() {
s.start(0, 99);
}
This .mp3 is controlled by two buttons, Pause and Play.
Pause:
on(release){
cue = Math.round(s.position/1000);
s.stop();
}
Play:
on(release){
s.start(cue,1);
}
Everything works fine. But here's where I'm stuck.
I want to add multiple .mp3's that play in order and then loop back to the first .mp3. I don't want the user to control this, it is background music, not an MP3 player. I don't even know what the ActionScript would be for adding multiple .mp3's. More to the point, I haven't the slightest idea how to adjust my buttons so that they know which .mp3 they're supposed to be pausing and playing.
So far I have tried simply adding in URL's, but that doesn't seem to work. I have tried making an .m3u playlist file that I use to replace the .mp3 file, but Flash doesn't recognize .m3u files, so that doesn't work either.
I have searched your forums, I have looked on http://www.kennybellew.com/tutorial/ and numerous other websites, but nothing really addresses this specific issue. Any assistance would be greatly appreciated.