Results 1 to 2 of 2

Thread: Please help

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    4

    Angry

    Can some one please tell me the how to make an applet where you have to controll a rectangle around the applet with the arrow keys and if you hit the edge you bounce straight off.

  2. #2
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367

    Hmmm

    Well you need to determine, if a user is moving the rectangle or if a thread animation type is. If user, you will need to have event for keyboard press, and handle the moving of the rectangle for the down, up, right, and left key. you will also need to check to see where the bounds are for the applet and if your rectangle hits them bounce the rectangle back.

    I have an applet that does this exactly with your choice of thread or user input to move at home, if I remember I will post it later when I get home.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width