-
Preloader help!
What've created, well had help with, is a preloader which loads the bytes.
movieLoaded = this.getBytesLoaded();
movieTotal = this.getBytesTotal();
percentage = Math.floor(movieLoaded/movieTotal*100);
display.text = "LOADED: "+percentage+" %";
if (percentage >= 100) {
gotoAndPlay("content", 1);
}
This works fine, but what I want to do is to have a loading bar along side the existing preloader.
What would I need to add to the existing script to make it work?
Cheers
-
preloader_mc.bar_mc._xscale = 0;
preloader_mc.display.text = "LOADED: 0 %";
this.onEnterFrame = function ()
{
movieLoaded = this.getBytesLoaded();
movieTotal = this.getBytesTotal();
percentage = Math.floor(movieLoaded/movieTotal*100);
this.preloader_mc.display.text = "LOADED: "+percentage+" %";
this.preloader_mc.bar_mc._xscale = percentage;
if (percentage >= 100) {
gotoAndPlay("content", 1);
}
}