|
|
This tutorial will teach you how to make a preloader like this one (sorry about the music, it was the only thing i could find big enough to show you an example!)
Firstly you'll need to set the timeline out into the necessary layers:
on the squares layer, press F5 in the second frame to make this stretch over 2 frames on the stage, draw a square:
Right-Click > convert to symbol > movieclip > name it "Square" double click the square to open the movieclip, now right click the frame 1 (there should only be one frame here) and press "Create motion tween", now go to frame 6 and press F6 to create a keyframe, this is how the end square will look. on frame1, right click the square and press "free transform" now make the square really small but still seeable. Create a new layer, and press F6 in Frame 1 and then in Frame 6 in frame1 press F9 to open up the actions layer in frame 1 and 6 in the actions box type stop();
I used 2 layers one for the border and one for the center, but you don't need to, now your layers should look something like this: now go back to the root layer, press F11 to open up the library and drop 9 more of the squares onto the stage, but them in a line equal distance apart:
now in the background layer press F5 again in frame 2 and create a nice clean background to go behind the squares:
Create 2 text boxes on the stage, open up the "properties" menu, one of the text boxes should be static text with just a "%" in, the other should be dynamic text - slightly longer:
click the slightly longer text box, and make sure the settings in the "properties" menu match the ones below:
now select the square on the far left and give it an instance name of sq1:
go to the next on across and give it the name sq2 etc etc until you finish on sq10 :) now its time for the actionscript!!
on the "actions" layer press F6 on the 2nd frame
in the first frame open up the actions panel (F11) and insert the following code: totalBytes = Math.round(getBytesTotal() / 1024); // gets the total size of the movie in KB
in the next frame, just enter gotoAndPlay(1);
now to test that it has worked, but a large file like an MP3 on frame 3 and then press control > test movie on the window that opens up do this:
and then press simulate Download to get a real time version of how different speed internets will load it :)
that's all! have fun!! Source1 - preload.fla (right-click > "save target as" to download) Source2 - preload.swf (right-click > "save target as" to download) Sponsored Link
|
|
No comments have been left on this tutorial |


