Packagevegas.events
Classpublic class EventListenerBatch
InheritanceEventListenerBatch Inheritance TypedCollection
ImplementsEventListener

It handles several EventListener as one EventListener.

Example :

import flash.events.Event ; import vegas.events.Delegate ; import vegas.events.EventDispatcher ; import vegas.events.EventListener ; import vegas.events.EventListenerBatch ; var EVENT_TYPE:String = "onTest" ; var action1:Function = function (e:Event):Void { trace ( "action1 : " + e.type ) ; } var action2:Function = function (e:Event):Void { trace ( "action2 : " + e.type ) ; } var oListener1:EventListener = new Delegate(this, action1) ; var oListener2:EventListener = new Delegate(this, action2) ; var batch:EventListenerBatch = new EventListenerBatch() ; batch.insert(oListener1) ; batch.insert(oListener2) ; var e:Event = new BasicEvent( EVENT_TYPE , this ) ; EventDispatcher.getInstance().registerEventListener(EVENT_TYPE, batch) ; EventDispatcher.getInstance().dispatchEvent( e ) ;



Public Properties
 PropertyDefined by
 Inheritedtype : *
Indicates the type of the Typeable object.
TypedCollection
Public Methods
 MethodDefined by
  
Creates a new EventListenerBatch instance.
EventListenerBatch
 Inherited
add(o:*):Boolean
Inserts an element in the collection.
TypedCollection
 Inherited
clear():void
Removes all elements in the collection.
TypedCollection
  
clone():*
Returns a shallow copy of this instance.
EventListenerBatch
 Inherited
contains(o:*):Boolean
Returns true if this collection contains the specified element.
TypedCollection
 Inherited
get(key:*):*
Returns the element from this collection at the passed key index.
TypedCollection
  
handleEvent(e:Event):void
Handles the event.
EventListenerBatch
 Inherited
indexOf(o:*, fromIndex:uint = 0):int
Returns the index of an element in the collection.
TypedCollection
 Inherited
isEmpty():Boolean
Returns true if this collection contains no elements.
TypedCollection
 Inherited
Returns an iterator over the elements in this collection.
TypedCollection
 Inherited
remove(o:*):*
Removes a single instance of the specified element from this collection, if it is present (optional operation).
TypedCollection
 Inherited
size():uint
Returns the number of elements in this collection.
TypedCollection
 Inherited
supports(value:*):Boolean
Returns true if the specific value is valid.
TypedCollection
 Inherited
toArray():Array
Returns an array containing all of the elements in this collection.
TypedCollection
 Inherited
toSource(indent:int = 0):String
Returns the source code string representation of the object.
TypedCollection
 Inherited
toString():String
Returns the String representation of the object.
TypedCollection
 Inherited
validate(value:*):void
Evaluates the specified value and throw a TypeError object if the value is not valid.
TypedCollection
Constructor detail
EventListenerBatch()constructor
public function EventListenerBatch()

Creates a new EventListenerBatch instance.

Method detail
clone()method
public override function clone():*

Returns a shallow copy of this instance.

Returns
* — a shallow copy of this instance.
handleEvent()method 
public function handleEvent(e:Event):void

Handles the event.

Parameters
e:Event