I have this code in my actionscript:
stop();
xml_file = new XML();
xml_file.load("data.xml");
xml_file.onLoad = function(success) {
if (success) {
names = this.childNodes;
for (i=0; i<names.length; i++) {
if(names*.nodeName=="drosa"){
trace("oh yeah!")
}
}
}
};
I want Flash to trace OH yeah! if the name of one of my nodes in my xml file is equal to “drosa”
Its not a problem with the XML. I’ve already checked that. What is wrong?
(This is my first time using XML with Flash so it might be a really obvious or stupid error.)