I have a NetConnection object:
myNetConnection = new NetConnection();
myNetConnection.addEventListener(NetStatusEvent.NET_STATUS, statusHandler);
myNetConnection.connect("rtmp://address");
And in handler do this:
private function statusHandler(event:NetStatusEvent):void
{
switch (event.info.code)
{
case "NetConnection.Connect.Success":
{
trace("ok");
break;
}
case "NetConnection.Connect.Failed":
{
trace("Some problems, NetConnection.Connect.Failed");
break;
}
}
}
So, if all ok - I have see "ok" in debug console very fast. But if have any problems - "Some problems, NetConnection.Connect.Failed" I see after long time waiting. My question - how i can see "Some problems, NetConnection.Connect.Failed" faster(as "ok" fast)?