# Preloader simple? problem

**URL:** <https://forum.kirupa.com/t/preloader-simple-problem/284979>\
**Category:** Uncategorized\
**Created:** [March 25, 2009, 6:58pm UTC](https://forum.kirupa.com/t/preloader-simple-problem/284979 "2009-03-25T18:58:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcelomdsc](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@marcelomdsc](https://forum.kirupa.com/u/marcelomdsc)\
**Post date:** [March 25, 2009, 6:58pm UTC](https://forum.kirupa.com/t/preloader-simple-problem/284979/1 "2009-03-25T18:58:45Z")

</div>

Hello, I´m having problems with my preloader.  
I´ve used this same code for a few projects before without any problems but now it´s not  
working correctly.  
The preloading works fine, the problem is with the numbers (%) shown in my dynamic text box.  
It displays up to 12% and then it jumps to the label “Loaded” which is the actual content, and everything works fine.

Here is the code…  
//preloader  
this.onEnterFrame = function () {  
var amountLoaded:Number = this.getBytesLoaded() / this.getBytesTotal() \* 100;  
preloader.text = Math.round(amountLoaded) + “%”;  
if(amountLoaded == 100) {  
this.gotoAndPlay(“Loaded”);  
delete this.onEnterFrame;  
}  
}

thanks, Marcelo.
