Comunidad de diseño web y desarrollo en internet online

Ayuda con una funcion

Citar            
MensajeEscrito el 14 Nov 2007 04:05 pm
Hola, tengo el sgte problema con estas funciones, mi problema es el sgte estas funciones tiene el siguiente proposito, (funcion btnEncima) animar un boton hasta cierto momento y (funcion btnQuitar) luego hacer retroceder la animacion del boton. Ahora mi problema es el sgte cuando paso por encima de un btn e inmediatamente paso por encima de otro, al primer boton no se le aplica la funcion btnQuitar, simplemente se qda marcado.

Aqui les adjunto el codigo.

Ojala puedan ayudarme. Muxas gracias

Código :

function btnQuitar(btn:MovieClip, ultimoframe:Number) {
   delete onEnterFrame();
   onEnterFrame = function () {
      if (btn._currentframe>1 && btn._currentframe<=ultimoframe) {
         btn.gotoAndStop(btn._currentframe-1);
      }
      
   };
}

Código :

function btnEncima(btn:MovieClip, ultimoframe:Number) {
   onEnterFrame = function () {
      if (btn._currentframe<ultimoframe) {
         btn.nextFrame();
      } 
      
   };
}

Por JavierS

37 de clabLevel



Genero:Masculino  

Viña/Chile

firefox
Citar            
MensajeEscrito el 15 Nov 2007 01:22 am
Hola.
Si te entendí bien, lo que quieres hacer es un fade-in/fade-out. Si es esto te recomiendo que leas este tutorial y lo adaptes a tus necesidades.

http://www.cristalab.com/tutoriales/123/boton-con-fade-in-y-fade-out-animado

Por GustavoV

Claber

136 de clabLevel



Genero:Masculino  

firefox

 

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