[F5] Preloader won't work!

Hi, i am trying to write a preloader for my flash webpage, using the tutorial given here. I have a single instance of a movie in my root timeline that I want the flash file to play after it has loaded. I currently have two layers in my root, one that has the movie i want to play in it in frame 2 (wiht nothing in frame 1), and another that has only a preloader animation in frame 1. The code i ahve associated with frame 1 (in the preloader animation layer) is:

if (_root.page1._framesloaded>=_root.page1._totalframes) {
gotoAndPlay (2);
} else {
gotoAndPlay (1);
}

(page1 is the instance that i want to play after it has fully loaded)

and the code that i have in the second frame of the layer containing the instance page1 is:

stop();

Whenever I try and export the movie and run it, i just get a blank screen. Im probably doing something stoopid, but i cant figure it out, and i have to hand it in in a few hours :frowning: Thanks for any help anyone can offer.

nic.

change the code to this:


if (framesloaded>=totalframes) {
gotoAndPlay (2);
} else {
gotoAndPlay (1);
}

and if you don´t see the preloader, it is coz it is not preloading…the swf is in your machine! :wink:

to emulate a preloader, hit ctrl+enter (to test the movie), and when testing hit ctrl+enter again (to test the movie in emulated real time download). you may want to hit ctrl+b to see the bandwidth profile, and mess up with the debug menu for different speed conections.

Cheers :flower:

Thanksq, but I tried that originally, although i used underscores before the total and number of frames properties. This does make the preloader appear for a short time, but i think that its only loading some of the movie, because when it dissapears and the movie plays, it still plays slowly for a while, and continues to load. I though that by putting my whole file into another movie clip instance, and then checking _root.movieclipname.framesloaded>=_root.movieclipnametotalframes it would force flash to check the size of the whole movie. :q: thanks for the help though.

…is not because it is still loading…it is because it is cpu intensive.

:slight_smile:

ohk! thanks. Its nice to know that im making my pc think other than by playing games :wink: