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

2dSideScroller.avi

Loading...

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

Uploaded by on Dec 31, 2010

error in class 'board' class...

action events not working for side scroll.

tut of a tut (recursive-tutorial)

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (MrMisanthropy)

  • @xxxcoolboyxxx - yes that worked! although now....whatever button i press my character .jpg goes to the left. :/ The code logic looks like it would not do this though.

Video Responses

see all

All Comments (4)

Sign In or Sign Up now to post a comment!
  • @MrMisanthropy To make sure that the character doesnt only move to the left, the if statements in the dude class must look like this:

    if(key == KeyEvent.VK_LEFT){ dx = -1; } if(key == KeyEvent.VK_RIGHT){ dx = +1; }

  • I think its not detecting that you already have an actionPerformed method, and when you click "add unimplemented methods", it adds another actionPerformed method (even though there is already one in there (with p.move()).

    Maybe keep the actionPerformed method it creates and add the two lines in there from the other preexisting method. See if that works.

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