How to Create a Preloader
Preloaders are small animations that run while the main content is loading; they offer a nice distraction for users. Preloaders can be applied on websites, flash animations or games where they are seen animating while the main content is loading or downloading in the background. Preloaders are created using the Adobe Flash software. The Flash application comes with a built-in Loader and Progress Bar component, making it easy to build and set up a preloader component.
Instructions
-
-
1
Load the Flash program and create a new Flash file.
-
2
Create an entirely new scene for your Flash preloader. Set up two scenes, one for the movie and the other for the preloader, or add an extra scene if your movie already contains multiple scenes and move this scene to the first frame.
-
-
3
Click on the preloader frame and press F9 to bring up the Actions panel. Copy and paste the code below:
If (_root._framesload >=_root._totalrames) {
gotoAndPlay ("Scene 2", 1);
}
The above code specifies that when the total number of frames of the movie is greater or equal to the total number loaded, the timeline playhead moves to the first frame in Scene 2 where, in this case, the main movie resides.
-
4
Select the last frame of the preloader scene and click F9.
-
5
Copy and paste the code below to the Actions panel:
gotoAndPlay(1);
The above code loops the preloader over and over again until the main movie is loaded and ready to play after which the preloader disappears.
-
1
Tips & Warnings
To test your preloader animation, use the "View" "Simulate Download" option. Using the "Control" "Test Movie" option will result in the preloader loading too fast that you will barely notice it.
Progress bar preloaders can be used to let users know how much longer they have to wait before redirection to the main movie.
References
Resources
- Photo Credit Photodisc/Photodisc/Getty Images