[Variables] RoomList Update
Posted: 26 Apr 2009, 16:24
Well, im trying to do a code so that you can see only the rooms that YOU created, in a lb called myroomList.. well, i have a variable called duenoactu in the room variables, but when, to try to see if it works, i put as a room lable "Room name, user count, owner:" it always comes as undefined, and in the room itself i have owner: and it shows the value.. whats the problem?
smartfox.onRoomListUpdate = function(roomList:Object, room:Room)
{
_root.navegador.roomList_lb.removeAll()
_root.navegador.myroomList_lb.removeAll()
for (var i in roomList)
{
room = roomList[i];
rv = room.getVariables();
_root.navegador.roomList_lb.addItem(room.getName() + " (" + room.getUserCount() + ") "+rv.duenoactu, room.getId())
if (rv.duenoactu == "test") {
_root.navegador.myroomList_lb.addItem(room.getName() + " (" + room.getUserCount() + ")", room.getId())
}
}
_root.navegador.roomList_lb.sortItemsBy("label", "ASC")
_root.navegador.myroomList_lb.sortItemsBy("label", "ASC")
//Quite el this.autoJoin()
}
help please!
smartfox.onRoomListUpdate = function(roomList:Object, room:Room)
{
_root.navegador.roomList_lb.removeAll()
_root.navegador.myroomList_lb.removeAll()
for (var i in roomList)
{
room = roomList[i];
rv = room.getVariables();
_root.navegador.roomList_lb.addItem(room.getName() + " (" + room.getUserCount() + ") "+rv.duenoactu, room.getId())
if (rv.duenoactu == "test") {
_root.navegador.myroomList_lb.addItem(room.getName() + " (" + room.getUserCount() + ")", room.getId())
}
}
_root.navegador.roomList_lb.sortItemsBy("label", "ASC")
_root.navegador.myroomList_lb.sortItemsBy("label", "ASC")
//Quite el this.autoJoin()
}
help please!