I am trying to create a new variable in the XML onLoad function but when I trace it outside the onLoad function it returns undefined. Anyone could help? The code is as below.
stop();
var adsDataFile:String = “./ads_data.xml”;
var adsWin:AdsWindow;
var adsXMLdata=new XML();
adsXMLdata.ignoreWhite = true;
adsXMLdata.onLoad = function(success){
if (success){
[COLOR=“Blue”]var adsWin:AdsWindow = new AdsWindow(adsXMLdata, _root.inviBtn00, _root.inviBtn01, _root.inviBtn02, _root.inviBtn03, _root.inviBtn04, _root.inviBtn05,
_root.ad00, _root.ad01, _root.ad02, _root.ad03, _root.ad04, _root.ad05);[/COLOR]
}
}
adsXMLdata.load(adsDataFile);
[COLOR=“Blue”]trace(this.adsWin);[/COLOR]