Playing preloader even if cache is stored in computer

If you look at sites like these:

http://www.rtrtechnology.com/

You still watch the preloader very quickly even though you have been to the site. But on other sites, the preloader doesn’t even show up if youve been to that site. I was just wondering how they do this?? I’m gussing a second animation that plays if the cache is stored or something? thanks

try adding some actions to you rmovie on a blank frame at the start of your movie. Something to the effect of

if(bytesLoaded = totalBytes){
gotoAndPlay(“MainScene”, 1);
}else{
gotoAndPlay(“PreloaderScene”, 1);
}

where you have already defined what bytesLoaded and totalBytes are. I haven’t tried this myself - let me know how you go.

Are you sure that will work? because that would mean the preloader will only play AFTER all the bytes are loaded, and that the preloader may play twice (if it goes to preloader scene, then to mainScene) :-\ Unless i’m misunderstanding something :-\

that, or you could prevent them from caching it. That would solve the problem, but would cause a lot of bandwidth to be eaten up.

found here: http://www.kirupaforum.com/forums/showthread.php?s=&threadid=25852

if all your bytes are loaded, instruct your movie to skip the preloader scene. i always keep my preloader in a scene of its own to keep my timeline tidy. Your scenes might go:

Scene 1 (the actions that check if the bytes are loaded)
Scene 2 (preloader)
Scene 3 (your movie)

if the bytes are loaded, it goes to Scene 3. If they are not, it goes straight to Scene 2 where your preloader is. If your Scene 1 has nothing on the stage, it will take no time to load and do the action straight away.

No garuntees that this works, but i can’t imagine why not. So long as you don’t have a stop action in Scene 1

Wait lemme get this straight, scene 1 is jsut to check if the bytes are loaded…This is only to CHECK right? then in scene 2, the actual loading begins??

But if scene 1 has bytles loaded = total bytes…then it will go straight to your movie. Then the preloader still won’t play right?? I’m getting confused :-\ thanks for the help so far though

Scene 1 is just to check if the bytes are loaded. This is only to check. IF the bytes ARE loaded already (as in you have already visited the site before and it is stored in your cache) you instrcut your movie to go straight to Scene 3, where you have the content of your movie.

IF the bytes AREN’T loaded, you instruct your movie to go to Scene 2, where a preloader will give you the progress of the bytes loaded. Flash plays the movie as it is loading, that’s why you have to create a looping sequence for your preloader. Because the content of Scene 1 is just some script (it will be less than 1kB) it doesn’t take long to load, so short in fact that the viewer won’t even realise that the movie is playing a blank frame. In the 2 milliseconds that the Flashplayer takes to load Scene 1, it will have read the script and executed it.

Here is my suggestion again:

SCENE 1 a script that says:

if(bytesLoaded = totalBytes){
gotoAndPlay(“Scene 3”, 1);
}else{
gotandPlay(“Scene 2”, 1);
}

where you include above that script either an action that gets the totalBytes (getBytesTotal) or you assign totalBytes a value (totalBytes = 76511516;)

SCENE 2 this has the preloader. Because Scene 1 is so small, it won’t take long before the player is ready to play Scene 2, where there is a looping sequence that stops the movie from continuing until all the bytes are loaded.

SCENE 3 this is your movie. At the end of Scene 2, your movie will go straight to Scene 3. The other way you got here was if the bytes were loaded in Scene 1 and it exectued the top part of the if condition.

In short, the preloader only plays if you visit Scene 2. But if the bytes are already loaded, it won’t visit Scene 2 because you told it not to in Scene 1.

Effectively, you have two preloaders, one that shows progress and one that just checks if the movie is loaded.

Savvy?

yeah i understand what you are saying…But IF the stuff is already in the cache, then whats going to animate the preloader just like on rtrtechnology.com? If you visit that site twice, you will see the first time, it actually slowly loads the preloader. But the second time you visit, the preloader plays very quickly (which it obviously isnt’ loading anything), it is just animating something.

Well all those are just my guesses :-\ i’m not really sure…would you know? thanks

Like I said before, I haven’t actually tried what I’m suggesting. It would pay to give it a go and see what happens. If your movie already has a preloader then all you have to do is add the scene at the start and the action on the first frame. Five minutes. Of course, you’ll have to put it online to test it, unless your eyes are quick enough using a non-streaming preview in Flash.

At least you’ll learn something in the process.

Ok i’ll give it a try, thx for the suggestions :).