actionscript 3 - How can I check if mms connection is alive? -


i'm trying check whether mms links alive or broken. tried using netconnection didn't work, got error.

edit: here's code tried:

    // inside function     showcheckconnectionpopup();      if (connection_combobox.selectedindex == 0) {         urlloader.load(new urlrequest("http://" + addressstr));     } else if (connection_combobox.selectedindex == 1) {         rtmpvurl = "rtmp://" + rtmpvurl;         rtmp_test = new rtmp_test();         addchild(rtmp_test);         rtmp_test.init(rtmpsid, rtmpvurl);         rtmp_test.addeventlistener(customevent2.pass_params, ontestprocessed);         /*         rtmp_player.vid.x = 100;         rtmp_player.vid.y = 100;         */     } else if (connection_combobox.selectedindex == 2) {         addressstr = "mms://" + addressstr;         creatertmpconnection(addressstr);     } }  var _ncconnection:netconnection = new netconnection(); // create new net connection, add event listener , connect // null because don’t have media server _ncconnection = new netconnection(); _ncconnection.addeventlistener(netstatusevent.net_status, netstatushandler); _ncconnection.addeventlistener(securityerrorevent.security_error, securityerrorhandler); _ncconnection.addeventlistener(ioerrorevent.io_error,errorhandler); _ncconnection.addeventlistener(asyncerrorevent.async_error, asyncerrorhandler); // _ncconnection.addeventlistener(asyncerrorevent.async_error,metahandler);  function creatertmpconnection(s:string) {     rtmptimeouttimer.reset();     rtmptimeouttimer.start();     _ncconnection.connect(s); } 

argumenterror: error #2004: 1 of parameters invalid. @ flash.net::netconnection/connect() @ untitled_02_02_fla::maintimeline/creatertmpconnection()[untitled_02_02_fla.maintimeline::frame1:741] @ untitled_02_02_fla::maintimeline/onpopupokbtnclick()[untitled_02_02_fla.maintimeline::frame1:568]*

line 741: _ncconnection.connect(s);

line 568: creatertmpconnection(addressstr);