Home
» Other Stuff » Flash Actionscript Set Focus
Flash Actionscript Set Focus
| December 19, 2007 | Posted by The Futtock under Other Stuff |
If you want to set focus to a text input field / text area in Flash then use the following code:
stage.focus = myTextField;
Selection.setFocus(instanceName);
I added this inside an event listener and it works great!
textField.setSelection(0, 100);
Now I need to figure out how to attach a listener to textField.onChanged
This seems useful!
But i don’t get your solution. To what do you refer by “myTextField” and what by “instanceName”?
and what what is “Selection”? Do we have to import something?