Soy nueva en esto y me encontre con un problema para convertir mi movie Clip en un boton, no me actua como tal.
A continuacion paso lo que estoy haciendo
System.useCodepage = true;
var botonera:XML = new XML();
botonera.ignoreWhite = true;
botonera.load("botonera.xml");
var i:Number = 0;
var b:Number = 0;
botonera.onLoad = function() {
while (i<botonera.firstChild.childNodes.length){
var rutaClip = _root.attachMovie("boton","boton"+i+"_mc",i,{_x:80, _y:50+i*105});
rutaClip.nombre.htmlText = botonera.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
var rutaURL = botonera.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;
trace(rutaURL);
if (rutaURL){
var ClipZona:MovieClip = _root.createEmptyMovieClip ("ClipZona"+b, getNextHighestDepth());
clipZona._x=80;
clipZona._y=50+b*105;
clipZona._width=162;
clipZona._height=62;
ClipZona.onRelease = function (){
getURL(rutaURL, "_self");
}; b++;
}
i++;
}
}
y mi xml dice lo sgte.
<menu>
<button creoatri="prueba">
<name> BOTON1 </name>
<link> http://www.google.com </link>
</button>
<button creoatri="prueba2">
<name> BOTON2 </name>
<link> http://www.adobe.com </link>
</button>
<button creoatri="prueba3">
<name> BOTON3 </name>
<link> http://www.yahoo.com </link>
</button>
<button>
<name creoatri="prueba4"> BOTON4 </name>
<link> http://www.facebook.com </link>
</button>
</menu>
AGRADECERIA MUCHO LA AYUDA!