Package | fl.motion |
Class | public class BezierEase |
Inheritance | BezierEase Object |
Implements | ITween |
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Both this class and the CustomEase class use one or more cubic Bezier curves to define the interpolation. However, the BezierEase class defines its coordinates slightly differently than the CustomEase class.
The BezierEase class uses literal values for the y coordinates of the curve, rather than
normalized values between 0
and 1
.
This allows you to create curves that cannot be created with custom easing. For example,
you can create a curve where the start and end values are identical, but the curve rises and falls
in between those values. Also, depending on the context, you may want to define the easing
curve with literal values instead of percentages.
Default MXML Propertypoints
Related API Elements
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
points : Array
An ordered collection of points in the custom easing curve. | BezierEase | ||
target : String
The name of the animation property to target. | BezierEase |
Method | Defined By | ||
---|---|---|---|
BezierEase(xml:XML = null)
Constructor for BezierEase instances. | BezierEase | ||
Calculates an interpolated value for a numerical property of animation,
using a Bezier easing curve. | BezierEase | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
points | property |
public var points:Array
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
An ordered collection of points in the custom easing curve.
Each item in the array is a flash.geom.Point
instance, with x
and y
properties.
The x coordinate of each point represents the time coordinate of the ease, as a percentage.
The x value is normalized to fall between 0
and 1
,
where 0
is the beginning of the tween and 1
is the end of the tween.
The y coordinate of each point contains the literal value of the animation property at that point
in the ease. The y value is not normalized to fall between 0
and 1
.
The first and last points of the curve are not included in the array, because the first point is locked to the starting value, defined by the current keyframe, and the last point is locked to the ending value, defined by the next keyframe.
Related API Elements
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 "".
Implementation
public function get target():String
public function set target(value:String):void
Related API Elements
BezierEase | () | Constructor |
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,
using a Bezier easing curve.
The percent value is read from the BezierEase instance's points
property,
rather than being passed into the method.
Using the points
property value allows the function signature to match the ITween interface.
Parameters
time:Number — The time value, which must be between 0 and duration , inclusive.
The unit can be freely chosen (for example, frames, seconds, milliseconds),
but 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.
The unit can be freely chosen (for example, frames, seconds, milliseconds),
but must match the time unit.
|
Number — The interpolated value at the specified time.
|
Related API Elements
Wed Nov 21 2018, 06:34 AM -08:00