Let me explain what I am doing:
I am following closely the Advanced Chat sample. I am currently learning the roomlist, usercount and userlist things. And here is where I have this weird issue.
For monitoring reasons I have a log textarea where I send all kind of stuff to to monitor what is going on. So what I want to do is to send the room name and the current number of users into my log window.
For this I am using the "getUserRoom" function which is also in the example:
Code: Select all
private function getRoomLabel(room:Room):String
{
return room.name + " (" + room.userCount + "/" + room.maxUsers + " users)" + (room.isPasswordProtected ? " *" : "");
}Code: Select all
private function getRoomLabel(room:Room):String
{
logdataprovider.addItem(room.name + ": "+ room.userCount);
return room.name + " (" + room.userCount + "/" + room.maxUsers + " users)" + (room.isPasswordProtected ? " *" : "");
}In my roomlist window I have following rooms: The Lobby, Lobby2 and Lobby3
In my logwindow I have: Lobby3, Lobby3, Lobby2 and The Lobby.
When I add a new room from the backend (name: Lobby4) I get the result that I get: Lobby4, Lobby4, Lobby3, Lobby2 and The Lobby.
Somehow the last room alwas appears double in my logwindow. But why is this?y
The functions itself are working as they should. My roomlist shows the rooms and the users in the rooms. Only my logwindow shows this last room doubled.
Any explanation for this?