Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/06/2008, 23:16
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años, 9 meses
Puntos: 834
Respuesta: Movimiento suave

Fijate si te sirve algo así:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<
title></title>
<
script>
function $(
id){
    return 
document.getElementById(id);
}
function 
addEvent(objevTypefnuseCapture){
 
 if (
obj.addEventListener){
    
obj.addEventListener(evTypefnuseCapture);
    
  } else if (
obj.attachEvent){
    
obj.attachEvent("on"+evTypefn);
   
  } else {
   
obj['on'+evType]=fn;
  }
}
function 
easing(prop,fin,tiempo,rozamiento,unidad){
    var 
_this=this;
    var 
i=setInterval(
        function(){
            
_this.style[prop]=fin-(fin-parseInt(_this.style[prop]))*rozamiento+unidad;
            if(
parseInt(_this.style[prop])/fin*100 >= 99.9){
                
_this.style[prop]=fin+unidad;
                
clearInterval(i);
            }
        },
tiempo);
}


window.onload=function(){
    
addEvent($('pp'), 'click',function(){easing.call($('pp'),'left',600,3.8,.8,'px');}, false);
}
</script>
</head>

<body>
<img style="cursor:pointer; position:absolute; left:0; top:0" id="pp" src="http://www.forosdelweb.com/customavatars/avatar65984_1.gif" />
</body>
</html> 

Última edición por Panino5001; 03/06/2008 a las 23:35