Packagecom.whirled.net
Classpublic class MessageReceivedEvent
InheritanceMessageReceivedEvent Inheritance flash.events.Event

Dispatched on the 'net' subcontrol when a message is sent by any client.



Public Properties
 PropertyDefined by
  name : String
[read-only] Access the message name.
MessageReceivedEvent
  senderId : int
[read-only] Access the id of the occupant that sent the message.
MessageReceivedEvent
  value : Object
[read-only] Access the message value.
MessageReceivedEvent
Public Methods
 MethodDefined by
  
MessageReceivedEvent(messageName:String, value:Object, senderId:int)
MessageReceivedEvent
  
clone():Event
MessageReceivedEvent
  
isFromServer():Boolean
Returns true if the message was sent by the whirled game server or by the game's server agent.
MessageReceivedEvent
  
toString():String
MessageReceivedEvent
Public Constants
 ConstantDefined by
  MESSAGE_RECEIVED : String = "MsgReceived"
[static] The type of all MessageReceivedEvents.
MessageReceivedEvent
Protected Constants
 ConstantDefined by
  SERVER_AGENT_ID : int = -2.147483648E9
[static] Sender id indicating that the message is from the game's server agent.
MessageReceivedEvent
  SERVER_ID : int = 0
[static] Sender id indicating that the message is from the whirled game server.
MessageReceivedEvent
Property detail
nameproperty
name:String  [read-only]

Access the message name.

Implementation
    public function get name():String
senderIdproperty 
senderId:int  [read-only]

Access the id of the occupant that sent the message. The value may not correspond to a real occupant id if isFromServer returns true.

Implementation
    public function get senderId():int

See also

valueproperty 
value:Object  [read-only]

Access the message value.

Implementation
    public function get value():Object
Constructor detail
MessageReceivedEvent()constructor
public function MessageReceivedEvent(messageName:String, value:Object, senderId:int)Parameters
messageName:String
 
value:Object
 
senderId:int
Method detail
clone()method
public override function clone():Event

Returns
Event
isFromServer()method 
public function isFromServer():Boolean

Returns true if the message was sent by the whirled game server or by the game's server agent.

Returns
Boolean
toString()method 
public override function toString():String

Returns
String
Constant detail
MESSAGE_RECEIVEDconstant
public static const MESSAGE_RECEIVED:String = "MsgReceived"

The type of all MessageReceivedEvents.

SERVER_AGENT_IDconstant 
protected static const SERVER_AGENT_ID:int = -2.147483648E9

Sender id indicating that the message is from the game's server agent. TODO: does this need to be public?

SERVER_IDconstant 
protected static const SERVER_ID:int = 0

Sender id indicating that the message is from the whirled game server. TODO: does this need to be public?