I’ve built a preloader that works fine locally, when downloading files from the web address supplied. But when I post it live, the preloader shows a frame of 100% then shows the image before it has fully loaded. It ‘pops’ in.
What am I doing wrong? This has been driving me crazy for 4 days and any help would be much appreciated.
Thanks!
The link to the ‘faulty’ site is www.inadequateanimal.com/index2.html
The preloader code I am using for each quadrant is:
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/”;
i = filename.length;
k = Math.floor(Math.random()*i);
_root.topleft.onEnterFrame = function() {
startLoading(path+filename[k]);
infoField._visible = true;}
function startLoading(whichImage) {
loadMovie(whichImage, topleftloader);
_root.topleft.onEnterFrame = function() {
infoLoaded = _root.topleft.topleftloader.getBytesLoaded();
infoTotal = _root.topleft.topleftloader.getBytesTotal();
percentage = Math.floor(infoLoaded/infoTotal*100);
infoField.text = percentage+"%";
if (percentage>=100) {
infoField._visible = false;
_root.topleft.gotoAndStop(2);
}
};
}
stop();