rendered paste bodyfunction loadXML(loaded) {
if (loaded) {
var item:XML;
for each(item in this.attribute('eventdata')) {
trace("item: " + item.body.toXMLString());
}
_root.eventlist = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.eventdata = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
hasil = _root.eventlist + " - " + _root.eventdata;
txt.text = hasil;
} else {
trace("file not loaded!");;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("events.xml");