12/28/2010 11:14:36 PM
Title:
About NetConnection Object( Flex)
Hello,
I am having video-chat, audio-chat, text-chat component in one application. Is it possible to do all three task by using only one NetConnection Object? If yes, then how to do that?
Please Help.....
Shawn
Points: 680
Posts:0
1/1/2011 10:34:59 AM
if you are connecting to FMS sever using netConnection then you can use this single connection to create many shared objects in the same flex application and do chatting. In fact all we only use one NetConnection only in one application. In your case you can use the same connection as uri for all sharedobjects inside you components
//new netconnection crated once only
nc = new NetConnection();
nc.connect("rtmp://localhost/youAppOnFMS");
//below both shared objects can use the same "nc" as uri
so = SharedObject.getRemote("fsoName", nc.uri, false);
so.connect(nc);
so1 = SharedObject.getRemote("fsoName1", nc.uri, false);
so1.connect(nc);