# Dynamic Scroll Bar

**URL:** <https://forum.kirupa.com/t/dynamic-scroll-bar/29683>\
**Category:** flash\
**Created:** [August 29, 2003, 6:46am UTC](https://forum.kirupa.com/t/dynamic-scroll-bar/29683 "2003-08-29T06:46:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffe](https://avatars.discourse-cdn.com/v4/letter/w/c37758/32.png) [@waffe](https://forum.kirupa.com/u/waffe)\
**Post date:** [August 29, 2003, 6:46am UTC](https://forum.kirupa.com/t/dynamic-scroll-bar/29683/1 "2003-08-29T06:46:14Z")

</div>

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.

```auto

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

```

I have a scrollbar using this code

```auto

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:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 12:57pm UTC](https://forum.kirupa.com/t/dynamic-scroll-bar/29683/2 "2003-08-29T12:57:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 7:09pm UTC](https://forum.kirupa.com/t/dynamic-scroll-bar/29683/3 "2003-08-29T19:09:29Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 8:09pm UTC](https://forum.kirupa.com/t/dynamic-scroll-bar/29683/4 "2003-08-29T20:09:35Z")

</div>

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 🙂
