код скролинга, на всякий случай:
Код:
onClipEvent (load)
{
oldY = 1;
Y = 1;
vY = 0;
newY = 0;
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;
scrollContent = _parent.scrolledMC._y;
newY = _parent.scrolledMC._height;
var mouseListener = new Object();
mouseListener.onMouseWheel = function (delta)
{
if (buttonMC._y >= 0 && buttonMC._y <= scrollHeight - buttonSize + 1)
{
buttonMC._y = buttonMC._y - delta * _parent.mouse_speed;
} // end if
};
Mouse.addListener(mouseListener);
hiScroll = _parent.line._height - _parent.dragMC._height;
step = (scrollHeight - buttonSize - hiScroll) / hiScroll;
y = _parent.scrolledMC._y;
scrollContent = _parent.scrolledMC;
viewWidth = scrollContent._width;
mask = scrollContent._parent.createEmptyMovieClip
("mask", scrollContent._parent.getNextHighestDepth());
with (mask)
{
beginFill(255, 50);
lineStyle(0, 16711935, 100);
moveTo(scrollContent._x + 350, scrollContent._y );
lineTo(scrollContent._x - viewWidth, scrollContent._y );
lineTo(scrollContent._x - viewWidth, scrollContent._y + viewHeight + 5);
lineTo(scrollContent._x + 350, scrollContent._y + viewHeight + 5);
endFill();
} // End of with
scrollContent.setMask(mask);
}
onClipEvent (enterFrame)
{
if (_parent.drag_but)
{
if (buttonMC._y >= 0)
{
buttonMC._y = buttonMC._y - scrollStep;
} // end if
} // end if
if (_parent.down_but)
{
if (buttonMC._y <= scrollHeight + buttonSize)
{
buttonMC._y = buttonMC._y + scrollStep;
} // end if
} // end if
if (buttonMC._y <= 0)
{
buttonMC._y = 0;
} // end if
if (buttonMC._y >= viewHeight - buttonSize)
{
buttonMC._y = viewHeight - buttonSize;
} // end if
level = buttonMC._y - buttonY;
lev = int(y - level * step);
newY = oldY + (lev - oldY) / scrollSpeed;
_parent.scrolledMC._y = newY;
oldY = newY;
}