[SOLVED] problem with leaveEditMode & maps

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

tim831
Posts: 2
Joined: 04 Jul 2011, 09:45

[SOLVED] problem with leaveEditMode & maps

Postby tim831 » 04 Jul 2011, 10:04

Hi, we are using SFS2x rc1 & OpenSpace 2.0.3 under Flash CS5.

Everything works fine in edit mode. When leaving edit mode with leaveEditMode(false), the map will not reload itself if there has been changes done to the map. To be more specific

--------------------------------
leaveEditMode(true) with NO map change: GOOD
leaveEditMode(true) with map change: GOOD
leaveEditMode(false) with NO map change: GOOD
leaveEditMode(false) with map change: ERROR
-------------------------------
On the client side, both oSpace.MAP_LOADED event and oSpace.MAP_RENDERED event have been received.

On the server side, all five logs seem normal:
1) Map load request received from user XXX
2) Room "ABC" already joined; now loading associated map "ABC_map"
3) Library "projectOSLibrary" already available in cache
4) Map "ABC_map" already available in cache
5) Map "ABC_map" sent to user XXX
then no more logs

After using leaveEditMode(false), the map fades out and the entire OpenSpace area becomes white, looks the same as using openSpace.unloadMap() method.

When we try to use a button to manually load a map with method openSpace.loadMap("AAA"), the OP won't load itself if it is the SAME map. But if it is a DIFFERENT map, the map loads correctly.

We're not sure what causes the problem because everything seems fine. During the debugging process, we have even removed all avatar but the results are the same.

We have been debugging the whole day and had completely no progress... Could some kind souls help please?

---------------------------------------
------------ Solution ----------------
---------------------------------------
Thanks bax.

It's a very funny problem. As soon as the map size is larger the the view port, the map can reload itself with no problem.

So the solution: get really huge background if going for large view port :)
Last edited by tim831 on 04 Jul 2011, 19:38, edited 3 times in total.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 04 Jul 2011, 16:32

Is the map size (in pixels) equal to the viewport?
Paolo Bax
The SmartFoxServer Team
tim831
Posts: 2
Joined: 04 Jul 2011, 09:45

Postby tim831 » 04 Jul 2011, 16:37

bax wrote:Is the map size (in pixels) equal to the viewport?


it's smaller than the view port. If i load another map, it works fine. But if i try to reload the same map, after the original map fades out, the reloaded map wont appear.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 05 Jul 2011, 09:44

Thank you for the solution. Well, actually a workaround.
I suspected the map size vs viewport size was the issue, because I saw this happen before. Unfortunately we haven't been able to find a solution to this yet.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 40 guests