ok heres the deal, this is new for me. i have an xml file containing the news content for a movie. and i have the as below for loading the news and formatting it to my needs. basically what i want is the movie to only load one entry at a time, and then have a next button to go to the next.
i know someone knows this or it has been covered. please help me out guys! thanks in advance.
the_xml = new XML();
the_xml.ignoreWhite = true;
parseAll = function () {
if (fileexists == false) {
main_txt.text = main_txt.text + "
No news. Please check back soon.";
} else if (fileexists == undefined) {
main_txt.text = main_txt.text + "
no file found";
} else if (fileexists == true) {
main_txt.text = "";
vList = "";
for(num=(maxNode-1); num>=0; num--) {
vDate = the_xml.firstChild.childNodes[num].attributes['date'].toString();
vTitle = the_xml.firstChild.childNodes[num].childNodes[0].firstChild.nodeValue;
vBody = the_xml.firstChild.childNodes[num].childNodes[1].firstChild.nodeValue;
vList = vList + "<FONT COLOR=\"#CC0000\">" + vTitle + "</FONT><FONT COLOR=\"#FFFFFF\"> :: </FONT><FONT COLOR=\"#666666\">" + vDate + "</FONT><BR>";
vList = vList + "<FONT COLOR=\"#FFFFFF\">" + vBody + "</FONT><BR><BR>";
main_txt.htmlText = vList;
}
}
};
loadTime = function () {
trace("ok");
main_txt.text = "NEWS FILE LOADED, PLEASE WAIT.";
node = 0;
maxNode = the_xml.firstChild.childNodes.length;
if (maxNode == 0) { //(_root.the_xml.toString() == "nofileforyou") {
fileexists = false;
} else {
fileexists = true;
}
main_txt.text = the_xml.toString();
parseAll();
}
the_xml.onLoad = loadTime;
the_xml.load(tempFile);
stop();