• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Controlling Text > Controlling the Focus of Text Boxes

Controlling the Focus of Text Boxes

If you have multiple text boxes on the Stage, you need to be able to control which one is currently active, or focused, before you can retrieve or assign the cursor location or selection. The getFocus and setFocus methods of the Selection object let you do this.

The method getFocus returns a string containing the absolute path to the text box using the _level0 term. For example, if the currently selected text box called yourName is on the root Timeline and you call the getFocus method, the returned value is:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint