Base class for all animator objects.
protected var _currentFrame:uint
currentFrame:int
[read-only]
Returns the current keyframe number
Implementation
public function get currentFrame():int
cycleNumber:int
[read-only]
Returns the number of the current loop cycle
Implementation
public function get cycleNumber():int
public var delay:Number
Defines the delay to the start of the animation in seconds
public var fps:Number
Defines the keyframes per second of the animation
protected var _fraction:Number
protected var ini:Init
Instance of the Init object used to hold and parse default property values
specified by the initialiser object in the 3d object constructor.
public var interpolate:Boolean
Defines whether the animation interpolates between channel points. Defaults to true.
protected var _invFraction:Number
isPlaying:Boolean
[read-only]
Returns true when the animation is playing
Implementation
public function get isPlaying():Boolean
length:Number
[read-write]
Defines the total length of the animation in seconds
Implementation
public function get length():Number
public function set length(value:Number):void
public var loop:Boolean
Defines whether the animation will loop. Defaults to true.
public var name:String
The name of the animation used as a unique reference.
protected var _progress:Number = 0
progress:Number
[read-write]
Represents the progress of the animation playhead from the start (0) to the end (1) of the animation.
Implementation
public function get progress():Number
public function set progress(value:Number):void
protected var _target:Object3D
target:Object3D
[read-write]
Defines the 3d object to which the animation is applied.
Implementation
public function get target():Object3D
public function set target(value:Object3D):void
protected var _time:Number
arcane var _totalFrames:Number = 0
totalFrames:Number
[read-only]
Returns the total length of the animation in frames
Implementation
public function get totalFrames():Number
public function Animator(target:Object3D = null, init:Object = null)
Parameters
| target:Object3D (default = null ) — [optional] Defines the 3d object to which the animation is applied.
|
|
| init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
Init Parameters
| progress:Number (default = 0) |
| fps:Number (default = getDefaultFps() |
| loop:Boolean (default = true) |
| interpolate:Boolean (default = true) |
| delay:Number (default = 0) |
public function addOnCycle(listener:Function):void
Default method for adding a cycle event listener.
Parameters
| listener:Function — The listener function
|
public function addOnEnterKeyFrame(listener:Function):void
Default method for adding an enterKeyFrame event listener
Parameters
| listener:Function — listener The listener function
|
public function clone(animator:Animator = null):Animator
Duplicates the animators properties to another Animator
object
Parameters
| animator:Animator (default = null ) — [optional] The new animator instance into which all properties are copied
|
Returns
| Animator —
The new animator instance with duplicated properties applied
|
protected function getDefaultFps():Number
Returns
public function gotoAndPlay(frame:uint):void
Parameters
public function gotoAndStop(frame:uint):void
Parameters
public function play():void
public function removeOnCycle(listener:Function):void
Default method for removing a cycle event listener
Parameters
| listener:Function — listener The listener function
|
public function removeOnEnterKeyFrame(listener:Function):void
Default method for removing a enterKeyFrame event listener
Parameters
| listener:Function — listener The listener function
|
public function stop():void
public function update(time:Number):void
Updates the position of the playhead to the given time in seconds.
Parameters
| time:Number — Defines the time in seconds of the playhead of the animation.
|
protected function updateProgress(val:Number):void
Parameters
protected function updateTarget():void
Event object type: away3d.events.AnimatorEvent
Dispatched when a looping animation starts a new cycle.
See also
Event object type: away3d.events.AnimatorEvent
Dispatched when entering a new keyframe.
Event object type: away3d.events.AnimatorEvent
Dispatched when the animation starts.
Event object type: away3d.events.AnimatorEvent
Dispatched when the animation stops.