NetConnection.failed
I dont quite understand why i am unable to connect. to FMS. I have checked the FMS port tester and the results showed there are open. I believe my uri string is correct. Why cant i connect? Below is a snippet of my code:
import.flash..net.NetConnection;
import.flash.media.Video;
import..flash.media.Camera;
import flash.media.Microphone;
var nc:NetConnection = new NetConnection();
nc.connect("rtmfp://fms/flashTest");
nc.addEventListenet(NetStatusEvent.NET_STATUS, netHandler);
function netHandler(event:NetStatusEvent):void{
switch(event.info.code){
case "NetConnection.Connect.Success":
trace("Your connected");
break;
case "NetConnection.Connect.Failed":
trace(" Sorry unable to connect");
break;
case "NetConnection.Connect.Reject":
trace("Please try again");
break;
}
}
var video:Video = new Video();
video.width = camera.width;
video.height = camera.height;
video.x = 10;
video.y = 10;
addChild(video);
var camera:Camera = Camera.getCamera();
camera.setMode(400,300,20);
camera.setQuality(0,85);
video.attachCamera();
addChild(camera);
var microphone:Microphone = Microphone.getMicrophone();
microphone.codec = soundcodec.SPEEX;
microphone.Framesperpocket = 1;
