开发者

MouseWheel Trace Works in Debug Mode, not Test

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