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.