Frames
You'll recall from Lesson 1 that the Timeline is divided into Frames,
and each Frame represents a snippet of time. How long that snippet of
time is depends upon what frame rate you've set in your movie. Each
frame in the Timeline is played chronologically, starting with Frame 1
and continuing until your movie's end, unless the playhead is directed
elsewhere by a script or user action.
Animation is created by rapidly displaying a series of still images,
each varying in position or with subtle differences in appearance. This
process simulates movement and gives the impression of life and movement
to an image. You manipulate an object on the Stage at different times
(frames) in the Timeline by placing the object in different positions.
This time-based, or frame-by-frame, animation is the basis of Flash (and
traditional) animation.
When you launch a new movie, there's only one frame on one Layer. You
add frames to your Timeline by choosing Insert >
Frame from the main menu or pressing the F5
key. There's also a contextual pop-up menu for Frames that you can
access by Control+clicking the frame (Mac) or right-clicking the frame
(Windows) and selecting Insert Frame. To add
multiple frames, click ahead in the Timeline (to a higher-numbered
frame), and then press the F5 key. The
Timeline fills with frames to the frame number you clicked. (You can
also add frames to multiple Layers by shift+selecting the frames of
adjoining layers first, then performing one of the preceding actions.)
Deleting or removing frames is just as easy -- simply select the
frame by clicking it and press Shift+F5, or
access the frame context pop-up menu by Control-clicking the frame (Mac)
or right-clicking the frame (Windows) and selecting Remove
Frames.
use Keyframes
Keyframes are frames that contain new content. Whenever you drag a
symbol, button, or other element from the Library onto an empty Stage,
the current frame automatically becomes a keyframe. Keyframes are
essential to the Flash animation process. They're indicated by a bullet
in the Timeline: a solid bullet indicates a frame with content, and an
empty bullet indicates a blank keyframe with no content on the Stage, as
shown in Figure 2-1. A blank keyframe, however, may contain a label or a
script. In fact, for a frame to contain a label, it must first be
converted to a keyframe.

Figure 2-1: An empty bullet indicates a
blank keyframe with no content on the Stage.
You can create a keyframe in a number of ways -- just select the
frame in the Timeline by clicking in it, and do one of the following:
 | Choose Insert > Keyframe.
|
 | Press the F6 key. |
 | Control+click (Mac) or right-click (Windows) the frame and then
select Insert Keyframe from the pop-up
menu. |
To give a keyframe a name that you can access with ActionScript, you
need to create a frame label. To label a
keyframe, click in the frame and type a name into the Frame Label text
field in the Property Inspector, as shown in Figure 2-2. If your
Properties panel isn't showing, choose Window >
Properties, or press Command+F3 (Mac)
or Ctrl+F3 (Windows).

Figure 2-2: The Frame Label text field in
the Property Inspector.
Blank keyframes, or keyframes with no content on the Stage, are
indicated by an empty bullet. To create a blank keyframe, choose Insert
> Blank Keyframe, press the F7 key, or Control+clicking (Mac)
or right-clicking (Windows) the frame and selecting Insert
Blank Keyframe from the pop-up menu.
To clear a keyframe and blank keyframe, click the keyframe to select
it and perform one of the following:
 | Choose Insert > Clear Keyframe.
|
 | Press Shift+F6. |
 | Control+click (Mac) or right-click (Windows) the frame, and select
