Connecting the ScrollBar to the Scroll buttons


show more Connecting the ScrollBar to the Scroll buttons provides you with in-depth training on Web. Taught by Todd Perkins as part of the Flash CS3 Professional Beyond the Basics show less
please wait ...

Connecting the ScrollBar to the Scroll buttons

For the finishing touches for this application, we're going to connect the scroll buttons to the scrollbar so that the scrollbar moves when we click on the scroll buttons. If you're following along, I'm working in 11_Scroll_Buttons.fla in the Chapter 04 folder in the Exercise Files folder. Select the first keyframe in the actions layer and open up the Actions panel by pressing Option+F9 on the Mac or F9 on the PC. At the bottom of the scrollText function we'll set a value for our scroll percent variable. Type scrollPercent = and then in parentheses type text_mc.y - minScroll and then outside of the parentheses type a / and then inside the parentheses, type maxScroll - minScroll We used the scroll percent of variable before to determine what percentage the scrollbar is down.

What we're using it for here is to figure out what percentage the text field has been scrolled. We get that value by first taking the relative position of the text field. What that means is we take the text ...

Connecting the ScrollBar to the Scroll buttons
Video duration: 3m 42s 5h 21m Intermediate

Viewers:

Connecting the ScrollBar to the Scroll buttons provides you with in-depth training on Web. Taught by Todd Perkins as part of the Flash CS3 Professional Beyond the Basics

Subject:
Web
Software:
Flash Professional
Author:
please wait ...