[Red5] shared object

Manuel Raña info at vengava.com
Fri Sep 25 04:22:21 PDT 2009


Search for syncEventHandler for an example at:
http://www.elctech.com/tutorials/tutorial---red5-as3-fc4-and-shared-fridge-magnets

and
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/events/SyncEvent.html

You'll get data inside that handler



2009/9/25 Trevor Burton <worldofpaper at googlemail.com>

> We don't have nearly enough information to be able to offer you any other
> help... if you post some code i can take a look and make suggestions.
>
> T
>
>
> On Fri, Sep 25, 2009 at 10:34 AM, aily raesi <ayda_xyz at yahoo.com> wrote:
>
>> The thing is when I want to access the data on the shared object from
>> another script,it is not working,it says that it is undefiend.I want to add
>> something to shared object with one actionscript and receive it with another
>> but it does not work...
>>
>> I tried this:
>> var nc:NetConnection = new NetConnection();
>>
>>
>> nc.addEventListener(NetStatusEvent.NET_STATUS, onConnectionNetStatus);
>> nc.connect("rtmp://localhost/SOSample");
>>
>> function onConnectionNetStatus(event:NetStatusEvent) : void {
>>     // did we successfully connect
>>     if(event.info.code == "NetConnection.Connect.Success") {
>>         var myRemoteSO:SharedObject = SharedObject.getRemote("test",
>> nc.uri, true, false);
>>         myRemoteSO.connect(nc);
>>         myRemoteSO.data.test="hej";
>>         trace(""+myRemoteSO.data["mo"]);
>>
>>
>>
>>
>>
>>     }
>> }
>>
>>
>> but when I run this code:
>>
>> var nc:NetConnection = new NetConnection();
>>
>>
>> nc.addEventListener(NetStatusEvent.NET_STATUS, onConnectionNetStatus);
>> nc.connect("rtmp://localhost/SOSample");
>>
>> function onConnectionNetStatus(event:NetStatusEvent) : void {
>>     // did we successfully connect
>>     if(event.info.code == "NetConnection.Connect.Success") {
>>         var myRemoteSO:SharedObject = SharedObject.getRemote("test",
>> nc.uri, true, false);
>>         myRemoteSO.connect(nc);
>>
>>         trace(""+myRemoteSO.data.test);
>>         trace("connected");
>>
>>
>>
>>
>>     }
>> }
>>
>>
>> I don't get hej,I get undefiend
>> how can I solve this?thanks in advance....
>>
>>
>> --- On *Fri, 9/25/09, aily raesi <ayda_xyz at yahoo.com>* wrote:
>>
>>
>> From: aily raesi <ayda_xyz at yahoo.com>
>> Subject: [Red5] shared object
>> To: red5 at osflash.org
>> Date: Friday, September 25, 2009, 3:18 AM
>>
>>
>> Hi
>>
>> I am trig to create a sharedobject on the server and access it with
>> multiple clients,but it is not working fine,it seems not to write on
>> server,here is code, I would appreciate any help....
>>
>> var nc:NetConnection = new NetConnection();
>> nc.connect("rtmp://localhost/SOSample");
>> var
>> myRemoteSO:SharedObject=SharedObject.getRemote("mooo",nc.uri,true,false);
>> myRemoteSO.connect(nc);
>> myRemoteSO.data["mo"]=message.text;
>>
>> for (var prop in myRemoteSO.data ) {
>>     trace(prop+": "+myRemoteSO.data[prop]);
>>
>> }
>>
>>
>>
>> -----Inline Attachment Follows-----
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org <http://mc/compose?to=Red5@osflash.org>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>
>
> --
> Trevor Burton
> http://www.flashmonkey.org
> http://www.infrared5.com
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20090925/e5157c8b/attachment.html>


More information about the Red5 mailing list