Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stage.addEventListener(KeyboardEvent.KEY_UP, checkForKey)
- function checkForKey(event:KeyboardEvent) {
- if (event.charCode == 37) {
- andro.x += -50
- }
- if (event.charCode == 39) {
- andro.x += 50
- }
- if (event.charCode == 38) {
- andro.y += 50
- }
- if (event.charCode == 40) {
- andro.y += -50
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement