Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/10/2007, 10:57
Avatar de Bandit
Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 9 meses
Puntos: 406
Re: Moviendo MC desde 2 botones.

Al botón ponle como nombre de instancia: btn y al MC: mi_mc.
En el primer frame éstre código:
_global.Mover = function(Objeto, PosicionX, PosicionY, Velocidad) {
Objeto.onEnterFrame = function() {
Objeto._y = Objeto._y+(PosicionY-Objeto._y)/Velocidad;
if (Objeto._y == PosicionY) {
delete Objeto.onEnterFrame;
}
};
};
btn.onRelease = function(){
Mover(mi_mc, 0, 150, 3);
}

Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/