|
-
Feb 10th, 2001, 11:47 PM
#1
Thread Starter
New Member
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.
-
Feb 12th, 2001, 02:20 PM
#2
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|