Comunidad de diseño web y desarrollo en internet online

Problema Rollout de un menú

Citar            
MensajeEscrito el 04 Feb 2010 05:06 pm
Hola a todos, estoy haciendo una web la cual consta de un menú el cual para ingresar a cada sección, carga un contenedor con cada swf. Mi problema es que cada mc de botón tiene un rollout y rollover los cuales estoy ocupando con lo siguiente:

Código ActionScript :

menu_01.onRollOver = function ()
{
    menu_01.onEnterFrame = function ()
    {
        menu_01.nextFrame();
    };
};
menu_01.onRollOut = function ()
{
    menu_01.onEnterFrame = function ()
    {
        menu_01.prevFrame();
    };
};
menu_02.onRollOver = function ()
{
    menu_02.onEnterFrame = function ()
    {
        menu_02.nextFrame();
    };
};
menu_02.onRollOut = function ()
{
    menu_02.onEnterFrame = function ()
    {
        menu_02.prevFrame();
    };
};
menu_03.onRollOver = function ()
{
    menu_03.onEnterFrame = function ()
    {
        menu_03.nextFrame();
    };
};
menu_03.onRollOut = function ()
{
    menu_03.onEnterFrame = function ()
    {
        menu_03.prevFrame();
    };
};
menu_04.onRollOver = function ()
{
    menu_04.onEnterFrame = function ()
    {
        menu_04.nextFrame();
    };
};
menu_04.onRollOut = function ()
{
    menu_04.onEnterFrame = function ()
    {
        menu_04.prevFrame();
    };
};
menu_05.onRollOver = function ()
{
    menu_05.onEnterFrame = function ()
    {
        menu_05.nextFrame();
    };
};
menu_05.onRollOut = function ()
{
    menu_05.onEnterFrame = function ()
    {
        menu_05.prevFrame();
    };
};
menu_06.onRollOver = function ()
{
    menu_06.onEnterFrame = function ()
    {
        menu_06.nextFrame();
    };
};
menu_06.onRollOut = function ()
{
    menu_06.onEnterFrame = function ()
    {
        menu_06.prevFrame();
    };
};
menu_07.onRollOver = function ()
{
    menu_07.onEnterFrame = function ()
    {
        menu_07.nextFrame();
    };
};
menu_07.onRollOut = function ()
{
    menu_07.onEnterFrame = function ()
    {
        menu_07.prevFrame();
    };
};
stop ();
menu_01.onRelease = function ()
{
    _parent.valorcarga = 1;
    _parent.play();
};
menu_02.onRelease = function ()
{
    _parent.valorcarga = 2;
    _parent.play();
};
menu_03.onRelease = function ()
{
    _parent.valorcarga = 3;
    _parent.play();
};
menu_04.onRelease = function ()
{
    _parent.valorcarga = 4;
    _parent.play();
};
menu_05.onRelease = function ()
{
    _parent.valorcarga = 5;
    _parent.play();
};
menu_06.onRelease = function ()
{
    _parent.valorcarga = 6;
    _parent.play();
};
menu_07.onRelease = function ()
{
    _parent.valorcarga = 7;
    _parent.play();
};


No se como dejar el botón activo y que al pasar a otra sección vuelva al estado inicial.

Esto es la imagen de mi fla http://img52.imageshack.us/img52/1588/flash1a.jpg

Agradeceria mucho su ayuda

Por Nachexpac

3 de clabLevel



 

firefox
Citar            
MensajeEscrito el 04 Feb 2010 05:13 pm
hola amigo, creo que te queda mucho mas estetico y apropiado utilizar una funcion que se active on enterframe, con esto conseguiras que esa funcoin este pendiente de todos los eventos de tu pelicula flash, de esta manera cuando pongan el mouse sobre algunos de tus menus simplementa llamas esa funcion y le pasas como parametro el menu que estan solicitando, suerte amigo!

si no me has entendido correctamente visita mi web enlace, y hay te atendere con mas detalle!

Por jhonfredynova

3 de clabLevel



 

Colombia

chrome
Citar            
MensajeEscrito el 04 Feb 2010 06:17 pm
y cual seria esa funcion mas estetica?

Por Nachexpac

3 de clabLevel



 

firefox
Citar            
MensajeEscrito el 05 Feb 2010 08:13 pm
hola, amigo la funcion que te nombre es asi:

Código ActionScript :


menu.addEventListener(MouseEvent.CLICK, funcion);

function funcion(evento:MouseEvent):void
{
     if(evento.target.name=="boton1")
     {
           // ejecuta accion 1  
     }

     if(evento.target.name=="boton2")
     {
           // ejecuta accion 2
     }


     if(evento.target.name=="boton2")
     {
           // ejecuta accion 2
     }
}

Por jhonfredynova

3 de clabLevel



 

Colombia

firefox
Citar            
MensajeEscrito el 08 Feb 2010 03:12 pm
Eso era lo que necesitaba. Gracias!

Por Nachexpac

3 de clabLevel



 

firefox

 

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