Streaming sound

Hi,

I’m building a streaming mp3 player. So that you can load a mp3 from all over the internet in a streaming way, but soon It became obvious that when I set the loadSound to true (used to stream sounds) that sometimes the mp3 begins to stop and load and then play again. A sort of short stops. So I thought let’s place a buffer so that when the song is loaded half way it’s starts playing and gone are the short stops. But that’s where my problem started and some questions arised. I use the onload method to check if any sounds are loaded into the sound object. I used this sentense to handle the onload action:

mySound.onLoad = onLoadSound;

The onLoadSound method looks like this:


function onLoadSound(success:Boolean):Void
{
	playTicker = true;
	
	if(Math.round(mySound.getBytesTotal()/2) === Math.round(mySound.getBytesLoaded()))
	{
		trace("half ways");
		success = true;
	}
	
	if(success)
	{
		trace("start");
		mySound.start();
	}
	else
	{
		tickerHolder.text = NOFILEFOUND;
	}
}

But now that I’m not exactly streaming anymore, so I have set the loadSound to false. Now I wonder if the onID3 method I used for getting some specific information out of the mp3 also acts like a none streaming file stream?

Also something is wrong with my check if the loading process is half way.
I have some songs on my pc and one on the internet. The songs on my pc load very well. (offcourse :P) But they don’t get into my if statement. :frowning:

And the song loaded from an internet adress doesn’t even get into the onload function :puzzle:

Any suggestions?

thnx

No one?