Packageplayerio
Interfacepublic interface Message

Message object either sent or received from the server



Public Properties
 PropertyDefined By
  length : int
[read-only] Gets the length of the message
Message
  type : String
The type of the message
Message
Public Methods
 MethodDefined By
  
add(... args):void
Adds data entry to the Message object
Message
  
getBoolean(index:int):Boolean
Reads a Boolean from the message object at index
Message
  
getByteArray(index:int):ByteArray
Reads a ByteArray from the message object at index
Message
  
getInt(index:int):int
Reads an int from the message object at index
Message
  
getNumber(index:int):Number
Reads a number from the message object at index
Message
  
getString(index:int):String
Reads a String from the message object at index
Message
  
getUInt(index:int):uint
Reads an uint from the message object at index
Message
  
toString():String
Shows a human readable serialization of the message
Message
Property Detail
lengthproperty
length:int  [read-only]

Gets the length of the message


Implementation
    public function get length():int
typeproperty 
type:String

The type of the message


Implementation
    public function get type():String
    public function set type(value:String):void
Method Detail
add()method
public function add(... args):void

Adds data entry to the Message object

Parameters

... args — Entries to add. Valid types are Number, int, uint, String, Boolean and ByteArray


Example
How to add values to a message
         message.add("This is a chat message", 3)
         
getBoolean()method 
public function getBoolean(index:int):Boolean

Reads a Boolean from the message object at index

Parameters

index:int — The index of the value to be read

Returns
Boolean — Boolean
getByteArray()method 
public function getByteArray(index:int):ByteArray

Reads a ByteArray from the message object at index

Parameters

index:int — The index of the value to be read

Returns
ByteArray — ByteArray
getInt()method 
public function getInt(index:int):int

Reads an int from the message object at index

Parameters

index:int — The index of the value to be read

Returns
int — int
getNumber()method 
public function getNumber(index:int):Number

Reads a number from the message object at index

Parameters

index:int — The index of the value to be read

Returns
Number — Number
getString()method 
public function getString(index:int):String

Reads a String from the message object at index

Parameters

index:int — The index of the value to be read

Returns
String — String
getUInt()method 
public function getUInt(index:int):uint

Reads an uint from the message object at index

Parameters

index:int — The index of the value to be read

Returns
uint — uint
toString()method 
public function toString():String

Shows a human readable serialization of the message

Returns
String — String