开发者

MouseWheel Trace Works in Debug Mode, not Test

开发者 https://www.devze.com 2023-01-07 23:11 出处:网络
Here is my code in its entirety. It won\'t trace when I Test Movi开发者_StackOverflow中文版e, but when I debug, it works fine.

Here is my code in its entirety. It won't trace when I Test Movi开发者_StackOverflow中文版e, but when I debug, it works fine.

import flash.events.*;

function scrollWheelHandler(e:MouseEvent){
    trace(e.delta);
}

stage.addEventListener(MouseEvent.MOUSE_WHEEL, scrollWheelHandler);

I hate flash. This is in a new project btw. wtf is going on?


MouseWheel events don't register with Flash Player on Mac.


There're some libraries to support failure of MouseWheel events on Mac.

SWFWheel is one of it and widely used by Japanese ActionScript communities. http://www.libspark.org/wiki/SWFWheel/en

This uses Javascript to detect MouseWheel events via ExternalInterface.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号