Using Components > The ScrollBar component > Adding scroll bars to input and dynamic text fields

 

Adding scroll bars to input and dynamic text fields

When you drag a scroll bar onto a dynamic or input text field on the Stage, the scroll bar automatically snaps to the nearest side at the vertical or horizontal position where you place it. The scroll bar and the text field must be in the same Timeline.

Note: The ScrollBar component cannot be used with static text fields.

Once the scroll bar is snapped to the text field, Flash enters the instance name of the text field for the targetTextField parameter for the scroll bar instance in the Property inspector. Although the scroll bar automatically snaps to the text field, it is not grouped with the text field. Therefore, if you move or delete the text field, you must also move or delete the scroll bar.

 
To create a scrollable text field:

1

Use the Text tool to create a text field on the Stage.

2

Choose Window > Properties to open the Property inspector.

3

Choose Dynamic Text or Input Text from the Text type menu in the Property inspector.

4

Enter a name in the Instance Name field.

5

Choose Window > Components to open the Components panel.

Note: If you have already used a ScrollBar or a component that uses scroll bars in your Flash document and have modified the scroll bar properties or skins in any way, drag the ScrollBar from the library, not the Components panel.

6

Drag a ScrollBar component onto the text field bounding box close to the side where you want to place a scroll bar.

7

Repeat step 6 to add additional ScrollBar components to the text field.

8

If you resize the text field, drag the ScrollBar off the text field and then onto it again to resize the scroll bar.