1:Open New Flash Document and create a new scene, rename the scene "preloader" (without the "s)
2: now create 3 layers (you should now have 4 layers all together) and name
the very first one starting from the bottem up Bar, the one above that, Outline, the one above that, Text, The one above that, Actions
3: On the Bar Layer Create what you want to fill up, Usually a rectange, so just select the
rectangle tool and make a bar. (Width big length small:_________________
|_________________|
The fill color should be the color that you want to fill up inside of the bar.
4:Now double click on the outer edge of the Rectange so that you have only the lines selected not the Fill and hit Ctrl+X or just go to edit and cut it.
Paste it in place (Ctrl+Shift+V) on the Outline Layer.
5:Now select the bar layer and create another layer so that you now have a layer inbetween Bar and Outline, Rename the newly created layer to Mask.
6: In the mask layer select the Rectange tool again and check that it won't have lines (select the color for the line and go to the white box with a red stripe through it).and the fill color a Bright Green but easy to see around (yes all the way around (like starting at the Bars left edge and ending at the right but make sure it fills up the whole outline/bar. Now select the Green Rectange and hig F8 or right click and convert to symbol. Name it: mask_mc : and give set the registration point to the very left middle spot
+++
-> +++
+++
and hit OK. Now give it an instance name of: mask_mc : now select the Mask layer right click it and select Mask. If the bar layer isn't already selected to the mask so that it will reveal the bar layer than select it and drag it kind of into the middle of the mask layer.
7: Now lock all the layers except for the Text layer and put whatever text you wanna put in... Preferably Loading...
8: Now select the first frame of the Actions layer and hit F9 or right click and go to Actions. Now were going to put in some lines of code that will make the bar start from one end and go more to the left as the animation loads.
Actions:
stop();
masc_mc._width = 1;
this.onEnterFrame = function():Void {
var loadedData:Number = this.getBytesLoaded();
var allData:Number = this.getBytesTotal();
var percent:Number = Math.round(loadedData/allData*100);
mask_mc._xscale = percent;
if(loadedData>=allData) {
gotoAndPlay();
delete this.onEnterFrame;
}
}
NOTE: the gotoAndPlay function your going to have to put the Scene 1 (or whatever you renamed the other scene) and then a comma , then the scene number. NOTE2: The scene name needs to be inside " Ex:
gotoAndPlay("Scene 1",1);
That is it! good luck to you all and if you have questions be sure to post em \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/