I know a lot of work has gone into the Flash CS3 components and skinning them is much easier than it was with earlier versions, but doesn't it seem like they're still just too finicky? Well, it does to me. My simple ScrollPane class does everything you'd expect, but (unlike the component) leave the layout up to you. The result is a ScrollPane that's much more flexible and easily adapted to your pushing-the-boundaries-of-what-a-scroll-pane-can-look-like design. Don't want an up arrow? Don't include it. No thumb? No problem. Best of all, com.exanimo.containers.ScrollPane and com.exanimo.controls.ScrollBarare modeled after fl.containers.ScrollPane and fl.controls.ScrollBar, so you don't have to waste time learning new APIs. Better than best of all, I've put together six examples that demonstrate all the different ways to use the ScrollPane, and how easy it is to extend it.
Download the source code and example files as a ZIP or get them from my subversion repository.
Features
- Simple to skin
- API based on
fl.containers.ScrollPane - Doesn't muck with your layout
- Optional Thumb scaling
- Support for disabled ScrollBars
- Easy-to-implement easing
- Mouse wheel support (Windows only, for now)
- Thumb and arrow buttons are optional
- Accessors for setting the size of a line and page
- Accessors for setting the scrolling repeat interval and delay
- Uses interfaces in case you want to create your own implementation from scratch

2008.05.08
How do I add easing to exampel no. 2?
Really like the possibilities of this scrollbar pane…
All the best, Niklas
2008.05.09
Simple! Just change the linkage base class from "com.exanimo.containers.BaseScrollPane" to "EasingScrollPane" and put the EasingScrollPane class included with Example 6 in the same directory as your FLA. If you take a look at the contents of the EasingScrollPane class, it should be clear how to make your own custom easing. All you have to do is extend BaseScrollPane and override a method.
2008.05.10
Thanks for your answer.
Hmmm…
When I change the base class to EasingScrollPane and put the class in the same folder I get this error:
EasingScrollPane.as Line 4 1046: Type was not found or was not a compile-time constant: TextField.
Not quite sure why this is happening… Do I have to import some import somewhere?
Line 4 is the refering to the import of the BaseScrollPane class but in that class, as far as I can see there is an import flash.text.TextField;
Niklas
P.S Some great stuff here on your site.
2008.05.10
Yeah, when a class is linked to a symbol in the library, it must import the classes of its children. Since the ScrollPane in example 2 contains a TextField, you'll have to import flash.text.TextField in the EasingScrollPane class. It doesn't matter that the superclass (BaseScrollPane) already imports it, Flash adds the children to the definition of the linked class.
I'm glad you're finding the site useful!
2008.05.20
Hey!
Thanks for your help. Now it works perfectly - awesome!!
Niklas
2008.06.19
Thanks so much, came together nicely!
-Oddmachine
2008.08.29
Hi there again!
I have actually have two questions:
Is there a way to use the scroll but without the mask - kind of like on this page: http://emehmedovic.com/xmca/toobplayer/#/download/ ?
My second question is this: Is there a way to have the size of the mask change dynamically? I've tried to make a movie clip out of the mask so that I can name it with an instance name but the scroll stopped working…
All the best, Niklas
2008.08.29
Hi again, Niklas! Yes, there is a way to scroll without the mask.. what you would do is just use the scroll bar (BaseScrollBar) by itself, listen for its scroll events, and move your content in the handler. As to your second question, you can make the mask a MovieClip. From the documentation of BaseScrollPane:
If [the BaseScrollPane] has a child named "_mask", it will be used as the mask; otherwise the Shape object of the highest index in the display list will be used.
So just name your MovieClip "_mask", and you should be good to go.
2008.09.22
Hi Mathew!
Sorry for my late reply. I've been very busy. So far I've tried to make a movieclip out of the mask and noticed that in the EasingScrollPane.as you needed to add import flash.display.MovieClip;. Works like a charm - thanks again for taking some of your time to help me out!!
Niklas
2008.11.26
Hi Matthew, this scrollbar works great with text i love the ease control. I'm a bit of a newbie though and was wondering if I could load a MovieClip with live buttons rather than text?