Problem in getting displaying userlist

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
vasanth
Posts: 5
Joined: 27 Jun 2008, 08:44
Location: india

Problem in getting displaying userlist

Post 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
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply