AQCurve
| Kind of class: | class |
|---|---|
| Inherits from: | none |
| Version: | 29 Jan 2006 |
| Author: | Arthur Clemens |
| Classpath: | playground.classes.util.actionqueue.AQCurve |
| File last modified: | Friday, 03 February 2006, 13:34:57 |
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 animation in seconds
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.
Implementation note:
This method calls AQWorker#returnValue.
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 );