| Package | starling.animation |
| Class | public class DelayedCall |
| Inheritance | DelayedCall EventDispatcher Object |
| Implements | IAnimatable |
DelayedCall dispatches an Event of type 'Event.REMOVE_FROM_JUGGLER' when it is finished, so that the juggler automatically removes it when its no longer needed.
See also
| Property | Defined By | ||
|---|---|---|---|
| currentTime : Number [read-only] The time that has already passed (in seconds). | DelayedCall | ||
| isComplete : Boolean [read-only] Indicates if enough time has passed, and the call has already been executed. | DelayedCall | ||
| repeatCount : int The number of times the call will be repeated. | DelayedCall | ||
| totalTime : Number [read-only] The time for which calls will be delayed (in seconds). | DelayedCall | ||
| Method | Defined By | ||
|---|---|---|---|
DelayedCall(call:Function, delay:Number, args:Array = null) Creates a delayed call. | DelayedCall | ||
![]() | addEventListener(type:String, listener:Function):void Registers an event listener at a certain object. | EventDispatcher | |
advanceTime(time:Number):void Advance the time by a number of seconds. | DelayedCall | ||
![]() | dispatchEvent(event:Event):void Dispatches an event to all objects that have registered listeners for its type. | EventDispatcher | |
![]() | dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void Dispatches an event with the given parameters to all objects that have registered
listeners for the given type. | EventDispatcher | |
![]() | hasEventListener(type:String):Boolean Returns if there are listeners registered for a certain event type. | EventDispatcher | |
![]() | removeEventListener(type:String, listener:Function):void Removes an event listener from the object. | EventDispatcher | |
![]() | removeEventListeners(type:String = null):void Removes all event listeners with a certain type, or all of them if type is null. | EventDispatcher | |
reset(call:Function, delay:Number, args:Array = null):DelayedCall Resets the delayed call to its default values, which is useful for pooling. | DelayedCall | ||
| currentTime | property |
currentTime:Number [read-only] The time that has already passed (in seconds).
public function get currentTime():Number| isComplete | property |
isComplete:Boolean [read-only] Indicates if enough time has passed, and the call has already been executed.
public function get isComplete():Boolean| repeatCount | property |
repeatCount:intThe number of times the call will be repeated. Set to '0' to repeat indefinitely.
The default value is 1.
public function get repeatCount():int public function set repeatCount(value:int):void| totalTime | property |
totalTime:Number [read-only] The time for which calls will be delayed (in seconds).
public function get totalTime():Number| DelayedCall | () | Constructor |
public function DelayedCall(call:Function, delay:Number, args:Array = null)Creates a delayed call.
Parameterscall:Function | |
delay:Number | |
args:Array (default = null) |
| advanceTime | () | method |
public function advanceTime(time:Number):voidAdvance the time by a number of seconds.
Parameters
time:Number — in seconds. |
| reset | () | method |
public function reset(call:Function, delay:Number, args:Array = null):DelayedCallResets the delayed call to its default values, which is useful for pooling.
Parameters
call:Function | |
delay:Number | |
args:Array (default = null) |
DelayedCall |