Comunidad de diseño web y desarrollo en internet online

problema con MOUSE_OUT MOUSE_OVER

Citar            
MensajeEscrito el 24 Mar 2011 07:14 pm
HOla, tengo un problema al intentar hacer un botón animado al cual cuando pasas el mouse encima se agranda y cuando quitas el mouse vuelve a su tamaño original (mediante un tween) el codigo que he puesto dentro de mi MC en el primer frame es el siguiente:

Código ActionScript :

btnGral.addEventListener(MouseEvent.ROLL_OVER , overSection);


function overSection(evtObj:MouseEvent){
   
   
   
   gotoAndPlay("empezar");
   
}




para el siguiente frame he puesto este

Código ActionScript :

btnGral.addEventListener(MouseEvent.MOUSE_OUT, outSection);


function outSection(evtObj:MouseEvent){
   
   

   gotoAndPlay("terminar");
   
}




el frame de en medio tiene un stop()

el problema realmente es que cuando paso rápido el mouse sobre mi mc este se detiene en el fotograma central y no hace caso a la función outSection

Espero me explique bien.

Muchas gracias y espero me puedan ayudar.

Por desdeaki

3 de clabLevel



Genero:Masculino  

Mercadólogo, Publicista.

safari
Citar            
MensajeEscrito el 25 Mar 2011 05:40 am
Tienes varios errores, primero no haces referencia a nada en la funcion,

function overSection(evtObj:MouseEvent){
gotoAndPlay("empezar");
}

Hazlo asi:

function overSection(evtObj:MouseEvent){
btnGral.gotoAndPlay("empezar");
}

Despues, por que usas dos frames?? ponlo todo el codigo dentro del mismo y por ultimo la funcion ROLL_OVER, cambiala por MOUSE_OVER, saludos

Por cranecx

21 de clabLevel



Genero:Masculino  

Desarrollador Web

msie
Citar            
MensajeEscrito el 25 Mar 2011 05:41 am
proba con esto:

Primer frame, todo el codigo:


btnGral.addEventListener(MouseEvent.ROLL_OVER , overSection);


function overSection(evtObj:MouseEvent){



gotoAndStop("empezar");

}

btnGral.addEventListener(MouseEvent.MOUSE_OUT, outSection);





function outSection(evtObj:MouseEvent){







gotoAndStop("terminar");



}

Por nykko

23 de clabLevel



 

firefox
Citar            
MensajeEscrito el 25 Mar 2011 04:09 pm
Muchas gracias!!

Por desdeaki

3 de clabLevel



Genero:Masculino  

Mercadólogo, Publicista.

safari

 

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