| Package | org.aswing.util |
| Class | public class AbstractImpulser |
| Inheritance | AbstractImpulser flash.events.EventDispatcher |
| Implements | Impulser |
| Subclasses | Timer |
Impulse interface.
| Property | Defined by | ||
|---|---|---|---|
| delay : uint | AbstractImpulser | ||
| initialDelay : int | AbstractImpulser | ||
| isInitalFire : Boolean | AbstractImpulser | ||
| repeats : Boolean | AbstractImpulser | ||
| Method | Defined by | ||
|---|---|---|---|
|
AbstractImpulser(delay:uint, repeats:Boolean = true)
Constructs
AbstractImpulser. | AbstractImpulser | ||
|
addActionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Adds an action listener to the
AbstractImpulser
instance. | AbstractImpulser | ||
|
getDelay():uint
Returns the delay between firings of events.
| AbstractImpulser | ||
|
getInitialDelay():uint
Returns the
AbstractImpulser's initial delay. | AbstractImpulser | ||
|
isRepeats():Boolean
Returns
true (the default)
if the AbstractImpulser will send
an action event to its listeners multiple times. | AbstractImpulser | ||
|
isRunning():Boolean
| AbstractImpulser | ||
|
removeActionListener(listener:Function):void
Removes a action listener.
| AbstractImpulser | ||
|
restart():void
| AbstractImpulser | ||
|
setDelay(delay:uint):void
Sets the
AbstractImpulser's delay between
fired events. | AbstractImpulser | ||
|
setInitialDelay(initialDelay:uint):void
Sets the
AbstractImpulser's initial delay,
which by default is the same as the between-event delay. | AbstractImpulser | ||
|
setRepeats(flag:Boolean):void
If
flag is false,
instructs the AbstractImpulser to send only once
action event to its listeners after a start. | AbstractImpulser | ||
|
start():void
| AbstractImpulser | ||
|
stop():void
| AbstractImpulser | ||
| delay | property |
protected var delay:uint
| initialDelay | property |
protected var initialDelay:int
| isInitalFire | property |
protected var isInitalFire:Boolean
| repeats | property |
protected var repeats:Boolean
| AbstractImpulser | () | constructor |
public function AbstractImpulser(delay:uint, repeats:Boolean = true)
Constructs AbstractImpulser.
delay:uint |
|
repeats:Boolean (default = true) |
— when init delay <= 0 or delay == null
|
| addActionListener | () | method |
public function addActionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Adds an action listener to the AbstractImpulser
instance.
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
| getDelay | () | method |
public function getDelay():uintReturns the delay between firings of events.
Returnsuint |
See also
| getInitialDelay | () | method |
public function getInitialDelay():uint
Returns the AbstractImpulser's initial delay.
uint |
See also
| isRepeats | () | method |
public function isRepeats():Boolean
Returns true (the default)
if the AbstractImpulser will send
an action event to its listeners multiple times.
Boolean |
See also
| isRunning | () | method |
public function isRunning():Boolean
Returns
Boolean |
| removeActionListener | () | method |
public function removeActionListener(listener:Function):voidRemoves a action listener.
Parameterslistener:Function — the listener to be removed.
|
See also
| restart | () | method |
public function restart():void
| setDelay | () | method |
public function setDelay(delay:uint):void
Sets the AbstractImpulser's delay between
fired events.
delay:uint — the delay
|
— when set delay <= 0 or delay == null
|
See also
| setInitialDelay | () | method |
public function setInitialDelay(initialDelay:uint):void
Sets the AbstractImpulser'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.
initialDelay:uint — the delay
between the invocation of the start
method and the first event
fired by this impulser
|
— when set initialDelay <= 0 or initialDelay == null
|
See also
| setRepeats | () | method |
public function setRepeats(flag:Boolean):void
If flag is false,
instructs the AbstractImpulser to send only once
action event to its listeners after a start.
flag:Boolean — specify false to make the impulser
stop after sending its first action event.
Default value is true.
|
| start | () | method |
public function start():void
| stop | () | method |
public function stop():void