Итак, после нескольких часов попыток выяснить, почему мой код не компилируется, я обнаружил, что этот код несовместим с AS3:
function loadXML(loaded) {
if (loaded) {
_root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
name_txt.text = _root.inventor;
comment_txt.text = _root.comments;
} else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("http://localhost/connect.php");
Кто-нибудь знает, как получить доступ к руту в AS3? Спасибо!