OK, the real story here is the new ActionScript 3.0 Display API. The Display API is one the biggest differences between ActionScript 3.0 and ActionScript 2.0, and what makes this preloader simple is the ease with which ActionScript 3.0 lets us “add” and “remove” objects from the “display list.” (I’m going to assume a basic understanding the Display API and the concept of a “display list.” If not, Rich Shupe & Zevan Rosser have written one of the best introductions to ActionScript 3.0 in their Learning ActionScript 3.0 book. You should definitely pick that up if you’re new to the Display API.

However, let’s very briefly start at the beginning, so we’re clear about the relationships between SWF files, MovieClips, Sprites, and that thing called the “Main Timeline.”

Most flash applications are written with a flash authoring tool, such as Adobe’s Flash Pro CS4.  The flash compiler first converts the .fla file into “ActionScript bytecode” and then it puts that bytecode in a special format called SWF file.  Other programs called “Flash runtimes” execute SWF files.

.fla files can have objects or code in the timeline, and this is called the “main Timeline” of the flash application.