Packageblitting.time
Classpublic class CallLater
InheritanceCallLater Inheritance Object

Setup a timer to call a handler once at a later time. Example:
                  
 new CallLater(5000, exampleFunction, "Hello", "World!").call();
 
               



Protected Properties
 PropertyDefined By
  callbackk : Function
The function to call.
CallLater
  delay : int = 1
The delay to make the call, in ms.
CallLater
  params : Array
Parameters to be passed to the function.
CallLater
  scope : *
An object that specifies the value of `this` object within the function body.
CallLater
  timer : Timer
Timer to dispatch time to call.
CallLater
Public Methods
 MethodDefined By
  
CallLater(delay:int = 1, scope:* = null, callback:Function = null, ... params)
Constructor
CallLater
  
call():void
Call the function.
CallLater
Protected Methods
 MethodDefined By
  
Handler to execute the call function.
CallLater
  
timerHandler(timerEvent:TimerEvent):void
CallLater
Property Detail
callbackkproperty
protected var callbackk:Function

The function to call.

delayproperty 
protected var delay:int = 1

The delay to make the call, in ms. If delay is 0, then make the call immediately; otherwise, defaulting to 1ms to execute next frame.

paramsproperty 
protected var params:Array

Parameters to be passed to the function.

scopeproperty 
protected var scope:*

An object that specifies the value of `this` object within the function body.

timerproperty 
protected var timer:Timer

Timer to dispatch time to call.

Constructor Detail
CallLater()Constructor
public function CallLater(delay:int = 1, scope:* = null, callback:Function = null, ... params)

Constructor

Parameters
delay:int (default = 1) — The delay in ms to make the call.
 
scope:* (default = null) — An object that specifies the value of `this` object within the function body.
 
callback:Function (default = null) — The function to call.
 
... params — Parameters to be passed to the function.
Method Detail
call()method
public function call():void

Call the function.

callHandler()method 
protected function callHandler():void

Handler to execute the call function.

timerHandler()method 
protected function timerHandler(timerEvent:TimerEvent):void

Parameters

timerEvent:TimerEvent — The type of the event