Extend still images, About mask layers – Adobe Flash Professional CS3 User Manual

Page 241

Advertising
background image

FLASH CS3

User Guide

235

For a video tutorial about copying and pasting motion as ActionScript, see

www.adobe.com/go/vid0126

.

1

Select the frames in the Timeline that contain the motion tween to copy. The frames you select must be on the

same layer, however, they do not have to span a single motion tween. The selection can span a tween, empty frames,
or two or more tweens.

2

Select Edit > Timeline > Copy Motion As ActionScript 3.0.

Provide the name of the instance to attach the motion tween to. Flash generates ActionScript specific to that instance
name. Edit the Flash-generated ActionScript later for different instances.

Flash copies to your system’s clipboard the ActionScript code that describes the selected motion tween. Paste the
code into the Actions panel of a Flash document that contains the instance to receive the copied tween.

The ActionScript code contains the following items:

An import of the fl.motion.Animator class

An XML object for the provided instance (instance_xml:XML)

An Animator object for the instance (instance_animator:Animator)

A call to the Animator.play() method to begin the animation

Note: When working with motion guides, some differences might occur between the XML that the Copy Motion
command and the Copy Motion As ActionScript 3.0 command generate. If a motion guide and custom easing is applied
to a tween, the Copy Motion XML tags include the properties of the Bezier curves for the easing, and the XML uses only
two keyframes. For the same tween, using the Copy Motion As ActionScript 3.0 command creates keyframes for each
frame, and applies the correct values to each keyframe. If you remove the motion guide, the same XML code appears
describing the custom easing for both commands.

Extend still images

When you create a background for animation, a still image might remain the same for several frames. Adding a span
of new frames (not keyframes) to a layer extends the contents of the last keyframe in all the new frames.

To manually extend a still image through multiple frames, or to use a shortcut, create an image in the first keyframe
of the sequence and do one of the following:

Select a frame to the right, marking the end of the span of frames to add and select Insert > Timeline > Frame.

Alt-drag (Windows) or Option-drag (Macintosh) the keyframe to the right. This creates a span of new frames with
a keyframe at the end point.

About mask layers

For spotlight effects and transitions, use a mask layer to create a hole through which underlying layers are visible. A
mask item can be a filled shape, a type object, an instance of a graphic symbol, or a movie clip. Group multiple layers
under a single mask layer to create sophisticated effects.

To create dynamic effects, animate a mask layer. For a filled shape used as a mask, use shape tweening; for a type
object, graphic instance, or movie clip, use motion tweening. When using a movie clip instance as a mask, animate
the mask along a motion path.

To create a mask layer, place a mask item on the layer to use as a mask. Instead of having a fill or stroke, the mask
item acts as a window that reveals the area of linked layers beneath it. The rest of the mask layer conceals everything
except what shows through the mask item. A mask layer can contain only one mask item. A mask layer cannot be
inside a button, and you cannot apply a mask to another mask.

Advertising