Comunidad de diseño web y desarrollo en internet online

Ayuda Actionscript Accordion

Citar            
MensajeEscrito el 13 Dic 2005 07:43 pm
Necesito ayuda con el componente accordion de Flash, cuando se crean 2 pestañitas o mas, siempre quedan del mismo tamaño por ejemplo:

acor_historia.setSize(151, 240);

//Le ponemos las opciones del menú
acor_historia.createChild("View", "01", {label: "Historia",data:{target:"_mainframe",url:"xxxxxx.html"}});
acor_historia.createChild("View", "02", {label: "Instalaciones"});
acor_historia.createChild("View", "03", {label: "Directorio"});
acor_historia.createChild("View", "04", {label: "Estadistica"});

todos se crean del mismo tamaño, lo que quiero es por ejemplo que si "historia" tiene 3 opciones y "instalaciones" 8, que se pueda personalizar el tamaño, por que quedaria un hueco en blanco en historia.

Por Gsuz

1 de clabLevel



 

Mexico

msie
Citar            
MensajeEscrito el 14 Dic 2005 11:42 am
Bienvenido Gsuz!

Pues actualmente el componente Accordion creo que no se escala respecto a su contenido, eso tendrás que hacerlo tu mediante programación.

Prueba haciendo que al evento "change" haga un setSize, algo de este tipo.

Código :

var accordionListener:Object = new Object();

accordionListener.change = function(obj)
{
   if (obj.target.selectedChild._name == "opc01")
   {
      miacc.setSize(300,200);
   }
   else if (obj.target.selectedChild._name == "opc02")
   {
      miacc.setSize(300,100);
   }
}

miacc.addEventListener("change", accordionListener);


A mi me ha funcionado.

Deu!! ^^

Por Elecash

Claber

8126 de clabLevel

37 tutoriales
19 articulos
13 ejemplos

  Bastard Operators From Hell Desarrollador de GAIA Premio_Secretos Héroes

BarnaCity

firefox

 

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