# I have an overzealous preloader! Please help

**URL:** <https://forum.kirupa.com/t/i-have-an-overzealous-preloader-please-help/225137>\
**Category:** Uncategorized\
**Created:** [May 9, 2007, 3:11am UTC](https://forum.kirupa.com/t/i-have-an-overzealous-preloader-please-help/225137 "2007-05-09T03:11:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![inadequateanima](https://avatars.discourse-cdn.com/v4/letter/i/a87d85/32.png) [@inadequateanima](https://forum.kirupa.com/u/inadequateanima)\
**Post date:** [May 9, 2007, 3:11am UTC](https://forum.kirupa.com/t/i-have-an-overzealous-preloader-please-help/225137/1 "2007-05-09T03:11:46Z")

</div>

I got a preloader to work perfectly on my local server, there is the perfect little percentage marker and a nice fade in, however, when I post it online the files are being downloaded too quickly, or not really at all. They don’t even seem to be being preloaded even though the preload loadlistener shows a scale from 0 to 100 percent.  
Could someone look at my code and at the site and see what’s going on? I am almost at the end of this project and would love to move on to the more exciting stuff!  
Thanks in advance.

[www.inadequateanimal.com/index2.html](http://www.inadequateanimal.com/index2.html)

This is the code for one of the four preloaders (one for each quadrant):

filename = [“01.jpg”, “02.jpg”, “03.jpg”, “04.jpg”, “05.jpg”, “06.jpg”, “07.jpg”, “08.jpg”, “09.jpg”];  
path = “[http://www.inadequateanimal.com/pictures/topleft/](http://www.inadequateanimal.com/pictures/topleft/)”;  
i = filename.length;  
k = Math.floor(Math.random()\*i);

this.onEnterFrame = function() {  
startLoading(path+filename[k]);  
infoField.\_visible = true;}  
function startLoading(whichImage) {  
loadMovie(whichImage, topleftloader);  
this.onEnterFrame = function() {  
infoLoaded = topleftloader.getBytesLoaded();  
infoTotal = topleftloader.getBytesTotal();  
percentage = Math.floor(infoLoaded/infoTotal\*100);  
infoField.text = percentage+"%";  
if (percentage\>=100) {  
infoField.\_visible = false;  
this.gotoAndStop(2);

```
  }

```

};  
}  
stop();

It works perfectly on the local server, even when downloading each image from the url. When posted to the index2.html there is no pause as files are completely loaded… just a flickering 100% and then an image that pops up a little late!
