I need to be able to scroll down a page in my application. Currently I am only able to do this with the up/down keys, but then you cannot see whether the page is “scrollable” or not. So I would like to add a scrollbar, which the user is able to slide as well.
I was wondering if there is an easy way to add a scrollbar? Flash is my target.
“ScrollTrack” is an object that is the full height of the scrollbar. This is usually the dark grey area behind the scroll handle. “ScrollHandle” is another graphic, which lives on the scroll track and slides from top-to-bottom. The Scrollbar class supports up and down arrow buttons, but in this case I didn’t use them.
The scroll method is used when you want to force scroll to some place on the scrollbar (it accepts two arguments because this class supports horizontal scrollbars, too)
The minimum and maximum are the values associated with the top and bottom of the scroll. In this case, scrolling to the top, I want the credits.y to be 0, but scroll to the bottom, I want to move credits.y to -credits.height, plus a bit of extra padding at the bottom