Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/01/2003, 13:26
Avatar de TMeister
TMeister
Crazy Coder
 
Fecha de Ingreso: enero-2002
Ubicación: En la Oficina
Mensajes: 2.880
Antigüedad: 22 años, 3 meses
Puntos: 193
ActionScript!!!

Aqui te dejo la formula de la elasticidad Checala y modificala para lo que necesites!

Código:
onClipEvent (enterFrame) { 
Movieclip.prototype.elastico = function (origenX, origenY, friccion, radio) {
 if (accion == 0) { 
velocidadX = velocidadX*friccion+((origenX-this._x)*radio); 
velocidadY = velocidadY*friccion+((origenY-this._y)*radio); 
this._x += velocidadX;this._y += velocidadY;}}; 
this.elastico(200, 200, .8, .4);   
} 

onClipEvent (mouseDown) { 
if (this.hitTest(_root._xmouse, _root._ymouse, true)) { 
accion = 1; 
this.startDrag(true); 
} 
} 

onClipEvent (mouseUp) { 
accion = 0; 
this.stopDrag(); 
}
El Codigo en negritas son las propiedades del Efecto origenX, origenY, friccion, radio

Saludos!!

Última edición por TMeister; 04/01/2003 a las 13:28