I simply want to pass a second parameter into the following function, but it just isn’t working. It just doesn’t do anything - no errors, no output
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success, itemName):Void {
var child1:XML = this.firstChild;
for (i=0; i<child1.childNodes.length; i++){
var node:XMLNode = child1.childNodes*;
itemName.addItem({label:node.attributes.label,data:node.attributes.data});
}
}
I’m calling it like so:
[FONT=Courier New][COLOR=Blue]myXML.load(“talent.xml”, liTalentC);[/COLOR][/FONT]
I don’t understand why, when the function is created, you put “success” in the parentheses but when you call it, you put the name of the xml file in quotes there. Anyways, is it possible to send a second parameter through? Don’t let me down, guys. The only other thread I found that deals with this question was left unanswered 2 years ago.