i currently have a xml file that has been loaded into the flash:
<?xml version=“1.0”?>
<news>
<story>
<headline> Godzilla Attacks LA! </headline>
<descriptions>Equipped with a Japanese Mind-control device, the giant monster has attacked important harbours along the California coast. President to take action. </descriptions>
</story>
<story>
<headline> Bigfoot Spotted at M.I.T. Dining Area </headline>
<descriptions>The beast was seen ordering a Snapple in the dining area on Tuesday. In a related story, Kirupa Chinnathambi, an MIT engineering student has been reported missing. </descriptions>
</story>
<story>
<headline> London Angel Saves England </headline>
<descriptions>The “London Angel” known only as “Kit” has saved the U.K. yet again. Reports have stated that she destroyed every single Churchill bobble-head dog in the country. A great heartfilled thank you goes out to her. </descriptions>
</story>
<story>
<headline> Six-eyed Man to be Wed to an Eight-armed Woman </headline>
<descriptions>Uhhhmmm… No comment really… just a little creepy to see them together… </descriptions>
</story>
<story>
<headline> Ahmed’s Birthday Extravaganza! </headline>
<descriptions>The gifted youngster’s birthday party should be a blast. He is turning thirteen and has requested a large cake, ice cream, and a petting zoo complete with pony rides. </descriptions>
</story>
</news>
everything is working in the flash file with the current actionscript:
function loadXML(loaded) {
if (loaded) {
_root.headline = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.descriptions = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
name_txt.text = _root.headline;
comment_txt.text = _root.descriptions;
} else {
content = “file not loaded!”;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“books.xml”);
I want to add a simple back and previous button in the movie to cycle through the articles. Can anyone help me out please.