# MP3 preload, but then doesn't play?

**URL:** https://forum.kirupa.com/t/mp3-preload-but-then-doesnt-play/99962
**Category:** Uncategorized
**Created:** [January 24, 2004, 6:38am UTC](https://forum.kirupa.com/t/mp3-preload-but-then-doesnt-play/99962 "2004-01-24T06:38:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![TylerNZ](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tylernz/32/415_2.png) [@TylerNZ](https://forum.kirupa.com/u/TylerNZ)
#### Post date: [January 24, 2004, 6:38am UTC](https://forum.kirupa.com/t/mp3-preload-but-then-doesnt-play/99962/1 "2004-01-24T06:38:33Z")

</div>

Ok, so I’ve been playin around with loading MP3’s externally … and I finially managed to get a preloader working … however, now at the end of the preload function it doesn’t play the file!?

If the mp3 is in the browser cache … it will play the file!? How weird.

wanna see? [The Site](http://www.michaelwhittaker.net/flash/site2.html)

Click the top right button for the player to slide out.

My code:

```auto

mySounda = new Sound();
preloadNow = 1;
mySounda.loadSound("Track2.mp3",false);

this.onLoad = function () {
	mySoundLoading = 0;
	_root.sounds.loadBar._xscale = mySoundLoading;
}

this.onEnterFrame = function () {
	mySoundBytesTotal = _root.sounds.mySounda.getBytesTotal();
	mySoundBytesLoaded = _root.sounds.mySounda.getBytesLoaded();
	if (preloadNow==1 && mySoundBytesLoaded>0) {
		mySoundLoading = Math.round((mySoundBytesLoaded/mySoundBytesTotal)*100); 
			if (mySoundLoading > 99) {
				_root.sounds.mySounda.start(0,1)
				_root.sounds.textd = _root.sounds.mySounda.id3.TIT2;
				_root.sounds.playing = true;
				_root.sounds.preloadNow = 0;
		 	} else {
				_root.sounds.textd = mySoundLoading + "%";
				_root.sounds.loadBar._xscale = mySoundLoading;
	 	 }
	}
}

```

I discovered that my preloader wasn’t working before becoz I had two “onEnterFrame” events on the same frame. Obviously a no-no.

Anyway, can anyone help me with this?! Would be MUCH appreciated!!!
