UPDATE: createRoom(obj) missing property

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

Moderators: Lapo, Bax

User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

UPDATE: createRoom(obj) missing property

Postby Lapo » 07 May 2005, 10:03

Thanks to brandon,
we've discovered that a property was not documented in the createRoom() method of the SFS API.

We've now updated the online documentation for both AS 1.0 and 2.0

{ THE MISSING PROPERTY }

In the object argument you should pass to the method a property called "exitCurrentRoom" was missing.

By default when you create a game room you're automatically joined in the new room leaving the one you were in before.
If you don't want to leave the old room you can set the "exitCurrentRoom" property to false.

Here's a code example:

Code: Select all

var rObj:Object = new Object()
rObj.name = "myGameRoom"
rObj.isGame = true
rObj.maxUsers = 4
rObj.exitCurrentRoom = false

smartFox.createRoom(rObj)


The above code creates a new game room and allows the user to stay in the current room and the new one at the same time.
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 41 guests