My boss gave me a new task for playing flv file dynamically in fms. That means the web service must provide the flv name,start time and the length to play. To create this web service was easy; the return value was a string including these three properties I mentioned before. You can spilt this string into array using separating character '$'.
The following is action script code. import mx.services.*; nc = new NetConnection(); var myws:WebService = new mx.services.WebService("Your webservice address."); var wsCall:PendingCall = myws.getFLVInfo(); var returnedValue:String; wsCall.onResult = function(result) { returnedValue = result; var Arr:Array = new Array(); Arr = returnedValue.split("$",returnedValue.length); uri = "You fms URL"; nc.connect(uri); res = new NetStream(nc); res.setBufferTime(5); view.attachVideo(res); view.attachAudio(res); res.play(Arr[0],Number(Arr[1]),Number(Arr[2]),false); };版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。