Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             stage.addEventListener(KeyboardEvent.KEY_UP, checkForKey)
  2.             function checkForKey(event:KeyboardEvent) {
  3.                 if (event.charCode == 37) {
  4.                     andro.x += -50
  5.                 }
  6.                 if (event.charCode == 39) {
  7.                     andro.x += 50
  8.                 }
  9.  
  10.                 if (event.charCode == 38) {
  11.                     andro.y += 50
  12.                 }
  13.                 if (event.charCode == 40) {
  14.                     andro.y += -50
  15.                 }
  16.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement