Skip to main content
Participant
June 2, 2010
Question

Clients connected are not in order

  • June 2, 2010
  • 1 reply
  • 262 views

I have a shared object of users connected to my application in FMS.

application.users_so = SharedObject.get("users_so", false);

For example:

student1 | student2 | student3 | student4 | student5

The application.users_so.size() is 5

Now I remove student2 in both sides, server and client. The new size is 4.  First, the array looks like this in Server Side:

student1 | student5 | student3 | student4

But, in Client Side (with ArrayCollection) the array  looks like this:

student1 | student3 | student4 | student5

In Server Side the code I use to remove the client that has left the application is:

application.users_so.setProperty(client.name, null);

While in Client Side (flex) the code is:

this.arrayCursor.removeItemAt(i); // i is the index

My problem is the array is not equal in both sides. Is there another technique in order to have both in the same order ?

Thanks in advance.

    This topic has been closed for replies.

    1 reply

    calmchessplayer
    Inspiring
    June 3, 2010

    on server side i'd stuff array in shared object then on the client side call each on with a loop or call the whole array lik so.data.slot0[0] so.data.slot0[1]

    or like this............... updataing it with shared object onStatus messages there are more details but if you are half the flash programmer you seem to be you will understand and implement the idea.

    arr0:Array = new Array();

    arr0 = so.data.slot0;

    then arr0[0];

           arr0[1];