UIScrollBar.setScrollProperties()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
scrollBarInstance.setScrollProperties(pageSize, minPos, maxPos)
Parameters
The number of items that can be viewed in the display area. This parameter sets
pageSize
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.
This parameter refers to the lowest numbered line of text when the scroll bar is used
minPos
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.
This value refers to the highest numbered line of text when the scroll bar is used
maxPos
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
and the assignment doesn't cause the text field to broadcast change events. If you use the
method to set the text of the text field, you must use
replaceText
to cause an update of the scroll bars.
The
and
minPos
maxPos
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);
1408
UIScrollBar Component
UIScrollBar.setScrollTarget()
values are used together by the UIScrollBar component to determine
) rather than while authoring,
setScrollProperties()
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?