Have you checked out the samples on devnet? You should find everything you need
there.
Why are you using rConn instead of sConn to establish your netstream?
sConn = new NetConnection();
sConn.connect("rtmp://localhost/1", "test");
lStream = new NetStream([b]rConn[/b]);
I think this was just a typo.
When you publish, give it a name:
Instead of using: lStream.publish(localCam);
do lStream.publish(username); // where username is a string
Check out the flashmediaserver_cs_asd.pdf, page 102.
Also, currently you don't care whether or not the connection has been
established. Make sure you wait before you create your Netstream on top of the
connection. There is a great article on how to build such an application on
Adobe Devnet:
http://www.adobe.com/devnet/flashcom/articles/broadcast_receiver.html To build a 2-way chat you would also have to put both users in the same
"room". The easiest way to achieve this is to create new application instances
for each new user pair, then connect to with
rtmp://host/application/new_instance _name and play the video of the other user.
There's some information in article
http://www.adobe.com/devnet/central/articles/vchat_04.html This article is about how to build a 2-way video chat w/ central, but you can
possibly strip out that code.
Instead, I recommend having a look at the docs, i.e.
flashmediaserver_cs_asd.pdf to be found in your documentation directory.