开发者

flex 3: netconnection - how do i set a timeout?

Using flex 3, how do i set a timeout for a Net开发者_如何学CConnection?

code sample:

 nc=new NetConnection();
 nc.addEventListener (NetStatusEvent.NET_STATUS,checkConnect);
 rtmpNow="rtmpe://host/test/test1";         
 nc.connect(rtmpNow,fuid,gameName);


Unless you plan to wait for a NetConnection.Connect.Failed, I believe you have to setup your own timeout checks.

Using a Timer object, you can check upon Timer.TIMER_COMPLETE whether or not you've received a NetConnection.Connect.Success in your checkConnect function.

Can't think of another way to do this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