Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preloader problem 1

Status
Not open for further replies.

mike101

Programmer
Jul 20, 2001
169
US
I have my preloader setup for dialup users that take awhile to have it load. The problem is (since it's a header) that every page it shows the preload percent going again. It doesn't reload the animation, but runs through the numbers quickly, but it's redundant and annoying. Is there a way to make it so once that part of an animation has been run it doesnt run it again even if it goes to another page and the flash is loaded again from the memory (its not redownloaded of course). Thanks.
 
Regards,

oldman3.gif
 
First off, your preloader will not display properly, at least at the beginning, because you're using a component, and some +/- 21KBs have to download on the first frame before you can see anything displayed.

One workaround is to create a preloader movie, which sole purpose in life is to load your present movie (without it's own preloader). The preloader will then display properly from the start, and when done, this preloader movie will actually be replaced by your present movie, by immediately re-loading it on level 0, thus replacing the preloader movie.

That's basically what I've done in my link above, only correcting the preloader display or not on a refresh.

As for skipping the animation, the only way would be to use the sharedObject as Bill suggested, assuming SOs weren't disabled. On the first frame of "interface" (with a stop(); action), you would then have to check if the SO already exists on the user's system (and if not create one!), then comparing the last login time (stored in the SO) with the present time, jump to frame 19 if the difference was more than 10 minutes. A lot of trouble to basically skip a 19 frames animation and at your frame rate of 17 fps which lasts but one second or so. Is it really worth it? I'd understand if the "intro animation" lasted a minute, but for skipping 1 second's worth of animation? Think it would take more time to check the damn thing than just playing it! But that's just my opinion! Regards,

oldman3.gif
 
oldnewbie, i like that, but is there a way so when they load it again it doesnt run the animation again? also can i get a link to the .fla? Thanks again.
 
I'm still not able to skip for some reason and I haven't been able to find the problem. Sorry bout taking forever to respond, our robotics regional has been going on for the past 2 nights. If you can please look at the file and see if you can find the problem that would be excellent. It's at Also, instead of just skipping to the Flash animation if it's been loaded before, can it be made to skip to the END of the Flash animation? Thanks again guys.
 
The only way to skip, is to use the sharedObject or an old javascript cookie, which IMHO, is even worst than the SO. Regards,

oldman3.gif
 
Well, I thought that

if(_root.getBytesLoaded() >= _root.getBytesTotal()){
gotoAndStop(3);
}

was supposed to work? Can you give me an example of the shared object? I still am having trouble grasping that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top