Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Tutorial flash 8:make a really car game simple

Loading...

Sign in or sign up now!
18,406
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Oct 20, 2008

this is my first tutorial of flash.

Copy the code here:

onClipEvent (enterFrame) { _y += acelerar*Math.sin(_rotation/57.3); _x += acelerar*Math.cos(_rotation/57.3); acelerar *= 0.8;
}
onClipEvent (enterFrame) { if (Key.isDown(Key.UP)) { acelerar = 10 } else {
acelerar = 0 }
}
onClipEvent (enterFrame) { if (Key.isDown(Key.DOWN)) { acelerar = -15 }
}
onClipEvent (enterFrame) { if (Key.isDown(Key.LEFT)) { _rotation -= 15 }
}
onClipEvent (enterFrame) { if (Key.isDown(Key.RIGHT)) { _rotation += 10 }
}

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 9 dislikes

Link to this comment:

Share to:

Uploader Comments (soramatita)

  • i wanna know how to make a wall so anyone plzz give me a code for the walls

  • wall code in the description :P

  • You don't need to put everything in a separate

    clipevent. Why did you code it so going

    left is faster than going right?

    Fixed code (use Auto-Format):

    onClipEvent (enterFrame) {_y += acelerar*Math.sin(_rotation/57­.3);_x += acelerar*Math.cos(_rotation/57­.3);acelerar *= 0.8;if (Key.isDown(Key.UP)) {acelerar = 10;} else {acelerar = 0;}if Key.isDown(Key.DOWN)) {acelerar = -15;}if (Key.isDown(Key.LEFT)) {

    _rotation -= 15;}if (Key.isDown(Key.RIGHT)) {

    _rotation += 15;}}

  • thats the spanish scirpt : P

Top Comments

  • aaaaaaaaaaaa! im so stupid! i dont know how to enter the code it keeps giving me errors! please help X (

  • it works for me =) thanks

see all

All Comments (115)

Sign In or Sign Up now to post a comment!
  • thank you very useful, how i put walls?

  • @AlexaNicolaOmegaBace I'd like to see your grandmother in my PC, idioy :I

  • @soramatita im not a bundle of sticks!

  • @MrKaneDoggalypse DON'T SPAM MY VIDEO, FAGGOT

  • I LOVE YOU, GIVE US A HUG!!!

  • Nice tutorial, thanks. if you want control car using WASD buttons, use this: onClipEvent (enterFrame) { _y += acelerar*Math.sin(_rotation/57­.3); _x += acelerar*Math.cos(_rotation/57­.3); acelerar *= 0.8; } onClipEvent (enterFrame) { if (Key.isDown(87)) { acelerar = 15 } else { acelerar = 0 } } onClipEvent (enterFrame) { if (Key.isDown(83)) { acelerar = -15 } } onClipEvent (enterFrame) { if (Key.isDown(65)) { _rotation -= 10 } } onClipEvent (enterFrame) { if (Key.isDown(68)) { _rotation += 10 } }
  • When its done I change to make a road / background

  • @FDChicharrones just press f8 :D

  • A ver tío que no me entero de nada, para que al chocar contra un obstáculo el coche pare, qué código hay que introducir, y dónde?

  • i want to run over something plz give me the code

View all Comments »
Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more