Код синтаксически верен. Попробуйте продолжить исследования =)

Код AS1/AS2:
myXML.onLoad = function(ok) {
if (ok) {
if (this.status == 0) {
trace(this.toString());
} else {
trace('the XML has an error: ' + this.status);
}
} else {
trace('ooops!')
}
};