Making a car game in flash part.1 (voice instructions)

Loading...

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

Uploaded by on Jul 27, 2009

Thanks for watching and if you didn't see the code then here it is:

onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
this._x -= 15;
this.gotoAndStop("left");
}else if(Key.isDown(Key.RIGHT)){
this._x += 15;
this.gotoAndStop("right");
}else if(Key.isDown(Key.DOWN)){
this._y += 15;
this.gotoAndStop("down");
}else if(Key.isDown(Key.UP)){
this._y -= 15;
this.gotoAndStop("up");
}
}

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 3 dislikes

Link to this comment:

Share to:

Top Comments

  • Alla Svenskar gillar nu!

  • Forgot to mention, you also don't need to make a different frame for every direction, instead just rotate the image.

    If(Key.isDown(Key.RIGHT)){

    _rotation=90

    }

    for example, _rotation would be 180 for down, 270 for left, and 0 for up.

see all

All Comments (26)

Sign In or Sign Up now to post a comment!
  • thank you sooo much

  • @movie627 Ne men den andra topkommentaren är från 2010 och har mindra likes en min

  • @Jamesblueboy Yes it works!!!!!

  • @MrDajn Inte så många :(

  • here´s the complete code (without the trhee other frames) : onClipEvent(enterFrame){ if(Key.isDown(Key.LEFT)){ this._x -= 15; _rotation=270; }else if(Key.isDown(Key.RIGHT)){ this._x += 15; _rotation=90; }else if(Key.isDown(Key.DOWN)){ this._y += 15; _rotation=180; }else if(Key.isDown(Key.UP)){ this._y -= 15; _rotation=0; } }
  • @Jamesblueboy Ctrl+Enter

  • @646AWESOME if(Key.isDown(Key.UP)){

    instead of UP W

    instead of DOWN S

    instead of RIGHT D

    instead of LEFT A

  • your walls wont work on number two can you give me a flash open documentary like make one on media.com then i open it what you made is opened please

  • how can i insert audio responses on my game

  • it does not work

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