The fl.motion package contains functions and classes that can incorporate XML describing a motion tween and apply that tween to a display object. Flash CS3 has a Copy Motion as ActionScript 3.0 command that generates ActionScript and XML based on a motion tween on the Timeline in the authoring tool. You can use the generated ActionScript to apply the animation to other display objects. Or, you can script your own XML and use the fl.motion classes to apply the animation to a specified display object instance.
For information on the supporting XML elements, see Motion XML Elements.
To learn more about scripting your own animation or editing content from the Flash CS3 Copy Motion as ActionScript 3.0 command, begin with the Animator class which contains the primary functions and properties for applying the Motion XML to a motion tween.
Interface | Description | |
---|---|---|
ITween | The ITween interface defines the application programming interface (API) that interpolation classes implement in order to work with the fl.motion classes. |
Class | Description | |
---|---|---|
Animator | The Animator class applies an XML description of a motion tween to a display object. | |
BezierEase | The BezierEase class provides precise easing control for a motion tween between two keyframes. | |
BezierSegment | A Bezier segment consists of four Point objects that define a single cubic Bezier curve. | |
Color | The Color class extends the Flash Player ColorTransform class, adding the ability to control brightness and tint. | |
CustomEase | The CustomEase class is used to modify specific properties of the easing behavior of a motion tween as the tween progresses over time. | |
FunctionEase | The FunctionEase class allows custom interpolation functions to be used with the fl.motion framework in place of other interpolations like SimpleEase and CustomEase. | |
Keyframe | The Keyframe class defines the visual state at a specific time in a motion tween. | |
MatrixTransformer | The MatrixTransformer class contains methods for modifying individual properties of a transformation matrix: horizontal and vertical scale, horizontal and vertical skew, and rotation. | |
Motion | The Motion class stores a keyframe animation sequence that can be applied to a visual object. | |
MotionEvent | The MotionEvent class represents events that are broadcast by the fl.motion.Animator class. | |
RotateDirection | The RotateDirection class provides constant values for rotation behavior during a tween. | |
SimpleEase | The SimpleEase class allows you to control an animation with the kind of percentage easing that is used in the Flash timeline. | |
Source | The Source class stores information about the context in which a Motion instance was generated. | |
Tweenables | The Tweenables class provides constant values for the names of animation properties used in the Motion and Keyframe classes. |