Help with XML and Flash, maybe simple for the Advanced flasher?

Hi all,

I have currently been working with XML and Flash.

I am having a few small issues. I am after being able to advance through my nodes forward and back. I would assume this would be done using a function.

However am a bit lost, and need a helping hand

I am also in need of determining the amount of nodes held withing the xml file.

How can this be achieved, and advice or help would be very good at this time :).

Below is my code.

//XML Interaction with Flash
function loadXML(loaded) {
	if (loaded) {
		xmlNode = this.firstChild;

		//For loop
		for (i=0; i<total; i++) { total = xmlNode.childNodes.length; }
		client = xmlNode.firstChild.attributes.number;
		company = xmlNode.childNodes*.childNodes[0];
		photo = xmlNode.childNodes*.childNodes[0];
		involvement = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
		description = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
		url = xmlNode.childNodes*.childNodes[3];
		//Trace ('file loaded successfully');
		note = "file loaded successfully";
	} else {
		//Trace ('error loading file');
		note = "error loading file";

//XML Properties
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;