A remote shared object allows either a client or server to send a message using SharedObject.send() to all clients connected to the shared object. The send() method can be used for text chat applications, for example, where all users subscribed to your shared object receive your message.

When you use SharedObject.send(), you, as broadcaster, also receive a copy of the message.

  1. Write a method that SharedObject.send() will call:

     private function doSomething(msg:String):void { 
         trace("Here's the message: " + msg); 
  2. Call send() to broadcast the message:

     so = SharedObject.getRemote("position", nc.uri, false); 
     so.send("doSomething", msg);