MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 1395

Components language reference
Table of Contents

Advertisement

To create an application with the UIScrollBar component:
1.
Create a dynamic text field and give it an instance name myText in the Property inspector.
2.
In the Property inspector, set the Line Type of the text input field to Multiline or to
Multiline No Wrap if you plan to use the scroll bar horizontally.
3.
In Frame 1, use ActionScript to add enough text to the field so that users have to scroll to
view it all. You could write the following code:
myText.text="When the moon is in the seventh house and Jupiter aligns
with Mars, then peace will guide the planet and love will rule the
stars."
Make sure that the text field on the Stage is small enough that you need to scroll it to
see all the text. If it isn't, the scroll bar does not appear or may appear simply as two
lines with no thumb grip (the part you drag to scroll the content).
4.
Verify that object snapping is turned on (View > Snapping > Snap to Objects).
5.
Drag a UIScrollBar instance from the Components panel onto the text input field near the
side you want to attach it to. The component must overlap with the text field when you
release the mouse in order for it to be properly bound to the field.
The
_targetInstanceName
the text field instance name in the Property and Component inspectors. If it does not
appear in the Parameters tab, you may not have overlapped the UIScrollBar instance
enough.
6.
Select Control > Test Movie.
The application runs, and the scroll bar scrolls the contents of the text field.
You can also create a UIScrollBar component instance and associate it with a text field at
runtime with ActionScript.
property of the component is automatically populated with
Using the UIScrollBar component
1391

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents