AQSpring
| Kind of class: | class |
|---|---|
| Inherits from: | none |
| Author: | Arthur Clemens |
| Classpath: | org.asapframework.util.actionqueue.AQSpring |
| File last modified: | Monday, 29 January 2007, 15:33:53 |
AQSpring.spring controls a movieclip with spring effect.Summary
Class properties
- DEFAULT_HALT_SPEED : Number
Class methods
- spring (inMC:MovieClip, inTargetLoc:Point, inSpring:Number, inDamp:Number, inMass:Number, inShouldHalt:Boolean, inHaltSpeed:Number) : ActionQueuePerformData
Class properties
DEFAULT_HALT_SPEED
static private DEFAULT_HALT_SPEED:Number = 0.001
(read)
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);