FLash - Continous Mix
- Started
- Last post
- 8 Responses
- kStyle
I have an issue that I would like some opinions on:
I am doing a freelance site for a dj friend of mine. He requested an mp3 player with his mixes on the site. I have found plenty of different mp3 players online, however, between each track there is a second when the next mp3/swf loads. . .obvioulsy this ruins the "mix".
Any suggestions as to how to tackle this issue, aside from making the whole hour long mix one track?
Thanks in advance.
- ********0
load the 1st track before playing it....
then use the onLoad handler to play the first sound and load the next one......
you can then use
soundOne.onComplete = function()
{
soundTwo.play();
}
- unfittoprint0
tricky.
you could do the following:
After the first mp3 starts, trigger the next mp3 on the list to load on another Sound Object, turning off its volume, check if its position its bigger than 0 and then stop it. Use a setInterval to check the first mp3 position and when it approaches its final seconds, fade it out, while fading in the second mp3.
Either that or you'll have to stream the whole mix.
- ********0
onSoundComplete should work too unfit, no?
I use it to loop loaded sounds and it works seamlessly. So if the mix is one continuous file just cut it into manageable pieces....
then have 2 sound objects which you alternate between to load and play your sounds.
what do you think unfit??
- function820
i think with onSoundComplete you're going to still have a brief pause in music, because its not starting the next file until the current one is finished, you might not notice on a fast machine, but will likely notice on a slower one.
- kStyle0
thanks for all the insightful feedback
- unfittoprint0
as function indicated, you'll still have a small delay. Why? because your loading the next one, exaclty when the previoous finishes.
It should be done earlier. Checking when the first mp3 starts streaming, waiting a bit, start loading the next one and stop it, play it when the first one ends and so on...
- ********0
that's what I mean unfit,
as sound 1 is playing
load into sound 2
then use onSoundComplete to play sound 2 (which is already loaded) ...
- Anarchitect0
ah ok. I thought you meant loading, not playing.
my bad.