Developing preloaders in Flash

Here is a tutorial that helps you to develop a simple Flash preloader using Flash MX 2004 and ActionScripting in easy step-by-step practice.

Step1 : Open macromedia flash MX, open the flash file that you have designed. To incorporate preloader to it, add a scene to it, ny selecting the Window -> scene menu.

preloader

Step2 : Rename the newly added scene as "preload" as show below.

preloader

Step3 : Drag the scene and place it at the top if the window.

preloader

Step4 : Add a key frame and add a layer containing key frame with words "Loading".

preloader

Step5 : Create Motion Tween for the frame.  

preloader preloader

Step6 : Add a new layer above this layer. in the first frame right click and under actions pane add the following. 

preloader

Step7 : Under the Actions section add the below given code.

if (_framesloaded>=_totalframes) {
gotoAndPlay("Scene 1",1);
} else {
gotoAndPlay("preload",1);
}


Step 8 : Add a key frame in the last frame. Right click to add actions. Under actions add the below given code.

preloader

Step9 : Under the actions the below given code.

preloader

Step 10 : Now run the flash file by pressing CTRL+ENTER. The flash intro that you have prepared will run. To play the flash file along with the preloader, click View -> Show Streaming as shown below.

preloader

Here is the complete source file which are used in the sample, feel free to download and play around.

developing flash source files preloader.zip (3.28).

articles

http://s9.addthis.com