Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/09/2008, 11:46
Avatar de Lynxcraft
Lynxcraft
 
Fecha de Ingreso: noviembre-2007
Ubicación: yecla murcia
Mensajes: 1.346
Antigüedad: 18 años, 10 meses
Puntos: 51
Respuesta: Efecto chikle con el mouse

hola de nuevo perdona por el otro post pero tube que salir corriendo XDXDXD bueno mira este código a ver si te gusta


Código PHP:
import mx.transitions.Tween;
import mx.transitions.easing.*;
boton_posx = boton._x;
boton_posy = boton._y;
function 
seguir() {
    
    
    
this.onEnterFrame = function() {
        
boton._x = _xmouse;
        
boton._y = _ymouse;
        if (
boton._x>boton_posx+50 || boton._x<boton_posx-50) {
            
delete (this.onEnterFrame);
            var 
miEfecto1:Tween = new Tween(boton, "_x", Strong.easeOut, boton._x, boton_posx, 4, true);
            var 
miEfecto2:Tween = new Tween(boton, "_y", Strong.easeOut, boton._y, boton_posy, 4, true);
            
//boton._y = boton_posy;
            //boton._x = boton_posx;
        
}
        if (
boton._y>boton_posy+50 || boton._y<boton_posy-50) {
            
delete (this.onEnterFrame);
            var 
miEfecto1:Tween = new Tween(boton, "_x", Strong.easeOut, boton._x, boton_posx, 4, true);
            var 
miEfecto2:Tween = new Tween(boton, "_y", Strong.easeOut, boton._y, boton_posy, 4, true);

            
//boton._x = boton_posx;
            //boton._y = boton_posy;
        
}
    };
}
boton.onRollOver = function() {
    
seguir();
}; 
__________________
Sobran las ideas cuando faltan ganas de trabajar en ellas
Lynxcraft

Última edición por Lynxcraft; 20/09/2008 a las 11:59