Flash CS5.5 Professional.
swfPanel.setFocus()
Method: Sets the keyboard focus to the specified SWF panel.
The following code sets the focus to the SWF panel named "Project":
Please do the followings steps before running this command:
-
Undock the Project panel, so it is a floating panel.
-
Open the Create File dialog box from the Project panel and then click the Stage.
-
Press the Tab key a few times to ensure the Project panel does not have focus.
-
Run the script below from the Commands menu (put a JSFL file containing the code below in the user/config/Commands directory):
-
Press the tab key. You should see an insertion cursor in one of the text fields in the Create File dialog box.
flash.getSwfPanel("Project").setFocus();