The Room class is used internally by the SmartFoxClient object to store the properties of each room. Also, Room objects are returned by different methods and events of the API.
1.0.0
Final
The gotoAndPlay() Team
© 2006-2007 gotoAndPlay()
The Room class is used internally by the SmartFoxClient object to store the properties of each room. | |
The default contructor. | |
Get the list of users currently inside the room. | |
Look for a user in the room. | |
Retrieve a Room Variable. | |
Retrieve the list of all Room Variables. | |
Get the name of the room. | |
Get the id of the room. | |
A boolean flag indicating if the room is dynamic/temporary. | |
A boolean flag indicating if the room is a “game room”. | |
A boolean flag indicating if the room is private (password protected). | |
Retrieve the number of users currently inside the room. | |
Retrieve the number of spectators currently inside the room. | |
Retrieve the maximum number of users that can join the room. | |
Retrieve the maximum number of spectators that can join the room. | |
Retrieve the player id for the current user in the room. | |
A boolean flag indicating if the room is in “limbo mode”. |
public function Room( id: int, name: String, maxUsers: int, maxSpectators: int, isTemp: Boolean, isGame: Boolean, isPrivate: Boolean, isLimbo: Boolean, userCount: int = 0, specCount: int = 0 )
The default contructor.
id | the room id. |
name | the room name. |
maxUsers | the maximum number of users that can join the room simultaneously. |
maxSpectators | the maximum number of spectators in the room (for game rooms only). |
isTemp | true if the room is temporary. isGame- true if the room is a “game room”. |
isPrivate | true if the roomis private (password protected). |
public function getUserList():Array
Get the list of users currently inside the room.
None.
Array | a list of User objects. |
public function getUser( userId: * ):User
Look for a user in the room.
userId | the user name (String) or the id (int) of the user to retrieve. |
User | a User object. |
public function isLimbo():Boolean
A boolean flag indicating if the room is in “limbo mode”.
More info can be found in the “Zone configuration” documentation (http://www.smartfoxserver.com- /docs- /docPages- /config- /basics.htm#zone).
None.
Boolean | true if the room is in “limbo mode”. |
The default contructor.
public function Room( id: int, name: String, maxUsers: int, maxSpectators: int, isTemp: Boolean, isGame: Boolean, isPrivate: Boolean, isLimbo: Boolean, userCount: int = 0, specCount: int = 0 )
Get the list of users currently inside the room.
public function getUserList():Array
Look for a user in the room.
public function getUser( userId: * ):User
Retrieve a Room Variable.
public function getVariable( varName: String ):Object
Retrieve the list of all Room Variables.
public function getVariables():Array
Get the name of the room.
public function getName():String
Get the id of the room.
public function getId():int
A boolean flag indicating if the room is dynamic/temporary.
public function isTemp():Boolean
A boolean flag indicating if the room is a “game room”.
public function isGame():Boolean
A boolean flag indicating if the room is private (password protected).
public function isPrivate():Boolean
Retrieve the number of users currently inside the room.
public function getUserCount():int
Retrieve the number of spectators currently inside the room.
public function getSpectatorCount():int
Retrieve the maximum number of users that can join the room.
public function getMaxUsers():int
Retrieve the maximum number of spectators that can join the room.
public function getMaxSpectators():int
Retrieve the player id for the current user in the room.
public function getMyPlayerIndex():int
A boolean flag indicating if the room is in “limbo mode”.
public function isLimbo():Boolean
Set on or more Room Variables.
public function setRoomVariables( varList: Array, roomId: int = -1, setOwnership: Boolean = true ):void