Organizing Your Animation

As you see in a lot of the examples earlier in this book, you don't have to do a thing to your standard timeline, organization-wise. You can let Flash play your animation sequentially, from Frame 1 right through to Frame 500 (or whatever number your last frame is) with no problems.

If you need your animation to jump around and play out of sequence, though, there are a few ways you can do it. Which method is best depends on what you're trying to do. Here are three methods, along with their pros and cons:

  • Use labels to create bookmarks in the timeline. If you break an animation into named chunks with frame labels, then you give your animations the potential to be flexible and more interactive, because you can write ActionScript actions that target (act on) each individual chunk. For example, you can let your audience decide whether to play the ralph_reacts scene first, last, or skip it altogether. This method is one of the most popular, especially with the ActionScript crowd. It's easy to create labels and easy to use them in ActionScript. In short, wherever you use a frame number to refer to a specific frame in a timeline, you can also use a frame label.

  • Divide your animation into separate .swf files and load them as needed. This method is great if you have different teams working on a long animation. Team members can create movie clips independently, and then a master movie clip can load the other movie clips as needed. One of the advantages of this method ...

Get Flash CS5: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.