Celebré demasiado pronto, me funciona CASI todo el asunto, me aparecen los botones, el titulo en cada uno y los links, pero cuando abro el movieclip desde la pelicula principal (contenedor), no me funcionan los links.... quien me puede ayudar en esto...?
este es el código que estoy usando:
en el XML links.xml
Código :
<botones>
<item name="Google" link="http://www.google.cl" />
<item name="Gmail" link="http://gmail.google.com" />
<item name="Yahoo!" link="http://www.yahoo.es" />
</botones>
en el Flash
Código :
var myMenu:XML = new XML();
myMenu.ignoreWhite = true;
myMenu.load("links.xml");
linkBoton = new Array();
textoBoton = new Array();
myMenu.onLoad = function() {
for (var i = 0; i<this.firstChild.childNodes.length; i++) {
textoBoton[i] = this.firstChild.childNodes[i].attributes.name;
linkBoton[i] = this.firstChild.childNodes[i].attributes.link;
}
creaBtns(this.firstChild.childNodes.length);
};
function creaBtns(cuantosBotones) {
var separacion = 0;
$Yini = 55;
for (var i = 0; i<cuantosBotones; i++) {
btn = this.attachMovie("boton", "boton"+i, this.getNextHighestDepth());
btn=eval("boton"+i);
btn.link = linkBoton[i];
btn.mytexto.text = textoBoton[i];
btn._x = 45;
btn._y = $Yini+i*separacion+btn._height*i;
btn.onRelease = function() {
getURL(btn.link);
};
}
}