Hi.
I'm developing a flash application, and such a situation occurs.
I'm entering a room. Then I set an event handler for room variables change.
Then another user enters room, and sets some room variables.
When my room variables change handler is fired, I get the users list, and don't find anybody in it except me.
The question is how can I get the updated userList, so I can know who is in the same room with me, when he changed the room variable value?
And can you please describe what is updated and when? For example when will be updated result of _sfs.roomManager.getRoomList() ???
Do I need to explicitly say "go and update that list??" Or I don't need to worry of it?? Now I'm trying to get the updated rooms list, but it always returns the same value,
the value about the time when I first logged in!
Thanks and Regards,
Martun.
userList variable updates.
userList variable updates.
Thanks and Regards,
Martun Karapetyan.
Martun Karapetyan.
Re: userList variable updates.
Hi.
Hmm... How are you trying to get the room's userList? What code are you using?
Please also make sure that you're running the latest SFS2x Final (2.0.1) alongside with the latest ActionScript 3.0 API.
Hmm... How are you trying to get the room's userList? What code are you using?
Please also make sure that you're running the latest SFS2x Final (2.0.1) alongside with the latest ActionScript 3.0 API.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: userList variable updates.
Yes, I have downloaded both from the site some 4-5 days ago. On the old API everything was working OK.
Here is a fragment of my code(whole code is huge, and copyrighted.)
/// Current room.
var room:Room = _sfs.lastJoinedRoom;
// Retrive the users list.
var userList:Array = room.userList; // Returns information about the time joined, not now!
Here is a fragment of my code(whole code is huge, and copyrighted.)
/// Current room.
var room:Room = _sfs.lastJoinedRoom;
// Retrive the users list.
var userList:Array = room.userList; // Returns information about the time joined, not now!
Thanks and Regards,
Martun Karapetyan.
Martun Karapetyan.
Re: userList variable updates.
Hmm... That sounds weird... Sorry, but I don't have time left today for testing if that is really a bug.
In the mean time, if in the ROOM_VARIABLES_UPDATE handler, you do something like:
Doesn't that code show you the updated userList?
In the mean time, if in the ROOM_VARIABLES_UPDATE handler, you do something like:
Code: Select all
var room:Room = evt.params.room as Room;
var userList:Array = room.userList;Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: userList variable updates.
No. It shows the old one. May be the information that a new user has entered room comes later than the information that he has set a new room variable. Because in my case, the first thing after entering the room is to set a room variable for every user entering the room.
Thanks and Regards,
Martun Karapetyan.
Martun Karapetyan.
Re: userList variable updates.
For the updated room list, listen for onJoinRoom event (you dont have to say go and get updated rooms),
For the updated user list, you can listen for onUserCountChange handler...
Thanks ....
For the updated user list, you can listen for onUserCountChange handler...
Thanks ....
======================================================
Choose a job of your choice and you will never have to work in life !!!
Choose a job of your choice and you will never have to work in life !!!