Flash tutorials
Home 3D (2) Actionscripting (66) Animation (108) Audio (4) Drawing (7) Full flash sites (4) Getting Started (15) Navigation (25) Special Effects (61) Text Effects (38)

Simple Professional Flash Preloader

8.7.2010, 22:47    Total views: 18185

Read this action script lesson and learn how to create professional flash preloader. You can use this preloader for any web site. Let's start!







Example:



Step 1

Create a new flash document. Press Ctrl+J key on the keyboard (Document Properties) and set the width of your document to 400 pixels and the height to 300 pixels. Select #161616 color as background color. Set your Flash movie's frame rate to 34 and click ok.



Step 2


Call the current layer preloader. Double-click on its default name (Layer 1) to change it. Press Enter once you have typed in the new name!

Step 3

Select the Text Tool (A) and go to the Properties Panel (Ctrl+F3) below the stage. Then, choose the following options:

1. Select a Static Text field,
2. Select a Zurich Blk BT as font type.
3. Choose 64 as font size.
4. Select white as font color,
5. As the rendering option, select Use Anti-alias for readability.



Step 4

Type somewhere on the flash stage loading. See the picture below.



Step 5

While the text (loading) is still selected, hit F8 key (Convert to Symbol) to convert it into a Movie Clip Symbol.



Step 6

Double-click on the movie clip on stage with the Selection tool (V). You should now be inside the movie clip.

Step 7

Call the current layer text. Double-click on its default name (Layer 1) to change it. Press Enter once you have typed in the new name!

Step 8

Click now on frame 100 of layer text and hit F5 key.

Step 9

Create a new layer above the layer text and name it percent.

Step 10

Select the percent layer, takle the Text Tool (A) and go to the Properties Panel again (Ctrl+F3) below the stage. Then, select the following options:

a) Select a Dynamic Text field .
b) Select a Times New Roman CE as font type.
c) Choose 26 as font size and bold it.
d) Select #C00F02 as color.
e) As the rendering option, select Anti - alias for readability.
f) for var type percent12



Then, draw a rectangle shape on the bottom left side of loading text. After that, type on that rectangle 99%. See the picture below!



Step 11

Go back on the main scene (Scene 1).

Step 12

Select the Selection Tool (V) and click once on the preloader to select it. Then, go to the AS panel (F9) and enter this code inside the actions panel:

onClipEvent (load) {
total = _root.getBytesTotal();
} onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
percent12 = ""+percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
}
}

Step 13

Select now the first frame and go again to the AS panel (F9). Then, enter this code inside the actions panel:

stop();

We're done now with the preloader. To see how it works, create a new layer above the layer preloader and name it movie. After that, click on frame 2 of layer movie and hit F6 key. While you're still on frame 2, import some movie or image into a flash stage. That's it!

Enjoy!

Download source file (.fla)

Have questions about this tutorial?
Visit our friendly Community Forums!
Digg it! Add this tutorial to del.icio.us! Furl it! Add this tutorial to reddit! Spurl it! Add this tutorial to technorati!

Top tutorials

1. Advanced full flash site - Part 1
Total views: 310977

2. High-tech city animation
Total views: 274205

3. Water effect
Total views: 237451

4. Photo slide show
Total views: 221126

5. Special Picture Effect
Total views: 190885



Related links

dans le cadre de leur collection automne / hiver 2008 de la ngc, marque japonaise a ainsi une fois de plus a porter.ADIDAS TUBULAR WOMENils ont travaillé sur l'ensemble des trois pieces et # 8211; un sac fourre - tout, une valise et un porte - clés / carte de voyage.ils présentent une gamme de produits classiques.le fait qu'elles offrent a la plupart d'entre eux en orange est un bon contraste.  via honeyee.ADIDAS ORIGINALS NMDon peut s'attendre a une libération de ce produit dans les semaines a venir.ADIDAS TUBULAR SCHUHEla broderie artiste kimberly scola est parmi ceux qui participent a ce los angeles & # 8216; & # 8220; cette fete et # 8221; exposition,ADIDAS YEEZY BOOST 550 inaugurée vendredi dernier.ADIDAS EQUIPMENT 10a l'occasion de l'ouverture, en cas de scola a collaboré avec une tapisserie de 100 faux sacs fourre - tout.Adidas Adizero F50 FGces agréables rappels d'un événement,ADIDAS X PLR malheureusement, seulement deux jours de liaison.ADIDAS MESSI 16.3 ICles points saillants de & # 8220;StartAdidas Ultra Boost Uncaged cette fete et # 8221; et une liste de cas suivent l'artiste.ADIDAS ACE 16.3 TF