Packagepegas.transitions
Classpublic class Motion
InheritanceMotion Inheritance Action Inheritance SimpleAction Inheritance CoreEventDispatcher Inheritance CoreObject
ImplementsStoppable
SubclassesTween, TweenLite

The Motion class.



Public Properties
 PropertyDefined by
 Inheritedchannel : String
Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
  duration : Number
Returns the duration of the tweened animation in frames or seconds.
Motion
  fps : Number
Returns the number of frames per second of the tweened animation.
Motion
 InheritedisGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
 Inheritedlooping : Boolean
The flag to determinate if the Action object is looped.
Action
  prevTime : Number
Defined the internal prevTime value.
Motion
 Inheritedrunning : Boolean
(read-only) Indicates true if the process is in progress.
SimpleAction
  target : *
Indicates the target reference of the object contrains by the Motion effect.
Motion
  time : Number
[read-only] (read-only) Returns the current time within the duration of the animation.
Motion
  useSeconds : Boolean
Defined if the Motion used seconds or not.
Motion
Public Methods
 MethodDefined by
  
Motion(bGlobal:Boolean = false, sChannel:String = null)
Creates a new Motion instance.
Motion
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target.
CoreEventDispatcher
  
clone():*
Returns a shallow copy of this object.
Motion
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
 Inherited
Returns the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
Returns the event name use in the notifyChanged method.
Action
 Inherited
Returns the event name use in the notifyCleared method.
Action
 Inherited
Returns the event name use in the notifyInfo method.
Action
 Inherited
Returns the event name use in the notifyLooped method.
Action
 Inherited
Returns the event name use in the notifyProgress method.
Action
 Inherited
Returns the event name use in the notifyResumed method.
Action
 Inherited
Returns the event name use in the notifyStopped method.
Action
 Inherited
Returns the event name use in the notifyTimeOut method.
Action
 Inherited
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
 Inherited
Returns the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
 Inherited
hashCode():uint
Returns a hashcode value for the object.
CoreObject
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
 Inherited
Initialize the internal event's types of this process.
Action
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
  
nextFrame(e:TimerEvent):void
Forwards the tweened animation to the next frame.
Motion
 Inherited
Notify an ActionEvent when the process is finished.
SimpleAction
 Inherited
Notify an ActionEvent when the process is started.
SimpleAction
  
prevFrame():void
Directs the tweened animation to the frame previous to the current frame.
Motion
 Inherited
registerEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
CoreEventDispatcher
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
  
resume():Boolean
Resumes a tweened animation from its stopped point in the animation.
Motion
  
rewind(t:Number = 0):void
Rewinds a tweened animation to the beginning of the tweened animation.
Motion
  
run(... arguments):void
Runs the object.
Motion
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setEventTypeCHANGE(type:String):void
Sets the event name use in the notifyChanged method.
Action
 Inherited
setEventTypeCLEAR(type:String):void
Sets the event name use in the notifyCleared method.
Action
 Inherited
setEventTypeINFO(type:String):void
Sets the event name use in the notifyInfo method.
Action
 Inherited
setEventTypeLOOP(type:String):void
Sets the event name use in the notifyLooped method.
Action
 Inherited
setEventTypePROGRESS(type:String):void
Sets the event name use in the notifyProgress method.
Action
 Inherited
setEventTypeRESUME(type:String):void
Sets the event name use in the notifyResumed method.
Action
 Inherited
setEventTypeSTOP(type:String):void
Sets the event name use in the notifyStopped method.
Action
 Inherited
setEventTypeTIMEOUT(type:String):void
Sets the event name use in the notifyTimeOut method.
Action
 Inherited
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher.
CoreEventDispatcher
 Inherited
setLogger(log:ILogger = null):void
Sets the internal ILogger reference of this ILogable object.
CoreObject
  
setTime(t:Number):void
Sets the current time within the duration of the animation.
Motion
  
setTimer(timer:ITimer):void
Sets the internal timer of the tweened animation.
Motion
  
start():void
Starts the tweened animation from the beginning.
Motion
  
Starts the intenral interval of the tweened animation.
Motion
  
stop(... args):*
Stops the tweened animation at its current position.
Motion
  
