Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/08/2004, 16:28
Avatar de TortugaChat
TortugaChat
 
Fecha de Ingreso: julio-2004
Ubicación: Coatzacoalcos, Veracruz, México.
Mensajes: 150
Antigüedad: 19 años, 9 meses
Puntos: 0
De acuerdo

MovieClip.prototype.mover = function(longitud, vel, xboton) {
this.onEnterFrame = function() {
with (this) {
_y = _y+(xboton-_y)/vel;
if (Math.ceil(_width) == longitud && Math.ceil(_y) == xboton) {
delete onEnterFrame;
}
}
};
};


Y luego, llamar la función cuando la necesites:

ElClipQueQuieresMover.mover(Valor1,Valor2,Valor3);


Casi lo olvido, el código debe de ir en la linea principal, digamos que en el frame 1 de una capa especial llamada "Scripts".

Saludos.

Última edición por TortugaChat; 18/08/2004 a las 16:30