Clear Keyframe from the pop-up menu. |
You can also move a keyframe or a blank keyframe by clicking the
keyframe and dragging and dropping it into another frame number.
add comments
Instead of applying a name to a keyframe, you could apply a comment.
Sometimes in larger or more complicated movies, writing comments on
frames allows you to keep track of changes to objects or to scripts in a
particular frame. To add a comment to a frame label, type two forward
slashes (//) at the beginning of each line of text in the Frame Label
text field in the Property Inspector, as shown in Figure 2-3.

Figure 2-3: Type a comment by inserting
two forward slashes (//).
assign named anchors
In Flash MX, you can assign Named Anchors to keyframes. You couldn't
do this in Previous versions. Named Anchors allow you to use your
browser's Forward and Back buttons when playing back your Flash movie in
HTML. To use the Named Anchor keyframe function, you have to publish
your movie with the Flash with Named Anchors template setting. You'll
learn more about publishing your movie in Lesson 6.

Layers
Frames are one important part of Flash animation; the other critical
aspect is Layers. Recall from Lesson 1 that the Timeline is divided from
top to bottom into transparent Layers that you can stack and rearrange
to produce different spatial effects and visual depth.
Other reasons to use layers:
 | To tween animate an object, it must be on its own Layer. |
 | You may want
to lock or hide a layer if it's part of a larger animation that you
don't want to inadvertently edit |
 | You may want to move your layer to
the top or the bottom of the stack to give your object's animation
another perspective |
 | You may want to keep all the layers in one animated
sequence in one folder |
 | You may want to use a layer as a
drawing guide or a motion guide. |
For quick access to the Layers Properties box, double-click the Layer
icon (to the left of the Layer's name).
create motion guides
Guide layers are layers that can be used to align objects when you're
drawing on the stage with the Snap to Guides feature on (select View
> Guides > Snap to Guides). To use guides for drawing, make
sure the Ruler is visible by choosing View >
Ruler. Then, just click your mouse on either the horizontal or
vertical Ruler, and drag and drop your guide wherever you want, as shown
in Figure 2-4.

Figure 2-4: Drag and drop your guide.
Depending upon your stage's color or the color of the objects on your
stage, you may need to change the guide's color for better visibility.
To change your guide's color:
- Select View > Guides > Edit Guides.
- Choose a new color from the Color pop-up list.
You can use guide layers to create a Motion Guide by selecting a layer
and clicking the Add Motion Guide icon in the Layers panel (between the
Add Layer icon and the Add Folder icon). You'll see how to use a Motion
Guide later in this lesson's assignment.
create mask layers
If you've used masking in other graphics applications, you'll find
the process is the same in Flash. Basically, any solid filled shape on a
masked layer is transparent (completely see-through, like a pane of
glass), whereas any blank or empty space on that layer is opaque (a
solid shape you cannot see through). Using a mask layer to create a
spotlight effect (where you create a hole through which you can view
underlying layers), or using letters as a mask with a bitmap file in a
layer below, are two popular examples of how masks are used in Flash Web
sites.
To create a mask layer, first make a solid, filled-in shape with the
drawing tools place it on a layer. This shape will be used as the mask.
Then link the underlying layers you want the mask to show by setting
their Layer property to Masked. The mask layer
hides any other unlinked layers beneath it.
animate in Flash
As you know, animation is created by rapidly displaying a series of
still images, each varying in position or with subtle differences in
appearance. In Flash, you can animate objects two different ways: by
frame-by-frame animation and by tweened animation.
 | Frame-by-frame animation: Created by
having a series of keyframes containing images that are slightly
different in appearance, position, or behavior in each consecutive
frame. Basically, you place an object on the stage in a keyframe, go
ahead in the Timeline and make another keyframe in which you move
your object's position on the Stage. When you play your movie back,
the rapid display of frames gives your object the appearance of
movement. |
 | Tweened animation: Start and end with
keyframes, with Flash automatically creating and rendering the
tweened (or in-between) frames. Flash's tweening can also scale and
rotate your object, giving the appearance of depth as well as
movement. Both motion tweening (giving an object the appearance of
movement) and shape tweening (morphing one shape into another) can
be performed automatically by Flash between keyframes. Only Symbols
on a layer can be motion-tweened, whereas any shape on the Stage and
in one layer can be shape tweened, as long as it's not a symbol or
grouped in any way
|

Animate
To create your first frame-by-frame animation, follow these steps:
- Open the Flash file FlashMX01_solution.fla.
The symbol you created in Lesson 1 should be sitting on the Stage in
a keyframe in frame 1, as shown in Figure 2-5.

Figure 2-5: The symbol in frame 1.
- Click and drag your symbol to the left edge of the Stage.
- Click in frame 5 of the Timeline, and press the F6
key to insert a keyframe.
- Drag and drop your symbol halfway across the Stage.
- Click in frame 10 of the Timeline, and press the F6
key to insert a keyframe.
- Drag and drop your symbol to the right edge of the Stage.
- To view your animation, select Control >
Play, or simply press Return (Mac)
or Enter (Windows) on your keyboard.
To create a motion-tweened animation, follow these steps:
- Undo the frame-by-frame animation you just created by clicking in
frame 5 of the Timeline and pressing Shift+F7
to clear the keyframe, or right-clicking the keyframe and selecting Clear
Keyframe. You're left with a keyframe in frame 1 and a
keyframe in frame 10.
- Click the Layer to select all of its frames by clicking any empty
space in the Layer, not on one of the buttons.
- In the Frame Properties panel, click the Tween pop-up menu and
choose Motion, as shown in Figure 2-6.
Notice that an arrow appears between your keyframes in the Timeline,
indicating you've applied tweening to those frames.

Figure 2-6: Choose motion.
- To view your animation, choose Control >
Play, or click back on the Stage and simply press Return
(Mac) or Enter (Windows) on your keyboard.
The Frame panel's Tween pop-up menu (Step 3) has a couple of other
options: None, which removes tweening, and Shape,
for shape tweening. To the right of the Tween menu is a Scale checkbox,
in case you want your tween's size to scale.
Below, there's the Ease text input field,
which enables you to control the rate of change between your tweened
frames. Simply type in a positive or negative integer or use the Ease
slider bar to create a slower tweened start or faster tweened start.
If you want Flash to rotate your object while tweening, choose a Rotate
option from the Rotate pop-up menu (your
choices are None, Auto, Clockwise, or Counterclockwise),
and enter the number of rotations you'd like in the Times
input text box. The Synch (Synchronization)
checkbox synchronizes the playback of any symbols that may differ from
the main movie's Timeline. The Orient to Path
and the Snap checkboxes aid in motion tweening
on a path, which we'll explore next.
To create a motion tween to track a specific path, follow these
steps:
- Continuing with the file you've been modifying, click the Add
Motion Guide icon in the bottom of the Layers panel, as shown
in Figure 2-7.

Figure 2-7: Add Motion Guide Icon.
You can also right click the layer and choose Add Motion Guide from the
pop-up menu.
- Choose the Pencil tool from the Toolbox, and click Smooth
in Options pop-up menu, as shown in Figure 2-8.

Figure 2-8: Choose Smooth.
- Click in the Motion Guide layer, and draw a wavy path with the
Pencil tool up and down across the Stage. (You can also draw a path
with the Pen or Line tool, or you can create a path using an empty
-- no fill -- Circle or Rectangle.)
- Click back on Layer 1 in the keyframe of frame 1.
- In the Frame panel, Motion is still selected in the Tween pop-up
menu from our last exercise. Check the Orient to
Path box, and the Snap box in order
to snap the center (registration point) of your symbol to the motion
path.
- Back on the Stage, click your symbol and drag it to the beginning of the
motion path until a small circle appears, indicating that your
symbol is recognizing the motion path. Snap
the center to the beginning of the path.
- Click your ending keyframe in frame 10. Click back on your symbol
on the Stage and drag it over the other end of the motion path until
the small circle appears in the center of your symbol. Snap the
center to the end of the motion path.
- Make sure the Orient to Path and the Snap
boxes are checked for this keyframe, too.
(Is this necessary?)
- Hide the Motion Guide layer by clicking its bullet in the Eye icon
column.
- Press the Return key (Mac) or Enter
key (Windows) or choose Control > Play
to watch your tweened symbol following the motion path.
To see a completed example of motion tweening or motion tweening on a
path, download and open the Flash file FlashMX02.fla
.
The last kind of tweening we'll learn in this lesson is shape
tweening, in which you take one shape and morph it into another shape.
You'll do this in the assignment for this lesson.

Onion Skins
There are four useful icon buttons at the bottom of the Timeline
(from left to right):

 | Onion Skin: Use to view all the frames
of your tweened animation, not just the keyframes. |
 | Onion Skins Outline: Use to view the
tweened frames in outline. Click and drag the Onion Skin Markers to
change their positions. |
 | Edit Multiple Frames: Flash enables you
to edit multiple frames at one time. This is especially handy when
you want to move objects with multiple frames and keyframes. Let's
look at how to use this capability. |
 | Modify Onion Skin Markers: Pops up a
menu that provides you different ways to display the frames within
the Onion Skin markers. |
To move a block of frames using Edit Multiple Frames:
- Make sure all layers containing the frames you want to edit are
not locked. Be aware that if these layers are locked, you won't be
able to use Edit Multiple Frames or Onion Skins.
- Click the Edit Multiple Frames button in
the Timeline. Drag the Onion Skin Markers to cover the frames you
want to edit.
- Shift+select the frames you want to move
by clicking the first frame while pressing and holding the Shift
key on your keyboard, and then clicking the last frame.
- Click and drag the block of frames you selected and drop them
where you want to in the Timeline.
moving on
So we've finished Lesson 2 and you've already created some
animations. Now try shape tweening in the assignment for this lesson,
and then take the quiz just to check your new knowledge.

Assignment: Shape tweening
Go ahead and open Lesson 2's Flash file, FlashMX02.fla.
You'll use it as you work through the assignment.
You'll recall from this lesson that to tween a shape, you take one
shape and morph it into another shape. Although motion tweening requires
your object to be a symbol, in shape tweening, your object must be a
simple shape -- not a symbol, and not
grouped.
To tween a shape:
- On the Stage, in Layer 1, keyframe 1, choose your symbol and break
it apart by choosing either Modify > Break
Apart twice (once to break apart the symbol, and once to
break apart the Group). Or, press Command+B
(Mac) or Control+B (Windows) until you can
see your circle's fill and outline shapes selected separately.
- In the same Layer, click in keyframe 10, choose your symbol and
delete it. You should now see an empty bullet in the Timeline,
indicating a blank keyframe.
- In keyframe 10, draw a second shape with the Rectangle tool. Give
it a different stroke and fill color.
- Click back on Layer 1 to select all the frames.
- In the Frame panel, choose Shape from
the Tween pop-up menu. From the Blend pop-up menu, choose Angular
(for blending shapes with angled corners and straight lines), or Distributive
(for preserving rounded shapes). Since we're going from a circle to
a square, choose either option.
- Press Return (Mac) or Enter
(Windows) to watch your shape tween in action. In the Timeline,
notice the slight color tint indicating the tweened frames.

Quiz
Question 1
When you apply motion tweening to a layer, ___________________.
A) only one group or symbol is tweened
B) all groups or symbols on the layer are tweened
C) only groups are tweened
D) only symbols are tweened
Question 2
To be shape tweened, a shape must_________________.
A) contain solid colors only
B) be alone on a layer
C) not be a group or symbol
D) be different in the next keyframe
Question 3
What does a solid bullet in a frame in the Timeline indicate?
A) There's nothing on the Stage.
B) It's a blank keyframe.
C) There's tweening animation.
D) There's a new object or another kind of change on the Stage.
Question 4
What does an empty bullet in a frame in the Timeline indicate?
A) There's an object on the Stage.
B) It's a blank keyframe.
C) There's tweening animation.
D) There's a new object or a change to a previous keyframe.
Question 5
Which statement is correct about frame-by-frame animation?
A) It adds to the file size of a Flash movie.
B) It's a built-in feature of Flash MX.
C) It breaks your Flash movie into sequential sections.
D) It's easily applied using the Frames panel.
Question 6
What must you do to label a frame?
A) Make it a keyframe.
B) Type a name in the Library.
C) Place an object on the Stage.
D) Double-click a Layer.
Question 7
What are Onion Skin Markers used for? (Check all that apply.)
A) To edit multiple frames
B) To move a block of selected frames
C) To view all the frames of your tweened animation, not just the
keyframes |
|