Ok, we get a lot of questions about pre-loaders here at the forum, and that’s cool. Lemmy just write something up for you really quick…
Make a new scene. Name it something like “load”. In this scene there is already a layer. Put all of your good stuff (graphics, etc…) in this layer. Or make new layers and put stuff there. It doesn’t matter.
Next, make a new layer on top of everything else, or on the absolute bottom of everything else. Name this layer “actions”. So far there is only one frame in this scene, so click the next blank frame, frame 2, and push F6. This creates a new frame. For all of your other graphics, push F5 on frame 2 of their layers. Ok? Now go back to the second frame on your actions layer. Select the second frame and bring up the actions panel. Type the following code into this frame:
gotoAndPlay(1);
[SIZE=1]* Note - All actions should be writin in the Expert mode.[/SIZE]
Ok. Now go back to the first frame of the actions layer. Select the first frame and again bring up the actions panel. Type/paste the following code into this frame’s actions:
bytesloaded = Math.ceil(_root.getBytesLoaded()/10);
bytestotal = Math.ceil(_root.getBytesTotal()/10);
_root.loadText1 = ""+bytestotal+"
"+Math.ceil(bytestotal/10);
_root.loadText2 = ""+bytesloaded+"
"+Math.ceil(bytesloaded/10);
if (bytesloaded == bytestotal) {
_root.gotoAndPlay(3);
}
Ok. I will explain this later. Now, go to a layer, any layer, and add a couple of text boxes, dynamic style. Give the first text box the Var name loadText1 . Now give the second text box the Var name loadText2 . Type some random characters inside these text boxes, like 6 letters or so. Don’t worry about what it says.
Now go and add another frame to the scene, frame 3. In the actions layer for this frame, add the following code to the actions panel:
gotoAndPlay("main", 1);
main is the name of your main scene.
Ok, now to dissect the scripts.
bytesloaded = Math.ceil(_root.getBytesLoaded()/10);
bytestotal = Math.ceil(_root.getBytesTotal()/10);
This declairs two variables, called bytesloaded and bytestotal. The ActionScript (AS) tells the movie to get the bytes loaded ( _root.getBytesLoaded() ) and divide the number by 10 ( /10 ). This is to make the number a decimal place smaller. It just looks good, you can take the ( /10 ) out. Then the code rounds this number up using Math.ceil.
_root.loadText1 = “”+bytestotal+"
“+Math.ceil(bytestotal/10);
_root.loadText2 = “”+bytesloaded+”
"+Math.ceil(bytesloaded/10);
The AS takes the two variables, and prints them into the text boxes you have made. NOTE - Make sure that your text boxes have a ** Var**iable name, not an instance name.
if (bytesloaded == bytestotal) {
_root.gotoAndPlay(3);
}
A simple if statement, saying that if the variable bytesloaded is equivalent to bytestotal, then the _root (timeline of the movie) should go to, and play at frame three.
<br>
- Hope this helps, if you need more help just ask

- Reed morse