Page 1 of 1

SFSRoomManager not work

Posted: 04 Sep 2011, 10:54
by Oleg_79
var sfs:SmartFox = new SmartFox();

var ff:SFSRoomManager = new SFSRoomManager(sfs);

trace(ff.getRoomList());


1. Connect
2. Login
3. User is not in the room

Always comes to 0.
How to deal with this class? :(

Posted: 04 Sep 2011, 10:58
by rjgtav
Hi. If you create a new instance of the SFSRoomManager class, of course it will be empty, and will never be used by the SmartFox class.

The SFSRoomManager that is being used by the SmartFox class is its roomManager property.

Posted: 04 Sep 2011, 11:04
by Oleg_79
I need to get a list of all rooms in the zone. User in zone, but not in the room.
sfs.roomManger.getRoomList() - shows the room in which the user is. this does not suit

Posted: 04 Sep 2011, 12:24
by rjgtav
Please make sure that you are subscribed to the room group where those rooms are. You should get the whole list of rooms that are in that group.

Posted: 04 Sep 2011, 12:33
by Oleg_79
sfs.roomManager.getRoomList() - length 0, but in zone 10 rooms
sfs.roomManager.getRoomListFromGroup("GroupName") - length 0.

Posted: 04 Sep 2011, 12:34
by rjgtav
But are you subscribed to that group? you need to subscribe to it in order to receive it's room list.

Posted: 04 Sep 2011, 14:19
by jamalsoueidan
How do you create the rooms?

Maybe you are using the wrong server-side methods to create rooms, and that's why your client doesn't get updated :)

Posted: 06 Sep 2011, 16:59
by Oleg_79
Create in smartfox with admintools

Posted: 07 Sep 2011, 05:41
by Bax
But.. did you restart SmartFoxServer after creating the Rooms?

Posted: 07 Sep 2011, 10:48
by Oleg_79
bax wrote:But.. did you restart SmartFoxServer after creating the Rooms?
Yes.

Maybe I'm doing something wrong? I need to get a list of zone in which the room sits a given user (which is the type of search by nick). Could you suggest how to do it?

Posted: 08 Sep 2011, 06:15
by Bax
On the client side you can't know the rooms joined by all the users. You can just know the rooms joined by the user corresponding to the current client.
In order to do this use the SmartFox.roomManager.getJoinedRooms property.