Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

move about?

 
fred fredricks
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys...i have to basically make a centerpide game. can you help me get started please ?
hmmm, can some1 tell me how to make a dot (anything i guess? ) to move around when you press the arrrow keys?
i need a keylistener right? i am not sure. any tutorials on this?
thanks....
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to write a KeyListener.
An example using a mouse click, but you get the idea . . .

(Added in some KeyListener code of sorts)
[ March 25, 2003: Message edited by: Cindy Glass ]
 
fred fredricks
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, thanks, i am looking at the code at the moment.. hmm, but i am sorry, i am a total newbie really..can you help me out a little more. i just want an image to move up, down, left right when the arrows are pressed..the mouse click is confusing me a bit
thanks !
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK - I was in a hurry. Here it is without the Mouse stuff.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic