Global variables problem

Hi there,

I’ve been trying to get these variables that are defined inside this XML Array, outside of the XML array using _global, so that i can use them else where in the animation, but i’m not getting any purchase. PLs help.

[AS]var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(success) {
if (success) {
var theStage = this.firstChild.childNodes;
numOfStages = theStage.length;
for (var i = 0; i<numOfStages; i++) {

///////////////////// Stage - Renewal
_global.renewalTitle = theStage[0].attributes.Title;
_global.renewalPath = theStage[0].attributes.path;
_global.renewalLHImgOne = theStage[0].firstChild.attributes.image;
_global.renewalLHImgTwo = theStage[0].childNodes[1].attributes.image;
_global.renewalRHImgOne = theStage[0].childNodes[2].attributes.image;
_global.renewalRHImgTwo = theStage[0].childNodes[3].attributes.image;
_global.renewalInfo = theStage[0].firstChild.firstChild;
_global.renewalLHImgTwoInfo = theStage[0].childNodes[1].firstChild;
_global.renewalRHImgOneInfo = theStage[0].childNodes[2].firstChild;
_global.renewalRHImgTwoInfo = theStage[0].childNodes[3].firstChild;

// …etc

}
} else {
_root.castMC.StagesWrap.homeMC.homeFooter_txt.text = “Error loading XML file”;
}
};
// load the xml
xml.load(“headerData.xml”);

// And Below i’m trying to retrieve the global variables defined in the arrays, but it’s just not working

_root.Renewal.renewalBG.createEmptyMovieClip(“renewalLHImgOne_MC”, 50);
_root.Renewal.renewalBG.renewalLHImgOne_MC.loadMovie(serverPath+renewalPath+renewalLHImgOne);
_root.Renewal.renewalBG.createEmptyMovieClip(“renewalRHImgTwo_MC”, 51);
_root.castMC.StagesWrap.Renewal.renewalBG.renewalRHImgTwo_MC.loadMovie(serverPath+renewalPath+renewalRHImgTwo);
_root.Renewal.createEmptyMovieClip(“renewalRHImgOne_MC”, 53);
_root.Renewal.renewalRHImgOne_MC.loadMovie(serverPath+renewalPath+renewalRHImgOne);
[/AS]

:o if anyone could help, it’d be much appreciated

Thanks
Cam