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.
problem on "onMapLoaded" extension
EVENT MAP_UPDATED
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.
(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.
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)
}
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Return to “OpenSpace v2 discussions and help”
Who is online
Users browsing this forum: No registered users and 25 guests