The MessageEvent class is used to propagate messages within the messaging system.

Static variables

@:value("message")staticfinalread onlyMESSAGE:String = "message"

The MESSAGE event type; dispatched upon receipt of a message.

The value of this constant is "message".

The properties of the event object have the following values:

PropertyValue
`bubbles`false
`cancelable`false
`currentTarget`The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`message`The message associated with this event.
`target`The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.

@:value("result")staticfinalread onlyRESULT:String = "result"

The RESULT event type; dispatched when an RPC agent receives a result from a remote service destination.

The value of this constant is "result".

The properties of the event object have the following values:

PropertyValue
`bubbles`false
`cancelable`false
`currentTarget`The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`message`The message associated with this event.
`target`The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.

Static methods

staticcreateEvent(type:String, msg:IMessage):MessageEvent

Utility method to create a new MessageEvent that doesn't bubble and is not cancelable.

Parameters:

type

The type for the MessageEvent.

message

The associated message.

Returns:

New MessageEvent.

Constructor

@:value({ message : null, cancelable : false, bubbles : false })new(type:String, bubbles:Bool = false, cancelable:Bool = false, ?message:IMessage)

Constructs an instance of this event with the specified type and message.

Parameters:

type

The type for the MessageEvent.

bubbles

Specifies whether the event can bubble up the display list hierarchy.

cancelable

Indicates whether the behavior associated with the event can be prevented; used by the RPC subclasses.

message

The associated message.

Variables

message:IMessage

The Message associated with this event.

@:flash.propertyread onlymessageId:String

Methods

clone():Event

Clones the MessageEvent.

Returns:

Copy of this MessageEvent.

toString():String

Returns a string representation of the MessageEvent.

Returns:

String representation of the MessageEvent.