User Guide
1408 UIScrollBar Component
UIScrollBar.setScrollProperties()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
scrollBarInstance.setScrollProperties(pageSize, minPos, maxPos)
Parameters
pageSize The number of items that can be viewed in the display area. This parameter sets
the size of the text field’s bounding box. If the scroll bar is vertical, this value is a number of
lines of text; if the scroll bar is horizontal, this value is a number of pixels.
minPos This parameter refers to the lowest numbered line of text when the scroll bar is used
vertically, or the lowest numbered pixel in the text field’s bounding box when the scroll bar is
used horizontally. The value is usually 0.
maxPos This value refers to the highest numbered line of text when the scroll bar is used
vertically, or the highest numbered pixel in the text field’s bounding box when the scroll bar is
used horizontally.
Description
Method; sets the scroll range of the scroll bar and the size of the text field that the scroll bar is
attached to. This method is primarily useful when you attach a UIScrollBar component to a
text field at runtime (using
UIScrollBar.setScrollTarget()) rather than while authoring,
and the assignment doesn’t cause the text field to broadcast change events. If you use the
replaceText method to set the text of the text field, you must use setScrollProperties()
to cause an update of the scroll bars.
The
minPos and maxPos values are used together by the UIScrollBar component to determine
the scroll range for the scroll bar and the associated text field.
Example
The following example sets up a UIScrollBar component to display 10 lines of text at a time
in the text field out of a range of 0 to 99 lines:
my_sb.setScrollProperties(10, 0, 99);