【发布时间】:2010-09-11 12:05:36
【问题描述】:
stop();
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
var listener:Object = new Object();
listener.onMetaData = function(md:Object):void{};
listener.onPlayStatus = function(info : Object) : void {
trace("onPlayStatus:" +info.code + " " + info.duration);
if (info.code == "NetStream.Play.Complete") {
var endLoader:Loader = new Loader();
endLoader.load(new URLRequest("secondmovie.swf"));
addChild(endLoader);
initializeVideo();
}
};
ns.client = listener;
vid1.attachNetStream(ns);
var movietoplay:String = "firstmovie.flv";
ns.play(movietoplay);
function initializeVideo():void {
ns.close();
}
flv 播放完毕后,谁能帮我加载 swf?我想我只是没有正确加载 swf,因为 flv 播放正确。
【问题讨论】:
标签: flash actionscript-3 event-handling