A Preloader is simple. Basicly it's just a movie that dosen't do anything until the movie has progressed in loading. All you need to do is:
1) Create a new scene in a current project. You could name this scene "Preloader" to help you navigate.
2) Select the rectangle tool and draw a long and thin rectangle. Now, select the rectangle you just created (including the lines) and press 'F8' to create a symbol of rectangle. Name it 'Progress Bar' or 'Bar'.
3) Once it has been transformed into a symbol, open it by double clicking it in the libary.
4) Goto frame 100 and select it. Press the 'F5' key to create frames up to that point.
5) Select the fill of your rectangle (and not the lines) and press Ctrl + x to cut it.
6) create a new layer and Select frame 1 in it. Press Ctrl + Shift + V to paste it in the same place. Make sure this new layer is the lowerest. If not, just click the layers name and drag it below.
7) Goto frame 100 on the fill layer and select it. Press 'F6' to make it into a keyframe. Now, go back to frame 1 and select
ALMOST ALL of the fill except for a tiny peice at the far left. Press 'Delete'.
8) Make sure frame 1 of the fill layer is still selected. Open the frame properties by right clicking on the frame in the timeline and selecting 'pannels' the 'frame' (flash 5) or by opening the properties (flash MX).
9) where it shows tweening: none, click the drop down menu and select shape.
10) Right click on frame 1 of either layer and click on 'Actions'. Then add:
11) go back to the preloader scene and select frame 5. press 'F5'. Then select frame 2 and press 'F6'. Do the same to frame 3 and frame 5. You should now have keyframes at frames 1,2,3 and 5.
12) add the following code to frame 2:
Code:
loaded = int(_root.getBytesLoaded()/_root.getBytesTotal()*100);
if (loaded>=100) {
gotoAndPlay (4);
} else {
tellTarget (bar) {
gotoAndStop (int(_root.getBytesLoaded()/_root.getBytesTotal()*100));
}
percent = loaded add "%";
}
13) Now add the following code to frame 3:
--------------------
IMPORTANT: You need to have another scene after the preloader scene with a stop(); command in it. If you don't, it will play the next scene the show then preloader scene again. To manage scenes, click the 'Window' menu then 'Panels', then 'Scene' (Flash 5) or just click 'Scenes' (Flash MX)
YOU SHOULD NOW HAVE A WORKING PRELOADER
