嘿,我建立了自定义滚动框。当我在此框上向上滚动时,滚动元素正在向下滚动,而当我向下滚动时-滚动元素正在向上滚动;)。我想扭转这种机制。我该怎么做 ?在我的鼠标代码下方
import flash.events.MouseEvent;
function handleMouseWheel(event:MouseEvent):void {
if ((event.delta > 0 && box_mc.y < 171) || (event.delta < 0 && box_mc.y > 135))
{
box_mc.y = box_mc.y + (event.delta * 3);
sb.thumb.y = sb.thumb.y + (event.delta * 13);
trace(box_mc.y);
trace(event.delta);
}
}
stage.addEventListener(MouseEvent.MOUSE_WHEEL, handleMouseWheel);