Hy,
One of the missions that we cooped with during testing of the engine, is
what to do when one of the xml maps is missing.
we decide to 'clean' up the memory from both the openspace object and
the smartfox object, and allocate them again. But seems to be some problem:
her's an explanation of our moves:
as far as we using flex, our openspace object is allocated the followed:
_osWrapper=new OpenSpaceFlexWrapper();
addChild(_osWrapper);
os=_osWrapper.os;
when 'destructing' the allocated objects we're making the next moves:
1) smartFox.leaveRoom(currentRoomId);
2) smartFox.logout();
3) smartFox.disconnect();
4) _os=null;
5) _osWrapper=null;
and of coarse removing all the attached events.
The problem:
when we call the 'build' function again (the 3 rows above) ,
everything work fine, but on part of the new openspace object, there seems to be upper white rectungled layer. this layer is hiding part of the
loaded openspace world.
it seems to us that some memory of the previous entity of openspace
wasn't 'released' properly.
Could you tell us please, what we did wrong in our 'destructing' process ?
Thanks alot
how to destruct OpenSpace Object and SFS object
Check this post: http://forums.smartfoxserver.com/viewto ... 9727#19727
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
continue the issue
Thanks for the replay.
The topic from the link was known to us beafore we
addressed you. It wasn't help us much, cause the first time we allocate
the os object (even threw as3), everything work fine. The problem is in
trying to release (delete) the object and allocate a new entety.
there is no point for us to put it in mxml, cause if so, it can't be releases
out of memory.
Or- maybe you have some other correct solution how user X choose
(or forced by connection failier to server) to logout of the world and then
try login again ?
The topic from the link was known to us beafore we
addressed you. It wasn't help us much, cause the first time we allocate
the os object (even threw as3), everything work fine. The problem is in
trying to release (delete) the object and allocate a new entety.
there is no point for us to put it in mxml, cause if so, it can't be releases
out of memory.
Or- maybe you have some other correct solution how user X choose
(or forced by connection failier to server) to logout of the world and then
try login again ?
continue the issue
Hy.
We tryed to deal with 2 questions-
1) what to do on smartfox server connection failier,
2) what to do when the user asking to disconnect and want to login with
another user name
In both issues we've thought of 'deleteing' all the dynamic objects in the
application, and start over again- showing login, after that connect
to sfs, load the os etc.
Do you have any other idea, cause we're all come from C++ university
degrees and maybe our way of thinking is wrong and not sutable
for Flex/Flash AS3 solutions.
We tryed to deal with 2 questions-
1) what to do on smartfox server connection failier,
2) what to do when the user asking to disconnect and want to login with
another user name
In both issues we've thought of 'deleteing' all the dynamic objects in the
application, and start over again- showing login, after that connect
to sfs, load the os etc.
Do you have any other idea, cause we're all come from C++ university
degrees and maybe our way of thinking is wrong and not sutable
for Flex/Flash AS3 solutions.
Re: continue the issue
Well, no reason to destroy the OpenSpace instance. You can create it once at the application initialization (even before the connection is established or the login box is shown) and then keep it till the browser is closed.1) what to do on smartfox server connection failier
I would simply reload the browser page and restart from scratch.2) what to do when the user asking to disconnect and want to login with another user name
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
end of the issue
thanks very much for the both ideas, we'll do it that
way.
way.