My preloader dont work right all the time!! help
Hi
I have this script for a preloader that i used on 2 pages and worked just fine but on my last page the preloading starts working when the loading is at 50% until then its all white.
code:
stop();
myInterval = setInterval(preloader,10);
function preloader() {
if (getBytesLoaded() >= getBytesTotal()) {
play();
clearInterval(myInterval);
}
progressBar._xscale = (getBytesLoaded()/getBytesTotal())*100;
}
Can anyone tell me whats the problem?, i thing is my page not the preloading since it works fine on 2 pages.
Thank you very much.
I have the same problem with an external movie clip
Hello MatejKo,
I have had the same problem with a preloader, because Flash MX only allows you to link movie clips to frame 1.
I tried to solve it as you suggested by first making the preloader, and afterwards loading a .swf-file into the preloader as a movie clip.
Unfortunately I cannot make it work. It seems that the getBytesTotal and getBytesLoaded cannot be used on a movie clip?
Do you have any suggestions?
Best regards, Chaudhry.
Quote:
Originally posted by MatejKo
Hmmm. Jamescover I think this code isn't allright. His code is totally fine.
Maydays do you have a lot of pictures in your last page? Is the last swf of you page quite big? Do you export a lot of symbols for use in actionscript in the first frame?
Because what you have told might happen when you have a lot of symbols that are exported in the first frame (usually they take up more than 50% of the entire swf file). Note that this is because all those symbols are loaded first and only then the actual movie is loaded. You can overcome this problem by loading this swf from another swf and watch its progress from within the first swf.
If you need more help wait till tomorrow. ;)