Code: Select all
SF.onRoomListUpdate = function(roomList:Object){
for (var r in roomList){ //cycle trough all the rooms
var stanza:Room = roomList[r]; //get on of the rooms
trace("Name: " + stanza.getName() + " no. " + stanza.getUserCount() + "\n");
var amici:Object = stanza.getUserList(); //get the user list
for (var u in amici){
trace(amici[u] + "\n");
}
}
}
When I trace the room name or the count of users I get normal results (like... "Lobby" and "2", "3"... ) but when I try to access the user list I get a heck of a lot of undefined...
It seems like he gets an empty user list, because he doesn't enter in the for cycle at all... Why??