Flash / AS

Silverlight

WPF

ASP.net / PHP

Photoshop

Forums

Blog

About

 


FlashComponents
  Galleries
  Slideshows
  Menus
  Design & Effects
  Audio & Video
  User Interface
  Templates

 

 

 

 

 

 

 

 
Preloader
Animations

For large animations, it is best to have a small preloader attached to the beginning of your animation. Preloaders simply loop an animation until the user has loaded the animation to a certain point. I have created a simple preloader. Click on the link below to hear see it.

Click Here For Animation

If you didn't see a "Loading" sequence, it may be because you have a fast connection. Anyway, I have explained how it was done. First, you may want to download the source code for that file.

Preloaders themselves aren't complicated. It is the concept involved in creating one that takes a little bit of thinking. For the preloader I created, what I wish to do is:

" I want to have a small animation loop until the larger section with the sound is loaded. Once the sound has loaded, I want the animation to play that section. As long as the animation has not loaded up to the certain point, I do not wish to hear the sound"

It may sound a little crazy, but that is basically what I wish to accomplish by creating that preloader.

So, open the source code you just downloaded. The source code does not include the sound file, for that would make the code way to large for most users to download. The sound clip would be located at the frame labeled "sound". 

Here's How My Preloader works:

  1. First, right click on the first keyframe under the Layer marked "preload", then choose Actions. You should see a window similar to this.

  1. That is the code that says that "If the frame at label "sound" is loaded, go to and play the frame at label "sound".
     
  2. The third thing you should do, is make sure that if the Frame isn't loaded, that the user sees a small animation or word that says "loading" or something similar. The first five keyframes on Layer "preload" are for my simple loading sequence. The fifth keyframe has an action icon on the keyframe. Right click on that frame and choose "Actions". That is a simple Go To And Play command that takes the user back to the first keyframe. That accomplishes two things:
     
    1. Loops the animation for the user so that they can have something to watch while the movie loads.
       
    2. It also re-initializes the script on Frame 1 for the ifFrameLoaded so that if the movie has already loaded, it would take the visitor to the appropriate frame or frame label.

That's all there is to making a pre-loader. Just make sure you understand why each thing was done and why it is important. The first ActionScript command should usually include the ifFrameLoaded statement to compare a frame to. Then you will usually need to have a small Action for looping the introductory scene. Just experiment with my source code. If you want to, you can import a large sound file into the frame labeled "sound".

I hope the information helped. If you have any questions or comments, please don't hesitate to post them on the kirupa.com Forums. Just post your question and I, or our friendly forum helpers, will help answer it.

The following is a list of related tutorial and help resources that you may find useful:

How to use the Forums
New, Upcoming, and In-Progress Tutorials
How to Help out kirupa.com
Writing Tutorials
 

Cheers!

Kirupa Chinnathambi
facebook | twitter

 

 

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)