[SIZE=3][FONT=Times New Roman]I know this has to be simple and I’m “Nuking” it, but I need to iterate through the second dimension of my array with a navigation button.[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3]The goal is to have a ‘stage_mc’ which will load the element (in sequential order) of my loaded array using a next and previous button. Onload would load the first element, and the next and previous button would transverse forward and back in order of the array element. The next button would stop traversing forward if the array has reached its last element (and vice versa for the previous button).[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]I’m at a brain fried moment and cant ‘get it right’.[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Below is my script as it stands (I’ve included the XML commented out):[/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]topicNavXml = new XML();[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]topicNavXml.ignoreWhite = true;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]topicNavXml.load("topicNav.xml");[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]topicNavXml.onLoad = function() {[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] aNode = this.firstChild;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] bNode = aNode.childNodes;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] len0 = bNode.length;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] len1 = aNode.firstChild.childNodes.length;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] topicNav = new Array(len0);[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] for (var i = 0; i<len0; i++) {[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] topicNav* = new Array(len1);[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] for (var j = 0; j<len1; j++) {[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] topicNav*[j] = bNode*.childNodes[j].firstChild;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] }[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] }[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]};[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]/*[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]<?xml version="1.0" encoding="ISO-8859-1"?>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]<topicNavigation>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] <topicPages>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] <page>m1_l1_t1_000.swf</page>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] <page>m1_l1_t1_010.swf</page>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] <page>m1_l1_t1_020.swf</page>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] <page>m1_l1_t1_030.swf</page>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] <page>m1_l1_t1_040.swf</page>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] <page>m1_l1_t1_050.swf</page>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] <page>m1_l1_t1_060.swf</page>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] </topicPages>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]</topicNavigation>[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3]*/[/SIZE][/FONT]