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.