i am working through a flash tutorial on webcams but I dont know why the NetConnection is failing.
Here is what i tried.
- Installed fms , created an empty folder vid2 in applications
- attempted to record from a webcam but it is failing with the error
Sorry your connection failed
Reason is: undefined
Please help Here is my NetConnection callback
public function checkConnect (e:NetStatusEvent):void
{
switch(e.info.code){
case "NetConnection.Connect.Success":
{
ns = new NetStream(nc);
trace("checkConnect suceed");
break;
}
case "NetConnection.Connect.Closed":
{
ns.close();
trace("net connection closed");
break;
}
case "NetConnection.Connect.Failed":
{
trace("Sorry your connection failed");
trace("Reason is: " + e.info.description);
break;
}
case "NetConnection.Connect.Rejected":
{
trace("Oops the connection has been rejected");
break;
}
}
}