-
Strange preloader problem
I'm having trouble with a preloader that I have used in other movies with no problems at all. I basically copy and paste the frames into a new scene which I name preloader, and keep the same frame and scene naming conventions from movie to movie. However this new movie seems to completely ignore the preloader scene when I test it. The published swf is large enough to where I definitely see a lag between the web page loading and the swf loading into it. I normally make sure they're working by choosing "view>show streaming" where I can watch the preloader work frame to frame. here's how I have the preloader scene scripted:
Frame 1 labeled "preloader"
lBytes = _root.getBytesLoaded();
tBytes = _root.getBytesTotal();
percentLoaded = Math.floor((lBytes/tBytes)*100);
loadBar._xscale = percentLoaded;
loadText = percentLoaded+"% of "+Math.floor(tBytes/1024)+"K";
Frame 2
if (lBytes>=tBytes) {
gotoAndPlay("main", "start");
} else {
gotoAndPlay("preloader");
}
then of course my next scene is named "main" with the first frame named "start". I've looked at this over and over again and can't seem to find anything wrong with it. Like I said, I use this exact same preloader in other swf's and it works fine. Any ideas?
-
So what's the problem on this? Preloader only shows up at the end of the loading process?
When you test it with show streaming, does it stay on frame 0 for some time?
-
Actually yes, during streaming it is staying on frame 0 for nearly the entire load. Why is it doing that?
-
Because you're either using components, or attached movie clips and/or soundObjects (with linkage set to export on the first frame), or have set up new fonts in your Library.
All the above will prevent your preloader (although it's still may be working properly) from displaying anything until all of some elements in the above list, have all downloaded on the first frame.
2 workarounds. The easiest is to create a new preloader only movie, that will load this present movie of your's, cleared of it's own preloader...
http://odin.prohosting.com/~oldnew/f...ng/preload.htm
http://odin.prohosting.com/~oldnew/f...ng/preload.zip
-
That's exactly what it is; I'm using a scrollpane component as well as serveral linkaged movie clips. Never would've figured that one out on my own. Thanks a bunch!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|