views:

257

answers:

2

Hello

I have 2 questions about remote shared objects in Flex/ActionScript3:

1) If I connect to a remote shared objects, but do not handle the SYNC event, will the shared object still receive data from the server? ie. will the server still broadcast data to this client ? This is what I expect, but please let me know

2) Is the entire object state send each time the SYNC event is fired, or is it only the changes to the object state? I believe it is only the changes.

A: 

1) Yes. If you are connected to server you will receive sync event no matter if you have listener for it

2) Only changes. There is changeList property in SyncEvent that has an array of object that are changed.

dede
A: 

Hi,

I am creating a game which 2 users can play. For this I have implemented the concept of RTMP and Remote Shared object. I have implemented this successfully.

Now as per the requirement, If player close window and again join after some time then the current status of the game should be loaded. For that purpose I have converted remote object to persistence remote object. So in this case while one player disconnect and again connect then he can get the current game status. BUT while both the players disconnect from the game and again join then the new game starts from first stage instead of current stage while it was disconnected.

So my requirement is to keep the game on even both the players has disconnected from the game. Later on I will stop the game on some conditions.

Any suggestion/help would be greatly appreciated.

Kalpesh