ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
mx.events 

EventListenerRequest  - AS3 Flex

Packagemx.events
Classpublic class EventListenerRequest
InheritanceEventListenerRequest Inheritance SWFBridgeRequest Inheritance Event Inheritance Object

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Request sent from one SystemManager to a SystemManager in another application through their bridge to add or remove a listener to a specified event on your behalf. The data property is not used. Only certain events can be requested. When the event is triggered in the other application, that event is re-dispatched through the bridge where the requesting SystemManager picks up the event and redispatches it from itself. In general, this request is generated because some other code called the addEventListener() method for one of the approved events on its SystemManager. This request is also dispatched by SystemManager to allow the marshal implementation to handle adding or removing listeners differently. When dispatched by the SystemManager, the listener property is non-null;

More examples

Learn more



Public Properties
 PropertyDefined By
 Inheritedbubbles : Boolean
[read-only] Indicates whether an event is a bubbling event.
Event
 Inheritedcancelable : Boolean
[read-only] Indicates whether the behavior associated with the event can be prevented.
Event
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 InheritedcurrentTarget : Object
[read-only] The object that is actively processing the Event object with an event listener.
Event
 Inheriteddata : Object
Data related to the event.
SWFBridgeRequest
 InheritedeventPhase : uint
[read-only] The current phase in the event flow.
Event
  eventType : String
[read-only] The type of the event to listen to.
EventListenerRequest
  listener : Function
[read-only] The method or function to call
EventListenerRequest
  priority : int
[read-only] The priority parameter to addEventListener().
EventListenerRequest
 Inheritedrequestor : IEventDispatcher
The bridge that sent the message.
SWFBridgeRequest
 Inheritedtarget : Object
[read-only] The event target.
Event
 Inheritedtype : String
[read-only] The type of event.
Event
  useCapture : Boolean
[read-only] The useCapture parameter to addEventListener().
EventListenerRequest
  useWeakReference : Boolean
[read-only] The useWeakReference parameter to addEventListener().
EventListenerRequest
Public Methods
 MethodDefined By
  
EventListenerRequest(type:String, bubbles:Boolean = false, cancelable:Boolean = true, eventType:String = null, listener:Function = null, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false)
Creates a new request to add or remove an event listener.
EventListenerRequest
 Inherited
Duplicates an instance of an Event subclass.
Event
 Inherited
formatToString(className:String, ... arguments):String
A utility function for implementing the toString() method in custom ActionScript 3.0 Event classes.
Event
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Checks whether the preventDefault() method has been called on the event.
Event
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
[static] Marshals an event by copying the relevant parameters from the event into a new event.
EventListenerRequest
 Inherited
Cancels an event's default behavior if that behavior can be canceled.
Event
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow.
Event
 Inherited
Prevents processing of any event listeners in nodes subsequent to the current node in the event flow.
Event
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns a string containing all the properties of the Event object.
Event
 Inherited
Returns the primitive value of the specified object.
Object
Public Constants
 ConstantDefined By
  ADD_EVENT_LISTENER_REQUEST : String = "addEventListenerRequest"
[static] Request to add an event listener.
EventListenerRequest
  REMOVE_EVENT_LISTENER_REQUEST : String = "removeEventListenerRequest"
[static] Request to remove an event listener.
EventListenerRequest
Property Detail

eventType

property
eventType:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The type of the event to listen to.



Implementation
    public function get eventType():String

Related API Elements

listener

property 
listener:Function  [read-only]

The method or function to call



Implementation
    public function get listener():Function

Related API Elements

priority

property 
priority:int  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The priority parameter to addEventListener().



Implementation
    public function get priority():int

Related API Elements

useCapture

property 
useCapture:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The useCapture parameter to addEventListener().



Implementation
    public function get useCapture():Boolean

Related API Elements

useWeakReference

property 
useWeakReference:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The useWeakReference parameter to addEventListener().



Implementation
    public function get useWeakReference():Boolean

Related API Elements

Constructor Detail

EventListenerRequest

()Constructor
public function EventListenerRequest(type:String, bubbles:Boolean = false, cancelable:Boolean = true, eventType:String = null, listener:Function = null, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false)

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Creates a new request to add or remove an event listener.

Parameters
type:String — The event type; indicates the action that caused the event. Either EventListenerRequest.ADD or EventListenerRequest.REMOVE.
 
bubbles:Boolean (default = false) — Specifies whether the event can bubble up the display list hierarchy.
 
cancelable:Boolean (default = true) — Specifies whether the behavior associated with the event can be prevented.
 
eventType:String (default = null) — The type of message you would normally pass to the addEventListener() method.
 
listener:Function (default = null) — Determines whether the listener works in the capture phase or the target and bubbling phases.
 
useCapture:Boolean (default = false) — The priority level of the event listener. Priorities are designated by a 32-bit integer.
 
priority:int (default = 0) — Determines whether the reference to the listener is strong or weak.
 
useWeakReference:Boolean (default = false)

Related API Elements

Method Detail

marshal

()method
public static function marshal(event:Event):EventListenerRequest

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Marshals an event by copying the relevant parameters from the event into a new event.

Parameters

event:Event — The event to marshal.

Returns
EventListenerRequest — An EventListenerRequest that defines the new event.
Constant Detail

ADD_EVENT_LISTENER_REQUEST

Constant
public static const ADD_EVENT_LISTENER_REQUEST:String = "addEventListenerRequest"

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Request to add an event listener.

REMOVE_EVENT_LISTENER_REQUEST

Constant 
public static const REMOVE_EVENT_LISTENER_REQUEST:String = "removeEventListenerRequest"

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Request to remove an event listener.