I have followed everything i could but my lack of experence with actioscript has be stuck with where variables can be accessed when using functions, well here is what i have and it’s pretty easy to see what i am trying to do
function loadXML(loaded) {
if (loaded) {
_root.username = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.passcode = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
name_txt.text = _root.username;
pass_txt.text = _root.passcode;
} else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("c:/get.xml");
// this is where we need to access the variable
trace (_root.username);
trace (name_txt.text);
trace (name_txt);
test = "Need Variable Here: " + name_txt.text;
I just need to be able to have a variable with the username available outside the function… i don’t even know if this is a simple or complex problem