Ok for starters I'm using Flash CS3 with Actionscript 2.0, if your using the same version of flash make sure when creating a new document choose, actionscript 2.0. Once you have created a new file, you can import or draw the preloader, for an example let me show you mine:
As you can see it's nothing special, text on the top, some border around the fill and the fill in the middle, now that fill is the thing that will be moving while the procentage of the page is beeing loaded, so that fill must be converted into a movie clip, so select the fill, press F8 to convert it into a simbol and choose Movie clip:
Name it as you like. Once you have done that select that movie clip (or that fill), and you will see in the bottom left corner this:
In the box that says instance name, write loader_mc, so you can call this movie clip in action script. Once you've done that you can create a new layer, select the first frame and press F9 (or option F9 if your on a mac) to open up your actions panel. I'll just paste the code and then explain it.
myInterval = setInterval(preload, 100); // here we created a new interval and named it preload
function preload() {
var current = getBytesLoaded(); // in this var we store the information current bites loaded
var total = getBytesTotal(); // in this var we store the total bites loaded
var pctLoaded = Math.round(current/total*100); // we devide currnet with total to get the result
loader_mc._xscale = pctLoaded; // we tell the loader on the stage how much can that fill or movie clip strech depending on how much site has been loaded
if (current >= total) {
gotoAndStop ("scene1",2); // here we just tell it where to go once it finishes
clearInterval (myInterval);
}
}
Here's how it would look:
So you can put a large picture or something on frame 2, then whene testing the movie clip with control + enter, you can stimulate the download by going to view > download settings, choose the setting you'd like, then go to view > stimulate download and test if the loader works.
That's that, if you have any problems and question feel free to ask.