views:

2633

answers:

4

I'm trying to create some dynamic scrollbars for a project I'm working on in Flash (ActionScript 3).

I had written scrollbars a while ago in AS2, but I can't seem to sort out everything in my mind for AS3.

Basically, I'm looking for a tutorial exactly like the one at http://tutorials.parseidon.com/code-script/actionscript/flash-scrollbar/ except for in AS3.

Does anyone know where I could find one?

Thanks.

A: 

Any reason you can't use one of the existing 10,000 AS3 scrollbars that are already written? I think this is one of those cases where it's better to not reinvent the wheel. I hate flash scrollbars that aren't implemented 100% correctly, I wish everyone would just use a well-written one. PS: Skinnable scrollbar components are even included with flash & flex, so you don't have to look very far to find them.

davr
The problem is I keep finding information on text scrollbars, but the area that I'm scrolling with is made up of dynamically loaded movie clips. If you know of a scrollbar that would work for that, I would love to not have to reinvent the wheel.
Ryan Smith
+2  A: 

One of the best (and simplest) scrollbar tutorials out there is a two part video tutorial by Lee Brimelow of GotoAndLearn.com. They will also give you a good grounding of OOP in AS3.

Object-Oriented Scrollbar: Part 1

Object-Oriented Scrollbar: Part 2

This should fit with you needs, because it is based on scrolling a MovieClip. So as long as you load all your dynamic content into the container mc, and update the scrollbar when ever you change the content, you should be away!

TandemAdam
+1  A: 

For anyone looking into this:

The scroll bar that I finally found that works perfectly for me is:

http://blog.voq.jp/2007/09/scrolling_component_likes_ipho.html

It's got an iPhone style scroll to it and it's very easy to implement. Also, it's licensed under the APL (http://www.apache.org/licenses/LICENSE-2.0), so I'm quite happy about that as well.

Ryan Smith
First link is broken!
TandemAdam
Like Tandem said, link broken... no site even at: http://blog.voq.jp
Leon
A: 

I agree with Ryan Smith...

Matt