stopInterval():void
Stops the intenral interval of the tweened animation.
Motion
 Inherited
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
CoreEventDispatcher
 Inherited
toString():String
Returns the string representation of this instance.
CoreObject
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
  
update():void
Update the current object.
Motion
 Inherited
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
CoreEventDispatcher
Protected Methods
 MethodDefined by
  
fixTime():void
Motion
 Inherited
Notify an ActionEvent when the process is changed.
Action
 Inherited
Notify an ActionEvent when the process is cleared.
Action
 Inherited
notifyInfo(info:*):void
Notify an ActionEvent when the process info is changed.
Action
 Inherited
notifyLooped():void
Notify an ActionEvent when the process is looped.
Action
 Inherited
Notify an ActionEvent when the process is in progress.
Action
 Inherited
Notify an ActionEvent when the process is resumed.
Action
 Inherited
Notify an ActionEvent when the process is stopped.
Action
 Inherited
Notify an ActionEvent when the process is out of time.
Action
 Inherited
setRunning(b:Boolean):void
Changes the running property value.
SimpleAction
Events
 EventSummaryDefined by
 Inherited Dispatched when a process is changed.Action
 Inherited Dispatched when a process is cleared.Action
 Inherited Dispatched when a process is finished.SimpleAction
 Inherited Dispatched when an info process is running.Action
 Inherited Dispatched when a process is looped.Action
 Inherited Dispatched when a process is paused.Action
 Inherited Dispatched when a process is in progress.Action
 Inherited Dispatched when a process is resumed.Action
 Inherited Dispatched when a process is started.SimpleAction
 Inherited Dispatched when a process is stopped.Action
Property detail
durationproperty
duration:Number  [read-write]

Returns the duration of the tweened animation in frames or seconds.

Implementation
    public function get duration():Number
    public function set duration(value:Number):void
fpsproperty 
fps:Number  [read-write]

Returns the number of frames per second of the tweened animation.

Implementation
    public function get fps():Number
    public function set fps(value:Number):void
prevTimeproperty 
public var prevTime:Number

Defined the internal prevTime value.

targetproperty 
public var target:*

Indicates the target reference of the object contrains by the Motion effect.

timeproperty 
time:Number  [read-only]

(read-only) Returns the current time within the duration of the animation.

Implementation
    public function get time():Number
useSecondsproperty 
public var useSeconds:Boolean

Defined if the Motion used seconds or not.

Constructor detail
Motion()constructor
public function Motion(bGlobal:Boolean = false, sChannel:String = null)

Creates a new Motion instance.

Parameters
bGlobal:Boolean (default = false) — the flag to use a global event flow or a local event flow.
 
sChannel:String (default = null) — the name of the global event flow if the bGlobal argument is true.
Method detail
clone()method
public override function clone():*

Returns a shallow copy of this object.

Returns
* — a shallow copy of this object.
fixTime()method 
protected function fixTime():void

nextFrame()method 
public function nextFrame(e:TimerEvent):void

Forwards the tweened animation to the next frame.

Parameters
e:TimerEvent
prevFrame()method 
public function prevFrame():void

Directs the tweened animation to the frame previous to the current frame.

resume()method 
public function resume():Boolean

Resumes a tweened animation from its stopped point in the animation.

Returns
Boolean
rewind()method 
public function rewind(t:Number = 0):void

Rewinds a tweened animation to the beginning of the tweened animation.

Parameters
t:Number (default = 0)
run()method 
public override function run(... arguments):void

Runs the object.

Parameters
... arguments
setTime()method 
public function setTime(t:Number):void

Sets the current time within the duration of the animation.

Parameters
t:Number
setTimer()method 
public function setTimer(timer:ITimer):void

Sets the internal timer of the tweened animation.

Parameters
timer:ITimer
start()method 
public function start():void

Starts the tweened animation from the beginning.

startInterval()method 
public function startInterval():void

Starts the intenral interval of the tweened animation.

stop()method 
public function stop(... args):*

Stops the tweened animation at its current position.

Parameters
... args

Returns
*
stopInterval()method 
public function stopInterval():void

Stops the intenral interval of the tweened animation.

update()method 
public function update():void

Update the current object.