Intente pero no puedo lograrlo, me perdi..Tengo un xml el cual uno de sus datos es un link que quiero que se pueda pasar a un boton para ejecutarlo.Me sale undrfined .....Muchas gracias por la ayuda que siempre me dan
Código ActionScript :
myXML = new XML();
myXML.ignoreWhite = true;
myXML.ref = this;
myXML.onLoad = function(succes) {
if (succes) {
var root = this.firstChild;
nodes = root.childNodes;
for (var i = 0; i<nodes.length; i++) {
this.ref["Title_txt"+i].text = nodes[i].attributes.name;
subnodes = nodes[i].childNodes;
this.ref["Comments_txt"+i].text = subnodes[0].firstChild.toString();
this.ref["holder_mc"+i].loadMovie(subnodes[1].firstChild.toString());
//esto//
linka = this.firstChild.childNodes[0].attributes.url;
}
} else {
trace("Error loading XML document");
}
};
botoncito.onRelease = function() {
getURL(linka, "_blank");
};
stop();EL XML:
Código XML :
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE data[ <!ELEMENT title (comments, image,link)> <!ATTLIST title name CDATA #REQUIRED> <!ELEMENT comments (#PCDATA)> <!ELEMENT image (#PCDATA)> ]> <data> <title name="PLANETA: Planeta 6"> <comments>El texto que queremos poner aca ! </comments> <image>earth1.jpg</image> <link url = "http://www.kukynet.com.ar" > </link> </title> <title name="TEMA: Metrito"><comments>RAZA: Ikus</comments> </title> </data>
