User:Deepak bishukarma bika/sandbox

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.line; 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; } 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; }

mouse_speed = 2; speed_content = 6; step_content = 10; step = 5; scrolledMC.setMask(msk);

on (press) {   startDrag ("", false, 0, 0, 0, _parent._parent.line._height - _parent._parent.dragMC._height); } on (release, releaseOutside) {   stopDrag ; }