Hi, I don't know how to use SharedObject.client property. It simply doesnt work.
This is my code. The communication from AS 3.0 with Flash Media Server: import flash.net.NetConnection; import flash.net.SharedObject; import flash.events.NetStatusEvent; import flash.events.SecurityErrorEvent; private var nc:NetConnection; private var so:SharedObject; private function init():void{ } private function connect():void{ NetConnection.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0; nc = new NetConnection(); nc.connect("rtmp://localhost/myapp/myroom/"); so = SharedObject.getRemote("ChatSO",nc.uri,true); so.objectEncoding = flash.net.ObjectEncoding.AMF0; nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); /* IS THAT CORRECT?? */ so.client = this; } /* * THIS IS CALLED TO RUN chatReceive on every subscriber */ private function sendMessage():void{ so.send("chatReceive","message"); } /* NEEDS TO BE PUBLIC */ public function chatReceive(msg:String):void{ txt.text += msg+"\n"; } private function netStatusHandler(event:NetStatusEvent):void{ txt.text += event.info.code+"\n"; } private function securityErrorHandler(event:SecurityErrorEvent):void{ txt.text += event.toString()+"\n"; } The chatReceive method isnt called. Does anybody please know why? Thanks Tom -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/