Click to See Complete Forum and Search --> : passing var to xml


kredd
10-26-2006, 04:44 PM
have no idea why this is so hard but i've got a var that is set each time a button is clicked which determines which node of info is pulled from an xml file and populates some textfields in a nest MC. but the var isn't making to the xml function...so i keep getting an 'undefined' value.

xml code is a frame on the same timeline as all the buttons. the textfields to be populated are in a nested MC also on the same timeline as the buttons.

xml code:

function getPlayList (url){
seasArts = new XML();
seasArts.ignoreWhite = true;
seasArts.load(url);
seasArts.onLoad = function(success){
if(success){

bldgNos = seasArts.firstChild.childNodes.length;
bubble.bldng_title.text = seasArts.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
bubble.bldg_info.text = seasArts.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;
}
}
}
getPlayList (url)

button code that sends the variable:

on (rollOver) {
setProperty(this.bubble,_visible, 100);
setProperty(this.bubble,_x, 200);
setProperty(this.bubble,_y, 50);
_global.i = "0"; // var sent to xml
}

any ideas?

kredd
10-26-2006, 06:59 PM
fixed it.