I'm interested in a tutorial that teaches you how to move an object with the arrow keys. While delta's tutorial is fantastic, I'm not looking for ways to make it like AS2, I want to learn the actual methods used in order to make it work. I've got something like this so far, but I'm not sure how to assign specific keys yet:
stage.addEventListener(KeyboardEvent.KEY_DOWN ,downEF);
stage.addEventListener(KeyboardEvent.KEY_UP ,up);
function downEF(KeyboardEvent) {
stage.addEventListener(Event.ENTER_FRAME, down);
}
function down(Event){
obj.x+=2
}
function up(KeyboardEvent){
stage.removeEventListener(Event.ENTER_FRAME, down);
}