Hey there,
It’s definately not a problem to explain it more carefully (that’s probably what i should have done in the first place).
Ok… first to explain the code I gave:
loadedbytes = getBytesLoaded();
// this checks how many bytes of your site have been loaded (downloaded) thus far
totalbytes = getBytesTotal();
//this checks what the total size of your movie is (in bytes)
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
//these two variables only change the information from bytes into <b> kilo</b>bytes. Basically making the information into K.
if (loadedbytes == totalbytes) {
gotoAndPlay (“main”, 1);
}
//this says if the amount of loaded information is equal to the total amount there is (aka… you’ve downloaded the whole thing), then go to a scene called main, at the first frame.
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
//this code was specific to my file. I had an animation that ran during the preloader… so the users wouldn’t get board waiting for your movie. It basically says that get an integer (or whole number… no decimals) value from dividing totalbytes by 100, and use that sum to divide into loaded bytes (or in other words, this makes a percentage). Because my preloader was only 100 frames, this makes it stop at a percentage. Afterwards it tells my preloader movie to gotoandStop at the percentage (or frame between 1 & 100).
Ok I think that was pretty detailed, and should give you a good idea of what’s going on.
So… to makes this work you insert that code I pasted above into frame 1 of a scene called preloader. On frame 2, you put in the actionscript of :
gotoAndPlay(1);
This makes it so that all your code in frame one gets check (and your preloader updated, then on frame 2 it tells it go back and play frame one again. So it just repeats and repeats while updating your preloader.
Just make sure that your main content (everything that’s supposed to come after the preloader) is in a scene called “Main” (no quotes).
Well… I think that’s covers pretty much every single point.
I hope that helps you a bit, and don’t ever worry about asking for more help if you don’t understand… that’s the whole point of a help forum.
Cheers,
Uth =)