Dynamic Scroll Bar

I have a scroll bar that is scrolling a set of movie clips. To make things more difficult the set of movie clips are created dynamically.
This is done with this code in a loop that loops for number of movieclips needed.


_root.loadbanner_mc.createEmptyMovieClip("banner"+i, i+3);

I have a scrollbar using this code


scrollBar.setChangeHandler("mover");
function mover() {
_root.loadbanner_mc._y=scrollBar.getScrollPosition()+startscrollY;
}

All of this works great. The problem is the scroll bar is about 1/10 of an inch long. I do not mean the scroll component; it is the length I set it to. I mean the box or slider button if you will the button of the scroll component.

I have tried this to no avail. I have put a large vertical box in loadbanner_mc, but it does not make the scroll bar button any large.

Any ideas about this are much :bu:

That ‘button’ will be in size proportional to the size of your scroll pane compared to the content it contains, won’t it?

That’s what i was hoping for but it does not seem to be the case. As I said before I put a big vertical box in the movie that I am scrolling but the scroll bar is no bigger.

Also you said scrollPane, I am not using the scrollPane component. I am only using a scrollBar component.

It’s strange because the code I have set up in the scroll bar always scrolls to the appropriate length when there is 10 or 100 movie clips, but the scroll button does not change size.

Hmmmm :hair:

Got it, it had to do with this piece of code:

scrollBar.setScrollProperties(1, 104, scrollYPosition);

Changed to

scrollBar.setScrollProperties(100, 104, scrollYPosition);

Normally this would make the scroll y position shorter but in my case it does not. Lucky me :slight_smile: