I’m using xml to load .flvs into a movie player. I have it setup to load an external .swf to level 1 when the movie is finished. My goal is to have the .swf on level 1 select the next .flv from the xml array by way of simple buttons. Needless to say, it’s not working. Anyone care to give it a crack?
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.setBufferTime(10);
myVideo.attachVideo(ns);
/////////XML/////////////
var vlist:XML = new XML();
vlist.load("video.xml");
vlist.ignoreWhite = true;
vlist.onLoad = function() {
var videos:Array = this.firstChild.childNodes;
for (i=0; i<videos.length; i++) {
ns.play(videos[0].attributes.url);
}
};
path = "logos/";
ns.onStatus = function(object) {
if (object.code == "NetStream.Play.Start") {
} else if (object.code == "NetStream.Play.Stop") {
loadMovieNum(path+"logo.swf", 1);
}
};
Code for the _level1 .swf
logo_mc.onPress = function() {
_level0.ns.play(videos*.attributes.url);
};
XML Code
<?xml version="1.0" encoding="ISO-8859-1"?>
<videos>
<video url="flvs/Heartattacktest_Gerad.flv" />
<video url="flvs/part1.flv" />
<video url="flvs/Part_2_Final10906.flv" />
</videos>