
01/07/2005, 11:25
|
 | Moderador | | Fecha de Ingreso: julio-2003 Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 21 años, 7 meses Puntos: 406 | |
Hola pituu2:
Al MC que vas a mover ponle como nombre de instancias: clip
Prueba con éste código en le primer frame:
MovieClip.prototype.Mover = function(toX, toY, speed) {
this.xSpeed = (toX-this._x)/speed;
this.ySpeed = (toY-this._y)/speed;
this.speed = speed;
this.onEnterFrame = function() {
if (this.speed>0) {
this._x += this.xSpeed;
this._y += this.ySpeed;
this.speed--;
} else {
this.onEnterFrame = null;
}
};
};
clip.Mover(66, 0, 50);
Espero haberte sido de ayuda. |