使用Adobe Cirrus的netStream状态事件问题
基本上我会尝试总结一下。我有一堆潜在的随机字符串用于recvStream.play(“randomstring”);
然后我在运行事件监听器的函数上每隔5秒检查一次计时器:
recvStream.addEventListener(NetStatusEvent.NET_STATUS,
netConnectionHandler);
然后我在一个switch语句中思考我可以用它来检查它是否是一个活动流,或者让它搜索另一个应该处于活动状态的流或者停止计时器并让它播放。
// i was thinking this would verify it's playing and then that's it
case "NetStream.Play.Start" :
trace("ITS PLAYING YOU SHOULD SEE SOMETHING");
timer.stop();
break;
// i was thinking i could use this to see if the string is nothing then the timer would run again
case "NetStream.Buffer.Empty" :
trace("THE BUFFER IS EMPTY KEEP LOOKING");
//code to look again
break;
//I also tried NetStream.Play.StreamNotFound instead of NetStream.Buffer.Empty didn't work either
但它确实不能那样工作。我应该使用其他东西而不是NetStream.Buffer.Empty吗?还是其他什么都在一起?
我在Flash CS5中使用Actionscript 3,而我正在使用Cirrus RTMFP
http://labs.adobe.com/technologies/cirrus/
没有找到相关结果
已邀请:
1 个回复
缉康怪
显然,你甚至应该考虑在调用
之前验证你的随机字符串的正确性 - 这比故意让你的NetStream失败更清晰,而不是让网络紧张。