| Page 4 of 7 - Project 11
3. Double-click another instance of Scrollbar, name the instance
Scroll X, and position and rotate it: Object Inspector: x: 149.8
y: 276.9 Transform Inspector>Rotate: 0.0 4.
Double-click another instance of Scrollbar, name the instance Scroll Y, and, using
inspectors, position and rotate it: Object Inspector: x: 331.8
y: 94.8 Transform Inspector>Rotate: 90.0
 |
| Name another Scrollbar Instance and rotate
and position it. | | 5.
Double-click another instance of Scrollbar, name the instance TextScroll, and,
using inspectors, position and rotate it: Object Inspector: x: 515.8
y:
94.8 Transform Inspector>Rotate: 90.0
 |
| Name the fourth instance TextScroll and
rotate and position it, using the Inspectors. | |
Editing The Scrollbar
The Scroll Bar symbol consists of two scroll buttons and a middle "scroll
handle "that is, in fact, a button nested within a Movie Clip. The Scrollbar works
when users click the left or right buttons, or drag the scroll handle. Flash then
uses the x coordinate information of the scroll handle to adjust the view, including
zooming, scrolling, and text-scrolling. 1.
Open your movie 's Library and double-click the Scroll Bar symbol 's icon to edit
it. Edit the Scroll Bar symbol to observe that it is made up of three components:
two scroll buttons with a scroll handle between them.
 |
| Edit the Scrollbar symbol to observe that
it is made up of three components: two scroll buttons with a scroll handle between
them. | | 2.
Double-click the left button to open the Properties dialog box and, on the Actions
tab, assign the following ActionScript statements to adjust the scroll handle
's position: This script check to see if the scroll handle is within
5 pixels of the left end of the bar, and repositions it accordingly.
| On (Release) If
(GetProperty("ScrollHandle ",_x) >0)
If (GetProperty("ScrollHandle ",_x) >5)
Set Property ("ScrollHandle ",X Position) = GetProperty("ScrollHandle
",_x) -5 Else
Set Property ("ScrollHandle ",X Position) =0
End If End If
Call ("/Library/:AdjustView ") End On | |
3. Double-click the other scroll button (to
the far right) to open the Properties dialog box and, on the Actions tab,assign
this complementary set of ActionScript statements: This script is identical
to the first except it moves the scroll handle right instead of left.
| On (Release) If
(GetProperty("ScrollHandle ",_x) <80) If (GetProperty("ScrollHandle
",_x) <75) Set Property
("ScrollHandle ",X Position) = GetProperty("ScrollHandle
",_x) +5 Else
Set Property ("ScrollHandle ",X Position)=80
End If End If Call ("/Library/:AdjustView
") End On | | |