PlayerIO

The fastest way to build online games without breaking a sweat.

ActionScript3 Reference

actionscript 3 Message class informationClass Message

Namespace: playerio
Language: ActionScript 3

Message object either sent or received from the server

Properties

 
public
length :int [read-only]

Gets the length of the message

public
type :String

The type of the message

Methods

 
public
add (... args):void

Adds data entry to the Message object

public
clone (to:Object):void

public
getBoolean (index:int):Boolean

Reads a Boolean from the message object at index

public
getByteArray (index:int):flash.utils:ByteArray

Reads a ByteArray from the message object at index

public
getInt (index:int):int

Reads an int from the message object at index

public
getNumber (index:int):Number

Reads a number from the message object at index

public
getString (index:int):String

Reads a String from the message object at index

public
getUInt (index:int):uint

Reads an uint from the message object at index

public
Message (type:String, ... args):void

public
toString ():String

Shows a human readable serialization of the message

Message.length

public
length :int [read-only]

Gets the length of the message

Message.type

public
type :String

The type of the message

Message.add

public
add (... args):void

Adds data entry to the Message object

Arguments

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

Example

How to add values to a message

Message.clone

public
clone (to:Object):void

Arguments

to:Object

Message.getBoolean

public
getBoolean (index:int):Boolean

Reads a Boolean from the message object at index

Arguments

index:int
The index of the value to be read

Message.getByteArray

public
getByteArray (index:int):flash.utils:ByteArray

Reads a ByteArray from the message object at index

Arguments

index:int
The index of the value to be read

Message.getInt

public
getInt (index:int):int

Reads an int from the message object at index

Arguments

index:int
The index of the value to be read

Message.getNumber

public
getNumber (index:int):Number

Reads a number from the message object at index

Arguments

index:int
The index of the value to be read

Message.getString

public
getString (index:int):String

Reads a String from the message object at index

Arguments

index:int
The index of the value to be read

Message.getUInt

public
getUInt (index:int):uint

Reads an uint from the message object at index

Arguments

index:int
The index of the value to be read

Message.Message

public
Message (type:String, ... args):void

Arguments

type:String
... args

Message.toString

public
toString ():String

Shows a human readable serialization of the message