Preloader - Works but not accurate

Hello, I made the preloader from the tutorial on this site…
The one that shows a bar and a percent of what is loaded…

It works but the bar will be about half way across when it says it is at like 80%…

Is that just processor lag or something?

Here is the site…
http://www.videolinktechnologies.com/new/

Thanks…

Percentage Preloader with Load Bar by lostinbeta

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
<font color=#FF0000>this.loadBar._width = getPercent*</font><font color=#0000CC>100</font><font color=#FF0000>;</font>
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
	this.gotoAndPlay(3);
}

This is where we work with our preloader bar. It takes the value produced by the getPercent variable and multiplies it by 100. You may ask why the 100 is blue above, and I will tell you why. The 100 is blue because you can multiply it by whatever you would like, the number you place there determines the ending width of your loadBar movie clip. Since you drew the border for your clip on the stage already, I recommend using the width of your movie clip on the stage. You can select your clip and open the properties panel to see what the width is. Of course… this.loadBar is your loadBar movie clip and the _width at the end is what allows you to change the width of the clip so it can grow and fill in your border ouline of your original loadBar clip.

?? :stuck_out_tongue:

ahhhhh…
so that 100 is not like… “100 percent”

that 100 is the width of my loadBar movie clip…

I just changed it and am about to test it…
bet that does it.

Thank You!

oh yeah!!

that did it!

Thanks…

here it is…
http://www.videolinktechnologies.com/new/

no problem. :wink:

It helps to read the code descriptions in tutorials :wink: