| Package | pegas.transitions |
| Class | public class Tween |
| Inheritance | Tween Motion Action SimpleAction CoreEventDispatcher CoreObject |
Easing refers to gradual acceleration or deceleration during an animation, which helps your animations appear more realistic.
Example :
import pegas.transitions.Tween ; var tw:Tween = new Tween (mc, "_x", Elastic.easeOut, mc._x, 400, 2, true, true) ;
| Property | Defined by | ||
|---|---|---|---|
![]() | channel : 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 | |
![]() | isGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
![]() | looping : Boolean
The flag to determinate if the Action object is looped.
| Action | |
| model : *
(read-write) Determinates the model of this Tween.
| Tween | ||
![]() | prevTime : Number
Defined the internal prevTime value.
| Motion | |
![]() | running : 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) Returns the current time within the duration of the animation.
| Motion | |
![]() | useSeconds : Boolean
Defined if the Motion used seconds or not.
| Motion | |
| Method | Defined by | ||
|---|---|---|---|
|
Tween(... arguments)
Creates a new Tween instance.
| Tween | ||
![]() |
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 | |
|
clear():void
Removes all entries in the model of this Tween object.
| Tween | ||
|
clone():*
Returns a shallow copy of this Tween object.
| Tween | ||
![]() |
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
| CoreEventDispatcher | |
![]() |
Returns the internal
EventDispatcher reference. | CoreEventDispatcher | |
![]() |
getEventTypeCHANGE():String
Returns the event name use in the notifyChanged method.
| Action | |
![]() |
getEventTypeCLEAR():String
Returns the event name use in the notifyCleared method.
| Action | |
![]() |
getEventTypeINFO():String
Returns the event name use in the notifyInfo method.
| Action | |
![]() |
getEventTypeLOOP():String
Returns the event name use in the notifyLooped method.
| Action | |
![]() |
getEventTypePROGRESS():String
Returns the event name use in the notifyProgress method.
| Action | |
![]() |
getEventTypeRESUME():String
Returns the event name use in the notifyResumed method.
| Action | |
![]() |
getEventTypeSTOP():String
Returns the event name use in the notifyStopped method.
| Action | |
![]() |
getEventTypeTIMEOUT():String
Returns the event name use in the notifyTimeOut method.
| Action | |
![]() |
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| CoreEventDispatcher | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
![]() |
Creates and returns the internal
EventDispatcher reference (this method is invoked in the constructor). | CoreEventDispatcher | |
![]() |
initEventType():void
Initialize the internal event's types of this process.
| Action | |
|
insert(entry:TweenEntry):void
Inserts a TweenEnry in the model of the Tween object.
| Tween | ||
|
insertProperty(prop:String = null, easing:Function = null, begin:Number, finish:Number):TweenEntry
Inserts a new property in the Tween object.
| Tween | ||
![]() |
isLocked():Boolean
Returns
true if the object is locked. | CoreEventDispatcher | |
![]() |
lock():void
Locks the object.
| CoreEventDispatcher | |
![]() |
nextFrame(e:TimerEvent):void
Forwards the tweened animation to the next frame.
| Motion | |
![]() |
notifyFinished():void
Notify an ActionEvent when the process is finished.
| SimpleAction | |
![]() |
notifyStarted():void
Notify an ActionEvent when the process is started.
| SimpleAction | |
![]() |
prevFrame():void
Directs the tweened animation to the frame previous to the current frame.
| Motion | |
![]() |
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 | |
|
remove(entry:TweenEntry):Boolean
Remove a TweenEntry in the Tween Object.
| Tween | ||
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| CoreEventDispatcher | |
|
removeProperty(prop:String):Boolean
Remove a property in the Tween Object.
| Tween | ||
![]() |
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 | |
![]() |
setEventDispatcher(e:EventDispatcher):void
Sets the internal
EventDispatcher reference. | CoreEventDispatcher | |
![]() |
setEventTypeCHANGE(type:String):void
Sets the event name use in the notifyChanged method.
| Action | |
![]() |
setEventTypeCLEAR(type:String):void
Sets the event name use in the notifyCleared method.
| Action | |
![]() |
setEventTypeINFO(type:String):void
Sets the event name use in the notifyInfo method.
| Action | |
![]() |
setEventTypeLOOP(type:String):void
Sets the event name use in the notifyLooped method.
| Action | |
![]() |
setEventTypePROGRESS(type:String):void
Sets the event name use in the notifyProgress method.
| Action | |
![]() |
setEventTypeRESUME(type:String):void
Sets the event name use in the notifyResumed method.
| Action | |
![]() |
setEventTypeSTOP(type:String):void
Sets the event name use in the notifyStopped method.
| Action | |
![]() |
setEventTypeTIMEOUT(type:String):void
Sets the event name use in the notifyTimeOut method.
| Action | |
![]() |
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 | |
![]() |
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 | |
![]() |
Sets the internal timer of the tweened animation.
| Motion | |
|
setTweenEntry(prop:String, easing:Function, begin:Number, finish:Number):void
Set the TweenEntry property of this TweenLite object.
| Tween | ||
|
size():Number
Returns the numbers of elements(properties) in the model of this Tween.
| Tween | ||
![]() |
start():void
Starts the tweened animation from the beginning.
| Motion | |
![]() |
startInterval():void
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 | |
![]() |
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
| CoreEventDispatcher | |
![]() |
toString():String
Returns the string representation of this instance.
| CoreObject | |
![]() |
unlock():void
Unlocks the display.
| CoreEventDispatcher | |
![]() |
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 Tween in the time.
| Tween | ||
![]() |
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 | |
| model | property |
model:* [read-write](read-write) Determinates the model of this Tween.
Implementation public function get model():*
public function set model(value:*):void
See also
| Tween | () | constructor |
public function Tween(... arguments)Creates a new Tween instance.
Usage :
var tw:Tween = new Tween( obj, prop:String, e:Function, b:Number, f:Number, d:Number , u:Boolean, auto:Boolean ) ;
var tw:Tween = new Tween( obj, entries , d:Number , u:Boolean, auto:Boolean ) ;
Parameters
... arguments |
| clear | () | method |
public function clear():voidRemoves all entries in the model of this Tween object.
| clone | () | method |
public override function clone():*Returns a shallow copy of this Tween object.
Returns* — a shallow copy of this Tween object.
|
| insert | () | method |
public function insert(entry:TweenEntry):voidInserts a TweenEnry in the model of the Tween object.
Parametersentry:TweenEntry — a TweenEntry reference.
|
| insertProperty | () | method |
public function insertProperty(prop:String = null, easing:Function = null, begin:Number, finish:Number):TweenEntryInserts a new property in the Tween object.
Parametersprop:String (default = null) — the string representation of the number property.
|
|
easing:Function (default = null) — the easing method used by the Tween on this property.
|
|
begin:Number — the begin value.
|
|
finish:Number — the finish value.
|
TweenEntry —
a TweenEntry defined by the specified arguments.
|
| remove | () | method |
public function remove(entry:TweenEntry):BooleanRemove a TweenEntry in the Tween Object.
Parametersentry:TweenEntry — The entry to remove in this Tween.
|
Boolean |
| removeProperty | () | method |
public function removeProperty(prop:String):BooleanRemove a property in the Tween Object.
Parametersprop:String |
Boolean |
| setTweenEntry | () | method |
public function setTweenEntry(prop:String, easing:Function, begin:Number, finish:Number):voidSet the TweenEntry property of this TweenLite object.
Parametersprop:String — the property name of the object to change.
|
|
easing:Function — the easing function of the tween entry.
|
|
begin:Number — the begin value.
|
|
finish:Number — the finish value.
|
| size | () | method |
public function size():NumberReturns the numbers of elements(properties) in the model of this Tween.
ReturnsNumber — the numbers of elements(properties) in the model of this Tween.
|
| update | () | method |
public override function update():voidUpdate the current Tween in the time.