PDA

View Full Version : How would I get a object to move in a certain area with arrow keys?


tivaelydoc
07-16-2007, 01:44 AM
I want to have a object, like a image, move around a predetermined area, let's say 400x600, using the arrow keys. I've seen it in other js games and I was wondering how to do it?

mcjwb
07-16-2007, 06:45 PM
check out this blog entry by ppk on drag and drop (http://www.quirksmode.org/blog/archives/2007/06/drag_and_drop.html), it might give you some ideas.