5 Replies Latest reply on Apr 11, 2009 11:45 AM by Andrei Rinciog

    Little help at the start

    Andrei Rinciog Level 1



      I really like this service and i think that it's perfect for the my project. But I'm kind of stuck at the begining.


      I'm trying to first see how it works and if it's exactly what i need before i go on and integrate it in the project.


      What I'm trying to do first is to build a video sharing swf. So, you open the swf, connect to Stratus, get your ID and if the connection is succesful you can go ahead and start your webcam. I didn't do anything on the server and i post the Peer ID in a textfield. I have another textfield in the swf where you can insert Peer ID's. So, practically to connect to the stream from another computer i copy the Peer ID through an IM program and then i insert it into the other textfield and hit the connect button. This is the code that it's on the click event handler of the connect button :


           private function getHandler(e:MouseEvent):void {
                  var getStream : NetStream;
                  getStream = new NetStream(netConn,targetID.text);
                  getStream.addEventListener(NetStatusEvent.NET_STATUS, StreamHandler);
                  var getVideo : Video;
                  getVideo = new Video(245,250);
                  getVideo.x = 275;
                  getVideo.y = 90;




      Everything works fine, i receive Peer ID's on both the computers and i can see the video from my camera on both of them ( i show it locally also ) but when i insert that Peer ID in one of the swf's and i hit connect, nothing happens. What really gets me confused is that the function StreamHandler is never called. No event is sent from the get stream.


      Hope that somebody can clear this up a little for me. If you need i can post the entire as file.


      Thanks !