Scrollbar (dynamic scrollbar size)

Hi everyone.
I’m making a scroller that scrolls movieclip (text inside). It works quite good but I want to put the final touch on it.

I want that my scrollbar is dynamic in its size (just as browser scrolls or windows scrolls). Then my biggest programming problem comes up, maths :scream:

The values that I have is

  • How tall is the area there the text shows.
  • How tall is the movieclip that the text is shown in
  • How tall is the place there my scrollbar is shown.

Someone thats have an idea how to sort this out :h: