Packagecom.bourre.transitions
Classpublic class AbstractMultiTween
InheritanceAbstractMultiTween Inheritance AbstractSyncCommand Inheritance AbstractCommand
ImplementsAdvancedTween, TickListener
SubclassesMultiTweenFPS, MultiTweenMS

Player version: Flash Player 9.0
Language version: ActionScript 3.0

The AbstractMultiTween class allow tweening of many object properties at the same time.



Protected Properties
 PropertyDefined by
 Inherited_bIsRunning : Boolean
A boolean value which indicates if this command is currently processing.
AbstractSyncCommand
 Inherited_eOnCommandEnd : BasicEvent
An event instance used as event object when dispatching the onCommandEnd event to its listener.
AbstractSyncCommand
 Inherited_oEB : EventBroadcaster
The internal event broadcaster.
AbstractSyncCommand
 Inherited_owner : Plugin
A reference to the plugin owner of this command.
AbstractCommand
Public Methods
 MethodDefined by
  
AbstractMultiTween(targets:Object, setters:Array, endValues:Array, duration:Number, startValues:Array = null, easing:Function = null, getters:Array = null)
Creates new AbstractMultiTween instance.
AbstractMultiTween
  
_update():void
AbstractMultiTween
 Inherited
addASyncCommandListener(listener:ASyncCommandListener, ... rest):Boolean
Adds the passed-in listener as listener for the onCommandEnd event of this command.
AbstractSyncCommand
  
addEventListener(type:String, listener:Object, ... rest):Boolean
Adds an event listener for the specified event type.
AbstractMultiTween
  
addListener(listener:Object):Boolean
Adds the passed-in listener as listener for all events dispatched by this event broadcaster.
AbstractMultiTween
  
execute(e:Event = null):void
Execute the request according to the current command data.
AbstractMultiTween
 Inherited
Fires the onCommandEnd event to the listeners of this command.
AbstractSyncCommand
  
getDuration():Number
AbstractMultiTween
  
getEasing():Function
AbstractMultiTween
  
getEndValue():Array
AbstractMultiTween
 Inherited
Returns the exclusive logger object owned by the plugin.
AbstractCommand
 Inherited
getModel(key:String):AbstractModel
Returns a reference to the model AbstractModel.
AbstractCommand
 Inherited
Returns a reference to the owner of this command.
AbstractCommand
  
AbstractMultiTween
  
getStartValue():Array
AbstractMultiTween
  
getTarget():Object
AbstractMultiTween
 Inherited
getView(key:String):AbstractView
Returns a reference to the view AbstractView.
AbstractCommand
 Inherited
isModelRegistered(key:String):Boolean
Check if a model AbstractModel is registered with passed key in owner's ModelLocator.
AbstractCommand
  
isMotionFinished():Boolean
Returns true if tweening is finished.
AbstractMultiTween
  
isReversed():Boolean
Returns true if the motion is in reverse mode.
AbstractMultiTween
  
Returns true if tweening is finished.
AbstractMultiTween
 Inherited
isRunning():Boolean
Returns true if this command is currently processing.
AbstractSyncCommand
 Inherited
isViewRegistered(key:String):Boolean
Check if a view AbstractView is registered with passed key in owner's ViewLocator.
AbstractCommand
  
noEasing(t:Number, b:Number, c:Number, d:Number):Number
[static] Returns a no easing function for tweening process.
AbstractMultiTween
  
onTick(e:Event = null):void
Method called by the TickBeacon for each step of time according to its time slicing approach.
AbstractMultiTween
  
onUpdate(sV:Number, eV:Number):Number
AbstractMultiTween
 Inherited
Removes the passed-in listener for listening the onCommandEnd event of this command.
AbstractSyncCommand
  
removeEventListener(type:String, listener:Object):Boolean
Removes the passed-in listener for listening the specified event.
AbstractMultiTween
  
removeListener(listener:Object):Boolean
Removes the passed-in listener object from this event broadcaster.
AbstractMultiTween
  
reset():void
Resets the state of this object.
AbstractMultiTween
 Inherited
run():void
Implementation of the Runnable interface, a call to run() is equivalent to a call to execute without argument.
AbstractSyncCommand
  
setDuration(n:Number):void
AbstractMultiTween
  
setEasing(f:Function):void
Defines the easing function used by this Tween object.
AbstractMultiTween
  
setEndValue(a:Array):void
AbstractMultiTween
 Inherited
setOwner(owner:Plugin):void
Defines the plugin owner of this command.
AbstractCommand
  
setPlayHeadPosition(n:Number):void
AbstractMultiTween
  
setReversed(b:Boolean):void
AbstractMultiTween
  
setStartValue(a:Array):void
AbstractMultiTween
  
start():void
Starts the operation of this suspendable operation.
AbstractMultiTween
  
stop():void
Stops the operation in process.
AbstractMultiTween
 Inherited
toString():String
Returns the string representation of the object.
AbstractSyncCommand
Protected Methods
 MethodDefined by
  
_buildAccessor(o:Object, sP:Array, gP:Array = null, nS:Array = null):void
AbstractMultiTween
  
_onMotionEnd():void
AbstractMultiTween
 Inherited
firePrivateEvent(e:Event):void
Fires a private event directly on this command's owner.
AbstractCommand
Events
 EventSummaryDefined by
   Dispatched when tweened property value change.AbstractMultiTween
   Dispatched when tween start.AbstractMultiTween
   Dispatched when tween stop.AbstractMultiTween
Public Constants
 ConstantDefined by
 InheritedonCommandEndEVENT : String = "onCommandEnd"
[static] Name of the event dispatched at the end of the command's process.
AbstractSyncCommand
Constructor detail
AbstractMultiTween()constructor
public function AbstractMultiTween(targets:Object, setters:Array, endValues:Array, duration:Number, startValues:Array = null, easing:Function = null, getters:Array = null)

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Creates new AbstractMultiTween instance.

Parameters
targets:Object — Tween target
 
setters:Array — Setter accessor list
 
endValues:Array — End values for all tweened properties
 
duration:Number — Start values for all tweened properties
 
startValues:Array (default = null) — Easing function to use for tweening
 
easing:Function (default = null) — Getter accessor list
 
getters:Array (default = null)
Method detail
_buildAccessor()method
protected function _buildAccessor(o:Object, sP:Array, gP:Array = null, nS:Array = null):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
o:Object
 
sP:Array
 
gP:Array (default = null)
 
nS:Array (default = null)
_onMotionEnd()method 
protected function _onMotionEnd():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

_update()method 
public function _update():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

addEventListener()method 
public function addEventListener(type:String, listener:Object, ... rest):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds an event listener for the specified event type. There is two behaviors for the addEventListener function :

  1. The passed-in listener is an object : The object is added as listener only for the specified event, the object must have a function with the same name than type or at least a handleEvent function.
  2. The passed-in listener is a function : A Delegate object is created and then added as listener for the event type. There is no restriction on the name of the function. If the rest is not empty, all elements in it is used as additional arguments into the delegate object.

Parameters
type:String — name of the event for which register the listener
 
listener:Object — object or function which will receive this event
 
... rest — additional arguments for the function listener

Returns
Booleantrue if the function have been succesfully added as listener fot the passed-in event
addListener()method 
public function addListener(listener:Object):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds the passed-in listener as listener for all events dispatched by this event broadcaster. The function returns true if the listener have been added at the end of the call. If the listener is already registered in this event broadcaster the function returns false.

Note : The addListener function doesn't accept functions as listener, functions could only register for a single event.

Parameters
listener:Object — the listener object to add as global listener

Returns
Booleantrue if the listener have been added during this call
execute()method 
public override function execute(e:Event = null):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Execute the request according to the current command data.

Stateless commands may use the passed-in event object as data source for its execution. If the execution can't be performed because of unreachable data the command have to throw an error.

Parameters
e:Event (default = null) — An event that will be used as data source by the command.
getDuration()method 
public function getDuration():Number

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns
Number
getEasing()method 
public function getEasing():Function

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns
Function
getEndValue()method 
public function getEndValue():Array

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns
Array
getPlayHeadPosition()method 
public function getPlayHeadPosition():Number

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns
Number
getStartValue()method 
public function getStartValue():Array

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns
Array
getTarget()method 
public function getTarget():Object

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns
Object
isMotionFinished()method 
public function isMotionFinished():Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns true if tweening is finished.

Returns
Booleantrue if tweening is finished
isReversed()method 
public function isReversed():Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns true if the motion is in reverse mode.

