Scroll bar

I suppose this is more of a math problem than anything else… I have text with buttons that cause it to scroll up and down but I don’t know how to give it a bar that travels 100% of the distance between the top/bottom buttons…

also … after that I am doing something similar with dynamically loaded content so I would need the bar to be somewhat variable in size but would I be using something like

bar_mc._xscale = (text_txt._height (with math))

personally I would like to always have the bar the same size but I can’t quite figure it out.