Access keys

AQCurve

Kind of class: class
Inherits from: none
Author: Arthur Clemens
Classpath: org.asapframework.util.actionqueue.AQCurve
File last modified: Saturday, 07 October 2006, 23:53:41

Summary

Class methods

Class methods

moveCubicBezier

static function moveCubicBezier (
inMC:MovieClip, inDuration:Number, inStartX:Number, inStartY:Number, inEndX:Number, inEndY:Number, inControlPoint1:Point, inControlPoint2:Point, inEffect:Function) : ActionQueuePerformData
Moves a movieclip over a cubic bezier curve, defined by the start and end positions and 2 control points.
Parameters:
inMC :
movieclip to move
inDuration :
length of movement in seconds; 0 is used for perpetual animations - use -1 for instant change
inStartX :
x value to start moving from; if null then inMC's current _x value is used
inStartY :
y value to start moving from; if null then inMC's current _y value is used
inEndX :
x value to start moving to; if null then inMC's current (dynamic) _x value is used
inEndY :
y value to start moving to; if null then inMC's current (dynamic) _y value is used
inControlPoint1:
the first control point on the Bezier curve
inControlPoint2:
the second control point on the Bezier curve
inEffect :
(optional) An effect function, for instance one of the mx.transitions.easing methods. Arguments to pass the effect function may be appended as a comma-separated list.
Returns:
A new ActionQueuePerformData object.
See also:
Wikipedia on Cubic Bezier curves
Example:
The following example moves a movieclip along a cubic bezier path during 4 seconds, from position (0,0) to (300,300). The path is defined by 2 control points. The animation has an easing effect.
queue.addAction( AQCurve.moveCubicBezier, my_mc, 4, 0, 0, 300, 300, new Point(100,400), new Point(400,100), Strong.easeOut );