# Dynamic Scrollbar (scrollbutton) Height

**URL:** <https://forum.kirupa.com/t/dynamic-scrollbar-scrollbutton-height/212610>\
**Category:** flash\
**Created:** [January 12, 2007, 3:12pm UTC](https://forum.kirupa.com/t/dynamic-scrollbar-scrollbutton-height/212610 "2007-01-12T15:12:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thatguythatsme](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@thatguythatsme](https://forum.kirupa.com/u/thatguythatsme)\
**Post date:** [January 12, 2007, 3:12pm UTC](https://forum.kirupa.com/t/dynamic-scrollbar-scrollbutton-height/212610/1 "2007-01-12T15:12:53Z")

</div>

I am currently trying to adapt a scrollbar to change the size of the scroll button depending on the size of the area its trying to scroll. The scroll bar is a full screen scrollbar which scrolls a movie clip.

Ive tried a variety of different ways to achieve this but have gotten myself stuck.  
ActionScript Code:  
[FONT=Courier New][LEFT]resizer.[COLOR=#0000FF]onResize[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#000000] **var** [/COLOR] contentHeight = contentMain.[COLOR=#0000FF]\_height[/COLOR];  
[COLOR=#000000] **var** [/COLOR] stageHeight = [COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]height[/COLOR];  
scrollbar.[COLOR=#000080]scrollbutton[/COLOR].[COLOR=#0000FF]\_height[/COLOR] = [COLOR=#0000FF]Math[/COLOR].[COLOR=#0000FF]round[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#000000]}[/COLOR];  
[/LEFT]  
[/FONT]

So far its changing the size but not correctly… Does anyone know of a tutorial around somewhere that explains this type of scrollbar or know where I’m going wrong here?

David
