# Streaming MP3 (preload questions)

**URL:** https://forum.kirupa.com/t/streaming-mp3-preload-questions/111509
**Category:** Uncategorized
**Created:** [May 27, 2004, 6:25pm UTC](https://forum.kirupa.com/t/streaming-mp3-preload-questions/111509 "2004-05-27T18:25:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![chymx2](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chymx2/32/557_2.png) [@chymx2](https://forum.kirupa.com/u/chymx2)
#### Post date: [May 27, 2004, 6:25pm UTC](https://forum.kirupa.com/t/streaming-mp3-preload-questions/111509/1 "2004-05-27T18:25:23Z")

</div>

Hi,  
I want to use a streming MP3 to play a song while my flash movie plays. I have a movie calling to an external MP3

[font=Arial][size=3]  
[left]s = new Sound();s.loadSound(“C:/myMusic/song.mp3”,true);[/left]  
[left] [/left]

[left]so it works fine. Here is my problem. I have a “fake” EQ animation going but this animation starts the second the movie is loaded and the MP3 has a bit of a delay before it starts playing (my guess is that the Mp3 is caching at this time to be able to stream) so…is there a way to have the EQ animation wait for the Mp3 to cache and start streaming/playing (sort of tie them together)[/left]

[left]Thanks in advance =)[/left]  
[/size][/font]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 27, 2004, 8:25pm UTC](https://forum.kirupa.com/t/streaming-mp3-preload-questions/111509/2 "2004-05-27T20:25:15Z")

</div>

You can do it with checking for the sound position, if this is greater then 0 the sound is playing.

```auto
s = new Sound(this);
s.loadSound("C:/myMusic/song.mp3", true);
tmp = _root.createEmptyMovieClip("temp", 1);
tmp.onEnterFrame = function() {
	if (s.position>0) {
		//do your stuff;
		delete this.onEnterFrame;
	}
};

```

To see it really work you have to upload the file, for some reason (?) s.position in flash alone doesn’t work…(at least I’m having trouble with it)

scotty(-:
