Hi;
I have a method that is called when someone drags the handle of my scroll bar. That method updates the position of the target Movie Clip (holder_mc) that is being masked and scrolled. This method:
private function scrollContent():Void
{
var h = mcScrollBar.mcBg._height - 4 - mcScrollBar.mcHandle._height;
var percent = Math.round(mcScrollBar.mcHandle._y/h * 100)-1;
var contentH = holder_mc._height;
var newY = contentH*(percent/100);
holder_mc._y = -Math.round(newY);
}
There are circumstances where I will be manually updating the positon of the holder_mc to a specific _y position to simulate anchor tags. In this case, I need to update the position of the scroll handle to reflect the current _y of the holder_mc. I am having difficulty figuring out the math equations to update the scroll handle. Can anyone help?