Packagecom.worlize.api.event
Classpublic class ChatEvent
InheritanceChatEvent Inheritance flash.events.Event

Product Version : Worlize APIv.1

Represents a chat event in the room.

See also

com.worlize.api.model.ThisRoom.incomingChat
com.worlize.api.model.ThisRoom.outgoingChat


Public Properties
 PropertyDefined By
  isWhisper : Boolean
True if the chat represents a private message (whisper) to another user.
ChatEvent
  originalText : String
The unmodified chat text.
ChatEvent
  recipient : User
The recipient of the whisper, if this is a private message.
ChatEvent
  text : String
The chat text.
ChatEvent
  user : User
The user who is chatting.
ChatEvent
Public Methods
 MethodDefined By
  
ChatEvent(type:String)
Constructor.
ChatEvent
Public Constants
 ConstantDefined By
  INCOMING_CHAT : String = incomingChat
[static] The ChatEvent.INCOMING_CHAT constant defines the value of the type property of the event object for a incomingChat event.
ChatEvent
  OUTGOING_CHAT : String = outgoingChat
[static] The ChatEvent.OUTGOING_CHAT constant defines the value of the type property of the event object for a outgoingChat event.
ChatEvent
Property Detail
isWhisperproperty
public var isWhisper:Boolean

True if the chat represents a private message (whisper) to another user.

originalTextproperty 
public var originalText:String

The unmodified chat text.

If another app or event handler has modified the text property, originalText is guaranteed to represent the original value of the text property without modifications.

See also

recipientproperty 
public var recipient:User

The recipient of the whisper, if this is a private message.

textproperty 
public var text:String

The chat text.

Modify this to change the chat text in-flight.

See also

userproperty 
public var user:User

The user who is chatting.

Constructor Detail
ChatEvent()Constructor
public function ChatEvent(type:String)

Product Version : Worlize API.v1

Constructor.

Parameters
type:String — The event type; indicates the action that caused the event.
Constant Detail
INCOMING_CHATConstant
public static const INCOMING_CHAT:String = incomingChat

Product Version : Worlize APIv.1

The ChatEvent.INCOMING_CHAT constant defines the value of the type property of the event object for a incomingChat event.

The text property can be modified to change the chat text before it is displayed on screen.

This event is cancelable. Call preventDefault() on the event object to prevent the text from appearing on screen.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelabletrue
currentTargetThe 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.
isWhisperTrue if the event represents a private message
originalTextThe original chat text, unmodified. This value can be relied upon to contain the true chat text, as opposed to the text property that may have been modified by another app or event handler.
recipientThe user who is the recipient of a whisper. If the chat is not a whisper, will be set to null. See com.worlize.api.model.User.
targetThe 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.
textThe chat text. Can be modified to affect the actual message before it is displayed on screen.
userThe user who is sending the chat. See com.worlize.api.model.User.

See also

OUTGOING_CHATConstant 
public static const OUTGOING_CHAT:String = outgoingChat

Product Version : Worlize APIv.1

The ChatEvent.OUTGOING_CHAT constant defines the value of the type property of the event object for a outgoingChat event.

The text property can be modified to change the chat text before it is sent.

This event is cancelable. Call preventDefault() on the event object to prevent the chat message from being sent.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelabletrue
currentTargetThe 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.
isWhisperTrue if the event represents a private message
originalTextThe original chat text, unmodified. This value can be relied upon to contain the true chat text, as opposed to the text property that may have been modified by another app or event handler.
recipientThe user who is the recipient of a whisper. If the chat is not a whisper, will be set to null. See com.worlize.api.model.User.
targetThe 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.
textThe chat text. Can be modified to affect the actual message that is sent.
userThe user who is sending the chat. See com.worlize.api.model.User.

See also