ellils
05-14-2008, 06:01 AM
Hi guys,
I have a variable scope problem with this code:
var XML4:XML = new XML();
var pathtologo = new String();
XML4.ignoreWhite = true;
XML4.onLoad = function(success) {
if(success){
pathtologo = XML4.firstChild.childNodes[3];
trace("(1) Path to logo is: "+pathtologo);
}
}
conXML4.load("common.xml");
trace("(2) Path to logo is: "+pathtologo);
trace on (2) gives no value and I would like to somehow get the value there instead of being forced to use only method (1) to generate a value.
How should I do that?
I have a variable scope problem with this code:
var XML4:XML = new XML();
var pathtologo = new String();
XML4.ignoreWhite = true;
XML4.onLoad = function(success) {
if(success){
pathtologo = XML4.firstChild.childNodes[3];
trace("(1) Path to logo is: "+pathtologo);
}
}
conXML4.load("common.xml");
trace("(2) Path to logo is: "+pathtologo);
trace on (2) gives no value and I would like to somehow get the value there instead of being forced to use only method (1) to generate a value.
How should I do that?