Page 1 of 1

problem on "onMapLoaded" extension

Posted: 05 Sep 2011, 13:11
by alfaodin
Hi, well thi is my problem, we made an extension to create rooms dinamically, I need to receive the name of the map when the "onMapLoaded" event is launched, but the params of this event are null. I made a test and printed in a console the room params, there is data in the server, but when it returns to the client, the params are all null. Please help me, how can I get the room name in the client?
Regards.

Posted: 06 Sep 2011, 06:30
by Bax
As you are creating a room, you should listen to the related event (see the SFS API doc). The event tells you the room name and, through the room variables, the map name too.

EVENT MAP_UPDATED

Posted: 21 Sep 2011, 15:42
by alfaodin
Hi, Sorry for replying so late, but the real problem is that the event: public static MAP_UPDATED:String = "mapUpdated"
(read) has two params : the password and room . :(*) the room name or id passed to the IOpenSpaceAPI.loadMap method when the current map was loaded.
When this event is dropped, the room value is equal to undefined, why is it null? What do I have to do in order to get the name of the room? Thank you.

Posted: 22 Sep 2011, 17:22
by Bax
Not sure what you are doing wrong, but we just tested it and it works as expected. Are you sure you wrote the variables names correctly?

Code: Select all

private function onMapUpdated(evt:OpenSpaceEvent):void
{
	trace("OpenSpace.MAP_UPDATED event received")
	trace(evt.params.room)
	trace(evt.params.password)
}