# Calling a single ID

**URL:** <https://forum.kirupa.com/t/calling-a-single-id/80087>\
**Category:** Uncategorized\
**Created:** [February 19, 2005, 4:33am UTC](https://forum.kirupa.com/t/calling-a-single-id/80087 "2005-02-19T04:33:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![slickeye](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@slickeye](https://forum.kirupa.com/u/slickeye)\
**Post date:** [February 19, 2005, 4:33am UTC](https://forum.kirupa.com/t/calling-a-single-id/80087/1 "2005-02-19T04:33:41Z")

</div>

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.

```auto
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();

```
