Packagesystem.signals
Interfacepublic interface Signaler
Implementors FrameLoop, InternalSignal

Provides an object who communicates by signals.



Public Properties
 PropertyDefined By
  length : uint
[read-only] Indicates the number of receivers connected.
Signaler
Public Methods
 MethodDefined By
  
connect(receiver:*, priority:uint = 0, autoDisconnect:Boolean = false):Boolean
Connects a Function or a Receiver object.
Signaler
  
connected():Boolean
Returns true if one or more receivers are connected.
Signaler
  
disconnect(receiver:* = null):Boolean
Disconnect the specified object or all objects if the parameter is null.
Signaler
  
emit(... values):void
Emit the specified values to the receivers.
Signaler
  
hasReceiver(receiver:*):Boolean
Returns true if the specified receiver is connected.
Signaler
Property Detail
lengthproperty
length:uint  [read-only]

Indicates the number of receivers connected.


Implementation
    public function get length():uint
Method Detail
connect()method
public function connect(receiver:*, priority:uint = 0, autoDisconnect:Boolean = false):Boolean

Connects a Function or a Receiver object.

Parameters

receiver:* — The receiver to connect : a Function reference or a Receiver object.
 
priority:uint (default = 0) — Determinates the priority level of the receiver.
 
autoDisconnect:Boolean (default = false) — Apply a disconnect after the first trigger

Returns
Booleantrue If the receiver is connected with the signal emitter.
connected()method 
public function connected():Boolean

Returns true if one or more receivers are connected.

Returns
Booleantrue if one or more receivers are connected.
disconnect()method 
public function disconnect(receiver:* = null):Boolean

Disconnect the specified object or all objects if the parameter is null.

Parameters

receiver:* (default = null)

Returns
Booleantrue if the specified receiver exist and can be unregister.
emit()method 
public function emit(... values):void

Emit the specified values to the receivers.

Parameters

... values — All values to emit to the receivers.

hasReceiver()method 
public function hasReceiver(receiver:*):Boolean

Returns true if the specified receiver is connected.

Parameters

receiver:*

Returns
Booleantrue if the specified receiver is connected.