0
嘿,我建立了自定義滾動框。當我在這個框上滾動滾動元素會下降,當我向下滾動 - 滾動元素正在上升;)。我想扭轉這種機制。我該怎麼做 ? 下面我爲鼠標代碼as3鼠標滾輪反轉
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);