Book HomeActionScript: The Definitive GuideSearch this book

18.6. Working with Text Field Selections

When a user selects a portion of a dynamic or user-input text field, the positions of the selected characters are stored in a special built-in object called the Selection object. Using the Selection object, we can check which part of a text field a user has selected or even select a part of a text field programmatically. The Selection object can also tell us which of a series of text fields is currently selected by the user. Finally, we can use the Selection object to give keyboard focus to a particular text field, prompting a user to type in a suggested location.

To learn how to work with text field selections, see the Selection object in Part III, "Language Reference".



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.