actionscript 3 - flash webcam code fails with error undefined -


i working through flash tutorial on webcams dont know why netconnection failing.

here tried.

  • installed fms , created empty folder vid2 in applications
  • attempted record webcam failing error

sorry connection failed reason is: undefined 

please here 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 connection failed");                 trace("reason is: " + e.info.description);                break;            }            case "netconnection.connect.rejected":            {                trace("oops connection has been rejected");                break;            }        }   } 

entire actionscript file on pastebin

you cannot connect rtmp:/vid2/recordings, instead need connect rtmp://localhost/vid2 (please note need use 2 forward slashes protocol, address of server, name of existing folder on fms or ams)

hope helps!


Comments