awesome man thanks! okay now I want to make it a little more complicated with some user interaction. I know the basic code for the user moving the arrow keys left to right. So how can I make that template more "fun," or into a "game?"
thank you SO much for all your help, you are a life saver!
this is what I have in another java file for moving text from left to right with the arrow keys:
// handles KeyEvents
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_LEFT)// left arrow
xdir = -5;// move left
if (e.getKeyCode() == KeyEvent.VK_RIGHT)// right arrow
xdir = 1;// move right
if (e.getKeyChar() == ' ') {// space bar
beep.play();
xdir = 0;// stop moving
}
}
public void keyReleased(KeyEvent e) {
}
public void keyTyped(KeyEvent e) {
}
}
how would I import that to the red animation?