Flash - Create a simple preloader |
| BELOW IS THE EXAMPLE OF WHAT WE ARE GOING TO CREATE. |
In this tutorial I will show you a very easy way to create preloader with few lines of actionscript. |
A very basic flash preloader. This type does not require advanced knowledge of actionscript. Just 3 lines of code with explanation. The only objective here is to show some basic animation till the actual movie loads. Open an existing movie OR create a new one. Add a new scene by going to Insert >> Scene. Rename this newly added scene to "loader" or any name you fancy. Change the order the scenes by click - dragging the loader scene above scene 1. This can be done via the panels window ( Windows >> Other Panels >> Scene ). In frame 1 of loader scene press F9 and add the following actionscript. ifFrameLoaded ("Scene 1", 1){ Add text "Loading ..." using the text tool. Convert this into a movie clip. ( Select the text >>modify >> convert to symbol >> movie clip ). On frame 5 of the same layer insert a keyframe. Right click anywhere between frame 1 and frame 5 and create a motion tween. Now is the tricky part. For every alternate frame delete the text. For example your sequence should be text >> blank >> text >> blank and finally text. In frame 5 add the follwing actionscript. gotoAndPlay ("loader", 1); |
![]() |
Here is the Explanation. |
The Explanation. ifFrameLoaded ("Scene 1", 1) .... 1 stands for the number of frames the actual movie is utilising. This can vary from movie to movie. In my case it is one big image on a single frame.Now, we have to loop this animation over and over till the main movie ( Scene 1 is full loaded ). This is done by the the following actionscript gotoAndPlay ("loader", 1); Finally when the movie is fully loaded, start and play from frame 1 , Scene 1 [ gotoAndPlay ("Scene 1, 1); ]. |
Hope you enjoyed this small tutorial on how create a simple preloader in FLASH. |
About Us :
We are a Mumbai ( India ) based webdesigning company. 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
We use following tools / packages and technologies for creating
client websites.