# Preloader Issues - Deadline looming, please help

**URL:** <https://forum.kirupa.com/t/preloader-issues-deadline-looming-please-help/150610>\
**Category:** flash\
**Created:** [June 9, 2005, 3:15am UTC](https://forum.kirupa.com/t/preloader-issues-deadline-looming-please-help/150610 "2005-06-09T03:15:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nawebb79](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@nawebb79](https://forum.kirupa.com/u/nawebb79)\
**Post date:** [June 9, 2005, 3:15am UTC](https://forum.kirupa.com/t/preloader-issues-deadline-looming-please-help/150610/1 "2005-06-09T03:15:54Z")

</div>

I am trying to preload an mp3 file dynamically while showing the typical ‘percentage loaded’ in a dynamic text box. However for some reason, the percentage just doesn’t count up - it freezes on 100% even though the mp3 file is still loading. I’m sure there is a simple fix but I just can’t figure this one out and any help would be greatly appreciated. I have included the code that I’m using below. Also, does anyone know what would be the best way to adjust this code so that I could preload multiple mp3 files at the same time or one after another?

```auto
bgMusic = new Sound();
bgMusic.loadSound("Music/song1.mp3", false);
//start mp3 download 
createEmptyMovieClip("loadprogress", 1);
function showLoadProgress() {
if (_root.bgMusic.getBytesTotal()>0) {
// calculate size of mp3 in kilobytes
var kilobytes = Math.ceil(_root.bgMusic.getBytesTotal()/1024);
// calculate percent loaded
var percentLoaded = Math.ceil((_root.bgMusic.getBytesLoaded()/_root.bgMusic.getBytesTotal())*100);
// show loading message
_root.percentOutput02 = "Audio Loading: "+percentLoaded+"% of "+kilobytes+"k";
if (percentLoaded == 100) {
loaded = true;
// terminate loop
_root.percentOutput02 = "Audio Ready";
}
}
// end loop
if (percentLoaded>=100) {
loadprogress.removeMovieClip();
}
}
loadprogress.onEnterFrame = showLoadProgress;
// start loop

```

Many Thanks
