Comunidad de diseño web y desarrollo en internet online

problema con conversion de mc a boton

Citar            
MensajeEscrito el 06 Ago 2009 02:04 pm
Hola!
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!

Por backing

0 de clabLevel



 

firefox
Citar            
MensajeEscrito el 06 Ago 2009 03:29 pm
Cambia esta parte así:

Código ActionScript :

clipZona._height=62; 
ClipZona.uri = rutaURL
ClipZona.onRelease = function (){
getURL(this.uri, "_self");


Luego ten cuidado, clipZona (minúscula) y ClipZona (mayúscula) no es lo mismo, si la posición y el ancho/alto corresponden a ClipZona cambia la primera c a mayúscula

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.