Sprite animation: fixed repeat key delay

alright, I managed to avoid the OS's repeat key delay.

Before - On the stage I just setup an event Listener for they KeyboardEvent KEY_DOW, and one for KEY_UP. Whenever a key was pressed it would execute the function which would say If key is left arrow, move to the left.

After - Basically the same, except instead of actually moving the sprite, the KEY_DOWN function would add an event Listener of it's own of type Events.ENTER_FRAME. This ENTER_FRAME event is really useful for animation because it executes based on the SWF's frame rate. so if your movie frame rate is set to 28 fps, then 28 times a second this function will run... So now because the left arrow key is pressed, it triggers the ENTER_FRAME function which then moves the character until the KEY_UP is activated. Problem solved, check it out:

[Click on the SWF below to allow for keyboard input]