December 3, 2000 — updated November 13, 2001. See below.

Full Feature Flash Preloader

This preloader was developed by me in order to fulfill the needs of other flash developers, to have a full featured preloader that is easy to add to any Flash movie.

This is what you would call a "Smart Clip" seen in only in Flash 5. In order to keep it's usefulness and ease in which it can be added to movies, I had to resort to the Smart Clip format. Below is the example and downloadable source files.

Version: Flash 5


 
 


Sample

When I first started developing this preloader, there were several challenges or features that I wanted to have contained in an all-in-one movie clip:

  • Load only a percentage of the movie before it plays, while the rest streams in.
  • Have it all contained in a Movie Clip for easy drag-and-drop into your working files. No extra scripting needed.
  • Customizable percentage amount for loading using Smart Clip format, utilizing Clip Parameters panel.
  • Custom loading animation (optional).
  • Loading percentage progress bar.
  • Percentage loaded text output (optional).
  • Don't want the preloader to show up if the user is on a Fast connection. So it makes it very generic for every user.

Above is the results. In this sample, I'm loading an external SWF movie depending on what option you choose. Each of these external files contains the preloader.

Both movies that are loaded are nearly identical. The only difference is the percent I wanted to load in the movie before it starts playing the music. The 56k option loads only a 10th of the movie clip before it plays, so the user doesn't have to wait a long time. Then the clip plays as the rest of the music clip streams in.

In order for me to demonstrate the preloader for high speed connections, I decided that the DSL option will load 100% of the music before it plays. Otherwise, you may not even see the preloader work.

As an added benefit, if you are on a high speed connection, and you choose the 56k option, you barely see the preloader. This is great, because if you are targeting a large audience, all you have to do is set a good percentage of the movie to play for lower connections, and higher connections may not even see the preloader at all, making it a very smooth playback with no interruption. Of course this depends on the overall size of the movie you are loading, and the percentage you want to load before it plays.

Basically, I'm letting the loader play for about 1 second of frames before it detects how much of the movie is loaded. If it still needs more info, then it shows the preloader animation and graphics.

Another thing to note. This preloader works with a different kind of percentage value that many will be unfamiliar with, but the source file below instructs you how this works. The value works as follows:

1 = whole movie
2 = half of the movie
3 = third of the movie
4 = quarter of the movie
5 = fifth of the movie
etc.

This version is updated to preload the file in bytes rather than by frames.

This preloader works by getting the final size of your movie, then dividing it by the percentage you enter above. This is how much will be preloaded.

For example, if your final SWF size is 300k and want to load 100k before it plays, enter 3 for the percentLoad amount.

Generally, the larger or longer the movie is, the higher the number you use as the percentage value. This will make the preloaded chunk smaller.


Download v2.1

UpdateThe IK Preloader comes in either ZIP or SIT format depending on your system.

Flash 5 file download

Macintosh Stuffit File ik_preloader.sit

Windows Zip File ik_preloader.zip

 

If you have any further questions on how it was done, just drop me a note.