| Package | ch.capi.events |
| Class | public class GlobalEventDispatcher |
| Inheritance | GlobalEventDispatcher flash.events.EventDispatcher |
| Implements | IGlobalEventDispatcher |
| Subclasses | AbstractLoadableFile, CompositeMassLoader, MassLoader |
GlobalEventDispatcher class allows to add some listeners to
any kind of event sent by a sub-class.
| Property | Defined By | ||
|---|---|---|---|
| dispatchGlobalEvents : Boolean
Defines if the global events must be dispatched or not. | GlobalEventDispatcher | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new GlobalEventDispatcher object. | GlobalEventDispatcher | ||
dispatchEvent(evt:Event):Boolean
Dispatches the specified Event through the listeners. | GlobalEventDispatcher | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched after an event is dispatched. | GlobalEventDispatcher | |||
| Dispatched before an event is dispatched. | GlobalEventDispatcher | |||
| dispatchGlobalEvents | property |
dispatchGlobalEvents:Boolean [read-write]
Defines if the global events must be dispatched or not. This
value is true by default.
public function get dispatchGlobalEvents():Boolean public function set dispatchGlobalEvents(value:Boolean):void| GlobalEventDispatcher | () | Constructor |
public function GlobalEventDispatcher()
Creates a new GlobalEventDispatcher object.
| dispatchEvent | () | method |
override public function dispatchEvent(evt:Event):Boolean
Dispatches the specified Event through the listeners. This method
will also dispatch a GlobalEvent.GLOBAL_BEFORE and GlobalEvent.GLOBAL_AFTER
event before and after the event dispatching. The global events won't be dispatched
if the property dispatchGlobalEvents is false.
If the GlobalEvent.GLOBAL_BEFORE dispatching returns false, then the
event won't ben dispatched further and false is returned. Otherwise,
the event source and the event GlobalEvent.GLOBAL_AFTER are dispatched and the result
is the returned value of the source event dispatching.
Parameters
evt:Event — The source Event.
|
Boolean — true if all the events have been dispatched.
|
See also
| globalAfter | Event |
ch.capi.events.GlobalEventch.capi.events.GlobalEvent.GLOBAL_AFTERDispatched after an event is dispatched.
Defines the events that will be dispatched after the dispatching of the specified event.| globalBefore | Event |
ch.capi.events.GlobalEventch.capi.events.GlobalEvent.GLOBAL_BEFOREDispatched before an event is dispatched.
Defines the events that will be dispatched before the dispatching of the specified event.