F > FScrollBar.getScrollPosition |  |

FScrollBar.getScrollPosition

FScrollBar, FScrollBar.getScrollPosition, getScrollPosition

Availability

Flash Player 6.

Usage

    myScrollBar.getScrollPosition()

Parameters

None.

Returns

An integer.

Description

Method; returns an integer specifying the position of the scroll box (thumb). The returned value is in the range defined by the `minPos` and `maxPos` properties that determine the scrolling boundaries of the scroll bar. To set the `minPos` and `maxPos` parameters, use `FScrollBar.setScrollProperties`.

Example

The following code returns the current position of the scroll box for the scroll bar `scroll2` to the Output window. If `scroll2` has a `minPos` setting of 2 and a `maxPos` setting of 25, a return value of 12 indicates that the scroll box is in the middle of the scroll bar.

    trace(scroll2.getPosition());

See FScrollBar.setChangeHandler for another example that uses this method.

See also

`FScrollBar.setChangeHandler`, `FScrollBar.setScrollPosition`