Staying Focused with FocusManager

It just so easy to take things for granted that never would I know that implementing a correct tab order or tab loop for a form can be so mind wrenching. I am totally upset that the Flash authors have to make this so difficult for me.

Posted in serveral forums regarding FocusManager and tab loops but recieved no responses at all. Read many more forums and none of them have conclusive solutions. The Adobe Flash documentation is even worse with its useless example code. Since it appears that this class is so badly documented, I might as well do it myself here.

To immediately create a tab loop for a form, create a DisplayContainer as the form and then add form fields UI components in it. Let’s call the DisplayContainer TheForm

import fl.managers.FocusManager;
var fm:FocusManager = new FocusManager(TheForm);
fm.activate();
// the above code immediately create a tab loop and listens
// for tab key press to advance focus onto the next component