1 Reply Latest reply on Nov 5, 2006 5:51 AM by chris.huston.t10

    Can anybody help me ?

      Create a Flash swf that does the following:
      - connects (FCS NetConnection) to “rmtp://fcs.justwebcam/synctest/_definst_”
      - upon connection success waits for remote call of the method “init”. The “init” method has one parameter that is type object. This info object contains the “info_so_name” property that is the name of a temporary remote shared object that the flash client will need to connect to and read data from.
      - connects to the shared object wich name has beensent by the init call
      - listens for syncronization of the shared object and signals visually when the data has changed (i.e. a blinking green light)
      - at all time displays all the up-to date info contained by the object in a readeable form.
        • 1. Re: Can anybody help me ?
          chris.huston.t10 Level 3
          The below code might be of use:

          private var nc:NetConnection;
          private var info_so:SharedObject;
          private function connect_fcs():void {
          nc = new NetConnection();
          nc.client = this;
          nc.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
          nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR , sync_error);

          private function netStatus(event:NetStatusEvent):void {
          var info:Object = event.info;
          if (info.code == "NetConnection.Connect.Success") {

          public function init(info_so_name:String):void {
          info_so = SharedObject.getRemote(info_so_name, nc.uri, false);
          info_so.addEventListener(AsyncErrorEvent.ASYNC_ERROR , sync_error);
          info_so.addEventListener(SyncEvent.SYNC, sync_info);
          info_so.client = this;

          private function sync_error(event:AsyncErrorEvent):void {
          Alert.show("sync error = " + event.error);

          private function sync_users(event:SyncEvent):void {
          for (var t:String in event.changeList) {
          //display changes in readable form
          //blink green light