title: newbie: flex netstream how to get my code stream and receive netstreams correctly?
body: <p>I have problems getting my flex code to work, below is my code I try to netstream a webcam and receive it and use 2 functions for that. Any flex guru can help me fix these functions?</p>
  
  <pre><code>            function onNetConnectionPublish():void { 
                  StatusMessage("onNetConnectionPublish called");
                  ncNetStream = new NetStream(nc, NetStream.DIRECT_CONNECTIONS);  
                  ncNetStream.addEventListener(NetStatusEvent.NET_STATUS, sendNetStreamHandler);  
                  ncNetStream.publish("media");  
                  ncNetStream.attachAudio(Microphone.getMicrophone());  
                  ncNetStream.attachCamera(Camera.getCamera()); 
              } 
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>            function connectToRemote(remoteId:String) { 
                  StatusMessage("connectToRemote(" + remoteId + ")"); 
  
                  ncNetStream = new NetStream(nc, remoteId);  
                  ncNetStream.addEventListener(NetStatusEvent.NET_STATUS, receiveNetStreamHandler);  
                  ncNetStream.play("media");  
              } 
  </code></pre>
  
  <p>display video:</p>