I'm using an AS2 SharedObject along with Red5 to synchronize a group
of user in a real-time game.  I found an interesting bug.

I have an array:

  var someArray:Array = [1,2,3];

I have a dataObject that contains someArray and some other properties:

  dataObject = {
     someProperty: 1,
     someArray: someArray:Array,
     etc...
  }

Then, in my shared object I have references to both dataObject (which
contains someArray) AND someArray

  sharedObject.currentState = {
   dataObject: dataObject,
   someArray: someArray }

After making the change to sharedObject.currentState, when the
synchronized movie checks the value of

  sharedObject.currentState.someArray

its value is equal to

  sharedObject.currentState.dataObject

In conclusion, it appears that the SharedObject does not like it when
multiple references to the same object are included in a sharedObject.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to