01 : // 定义响应方法
02 : System.onStatus = function( genericError )
03 : {
04 : // Your script would do something more meaningful here
05 : trace('An error has occurred. Please try again.');
06 : }
07 :
08 : // 创建一个 NetStream 对象的方法
09 : // 如果NetStream 对象返回错误
10 : // System.onStatus 将被触发
11 :
12 : videoStream_ns.onStatus = function(infoObject) {
13 : if (infoObject.code == 'NetStream.Play.StreamNotFound') {
14 : trace('Could not find video file.');
15 : }
16 : }