Packagech.capi.events
Classpublic class GlobalEventDispatcher
InheritanceGlobalEventDispatcher Inheritance flash.events.EventDispatcher
Implements IGlobalEventDispatcher
Subclasses AbstractLoadableFile, CompositeMassLoader, MassLoader

The GlobalEventDispatcher class allows to add some listeners to any kind of event sent by a sub-class.



Public Properties
 PropertyDefined By
  dispatchGlobalEvents : Boolean
Defines if the global events must be dispatched or not.
GlobalEventDispatcher
Public Methods
 MethodDefined By
  
Creates a new GlobalEventDispatcher object.
GlobalEventDispatcher
  
dispatchEvent(evt:Event):Boolean
Dispatches the specified Event through the listeners.
GlobalEventDispatcher
Events
 Event Summary Defined By
  Dispatched after an event is dispatched.GlobalEventDispatcher
  Dispatched before an event is dispatched.GlobalEventDispatcher
Property Detail
dispatchGlobalEventsproperty
dispatchGlobalEvents:Boolean  [read-write]

Defines if the global events must be dispatched or not. This value is true by default.


Implementation
    public function get dispatchGlobalEvents():Boolean
    public function set dispatchGlobalEvents(value:Boolean):void
Constructor Detail
GlobalEventDispatcher()Constructor
public function GlobalEventDispatcher()

Creates a new GlobalEventDispatcher object.

Method Detail
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.

Returns
Booleantrue if all the events have been dispatched.

See also

Event Detail
globalAfter Event
Event Object Type: ch.capi.events.GlobalEvent
GlobalEvent.type property = ch.capi.events.GlobalEvent.GLOBAL_AFTER

Dispatched after an event is dispatched.

Defines the events that will be dispatched after the dispatching of the specified event.
globalBefore Event  
Event Object Type: ch.capi.events.GlobalEvent
GlobalEvent.type property = ch.capi.events.GlobalEvent.GLOBAL_BEFORE

Dispatched before an event is dispatched.

Defines the events that will be dispatched before the dispatching of the specified event.