public override void dispatchEvent(AsEvent _event) { if (mContentLoaderInfo.hasEventListener(_event.getType())) { mContentLoaderInfo.dispatchEvent(_event); } else { base.dispatchEvent(_event); } }
public override void dispatchEventOnChildren(AsEvent _event) { getChildEventListeners(this, _event.getType(), sListenersList); int numListeners = (int)(sListenersList.getLength()); int i = 0; for (; i < numListeners; ++i) { sListenersList[i].dispatchEvent(_event); } sListenersList.setLength(0); }
public virtual void broadcastEvent(AsEvent _event) { if (_event.getBubbles()) { throw new AsArgumentError("Broadcast of bubbling events is prohibited"); } int fromIndex = (int)(sBroadcastListeners.getLength()); getChildEventListeners(this, _event.getType(), sBroadcastListeners); int toIndex = (int)(sBroadcastListeners.getLength()); int i = fromIndex; for (; i < toIndex; ++i) { sBroadcastListeners[i].dispatchEvent(_event); } sBroadcastListeners.setLength(fromIndex); }