# Streaming sound

**URL:** <https://forum.kirupa.com/t/streaming-sound/120159>\
**Category:** Uncategorized\
**Created:** [August 21, 2004, 11:09am UTC](https://forum.kirupa.com/t/streaming-sound/120159 "2004-08-21T11:09:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![icestream](https://avatars.discourse-cdn.com/v4/letter/i/e19adc/32.png) [@icestream](https://forum.kirupa.com/u/icestream)\
**Post date:** [August 21, 2004, 11:09am UTC](https://forum.kirupa.com/t/streaming-sound/120159/1 "2004-08-21T11:09:29Z")

</div>

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:

```auto

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. ☹

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

Any suggestions?

thnx

---

<div class="post-metadata">

**Author:** ![icestream](https://avatars.discourse-cdn.com/v4/letter/i/e19adc/32.png) [@icestream](https://forum.kirupa.com/u/icestream)\
**Post date:** [August 21, 2004, 2:38pm UTC](https://forum.kirupa.com/t/streaming-sound/120159/2 "2004-08-21T14:38:11Z")

</div>

No one?
