http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118ccf9c47f-7e53.html
Are there any plans to implement this function into openfl? Or at the very least is there a way to mimic this? Been searching but have not been able to find any info on how I can accomplish this.
Well, one workaround would be to listen for KEY_DOWN
events, check if it’s the tab key, and manually pick the next text field. Use stage.focus = textField
to set the focus, and use textField.setSelection(textField.length, textField.length)
if you need to place the cursor at the end.
tabIndex worked for me in a .swf export I did.
In another project (html5), before I was aware of tabIndex, I had something like
class TabEnabledTextField extends TextField
function new () {
super();
}
public var next_field : TextField;
private function onKeyDown(e : KeyboardEvent) : Bool
{
if (e.keycode == Keyboard.TAB)
{
Lib.current.stage.focus = next_field;
e.preventDefault();
return false;
}
}
}
when I try to do
stage.focus = comment_text_field;
The application crashes. I am not getting any errors it simply crashes.
I’d love to see tabIndex
implemented, sorry it isn’t implemented yet.