this is my script for my xml and the loads into the array fine for the first frame. but i want to pass the variables in the array to the next frame, which doesnt work right now. any suggestions?
var stories = new Array();
var responses = new Array();
var menuNames = new Array();
var menuURLs = new Array();
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“story.xml”);
function loadXML(loaded) {
level1 = this.firstChild.firstChild;//story node
level2 = level1.nextSibling;//responses node
level3 = level2.nextSibling;//rightnav node
levelC = level1.firstChild;//characters
levelR = level2.firstChild;//responses
levelT = level3.firstChild;//right nav node
//levelU= levelT.nextSibling.firstChild.nextSibling.firstChild;
ttlC = level1.childNodes.length;//number of characters
ttlR = level2.childNodes.length;//number of responses
ttlT = level3.childNodes.length;//number of tabs for right nav
//
//
if (loaded) {
//characters
for (var c = 0; c<ttlC; c++) {
char = levelC.firstChild.nodeValue;
stories.push(char);
levelC = levelC.nextSibling;
}
//trace(stories);//displays 6 variables for the array list
//reponses
for (var r = 0; r<ttlR; r++) {
resp = levelR.firstChild.nodeValue;
responses.push(resp);
levelR = levelR.nextSibling;
}
//menu tabs
for (var t = 0; t<ttlT; t++) {
tabs = levelT.firstChild.firstChild.nodeValue;
menuNames.push(tabs);
link= levelT.firstChild.nextSibling.firstChild.nodeValue;
menuURLs.push(link);
levelT = levelT.nextSibling;
}
//trace(menuURLs);
this.gotoAndPlay(2);
}
}
//trace(stories.length);//displays 0… so i assume this is where the problem is in passing array vairables
stop();