Packageorg.aswing.util
Interfacepublic interface Impulser
ImplementorsAbstractImpulser, Timer

Declares API to fire one or more action events after a specified delay.



Public Methods
 MethodDefined by
  
addActionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Adds an action listener to the Impulser instance.
Impulser
  
getDelay():uint
Returns the delay between firings of events.
Impulser
  
Returns the Impulser's initial delay.
Impulser
  
isRepeats():Boolean
Returns true (the default) if the Impulser will send an action event to its listeners multiple times.
Impulser
  
isRunning():Boolean
Returns true if the Impulser is running.
Impulser
  
removeActionListener(listener:Function):void
Removes a action listener.
Impulser
  
restart():void
Restarts the Impulser, canceling any pending firings and causing it to fire with its initial delay.
Impulser
  
setDelay(delay:uint):void
Sets the Impulser's delay between fired events.
Impulser
  
setInitialDelay(initialDelay:uint):void
Sets the Impulser's initial delay, which by default is the same as the between-event delay.
Impulser
  
setRepeats(flag:Boolean):void
If flag is false, instructs the Impulser to send only once action event to its listeners after a start.
Impulser
  
start():void
Starts the Impulser, causing it to start sending action events to its listeners.
Impulser
  
stop():void
Stops the Impulser, causing it to stop sending action events to its listeners.
Impulser
Method detail
addActionListener()method
public function addActionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void

Adds an action listener to the Impulser instance.

Parameters
listener:Function — the listener
 
priority:int (default = 0) — the priority
 
useWeakReference:Boolean (default = false) — Determines whether the reference to the listener is strong or weak.

See also

org.aswing.event.AWEvent.ACT
getDelay()method 
public function getDelay():uint

Returns the delay between firings of events.

Returns
uint

See also

getInitialDelay()method 
public function getInitialDelay():uint

Returns the Impulser's initial delay.

Returns
uint

See also

isRepeats()method 
public function isRepeats():Boolean

Returns true (the default) if the Impulser will send an action event to its listeners multiple times.

Returns
Boolean

See also

isRunning()method 
public function isRunning():Boolean

Returns true if the Impulser is running.

Returns
Boolean

See also

removeActionListener()method 
public function removeActionListener(listener:Function):void

Removes a action listener.

Parameters
listener:Function — the listener to be removed.

See also

org.aswing.event.AWEvent.ACT
restart()method 
public function restart():void

Restarts the Impulser, canceling any pending firings and causing it to fire with its initial delay.

setDelay()method 
public function setDelay(delay:uint):void

Sets the Impulser's delay between fired events.

Parameters
delay:uint — the delay

See also

setInitialDelay()method 
public function setInitialDelay(initialDelay:uint):void

Sets the Impulser's initial delay, which by default is the same as the between-event delay. This is used only for the first action event. Subsequent events are spaced using the delay property.

Parameters
initialDelay:uint — the delay between the invocation of the start method and the first event fired by this impulser

See also

setRepeats()method 
public function setRepeats(flag:Boolean):void

If flag is false, instructs the Impulser to send only once action event to its listeners after a start.

Parameters
flag:Boolean — specify false to make the impulser stop after sending its first action event.
start()method 
public function start():void

Starts the Impulser, causing it to start sending action events to its listeners.

See also

stop()method 
public function stop():void

Stops the Impulser, causing it to stop sending action events to its listeners.

See also