onRoomListUpdate()

Availability:

Flash Player 7, 8
SmartFoxServer Lite / Basic / Pro

Usage:

smartFox.onRoomListUpdate(roomList:Object)

Description:

The event is fired when entering a zone (usually during a login() call). The server sends a list of rooms in the zone.

NOTE:
If you are using the default login mechanism provided by SmartFoxServer you will receive this event right after a successfull login.
This is because the client API, internally, call the getRoomList() method after the login response has arrived.

If you're implementing your own custom login handler you will have to manually request the list of rooms from the client side, by calling getRoomList()

Parameters:

roomList   A list of room objects

Check the Room Class for more info on the objects returned.

Returns:

nothing

Example:

smartFox.onRoomListUpdate = function(roomList)
{
	// Dump the names of the rooms available
	for (var r:String in roomList:Object)
	{
		trace(roomList[r].getName())
	}
}

See also: