Sanders provides a quick overview of Flash MX Professional 2004 and covers the core elements, frames and layers, and new features such as the document tab at the top of the Document window. (Macromedia Flash MX Professional 2004, by Bill Sanders, Sams, 2004, ISBN 0672326051.)
Getting to Know Flash Pro - The Timeline and Frames (Page 2 of 9 )
The Timeline in Flash represents a strip of "film" with frames. To understand how the Timeline works, imagine a film editor with a movable playhead that displays the contents of the current frame on the Stage when the playhead is moved over the frame. Figure 1.3 shows the Timeline. In this example, multiple Timelines (called layers) are visible simultaneously. (I'll describe layers shortly.)
Figure 1.3 The Timeline, layers, and playhead.
Frames
The frames in the Timeline represent the frames or cels in an animated movie. To understand frames in Flash, it helps to understand the process of traditional animation. Briefly, the traditional manual process of animating requires a master animator and one or more assistants. The master animator draws two different images representing changed characteristics of a scene. The frames in which the master animator draws the images are called keyframes. Between the pair of keyframes, the assistant animators (known as in-betweeners) draw the frames (or tweens) that change the image from one keyframe to the next. This process, called tweening, results in a smooth transition between keyframes.
Keyframes in Flash are the frames used to introduce new content in a document. When you move the playhead to a keyframe (or just click the keyframe), the content on the Stage is "entered" into the keyframe. Keyframes are created by clicking a frame and pressing the F6 key or selecting Insert, Timeline, Keyframe from the menu. A blank keyframe is recognizable by a black circle on the frame. If content is placed in the keyframe, the black circle is filled. The initial frame in a layer is always a keyframe.
The Flash playhead can be dragged to any frame or keyframe. When you select a frame by clicking it, the playhead jumps to that frame. The content on the Stage changes as the playhead is dragged left or right along the Timeline. Content in all layers is displayed as the playhead is moved over the frame containing the content.
You can label keyframes to make your program clearer and easier to debug. To add a label, select the keyframe and enter the label in the Frame window in the Property Inspector, as shown in Figure 1.4.
ActionScript in Keyframes - You can select a keyframe and add ActionScript 2.0 code that will be fired when the playhead moves to the frame. A keyframe with associated ActionScript code has a lowercase letter a next to the frame. (ActionScript is discussed in detail in Chapter 3, "Adding ActionScript to Your Animation," and used throughout this book.)
Figure 1.4 Property Inspector and labeled keyframe.
A regular frame (just called a frame) contains the same content as the keyframe to the left of it. If a frame is part of a tween, it will contain uneditable content generated by Flash's automated tweening process. Tweened frames contain the images equivalent to what the in-betweener artists do in a traditional animation process. However, because the tweened frames contain images with shapes, positions, or some other in-between changes between keyframes, they're "frozen" so that the animation process in the changes cannot be distorted.
Keyframes with no content are blank. If a blank keyframe is inserted in a tween, all tweened frames are destroyed. The best use of blank keyframes is to insert spaces in a layer; in other words, blank keyframes can act as frame "spacers."
This chapter is from Macromedia Flash MX Professional 2004, by Bill Sanders (Sams, 2004, ISBN: 0672326051). Check it out at your favorite bookstore today.