Packageaway3d.animators
Classpublic class Animator
InheritanceAnimator Inheritance flash.events.EventDispatcher
Subclasses BonesAnimator, PathAnimator, VertexAnimator

Base class for all animator objects.



Public Properties
 PropertyDefined By
  currentFrame : int
[read-only] Returns the current keyframe number
Animator
  cycleNumber : int
[read-only] Returns the number of the current loop cycle
Animator
  delay : Number
Defines the delay to the start of the animation in seconds
Animator
  fps : Number
Defines the keyframes per second of the animation
Animator
  interpolate : Boolean
Defines whether the animation interpolates between channel points.
Animator
  isPlaying : Boolean
[read-only] Returns true when the animation is playing
Animator
  length : Number
Defines the total length of the animation in seconds
Animator
  loop : Boolean
Defines whether the animation will loop.
Animator
  name : String
The name of the animation used as a unique reference.
Animator
  progress : Number
Represents the progress of the animation playhead from the start (0) to the end (1) of the animation.
Animator
  target : Object3D
Defines the 3d object to which the animation is applied.
Animator
  totalFrames : Number
[read-only] Returns the total length of the animation in frames
Animator
Protected Properties
 PropertyDefined By
  _currentFrame : uint
Animator
  _fraction : Number
Animator
  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.
Animator
  _invFraction : Number
Animator
  _progress : Number = 0
Animator
  _target : Object3D
Animator
  _time : Number
Animator
Public Methods
 MethodDefined By
  
Animator(target:Object3D = null, init:Object = null)
Creates a new Animator object.
Animator
  
addOnCycle(listener:Function):void
Default method for adding a cycle event listener.
Animator
  
addOnEnterKeyFrame(listener:Function):void
Default method for adding an enterKeyFrame event listener
Animator
  
clone(animator:Animator = null):Animator
Duplicates the animators properties to another Animator object
Animator
  
gotoAndPlay(frame:uint):void
Animator
  
gotoAndStop(frame:uint):void
Animator
  
play():void
Animator
  
removeOnCycle(listener:Function):void
Default method for removing a cycle event listener
Animator
  
removeOnEnterKeyFrame(listener:Function):void
Default method for removing a enterKeyFrame event listener
Animator
  
stop():void
Animator
  
update(time:Number):void
Updates the position of the playhead to the given time in seconds.
Animator
Protected Methods
 MethodDefined By
  
getDefaultFps():Number
Animator
  
updateProgress(val:Number):void
Animator
  
Animator
Events
 Event Summary Defined By
  Dispatched when a looping animation starts a new cycle.Animator
  Dispatched when entering a new keyframe.Animator
  Dispatched when the animation starts.Animator
  Dispatched when the animation stops.Animator
Property Detail
_currentFrameproperty
protected var _currentFrame:uint

_fractionproperty 
protected var _fraction:Number

_invFractionproperty 
protected var _invFraction:Number

_progressproperty 
protected var _progress:Number = 0

_targetproperty 
protected var _target:Object3D

_timeproperty 
protected var _time:Number

_totalFramesproperty 
arcane var _totalFrames:Number = 0

currentFrameproperty 
currentFrame:int  [read-only]

Returns the current keyframe number


Implementation
    public function get currentFrame():int
cycleNumberproperty 
cycleNumber:int  [read-only]

Returns the number of the current loop cycle


Implementation
    public function get cycleNumber():int
delayproperty 
public var delay:Number

Defines the delay to the start of the animation in seconds

fpsproperty 
public var fps:Number

Defines the keyframes per second of the animation

iniproperty 
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.

interpolateproperty 
public var interpolate:Boolean

Defines whether the animation interpolates between channel points. Defaults to true.

isPlayingproperty 
isPlaying:Boolean  [read-only]

Returns true when the animation is playing


Implementation
    public function get isPlaying():Boolean
lengthproperty 
length:Number

Defines the total length of the animation in seconds


Implementation
    public function get length():Number
    public function set length(value:Number):void
loopproperty 
public var loop:Boolean

Defines whether the animation will loop. Defaults to true.

nameproperty 
public var name:String

The name of the animation used as a unique reference.

progressproperty 
progress:Number

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
targetproperty 
target:Object3D

Defines the 3d object to which the animation is applied.


Implementation
    public function get target():Object3D
    public function set target(value:Object3D):void
totalFramesproperty 
totalFrames:Number  [read-only]

Returns the total length of the animation in frames


Implementation
    public function get totalFrames():Number
Constructor Detail
Animator()Constructor
public function Animator(target:Object3D = null, init:Object = null)

Creates a new Animator object.

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####
Method Detail
addOnCycle()method
public function addOnCycle(listener:Function):void

Default method for adding a cycle event listener.

Parameters

listener:Function — The listener function

addOnEnterKeyFrame()method 
public function addOnEnterKeyFrame(listener:Function):void

Default method for adding an enterKeyFrame event listener

Parameters

listener:Function — The listener function

clone()method 
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
getDefaultFps()method 
protected function getDefaultFps():Number

Returns
Number
gotoAndPlay()method 
public function gotoAndPlay(frame:uint):void

Parameters

frame:uint

gotoAndStop()method 
public function gotoAndStop(frame:uint):void

Parameters

frame:uint

play()method 
public function play():void

removeOnCycle()method 
public function removeOnCycle(listener:Function):void

Default method for removing a cycle event listener

Parameters

listener:Function — The listener function

removeOnEnterKeyFrame()method 
public function removeOnEnterKeyFrame(listener:Function):void

Default method for removing a enterKeyFrame event listener

Parameters

listener:Function — The listener function

stop()method 
public function stop():void

update()method 
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.

updateProgress()method 
protected function updateProgress(val:Number):void

Parameters

val:Number

updateTarget()method 
protected function updateTarget():void

Event Detail
cycle Event
Event Object Type: away3d.events.AnimatorEvent
AnimatorEvent.type property = away3d.events.AnimatorEvent

Dispatched when a looping animation starts a new cycle.

See also

enterKeyFrame Event  
Event Object Type: away3d.events.AnimatorEvent
AnimatorEvent.type property = away3d.events.AnimatorEvent

Dispatched when entering a new keyframe.

start Event  
Event Object Type: away3d.events.AnimatorEvent
AnimatorEvent.type property = away3d.events.AnimatorEvent

Dispatched when the animation starts.

stop Event  
Event Object Type: away3d.events.AnimatorEvent
AnimatorEvent.type property = away3d.events.AnimatorEvent

Dispatched when the animation stops.