| Package | system.events |
| Class | public class EventDispatcher |
| Inheritance | EventDispatcher InternalDispatcher flash.events.EventDispatcher |
EventTarget.
| Property | Defined By | ||
|---|---|---|---|
| channel : String
Indicates the channel of the dispatcher. | EventDispatcher | ||
![]() | target : IEventDispatcher [read-only]
Indicates the optional target reference of the instance. | InternalDispatcher | |
| Method | Defined By | ||
|---|---|---|---|
EventDispatcher(target:IEventDispatcher = null, channel:String = null)
Creates a new EventDispatcher instance. | EventDispatcher | ||
containsInstance(channel:String):Boolean [static]
Indicates if the specified singleton reference is register. | EventDispatcher | ||
![]() | fireEvent(event:*, target:* = null, context:* = null, bubbles:Boolean = false):Boolean
Dispatches an event into the event flow. | InternalDispatcher | |
flush():void [static]
Clear all globals EventDispatcher singletons. | EventDispatcher | ||
getChannels():Array [static]
Returns the Array representation of all channels register in the EventDispatcher factory or null if no singletons are registered. | EventDispatcher | ||
getInstance(channel:String = null):EventDispatcher [static]
Creates and returns a singleton EventDispatcher reference specified by the passed-in name identifier. | EventDispatcher | ||
![]() | registerEventListener(type:String, listener:*, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an system.events.EventListener object with an system.events.EventDispatcher object so that the listener receives notification of an event. | InternalDispatcher | |
removeInstance(channel:String = null):Boolean [static]
Removes a global EventDispatcher singleton. | EventDispatcher | ||
![]() | unregisterEventListener(type:String, listener:*, useCapture:Boolean = false):void
Removes an system.events.EventListener from the system.events.EventDispatcher object. | InternalDispatcher | |
| Constant | Defined By | ||
|---|---|---|---|
| DEFAULT_SINGLETON_CHANNEL : String = __default__ [static]
Determinates the default singleton channel. | EventDispatcher | ||
| channel | property |
channel:StringIndicates the channel of the dispatcher.
public function get channel():String public function set channel(value:String):void| EventDispatcher | () | Constructor |
public function EventDispatcher(target:IEventDispatcher = null, channel:String = null)Creates a new EventDispatcher instance.
Parameterstarget:IEventDispatcher (default = null) — The target object for events dispatched to the EventDispatcher object. This parameter is used when the EventDispatcher instance is aggregated by a class that implements IEventDispatcher; it is necessary so that the containing object can be the target for events. Do not use this parameter in simple cases in which a class extends EventDispatcher.
| |
channel:String (default = null) — The optional channel value of the dispatcher (use it in a global event flow).
|
| containsInstance | () | method |
public static function containsInstance(channel:String):BooleanIndicates if the specified singleton reference is register.
Parameters
channel:String — the channel value of the singleton reference register in the factory.
|
Boolean — true If the specified singleton reference is register.
|
| flush | () | method |
public static function flush():voidClear all globals EventDispatcher singletons.
| getChannels | () | method |
public static function getChannels():Array
Returns the Array representation of all channels register in the EventDispatcher factory or null if no singletons are registered.
Array — the Array representation of all channels register in the EventDispatcher factory or null if no singletons are registered.
|
| getInstance | () | method |
public static function getInstance(channel:String = null):EventDispatcherCreates and returns a singleton EventDispatcher reference specified by the passed-in name identifier.
Parameters
channel: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.
|
| removeInstance | () | method |
public static function removeInstance(channel:String = null):BooleanRemoves a global EventDispatcher singleton.
Parameters
channel:String (default = null) |
Boolean — true if a singleton is removed in the EventDispatcher factory.
|
| DEFAULT_SINGLETON_CHANNEL | Constant |
public static const DEFAULT_SINGLETON_CHANNEL:String = __default__Determinates the default singleton channel.