Cursor movement in AS3

I have an array of input TextFields. I want to dynamically move the cursor to the next TextField in the array whenever a key is pressed. How can I achieve this?