Returns
Booleantrue if the motion is in reverse mode
isReversedMotionFinished()method 
public function isReversedMotionFinished():Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns true if tweening is finished.

Reverse mode only.

Returns
Booleantrue if tweening is finished
noEasing()method 
public static function noEasing(t:Number, b:Number, c:Number, d:Number):Number

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns a no easing function for tweening process.

Parameters
t:Number
 
b:Number
 
c:Number
 
d:Number

Returns
Number — A no easing function for tweening process.
onTick()method 
public function onTick(e:Event = null):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Method called by the TickBeacon for each step of time according to its time slicing approach.

The onTick method is very similar to the old onEnterFrame method, but doesn't specifically occurs when entering in a new frame of a frame-based animation. The tick could be the result of a setInterval call, or a change in the timecode of a video.

Parameters
e:Event (default = null) — event dispatched by the beacon object
onUpdate()method 
public function onUpdate(sV:Number, eV:Number):Number

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
sV:Number
 
eV:Number

Returns
Number
removeEventListener()method 
public function removeEventListener(type:String, listener:Object):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Removes the passed-in listener for listening the specified event. The listener could be either an object or a function.

Parameters
type:String — name of the event for which unregister the listener
 
listener:Object — object or function to be unregistered

Returns
Booleantrue if the listener have been successfully removed as listener for the passed-in event
removeListener()method 
public function removeListener(listener:Object):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Removes the passed-in listener object from this event broadcaster. The object is removed as listener for all events the broadcaster may dispatch.

Parameters
listener:Object — the listener object to remove from this event broadcaster object

Returns
Booleantrue if the object have been successfully removed from this event broadcaster
reset()method 
public function reset():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Resets the state of this object. The state of an operation could be reset at any time, whether it be running or stopped. Concret implementation, which not support the reset method, can choose to throw an exception or to simply ignore the call.

setDuration()method 
public function setDuration(n:Number):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
n:Number
setEasing()method 
public function setEasing(f:Function):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Defines the easing function used by this Tween object.

Easing function can't be null, concret implementation must provide a default function if no function is defined, or if the passed-in function is null.

Parameters
f:Function — easing function for this tween, the function must implements the following signature :
function easingFunc( t : Number, b : Number, c : Number, d : Number ) : Number
Where :
  • t is the elapsed time since start in milliseconds
  • b is the the start value
  • c is the size of the value range such c = endValue - startValue
  • d is the duration of the tween in milliseconds
  • the returned value is the the interpolated value
setEndValue()method 
public function setEndValue(a:Array):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
a:Array
setPlayHeadPosition()method 
public function setPlayHeadPosition(n:Number):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
n:Number
setReversed()method 
public function setReversed(b:Boolean):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
b:Boolean
setStartValue()method 
public function setStartValue(a:Array):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
a:Array
start()method 
public function start():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Starts the operation of this suspendable operation. If a call to the start method is done while the operation is playing, concret class must ignore it.

stop()method 
public function stop():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Stops the operation in process. If a call to the stop method is done whereas this operation is already stopped, concret class must ignore it.

Event detail
onMotionChangedevent 
Event object type: com.bourre.transitions.TweenEvent
TweenEvent.type property = com.bourre.transitions.TweenEvent.onMotionChangedEVENT

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Dispatched when tweened property value change.

Defines the value of the type property of the event object for a onMotionChanged event.

The properties of the event object have the following values:

PropertyValue
type Dispatched event type
MethodValue
getTween() The current Tween carried by event
onStartevent  
Event object type: com.bourre.transitions.TweenEvent
TweenEvent.type property = com.bourre.transitions.TweenEvent.onStartEVENT

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Dispatched when tween start.

Defines the value of the type property of the event object for a onStart event.

The properties of the event object have the following values:

PropertyValue
type Dispatched event type
MethodValue
getTween() The current Tween carried by event
onStopevent  
Event object type: com.bourre.transitions.TweenEvent
TweenEvent.type property = com.bourre.transitions.TweenEvent.onStopEVENT

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Dispatched when tween stop.

Defines the value of the type property of the event object for a onStop event.

The properties of the event object have the following values:

PropertyValue
type Dispatched event type
MethodValue
getTween() The current Tween carried by event