fl.motion

# ITween - AS3 Flash

Package | fl.motion
Interface | public interface ITween
Implementors | BezierEase, CustomEase, FunctionEase, SimpleEase

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

The ITween interface defines the application programming interface (API) that interpolation classes implement in order to work with the fl.motion classes. The SimpleEase, CustomEase, BezierEase, and FunctionEase classes implement the ITween interface.

Related API Elements

Motion XML Elements

Public Properties

| Property | Defined By
--- | --- | ---
|  | target : String The name of the animation property to target. | ITween

Public Methods

| Method | Defined By
--- | --- | ---
|  | getValue(time:Number, begin:Number, change:Number, duration:Number):Number Calculates an interpolated value for a numerical property of animation. | ITween

Property Detail

### target

property

`target:String`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

The name of the animation property to target.

The default value is `""` (empty quotes), which targets all properties. The other acceptable values are `"x"`, `"y"`, `"position"` (which targets both x and y), `"scaleX"`, `"scaleY"`, `"scale"` (which targets both scaleX and scaleY), `"skewX"`, `"skewY"`, `"rotation"` (which targets both scaleX and scaleY), `"color"`, and `"filters"`.

The default value is `"".`

Implementation
`public function get target():String`
`public function set target(value:String):void`
Method Detail

### getValue

()
method

`public function getValue(time:Number, begin:Number, change:Number, duration:Number):Number`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Calculates an interpolated value for a numerical property of animation. The function signature matches that of the easing functions in the fl.motion.easing package. Various ITween classes will produce different styles of interpolation for the same inputs.

Parameters

| `time:Number` — The time value, which must be between `0` and `duration`, inclusive. You can choose any unit (for example, frames, seconds, milliseconds), but your choice must match the `duration` unit.
| `begin:Number` — The value of the animation property at the start of the tween, when time is `0`.
| `change:Number` — The change in the value of the animation property over the course of the tween. This value can be positive or negative. For example, if an object rotates from 90 to 60 degrees, the `change` is `-30`.
| `duration:Number` — The length of time for the tween. This value must be greater than zero. You can choose any unit (for example, frames, seconds, milliseconds), but your choice must match the `time` unit.

Returns

| `Number` — The interpolated value at the specified time.

Related API Elements

fl.motion.easing

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00