thanks for help me, but my client side code works if I use a FMS.
I don't want to use onSync I just want to access to my Shared Object when I 
need it.

How Can I do it?

thanks


>From: Sascha <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: Re: [Red5] Problem with Remote Shared Object
>Date: Thu, 31 Aug 2006 16:42:28 +0200
>
>GIANNI INGUSCIO schrieb:
> > Hi, I have a problem with a Remote Shared Object.
> >
> > I have created a Shared Object on the Red5 server, I have set some
> > attributes.
> > Now I want to access to Shared Object on client side. I tried this code 
>but
> > It doesn't print the attributes:
> >
> > var onlineSO:SharedObject = new SharedObject();
> > onlineSO = SharedObject.getRemote("soList", nc.uri, false);
> > onlineSO.connect(nc);
> > for (var i in onlineSO.data)
> >     {
> >     trace(onlineSO.data[i].toString());
> >     }
> >
> > Do I have to write any code server side to access Shared Object from 
>client
> > side?
> >
> > Thanks, Gianni
> >
>
>try this code:
>
>[code]
>main_nc = new NetConnection();
>     main_nc.onStatus = function(info) {
>         if (info.code == "NetConnection.Connect.Success") {
>             trace(info.code)
>             var onlineSO:SharedObject = new SharedObject();
>             onlineSO = SharedObject.getRemote("soList", nc.uri, true);
>             onlineSOo.onSync = function(list) {
>                 trace(list.toString+"__list")
>                 for (var n in list) {
>                     var base_obj = this.data[list[n].name];
>                     var base_obj_value = base_obj.<here_the_dataset_name>;
>trace("Name: "+ var base_obj +"\n Value: "+var
>base_obj_value+"\n___________");
>                     //do something
>                 }
>             };
>             drawing_so.connect(main_nc);
>         } else {
>             trace("ERROR: " + info.code);
>         }
>     };
>
>main_nc.connect("rtmp:/<your_application>");
>
>
>[/code]
>
>
>_______________________________________________
>Red5 mailing list
>[email protected]
>http://osflash.org/mailman/listinfo/red5_osflash.org

_________________________________________________________________
Scarica gratuitamente MSN Toolbar! http://toolbar.msn.it/


_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to