Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/09/2005, 10:31
Avatar de isaacluz
isaacluz
 
Fecha de Ingreso: marzo-2005
Mensajes: 180
Antigüedad: 19 años, 1 mes
Puntos: 0
Ahi te va otro. Pones el script en el _root, y que tu pelicula se llame MiPeli

Código:
_global.Mover = function(Objeto, PosicionX, PosicionY, Velocidad) {
	Objeto.onEnterFrame = function() {
		Objeto._x = Objeto._x+(PosicionX-Objeto._x)/Velocidad;
		Objeto._y = Objeto._y+(PosicionY-Objeto._y)/Velocidad;
		if (Objeto._x == PosicionX) {
			trace('Se acabó');
			delete Objeto.onEnterFrame;
		}
	};
};
Mover(MiPeli, 100, 100, 3);