ActionScript - Shared objects data

Hello All, This is my first posting. I hope I have posted the thread in the correct forum if I haven’t I do apologize. Anyhow, I have a remote shared object in my app. Whenever, a client changes a remote shared objects property I would like to invoke a sync event.

I know how to create a shared object but I don’t know to change and update data to the clients in real time. :confused:
Example,.if a client changes a name or logs in or out then I hope to generate a sync event that propagates itself to all connected clients.

I am new to AS3 after coming from JavaScript and Adobe documentations doesn’t give many examples so I am really confused how to approach this.:injured:

This is what I have so far below: I know the code is probably full of errors but if you can give me any advice what I am doing wrong I would appreciate it!
Thank You

//creating the shared object
var client_so:SharedObject = SharedObject.getRemote("mySo", nc.uri, false);
//linking the shared object to the netconnection object
client_so.connect(nc);

client_So.addeventListener(SyncEvent.SYNC, syncHandler);


//I hope to loop through the sync event looking for an object in the sync event whose code is change
then use switch to construct to look for the value of that object’s “name”
function syncHandler(se:SyncEvent):void{
   for(var i:int = 0; i < se.changeList.length; i++){
   if(se.changeList[i].code == "change"){
   switch (se.changeList[i].name) {

   case "clear":
   loadSo();
   break;

  case "success":
  showSo();
  break;

//Updates the value of a property in a shared object and indicates to the server that the value of the property has changed
function loadSo():void{
    client_so.setProperty("status", "online");

function showSo():void{
  trace(client_so.data.status);