some bugs in document

You think you've found a bug? Please report it here.

Moderators: Lapo, Bax

Post Reply
alvin3343
Posts: 80
Joined: 24 Jan 2006, 09:37

some bugs in document

Post by alvin3343 »

4.4 User class

Code: Select all

getId():Number  	                          returns the room Id
getName():String 	  	                      returns the room name
getVariable(varName:String):Object 	  	returns a room variable
getVariables():Object 	  	             returns a list of all the room variables
isSpectator():Boolean 	  	returns true if the room is a game room
These should be returns the " user" not the "room "

4.4 getActiveRoom()

Code: Select all

Example:
var roomId:Number = smartFox.getActiveRoom()
This should be var roomObj:Room=smartFox.getActiveRoom()

4.4 joinRoom()

Code: Select all

Parameters:
roomId 	  	the id of the room you want to join
the name of the room should be OK to be a parameter..

4.4sendObjectToGroup()

Code: Select all

roomId  	   	An array containing one or more recipient id
"roomId" should be "userList"

4.4 onLogin()

Code: Select all

Usage:
smartFox.onLogin(success:String, name:String, errorMsg:String) 
success:Boolean..

4.4 onRoomListUpdate()
roomList only contains a userList of current room.
this point should be mentioned. this makes many people confused I think.

4.4 onUserEnterRoom()

Code: Select all

Example:
smartFox.onUserEnterRoom = function(roomId:Number, userObj:Object)
userObj:User

7.1 User class

Code: Select all

getVariable(name)  	   	Return the room variable with the requested name
getVariables() 	  	Return a java.util.HashMap with all the Room Variables
should be user variable
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Thanks for your help, I've fixed the "bugs" :)
4.4 onRoomListUpdate()
roomList only contains a userList of current room.
this point should be mentioned. this makes many people confused I think.
Humm.. I am not sure if I understand the problem? Could you explain it a little bit better?

Thanks :)
Lapo
--
gotoAndPlay()
...addicted to flash games
alvin3343
Posts: 80
Joined: 24 Jan 2006, 09:37

Post by alvin3343 »

Welcome :lol:

I mean that when onRoomListUpdate() event is fired,
sfs receive a roomlist contains Room objects within current zone.
According to the document , Room obj contains a list of User objects.
So people may think that each Room object should have a list of its User objects.
But in fact, only the room which client is currrent in has a user list.

On the other words, when client receive onRoomListUpdate() event,
he has only a user list of the room he is connected not all user lists of each room within the zone.

sorry about my English. you got it?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Perfectly clear! Thanks :)
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply