| Creating advanced preloader - Flash Tutorial |
| BELOW IS THE EXAMPLE OF WHAT WE ARE GOING TO CREATE. |
Start with a new document. Create a new layer above display layer and name it fill. Choose the rectangle tool and create a rectangle without a border. Choose any dimensions and colour. Move this rectangle to the left. Insert a keyframe at frame 120 by pressing F6 key. Now move this rectangle to the center. Create motion tween between frame 1 and frame 120. Create a new layer above the fill layer and name it bar. Once again create a rectangle without a border and move it to center. Fill the rectangle with any colour of your choice but keep the dimensions similar to that of fill rectangle. Right click on the bar layer and choose mask. Create a new layer once again and name it border. Create a border of black colour. Dimensions as per the the rectangles created above. Finally, create one last layer above the border layer and name it message. Use static text option and write - loading .... Come out of the loader movie clip and back to scene 1. Drag the loader movie clip on to the stage form the library. Select this movie clip and paste the following code in the action panel. To open action panel press F9. |
| onClipEvent (load) { total = _root.getBytesTotal(); } onClipEvent (enterFrame) { loaded = _root.getBytesLoaded(); percent = int(loaded / total * 100); display = percent + "%"; gotoAndStop(percent); if (loaded == total) { _root.gotoAndPlay(2); } // end if } |
On frame 2 on the same layer add the the following actionscript |
Create a new layer above this one and on frame 2 start building your actual content OR for this purpose simply import a heavy image. Press ctrl + enter to see the preloader in action. You can simulate the download by going to the view menu and clicking the simulate download option. |
|
![]() |
Test your movie. |
| Hope you have enjoyed this flash tutorial on creating bar type preloader with actionscript. |
About Me :
I am a Web designer from Mumbai India. The recent changes
in web design standards has brought in lots of misunderstandings
and misconceptions. The idea behind the web 2.0 standardisation ....read the complete article
Following are the tools / packages and technologies I use for creating
my websites.
Contact Me :
Please contact me for web-design work
Please fill up the form :