Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/09/2005, 16:41
Avatar de yairyosoy
yairyosoy
 
Fecha de Ingreso: agosto-2005
Mensajes: 21
Antigüedad: 18 años, 7 meses
Puntos: 0
checa este sencillo código, sólo tienes qe oprimir la tecla <<RIGHT>> cuando lo ejecutes. Deberás ponerlo en tu MovieClip (imagino qe tu nave es un MC):
Esto lo tomé de un archivo qe hice también, pero al llegar a la coordenada la nave se estaciona, o sea qe girará 180° y avanzará de espaldas lentamente.

que te sea de provecho!


onClipEvent (load){
vel=10; //<-----------velocidad
focus=false; //<-------bandera abajo = reposo
}
onClipEvent(keyDown){
if (Key.RIGHT){
focus=true; //<bandera arriba = movimiento
}
}
onClipEvent (enterFrame){
if (focus==true){
if (this._x<=300){
this._x+=vel;
}else{
if (this._rotation<=170){
this._rotation=this._rotation+vel;
}else{
this._rotation=180;
if (this._x<=420){
this._x+=vel/2;
}
}
}
}
}
__________________
:borracho:
http://www.nerdpowermexico.com
Un mensaje de Yair Cuevas Alvarado.