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();
}
Can anyone help me load the swf once the flv is done playing? I think I'm just not loading the swf right because the flv plays correctly.