# Preloader - Works but not accurate

**URL:** https://forum.kirupa.com/t/preloader-works-but-not-accurate/23750
**Category:** Uncategorized
**Created:** [June 21, 2003, 9:31pm UTC](https://forum.kirupa.com/t/preloader-works-but-not-accurate/23750 "2003-06-21T21:31:10Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![kmax](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@kmax](https://forum.kirupa.com/u/kmax)
#### Post date: [June 21, 2003, 9:31pm UTC](https://forum.kirupa.com/t/preloader-works-but-not-accurate/23750/1 "2003-06-21T21:31:10Z")

</div>

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/](http://www.videolinktechnologies.com/new/)

Thanks…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 21, 2003, 10:14pm UTC](https://forum.kirupa.com/t/preloader-works-but-not-accurate/23750/2 "2003-06-21T22:14:40Z")

</div>

> _[Percentage Preloader with Load Bar](http://www.kirupa.com/developer/mx/percentagepreloader.htm) by lostinbeta_

```auto
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.

?? 😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 21, 2003, 11:07pm UTC](https://forum.kirupa.com/t/preloader-works-but-not-accurate/23750/3 "2003-06-21T23:07:56Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 21, 2003, 11:12pm UTC](https://forum.kirupa.com/t/preloader-works-but-not-accurate/23750/4 "2003-06-21T23:12:39Z")

</div>

oh yeah!!

that did it!

Thanks…

here it is…  
[http://www.videolinktechnologies.com/new/](http://www.videolinktechnologies.com/new/)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 21, 2003, 11:20pm UTC](https://forum.kirupa.com/t/preloader-works-but-not-accurate/23750/5 "2003-06-21T23:20:49Z")

</div>

no problem. 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 22, 2003, 12:37am UTC](https://forum.kirupa.com/t/preloader-works-but-not-accurate/23750/6 "2003-06-22T00:37:23Z")

</div>

It helps to read the code descriptions in tutorials 😉
