
Код:
var idXML:XML = new XML("xml=<init id=\""+_root.idcode+"\" />");
var replyIdXML:XML = new XML();
replyIdXML.ignoreWhite = true;
idXML.sendAndLoad(host,replyIdXML);
replyIdXML.onLoad = function (success:Boolean) {
if (success) {
if (this.firstChild.nodeName=="params") {
for (var i = 0; i<this.firstChild.childNodes.length; i++) {
if (this.firstChild.childNodes[i].nodeName == "colors") {
_root.schem = this.firstChild.childNodes[i].attributes.theme;
}
gotoAndStop("inputs");
}
} else {
if (this.firstChild.nodeName=="error") {
message = "Error! "+this.firstChild.attributes.code+". "+this.firstChild.attributes.description;
gotoAndStop("message");
} else {
message = "recieved XML is not correct!";
gotoAndStop("message");
}
}
}
else {
widget_message = "err: "+host;
gotoAndStop("message");
}
}
Напоминаю, из Flash IDE все ок!
