I think you should not create NetConnection in application.onPublish, create it somewhere before say in onAppStart and reuse that connection inside application.onPublish and also you need to use an array of NetStream as you are publishing 2/3 streams. The code should look something like ns = new NetStream(nc); // called when the server NetStream object has a status ns.onStatus = function(info) { trace("Stream Status: " + info.code) if (info.code == "NetStream.Publish.Start") { trace("The stream is now publishing"); } } ns.setBufferTime(2); ns.attach(myStream); ns.publish( myStream.name, "live" ); i++;
... View more