The code snippets below are for a floating character palette
that detects the focus of a textInput field, then drops the
character selected from the character palette into the textInput
field. Where I'm having trouble is that the variable that stores
the focused textInput field becomes "null" when the character
palette is clicked. It works fine when a specific input field is
defined, but this must accept all input fields available.
Any ideas? This is for an urgent project of course.....
// ------------- click of character palette
trace(chars.charAt(index)); // this is the character clicked
Selection.setSelection(caret + 1, caret + 1);
// ----------- this determines focus
var focus = Selection.getFocus();