hi everybody. i made a scrollbar to scroll a masked textbox, but can’t seem to get the equation right. can anybody help??
i have an MC called textBg, and the MC to be scrolled, called textBox. i calculate the difference between the two, and scale the scrollbar (scrollHandle) appropriately on top of an MC called scrollBg. (scrollBg is the same height as textBox, if it makes any difference) the y position of textBox is relative to textBg, which is stationary.
so far i’ve declared some variables, and tried using them… not sure if they’re useful though:
var textDiff = textBox.height - textBg.height; // size difference - text scroll amount
var maxScroll = textBg.y - textDiff; // maximum scroll distance
var scrollDiff = scrollBg.height - scrollHandle.height;
i’ve mucked around with different equations, involving scrollHandle.y, but can’t seem to get it to work correctly. i really suck with numbers, so any help would be greatly appreciated! i hope i explained myself well enough. thanks!