Packagecom.myflashlab.air.extensions.googleGames
Classpublic class Room
InheritanceRoom Inheritance Object

Data interface for room functionality.



Public Properties
 PropertyDefined By
  autoMatchWaitEstimateSeconds : int
[read-only] Retrieves the estimated wait time for automatching to finish for players who are not automatched immediately, as measured from the time that the room entered the automatching pool.
Room
  creationTimestamp : Number
[read-only] The server timestamp at which the room was created.
Room
  creatorId : String
[read-only] The ID of the participant who created this Room.
Room
  description : String
[read-only] Description of this room.
Room
  exclusive_bit_mask : int
[read-only]
Room
  max_automatch_players : int
[read-only]
Room
  min_automatch_players : int
[read-only]
Room
  participantIds : Array
[read-only] The IDs of the participants in this room.
Room
  roomId : String
[read-only] The ID of this Room.
Room
  variant : int
[read-only] Variant specified for this room, if any.
Room
Public Methods
 MethodDefined By
  
getParticipant($participantId:String):Participant
Get a participant in a room by its ID.
Room
  
getParticipantId($playerId:String):String
returns the participant ID corresponding to given player, or null if none found.
Room
  
getParticipantStatus($participantId:String):int
Get the status of a participant in a room.
Room
  
getStatus():int
The current status of the room.
Room
Public Constants
 ConstantDefined By
  ROOM_EVENT_AUTO_MATCHING : String = onRoomAutoMatching
[static]
Room
  ROOM_EVENT_CONNECTED : String = onConnectedToRoom
[static]
Room
  ROOM_EVENT_CONNECTING : String = onRoomConnecting
[static]
Room
  ROOM_EVENT_DISCONNECTED : String = onDisconnectedFromRoom
[static]
Room
  ROOM_EVENT_P2P_CONNECTED : String = onP2PConnected
[static]
Room
  ROOM_EVENT_P2P_DISCONNECTED : String = onP2PDisconnected
[static]
Room
  ROOM_EVENT_PEER_DECLINED : String = onPeerDeclined
[static]
Room
  ROOM_EVENT_PEER_INVITED : String = onPeerInvitedToRoom
[static]
Room
  ROOM_EVENT_PEER_JOINED : String = onPeerJoined
[static]
Room
  ROOM_EVENT_PEER_LEFT : String = onPeerLeft
[static]
Room
  ROOM_EVENT_PEERS_CONNECTED : String = onPeersConnected
[static]
Room
  ROOM_EVENT_PEERS_DISCONNECTED : String = onPeersDisconnected
[static]
Room
  ROOM_STATUS_ACTIVE : int = 3
[static] Constant returned by getStatus() indicating that the room is active and connections are established.
Room
  ROOM_STATUS_AUTO_MATCHING : int = 1
[static] Constant returned by getStatus() indicating that one or more slots are waiting to be filled by auto-matching.
Room
  ROOM_STATUS_CONNECTING : int = 2
[static] Constant returned by getStatus() indicating that this room is waiting for clients to connect to each other.
Room
  ROOM_STATUS_INVITING : int = 0
[static] Constant returned by getStatus() indicating that the room has one or more players that have been invited and have not responded yet.
Room
  ROOM_VARIANT_DEFAULT : int = -1
[static] Constant used to indicate that the variant for a room is unspecified.
Room
Property Detail
autoMatchWaitEstimateSecondsproperty
autoMatchWaitEstimateSeconds:int  [read-only]

Retrieves the estimated wait time for automatching to finish for players who are not automatched immediately, as measured from the time that the room entered the automatching pool.


Implementation
    public function get autoMatchWaitEstimateSeconds():int
creationTimestampproperty 
creationTimestamp:Number  [read-only]

The server timestamp at which the room was created.


Implementation
    public function get creationTimestamp():Number
creatorIdproperty 
creatorId:String  [read-only]

The ID of the participant who created this Room. Note that not all participants will see the same value for the creator. In the case of an automatch, this value may differ for each participant.


Implementation
    public function get creatorId():String
descriptionproperty 
description:String  [read-only]

Description of this room.


Implementation
    public function get description():String
exclusive_bit_maskproperty 
exclusive_bit_mask:int  [read-only]


