Basics of Motion Tweens

Introduction to motion tweens in ActionScript

Motion tweens provide an easy way to create animation.

A motion tween modifies display object properties, such as position or rotation, on a frame-to-frame basis. A motion tween can also change the appearance of a display object while it moves by applying various filters and other properties. You create the motion tween interactively with Flash, which generates the ActionScript for the motion tween. From within Flash, use the Copy Motion as ActionScript 3.0 command to copy the ActionScript that created the motion tween. Then you can reuse the ActionScript to create movement in your own dynamic animation at runtime.

See the Motion Tweens section in Using Flash CS4 Professional for information about creating a motion tween.

Common motion tween tasks

The automatically generated ActionScript code that implements a motion tween does the following:

  • Instantiates a motion object for the motion tween

  • Sets the duration of the motion tween

  • Adds the properties of the motion tween

  • Adds filters to the motion tween

  • Associates the motion tween with its display object or objects

Important terms and concepts

The following is an important term that you will encounter in this chapter:

  • Motion tween: A construct that generates intermediate frames of a display object in different states at different times; gives the appearance that the first state evolves smoothly into the second. Used to move a display object across the stage, as well as make it grow, shrink, rotate, fade, or change color over time.