Here is the code inside the scroll button:
onClipEvent (load)
{
oldY = 1;
Y = 1;
vY = 0;
newY = 0;
mouseWheelHitTest = true;
contentHeight = _parent.scrolledMC._height;
scrollSpeed = _parent.speed_content;
scrollStep = _parent.step_content;
viewHeight = _parent.line._height;
buttonSize = _parent.dragMC._height;
buttonY = buttonMC._y;
scrollHeight = _parent.scrolledMC._height + 875;
scrollContent = _parent.scrolledMC._y;
scrollContent1 = _parent.scrolledMC;
newY = _parent.scrolledMC._height;
var mouseListener:Object = new Object();
mouseListener.onMouseWheel = function(delta)
{
if (!mouseWheelHitTest || scrollContent1.hitTest(_root._xmouse, _root._ymouse, false) || hitTest(_root._xmouse, _root._ymouse, false))
{
if (buttonMC._y>=0 && buttonMC._y<=scrollHeight-buttonSize+1)
{
buttonMC._y -= (delta)*_parent.mouse_speed;
}
}
};
Mouse.addListener(mouseListener);
hiScroll = _parent.line._height-_parent.dragMC._height;
step = ((scrollHeight-buttonSize)-(hiScroll))/(hiScroll);
y = _parent.scrolledMC._y;
}
onClipEvent (enterFrame)
{
if (_parent.drag_but)
{
if (buttonMC._y>=0)
{
buttonMC._y -= scrollStep;
}
}
if (_parent.down_but)
{
if (buttonMC._y<=scrollHeight+buttonSize)
{
buttonMC._y += scrollStep;
}
}
if (buttonMC._y<=0)
{
buttonMC._y = 0;
}
if (buttonMC._y>=viewHeight-buttonSize)
{
buttonMC._y = viewHeight-buttonSize;
}
level = buttonMC._y-buttonY;
lev = int(y-(level*step));
newY = oldY+(lev-oldY)/scrollSpeed;
_parent.scrolledMC._y = newY;
oldY = newY;
}
And here is code on the top of the frame for the pane:
mouse_speed = 2;
speed_content = 6;
step_content = 10;
step = 5;
scrolledMC.setMask(mask);
stop();
Can you also show the code for one of the links that changes the section? That is likely where you will be adding some code to reset the positions of things.
I cannot be sure, but my best guess would to offer that the code that changes the sections will need to set the buttonMC._y value and the scrolledMC._y value both to zero (or whatever values they normally start at).