
Selection Object
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
746
|
ActionScript Language Reference
The scroll property normally is used with maxscroll to create text-scrolling interfaces, as
described under
TextField.scroll.
Bugs
When using text fields with embedded fonts in Flash Player 5.0.30.0, scroll may cause
some text to be displayed outside the bounding box of the field. Some artifacts may not be
removed as the text in the field scrolls. To work around the problem, use a mask over the
text field layer. This problem is fixed in Flash Player 5.0.41.0 and later.
Example
// Sets x to the index of the top line displayed in myField
var x = myField.scroll;
// Scrolls the text in myField down one line
myField.scroll++;
See Also
maxscroll; TextField.scroll, TextField.variable
Selection Object
control over text field selections and movie input focus
Flash 5; enhanced in Flash 6 to support buttons and movie clips
Selection.methodName()
Methods
addListener()
Register an object to receive onSetFocus() event notices.
getBeginIndex()
Retrieve the index of the first selected character in the text field with
keyboard focus.
getCaretIndex()
Retrieve the index of the insertion point in a text field.
getEndIndex()
Retrieve the index of the character following the selection in a text field.
getFocus() Identify the text field, button, or movie clip that is currently ...