AQSpring
| Kind of class: | class |
|---|---|
| Inherits from: | none |
| Author: | Arthur Clemens |
| Classpath: | org.asapframework.util.actionqueue.AQSpring |
| File last modified: | Saturday, 07 October 2006, 23:53:42 |
AQSpring.spring controls a movieclip with spring effect.Summary
Class methods
Class methods
spring
static function spring (
inMC:MovieClip,
inTargetLoc:Point,
inSpring:Number,
inDamp:Number,
inMass:Number,
inShouldHalt:Boolean,
inHaltSpeed:Number) : ActionQueuePerformData
Parameters:
inMC :
movieclip to move
inTargetLoc :
the location around which the movieclip moves defined as Point
inSpring :
stiffness variable, for instance: 10
inDamp :
friction variable, for instance: 0.9
inMass :
mass of movieclip, for instance: 10
inShouldHalt:
(optional) when true, the spring calculation will stop as soon as the speed is below a certain threshold (see parameter inHaltSpeed); default false
inHaltSpeed :
(optional) speed threshold when this method is stopped; default 0.001 pixels per frame
Returns:
true (this method has an onEnterFrame) (to flag optimization for ActionQueue).
Example:
This example moves a movieclip around location (400, 300), until the final speed of 0.0001 is reached:
queue.addAction( AQSpring.spring, spring_mc, new Point(400, 300), 10, 0.9, 10, true, 0.0001);