Implementation
    public function get exclusive_bit_mask():int
max_automatch_playersproperty 
max_automatch_players:int  [read-only]


Implementation
    public function get max_automatch_players():int
min_automatch_playersproperty 
min_automatch_players:int  [read-only]


Implementation
    public function get min_automatch_players():int
participantIdsproperty 
participantIds:Array  [read-only]

The IDs of the participants in this room. These are returned in the participant order of the room. Note that these are not stable across rooms.


Implementation
    public function get participantIds():Array
roomIdproperty 
roomId:String  [read-only]

The ID of this Room.


Implementation
    public function get roomId():String
variantproperty 
variant:int  [read-only]

Variant specified for this room, if any.


Implementation
    public function get variant():int
Method Detail
getParticipant()method
public function getParticipant($participantId:String):Participant

Get a participant in a room by its ID. Note that the participant ID must correspond to a participant in this match.

Parameters

$participantId:String

Returns
Participant
getParticipantId()method 
public function getParticipantId($playerId:String):String

returns the participant ID corresponding to given player, or null if none found.

Parameters

$playerId:String

Returns
String
getParticipantStatus()method 
public function getParticipantStatus($participantId:String):int

Get the status of a participant in a room. Note that the participant ID must correspond to a participant in this room

Parameters

$participantId:String

Returns
int
getStatus()method 
public function getStatus():int

The current status of the room.

Returns
int
Constant Detail
ROOM_EVENT_AUTO_MATCHINGConstant
public static const ROOM_EVENT_AUTO_MATCHING:String = onRoomAutoMatching

ROOM_EVENT_CONNECTEDConstant 
public static const ROOM_EVENT_CONNECTED:String = onConnectedToRoom

ROOM_EVENT_CONNECTINGConstant 
public static const ROOM_EVENT_CONNECTING:String = onRoomConnecting

ROOM_EVENT_DISCONNECTEDConstant 
public static const ROOM_EVENT_DISCONNECTED:String = onDisconnectedFromRoom

ROOM_EVENT_P2P_CONNECTEDConstant 
public static const ROOM_EVENT_P2P_CONNECTED:String = onP2PConnected

ROOM_EVENT_P2P_DISCONNECTEDConstant 
public static const ROOM_EVENT_P2P_DISCONNECTED:String = onP2PDisconnected

ROOM_EVENT_PEER_DECLINEDConstant 
public static const ROOM_EVENT_PEER_DECLINED:String = onPeerDeclined

ROOM_EVENT_PEER_INVITEDConstant 
public static const ROOM_EVENT_PEER_INVITED:String = onPeerInvitedToRoom

ROOM_EVENT_PEER_JOINEDConstant 
public static const ROOM_EVENT_PEER_JOINED:String = onPeerJoined

ROOM_EVENT_PEER_LEFTConstant 
public static const ROOM_EVENT_PEER_LEFT:String = onPeerLeft

ROOM_EVENT_PEERS_CONNECTEDConstant 
public static const ROOM_EVENT_PEERS_CONNECTED:String = onPeersConnected

ROOM_EVENT_PEERS_DISCONNECTEDConstant 
public static const ROOM_EVENT_PEERS_DISCONNECTED:String = onPeersDisconnected

ROOM_STATUS_ACTIVEConstant 
public static const ROOM_STATUS_ACTIVE:int = 3

Constant returned by getStatus() indicating that the room is active and connections are established.

ROOM_STATUS_AUTO_MATCHINGConstant 
public static const ROOM_STATUS_AUTO_MATCHING:int = 1

Constant returned by getStatus() indicating that one or more slots are waiting to be filled by auto-matching.

ROOM_STATUS_CONNECTINGConstant 
public static const ROOM_STATUS_CONNECTING:int = 2

Constant returned by getStatus() indicating that this room is waiting for clients to connect to each other.

ROOM_STATUS_INVITINGConstant 
public static const ROOM_STATUS_INVITING:int = 0

Constant returned by getStatus() indicating that the room has one or more players that have been invited and have not responded yet.

ROOM_VARIANT_DEFAULTConstant 
public static const ROOM_VARIANT_DEFAULT:int = -1

Constant used to indicate that the variant for a room is unspecified.