ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
fl.ik 

IKMover  - AS3 Flash

Packagefl.ik
Classpublic class IKMover
InheritanceIKMover Inheritance EventDispatcher Inheritance Object

Language Version: ActionScript 3.0
Product Version: Flash CS4
Runtime Versions: Flash Player 10, AIR 1.5

The IKMover class initiates and controls the inverse kinematic (IK) movement of armatures. Use the IKMover class to move the IKJoint object to the target point unless the IKMover object determines that the point can't be reached because of the established IKArmature constraints; or if the movement exceeds established timeLimit, iterationLimit or distanceLimit values.

More examples

Related API Elements



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  distanceLimit : Number
The maximum distance (in pixels) the IK engine should move for each iteration.
IKMover
  iterationLimit : int
Specifies the maximum number of iterations the IK engine performs for each movement.
IKMover
  limitByDistance : Boolean
Specifies whether the IK engine ends a movement after the distanceLimit value is exceeded.
IKMover
  limitByIteration : Boolean
Specifies whether the IK engine ends a movement after the iterationLimit value is exceeded.
IKMover
  limitByTime : Boolean
Specifies whether the IK engine ends a movement after a specified timeLimit is exceeded.
IKMover
  stepCount : int
[read-only] The number of iterations of the IK movement.
IKMover
  timeLimit : int
Specifies the maximum time (in milliseconds) the IK engine performs the movement.
IKMover
Public Methods
 MethodDefined By
  
IKMover(endEffector:IKJoint, targetIn:Point)
Constructor for an IKMover object.
IKMover
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
moveTo(targetIn:Point):*
Moves the associated IKJoint object to the target point, updating all the related IKJoint objectss based on their IK constraints.
IKMover
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
Property Detail

distanceLimit

property
distanceLimit:Number

Language Version: ActionScript 3.0
Product Version: Flash CS4
Runtime Versions: Flash Player 10, AIR 1.5

The maximum distance (in pixels) the IK engine should move for each iteration. This is calculated as the Euclidean distance:

sqrt(dx*dx + dy*dy)



Implementation
    public function get distanceLimit():Number
    public function set distanceLimit(value:Number):void

Related API Elements

iterationLimit

property 
iterationLimit:int

Language Version: ActionScript 3.0
Product Version: Flash CS4
Runtime Versions: Flash Player 10, AIR 1.5

Specifies the maximum number of iterations the IK engine performs for each movement. The limitByIteration property must be set to true to use the iterationLimit value. If the limitByIteration property is true, the IK engine runs through the specified number of iterations or until the IKJoint object reaches the target point. If all of the "limitBy..." properties of this class are false, the IK engine takes one step. If any of the "limitBy" properties are true, the IK engine continues processing until the limits of that condition are reached or the end-effector is at the target.



Implementation
    public function get iterationLimit():int
    public function set iterationLimit(value:int):void

Related API Elements

limitByDistance

property 
limitByDistance:Boolean

Language Version: ActionScript 3.0
Product Version: Flash CS4
Runtime Versions: Flash Player 10, AIR 1.5

Specifies whether the IK engine ends a movement after the distanceLimit value is exceeded.



Implementation
    public function get limitByDistance():Boolean
    public function set limitByDistance(value:Boolean):void

Related API Elements

limitByIteration

property 
limitByIteration:Boolean

Language Version: ActionScript 3.0
Product Version: Flash CS4
Runtime Versions: Flash Player 10, AIR 1.5

Specifies whether the IK engine ends a movement after the iterationLimit value is exceeded.



Implementation
    public function get limitByIteration():Boolean
    public function set limitByIteration(value:Boolean):void

Related API Elements

limitByTime

property 
limitByTime:Boolean

Language Version: ActionScript 3.0
Product Version: Flash CS4
Runtime Versions: Flash Player 10, AIR 1.5

Specifies whether the IK engine ends a movement after a specified timeLimit is exceeded.



Implementation
    public function get limitByTime():Boolean
    public function set limitByTime(value:Boolean):void

Related API Elements

stepCount

property 
stepCount:int  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS4
Runtime Versions: Flash Player 10, AIR 1.5

The number of iterations of the IK movement.



Implementation
    public function get stepCount():int

timeLimit

property 
timeLimit:int

Language Version: ActionScript 3.0
Product Version: Flash CS4
Runtime Versions: Flash Player 10, AIR 1.5

Specifies the maximum time (in milliseconds) the IK engine performs the movement. The limitByTime property must be set to true to use the timeLimit value. If the limitByTime property is true, the IK engine runs for the specified number of milliseconds or until the IKJoint object reaches the target point. If all of the "limitBy..." properties of this class are false, the IK engine takes one step. If any of the "limitBy" properties are true, the IK engine continues processing until the limits of that condition are reached or the end-effector is at the target.



Implementation
    public function get timeLimit():int
    public function set timeLimit(value:int):void

Related API Elements

Constructor Detail

IKMover

()Constructor
public function IKMover(endEffector:IKJoint, targetIn:Point)

Language Version: ActionScript 3.0
Product Version: Flash CS4
Runtime Versions: Flash Player 10, AIR 1.5

Constructor for an IKMover object. For shape IKArmature objects, the targetIn point parameter is ignored by the constructor function.

Parameters
endEffector:IKJoint — The IKJoint object to move.
 
targetIn:Point — The starting coordinates for the movement. This point is similar to a point on the stage of the Flash authoring tool where you can click on a symbol that is part of an IKArmature object (not necessarily on a joint), move the symbol, and consequently move the IKArmature object according to the constraints established for the IKArmature object.

For example, you have a leg and a foot, and you want to move the foot from the toe. If you specify a targetIn point at the toe of the foot, you can move the foot from that point. Otherwise, you would have to create a symbol at the toe to connect the toe to a bone before you could move the foot.

Method Detail

moveTo

()method
public function moveTo(targetIn:Point):*

Language Version: ActionScript 3.0
Product Version: Flash CS4
Runtime Versions: Flash Player 10, AIR 1.5

Moves the associated IKJoint object to the target point, updating all the related IKJoint objectss based on their IK constraints. The IKMover object moves the IKJoint object to the target point unless the IKMover object determines that the point can't be reached because of the established IKArmature constraints; or if the movement exceeds established timeLimit, iterationLimit, or distanceLimit values.

Parameters

targetIn:Point — The coordinate of the destination point

Returns
*