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.
 
in the first frame add a counter
var count= 0;

in the second frame

count = 1;

to the preloader
onClipEvent (enterFrame) {
if(_root.count ==0){
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per*1.85;
if (percent>99) {
_parent.gotoAndStop(2);
} }
}

Now it can only play them once
 
Add a blank keyframe as the first frame of your movie, with this code:

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

Since you'll be adding a frame also correct your prelaoder code to goto to frame 3 rather than frame 2. Regards,

oldman3.gif
 
Alright, I did that. One more thing... when the page is reloaded the animation gets repetitive too. Is there a way to skip that? I made a keyframe in the Layer 1 layer (the layer with the animation/interface) in scene 4, but can't get it to stay at the end of the animation. I've uploaded what I have to the same URL if you can check it out. Thanks guys.
 
You did what?

And what do you mean by re-loaded exactly? A browser refresh? Regards,

oldman3.gif
 
Actually, another thing also... is there a way to make it so that it will run the animation if it's been over 10 minutes since they last came to the site? So like whenever they come to the site each day it'll animate the first time they get there? Thanks again.
 
What I did was each time the user goes to a page, it reloads the animation and runs it. It gets repetitive there. So after the first time they see it I'd like for it to just skip to the last frame within that Layer 1, so the animation isnt repetitive and annoying. But I'd also like to do it where if it's been more than 10 minutes since they've accessed it or they've closed Internet Explorer, that it'll run the animation. Or does it automatically reload the FLASH when you close Internet Explorer and open it again? Thanks.
 
Alright, and what about the way to skip ahead into the animation when it's been visited so the animation isn't repetitive? Thanks.
 
Won't work if user has dissabled SOs... As I have done!

Based on the SO's (if not dissabled) last login time and the actual time, goto the appropriate frame, skipping whatever frames. Regards,

oldman3.gif
 
Sorry about the double "ss" in disabled above! Regards,

oldman3.gif
 
shared objects cannot be disabled with ease as cookies can. ill bet 99%+ of users machines will take shared objects.
 
Alright, but what about the Frame 4 for layer 1? I'd like to make THAT the place to go to if the thing's been preloaded already. But I don't want it to animate the intro I made, how do I make it so that Layer 1 is at the end of it's animation but doesn't run through it if the user has been there before? Thanks.
 
I'm still having this problem cause it's not skipping the second frame, and shows the load screen. The file is in the same place and you can see the animation at at the top. Thanks.
 
Well try Bill's code! If that doen't work, I may have another suggestion... Regards,

oldman3.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top