playlist xml on FMIS3.5
Hello
Looking to make a script on my server FlashMedia who plays my playlist xml loop. The script works for the first reading of the playlist but I do not know how to play it at infinity.
Can you add my script?
Thanks,
Gilles
France
application.allowDebug = true;
//Define events on application start
application.onAppStart = function() {
trace("Application started.");
//Define stream name
this.psuedoStream = Stream.get("clientPlayStream");
//Define playlist variables
var xmlPlaylist = new XML();
xmlPlaylist.ignoreWhite = true;
var resetPlaylist = true;
//Create and read playlist file
fileObj = new File("directtvf.xml");
fileObj.open("UTF8","read");
//Define events on playlist load xmlPlaylist.onLoad = function(val) { trace("Playlist loaded."); //Define video array var videos = xmlPlaylist.firstChild.childNodes; trace("Playlist contains "+videos.length+" items..."); //Loop through playlist for (i = 0; i < videos.length; i++) { //Define video variables var videoTitle = videos.attributes.title; var videoURL = videos.firstChild.nodeValue; trace((i+1)+": "+videoTitle+" ("+videoURL+")"); //Play video if (i == 0) { application.psuedoStream.play(videoURL, 0, -1, true); } else { application.psuedoStream.play(videoURL, 0, -1, false); } } } //Load playlist file xmlPlaylist.load(fileObj); }//Prevent termination of application
application.onAppStop = function() {
return true;
}
