I'm having some trouble using multiplayer.createRoom. The documentation notes the "callback" argument as follows:
callback:Function (Default = null)
Method executed when the createRoom call executed successfully: function(connection:Connection):void{...}
However, it seems that my callback function is receiving the room ID instead of a connection reference. I then have no way to access the connection.
Here is my code:
- Code: Select all
client.multiplayer.createRoom(
"test",
"bounce",
true,
{numUsers:numUsers},
handleRoomCreate,
handleRoomCreateError
);
...
//Throws a type error - cannot convert "test" to playerio.Connection.
protected function handleRoomCreate(connection:Connection):void
Thanks for your help!