| Package | vegas.events |
| Class | public class EventDispatcher |
| Inheritance | EventDispatcher AbstractEventDispatcher flash.events.EventDispatcher |
EventTarget.
Thanks:
EventDispatcher is an AS2 port of the Java.schst.net EventDispatcher. Inspired by the NotificationCenter of Apple's Cocoa-Framework.
| Method | Defined by | ||
|---|---|---|---|
|
EventDispatcher(target:IEventDispatcher = null)
Aggregates an instance of the EventDispatcher class.
| EventDispatcher | ||
|
containsInstance(name:String):Boolean
[static]
Indicates if the specified singleton reference is register.
| EventDispatcher | ||
![]() |
fireEvent(event:*, target:Boolean = null, context:* = null, bubbles:* = false):Boolean
Dispatches an event into the event flow.
| AbstractEventDispatcher | |
|
flush():void
[static]
Clear all globals EventDispatcher instances.
| EventDispatcher | ||
|
getInstance(name:String = null):EventDispatcher
[static]
Creates and returns a singleton EventDispatcher reference specified by the passed-in name identifier.
| EventDispatcher | ||
![]() |
Returns the internal
ILogger reference of this ILogable object. | AbstractEventDispatcher | |
|
getName():String
Returns the name of the display.
| EventDispatcher | ||
![]() |
hashCode():uint
Returns a hashcode value for the object.
| AbstractEventDispatcher | |
![]() |
registerEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = false):void
Registers an
EventListener object with an EventDispatcher object so that the listener receives notification of an event. | AbstractEventDispatcher | |
|
removeInstance(name:String = null):Boolean
[static]
Removes a global EventDispatcher instance.
| EventDispatcher | ||
![]() |
Sets the internal
ILogger reference of this ILogable object. | AbstractEventDispatcher | |
|
setName(name:String):void
Internal method to sets the name of the instance.
| EventDispatcher | ||
![]() |
toSource(indent:int = 0):String
Returns a string representing the source code of the EventDispatcher object.
| AbstractEventDispatcher | |
![]() |
toString():String
Returns a string representing the specified EventDispatcher object (ECMA-262).
| AbstractEventDispatcher | |
![]() |
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes an
EventListener from the EventDispatcher object. | AbstractEventDispatcher | |
| Constant | Defined by | ||
|---|---|---|---|
| DEFAULT_SINGLETON_NAME : String = "__default__" [static]
Determinates the default singleton name.
| EventDispatcher | ||
| EventDispatcher | () | constructor |
public function EventDispatcher(target:IEventDispatcher = null)Aggregates an instance of the EventDispatcher class.
Parameterstarget:IEventDispatcher (default = null) |
| addEventListener | () | method |
VEGAS function addEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = false):void
Registers an EventListener object with an EventDispatcher object so that the listener receives notification of an event.
type:String |
|
listener:Boolean |
|
useCapture:int (default = false) |
|
priority:Boolean (default = 0) |
|
useWeakReference:* (default = false) |
| containsInstance | () | method |
public static function containsInstance(name:String):BooleanIndicates if the specified singleton reference is register.
Parametersname:String |
Boolean — true If the specified singleton reference is register.
|
| flush | () | method |
public static function flush():voidClear all globals EventDispatcher instances.
| getInstance | () | method |
public static function getInstance(name:String = null):EventDispatcherCreates and returns a singleton EventDispatcher reference specified by the passed-in name identifier.
Parametersname:String (default = null) — The name of the singleton reference to return or create (If this value is Null, the DEFAULT_SINGLETON_NAME static value is used).
|
EventDispatcher —
The singleton EventDispatcher reference specified by the passed-in name identifier.
|
| getName | () | method |
public function getName():StringReturns the name of the display.
ReturnsString — the name of the display.
|
| removeEventListener | () | method |
VEGAS function removeEventListener(type:String, listener:Boolean, useCapture:* = false):void
Registers an EventListener object with an EventDispatcher object so that the listener receives notification of an event.
type:String |
|
listener:Boolean |
|
useCapture:* (default = false) |
| removeInstance | () | method |
public static function removeInstance(name:String = null):BooleanRemoves a global EventDispatcher instance.
Parametersname:String (default = null) |
Boolean |
| setName | () | method |
public function setName(name:String):voidInternal method to sets the name of the instance.
Parametersname:String |
| DEFAULT_SINGLETON_NAME | constant |
public static const DEFAULT_SINGLETON_NAME:String = "__default__"Determinates the default singleton name.