frame.setCustomEase()

Availability

Flash 8.

Usage

frame.setCustomEase(property, easeCurve)

Parameters

property A string that specifies the property the ease curve should be used for. Acceptable values are "all", "position", "rotation", "scale", "color", and "filters".

easeCurve An array of objects that defines the ease curve. Each array element must be a JavaScript object with x and y properties.

Returns

Nothing.

Description

Method; specifies an array of control point and tangent endpoint coordinates that describe a cubic Bézier curve to be used as a custom ease curve. This array is constructed by the horizontal (ordinal: left to right) position of the control points and tangent endpoints. For example, the following illustration shows an ease curve that would be created if the easeCurve array contained values for the seven points shown as p1 through p7:

Example

The following example sets the ease curve for all properties of the first frame on the first layer to the Bézier curve specified by the control points and tangent end points stored in the myCurve array:

var theFrame = fl.getDocumentDOM().getTimeline().layers[0].frames[0]
var myCurve = [{x:100, y:200},{x:200, y:100}, {x:10, y:0}] 
theFrame.setCustomEase("all", myCurve); 

See also

frame.getCustomEase(), frame.hasCustomEase, frame.useSingleEaseCurve