First time here? First time here? Newsletter Signup Newsletter
Search tutorials
Author: Tim Murray | Website: http://www.gmg.com.au

Designing the loader movie

The key to any Flash MX development is to know when to code and when to animate. Anything that can be quickly accomplished using the timeline, stage, movies and tweening should probably not be coded. Flash MX is great for this, it optimises well and runs fast, and the visual tools within Flash MX make for a rapid development cycle.

Our approach will be to do the graphic design work first, getting the feeling and style of what we want. Then we will incrementally build the code to support our preloader, so that we can test as we go along.

Start Flash MX and create a new file. Save it and call it something sensible. We picked "loader.fla" for want of a better name.

So, create a movie clip symbol, name it appropriately. We called it "loading" 'cos that's what it's going to say when we're finished. If you don't have the "Advanced" part of the dialog available, click on the "Advanced" button now. We will make sure that we export the movie for runtime sharing (so that we can use our loading movie in other Flash MX files once our primary Flash file, in this case "loader", is loaded), but don't bother with exporting the resource in the first frame (as this will cause an unnecessary delay while our loader is loaded for the first time in our main Flash file).

Now we go into our loading movie and create our loading animation using the design tools within Flash MX.

Our functions layer contains all of the ActionScript functions that our loader will need. We'll get to the scripting shortly.

The file info layer contains our dynamic text object that we will use to display our bytes loaded info. This will be handled from the scripting using a variable named "loadedText". We let Flash know this by typing in the name of the variable that we are going to use in the "Var" field in the Properties window.

The text layer contains the word "LOADING", and the shadows layer contains all of the pale grey squares that act as placeholders for the green boxes that we will be animating in as the file loads.

The remaining layers (creatively named Layer 3 to 15) contain our tweened box shapes. We created a layer, made a box shape, and duplicated the layer the appropriate number of times. Then we dragged the boxes on each layer where we wanted them and created the key frames by multi selecting the frames where we wanted the keys. Selecting all of the first key frames, we set a shape tween for all of our boxes then set the alpha to 0%. Finally we staggered the key frames out so that the boxes animated in one at a time.

Your loader movie may look different at this point (and rightly so), but the key parts that should be the same are the functions layer (where we will put some ActionScript soon) and the Dynamic Text object with the Var field set to loadedText (where we will place the bytes loaded feedback for the user). And of course, for more interest, you could always put extra movies in your loader (say, for a spinning 3D logo, flashing "LOADING" text, or whatever else takes your fancy). Just don't get too carried away!

Save it at this point.

» Level Advanced

Added: 2003-12-08
Rating: 8 Votes: 169
» Author
Tim is a co-director of the Glasson Murray Group, providing quality graphic design, illustration, 3D visualisation, interactive environments, virtual reality, multimedia and website services.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.