So ya need a preloader you say?
Well lets get cracking.
**this is for as2 not as3**
First create a new flash document then press f8 to create a new movieclip (MC)
Now create an 100 frame animation exactly of a progressive bar loading or an intro animation or something. Not 99, not 101.
100.
example:
Yay you made a 100 frame animation, good job. Now make three blank keyframes on the main timeline in the beginning (right click > Insert Blank Keyframe). Highlight the third keyframe and go to Properties. Set the frames name as "start" without the quotations.
Next put your 100 frame animation in the first two frames, make sure they are in the same place in both frames though. Now on both of the 100 frame animations on both frames add this code
- Code:
-
onClipEvent (enterFrame) {
gotoAndPlay(_root.percentDone);
}
Make sure this is on the Movieclip, not the frame or it won't work!
Finally in the actions of the first frame add
- Code:
-
totalBytes = Math.round(getBytesTotal()/1024);
loadedBytes = Math.round(getBytesLoaded()/1024);
percentDone = Math.round((loadedBytes/totalBytes)*100);
if (_root._framesloaded>=_root._totalframes) {
gotoAndPlay("start");
}
and on the second frame's actions add
- Code:
-
gotoAndPlay(1);
Basically:1. Create an one hundred frame animation in a mc
2. In another mc create 3 blank keyframes
3. Name the third frame "start" without the quotations
4. Put your mc in the first two frames
5. Add the script
tada, now give yourself a pat on the back =3