aka te dejo un scrip q construi, para q ande lo tenes q poner en la acciones de tu auto.
onClipEvent (load) {
speed = 0;
}
onClipEvent (enterFrame) {
//determinar velocidades maximas
if (speed<-10) {
speed += Number(.3);
}
if (speed>15) {
speed -= .1;
}
//disminuir la velocidad si no se esta acelerando
if (!Key.isDown(Key.UP) && !Key.isDown(Key.DOWN)) {
speed *= .98;
}
//cuando la velocidad esta por debajo de 0.1 y mas de -0.1 se convierte en 0
if (speed<.1 && speed>-.1) {
speed = 0;
}
//acelerar
if (Key.isDown(Key.UP)) {
if (speed<-1) {//aceleracion extra si venis en reversa
speed -= (speed/3);
} else {//aceleracion normal
speed += Number(.1);
}
}
if (Key.isDown(Key.DOWN)) {//frenado y reversa
speed -= .3;
}
if (Key.isDown(Key.LEFT)) {//rotacion
if (speed != 0) {//si no hay velocidad, no se puede girar
_rotation -= 2;
}
}
if (Key.isDown(Key.RIGHT)) {
if (speed != 0) {
_rotation += 2;
}
}
this._x += Math.sin(_rotation*(Math.PI/180))*speed;//formulas de avance
this._y += Math.cos(_rotation*(Math.PI/180))*speed*-1;
}
Nota: yo lo uso en 50 fps, si lo pones a 12 fps vas a tener q aumentar los valores por q sino te va a andar lento.