Accessing ActionScript MouseWheel scroll Delta for all screen resolutions

While some of you may have known this already but the delta value (booth AS3 & AS1/2) depends on the Operating Systems’ scroll settings, namely the scroll speed which can be different from system to system. Some systems scroll 3 lines at a time, some 7, some scroll an entire page.

So the best way to normalize this is by using Math.abs() like so:

var scroll = delta / Math.abs(delta);

Leave a Reply

Your email address will not be published. Required fields are marked *