# mp3 preloader code check please

**URL:** <https://forum.kirupa.com/t/mp3-preloader-code-check-please/37914>\
**Category:** Uncategorized\
**Created:** [December 15, 2003, 10:24pm UTC](https://forum.kirupa.com/t/mp3-preloader-code-check-please/37914 "2003-12-15T22:24:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![crapboyjr](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@crapboyjr](https://forum.kirupa.com/u/crapboyjr)\
**Post date:** [December 15, 2003, 10:24pm UTC](https://forum.kirupa.com/t/mp3-preloader-code-check-please/37914/1 "2003-12-15T22:24:29Z")

</div>

Sorry for cross-posting, but I’m in bit of a jam.

I’m trying to preload a dynamic mp3 and show the percentage loaded as a number and a graphic bar. But it’s not working.

The following code is on the the movie clip that the mp3 is being loaded into.

* * *

onClipEvent (load) {  
mySound = new Sound();  
mySound.loadSound(“music.mp3”, false);  
}

onClipEvent (enterFrame) {  
downloaded = mySound.getBytesLoaded();  
total = mySound.getBytesTotal();  
percent -= (percent-((downloaded/total)_100))_.25;  
per = int(percent);  
percentage = per+"%";  
loadBar.\_width = per;

if (percent\>99) {  
\_root.gotoAndPlay(“intro”);  
}  
}

* * *

Thanks.
