Making a car game in flash part.2

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
12,714
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 27, 2009

This is part 2 in my car making tutorial.

code:
onClipEvent (enterFrame) {
this._y += speed*Math.sin(_rotation/57);
this._x += speed*Math.cos(_rotation/57);
speed *= 0.8;
}
onClipEvent (enterFrame) {
if(this.hitTest(_root.wall)){
speed = 0;
}else if(this.hitTest(_root.wall1)){
speed = 0;
}else if (Key.isDown(Key.UP)) {
speed = 15;
} else {
speed = 0;
}
}

onClipEvent (enterFrame) {
if (Key.isDown(Key.DOWN)) {
speed = -15;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_rotation -= 15;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
_rotation += 15;
}
}
thanks for watching!

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (42)

Sign In or Sign Up now to post a comment!
  • this has 2 things wrong with it

    #1 its wall!!! not wow

    #2 the codes are wrong in the discription

  • **Fehler** Szene=Szene 1, Ebene=Ebene 1, Bild=1:Zeile 1: ')' erwartet if(Objekt

  • guys pls check out mine too /watch?v=fsRvQr3utkw PLS not joke my car dont look as good as yours but pls!

  • help respond owner thumbs up if your walls wont work!

  • Please help!! my wall moves :(

  • I have a glitch with the wall...

    When I press up, the wall moves to the right, and eventually off the screen.

    Plz help.

  • what if the car hits the wall backwards?

  • @MATTEE782 because that one is more simpler and you dont have to type extra lines!

  • why dos every tutorial have to be in actionscript 2.0?

  • The WAll Code?

Loading...

Alert icon
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