Actionscript 4: NetConnection.connect(...) does not fire a NetStatusEvent event -


i downloaded red5-recorder (http://www.red5-recorder.com/) , fails allow me start recording. after debugging found netconnection, needed record media server, created not fire netstatusevent event, fails silently. have implemented connection following minimal working example:

trace("make net connection"); nc = new netconnection(); nc.client = { onbwdone: function():void{ trace("bandwidth check done.") } }; trace("add event listener"); nc.addeventlistener(netstatusevent.net_status, function(event:netstatusevent) {     trace("handle"); }); trace("connect!"); nc.connect("rtmp://localshost/oflademo/test/"); trace("connect done"); 

the output of piece of code is:

make net connection add event listener connect! connect done 

the actionscript api states connect-call fires such event:

http://help.adobe.com/en_us/flashplatform/reference/actionscript/3/flash/net/netconnection.html#includeexamplessummary

moreover, netconnection not 'connected' (a state of netconnection object) 10 seconds after call. took @ this: netconnect fails silently in flash when called silverlight fix suggested author, swapping rtmp , http in connection uri, not work. also, tested uri , in fact exact same code sniplet in personal project, did work. can not seem find why connecting media server fails silently in red5-recorder project.

the awkward part if pass random string conenction uri, still nothing happens (no event, no exception, no crash). not setting nc.client becore nc.connect(), caused exceptions in experience, did not cause exceptions.

any suggestions welcome.

you setting address localshost instead localhost.

nc.connect("rtmp://localshost/oflademo/test/"); 

correct address:

nc.connect("rtmp://localhost/oflademo/test/"); 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -