Tuesday, March 25, 2008

TextField setFocus in Actionscript3 (flash)

In Actionscript2 (AS2), you can set focus to a textfield using setfocus();
Not anymore in AS3.
In actionscript3, instead of setfocus use code as follows:
For a text field with instance name 'mytextField' :

stage.focus=mytextField;

No comments: