Page 1 of 1

Problem in getting displaying userlist

Posted: 09 Jul 2008, 11:00
by vasanth
we are using Smartfoxserver Version 1.6.1

Code: Select all

function onJoinRoom(evt:SFSEvent):void
		{
		    var users:Array =  sfs.getActiveRoom().getUserList()
			debugTrace("Users----->"+users)
			for (var u:String in users){
   			debugTrace("Users----->"+users[u].getName())
			}
			debugTrace("Successfully joined room: " + evt.params.room.getName())
			sfs.loadBuddyList()
		}
we login the page successfully,but we didn't get userlist.It shows users is "undefined".
please provide the details

Posted: 11 Jul 2008, 08:31
by Lapo
Telepathy is not yet available here at our company, but we're practicing... :D
Sorry for the irony, but honestly it's unlikely that we can help by just seeing a few lines of code of your joinRoom handler ;)
The problems is likely to be generated by what was done before.

Now, before you post all your code and ask for a code review please take some time with our documentation which already provides clear examples on how to implement a custom login.

Here are tutorials that will help:
http://www.smartfoxserver.com/docs/docP ... /index.htm
http://www.smartfoxserver.com/docs/docP ... /index.htm

Additionally please check the AS3 API documentation. If you check the docs for the onJoinRoom you will notice that the room is already passed to you in the event.