F > FScrollBar.setSize |  |

FScrollBar.setSize

FScrollBar, FScrollBar.setSize, setSize

Availability

Flash Player 6.

Usage

    myScrollBar.setSize(length)

Parameters

`length` An integer specifying the length of the scroll bar, in pixels.

Returns

Nothing.

Description

Method; sets the length, in pixels, of the scroll bar at runtime. (You cannot set the width of scroll bar components.) Calling this method overrides any scaling and sizing applied during authoring.

This method should not be used with scroll bars attached to text fields; the scroll bar automatically snaps to the size of the text field during authoring.

For more information, see Sizing ScrollBar components in the Using Components chapter of Using Flash.

Example

The following code sets the length of `scrollText1` to 200 pixels.

    scrollText1.setSize(200);