Table of Contents

scroll Property Flash 4

the current top line displayed in a text field read/write
textFieldVar.scroll

Description

The scroll text field property can be both retrieved and set. This legacy property is accessed as a property of textFieldVar, an identifier associated with an on-screen text field. The textFieldVar identifier is specified in the Text Options panel (in Flash 5) or the Text Field Properties dialog box (in Flash 4). As of Flash 6, use the object-oriented TextField.scroll property instead, where TextField is an instance of the TextField class. See TextField.variable for more information.

A text field's scroll property indicates the number of the line currently displayed as the first line in the field's viewable region. When we set the value of scroll, it scrolls the text field, making the supplied line number the top line in the field's viewable region.

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


Table of Contents