The following question was asked on the red5 mailing list:
what is the difference between update a sharedobject in the client side doing sharedobject.setProperty(”property”,value) with actionscript and in the server side with red5 doing
sharedobject.setAtributte(”atributte”,value).
There is a difference between the two. Clients who are subscribe to remote SharedObjects get notified of updates via the SyncEvent which gets dispatched by the Flash Player. The SyncEvent object contains a few important properties [target, changeList]. The target property points to the SharedObject which is being updated. However, the changeList property holds an Array of objects that have status in regards to the slot data. Each object in the list has three properties [code, name, and oldValue]. The Flash Player sets code to "clear", "success", "reject", "change", or "delete". You can read more about the difference here! The two values that help answer your question are as follows:
- A value of "success" means the client changed the shared object.
- A value of "change" means another client changed the object or the server resynchronized the object.
Tags: Red5, SharedObject