00:00
00:00
Zanzlanz
Game developer and music producer! I made the Mine Blocks game(s).

Age 28, Male

Game Developer

Computer Scientist, 2018

Detroit

Joined on 9/9/11

Level:
17
Exp Points:
3,202 / 3,210
Exp Rank:
18,031
Vote Power:
5.94 votes
Audio Scouts
4
Art Scouts
1
Rank:
Scout
Global Rank:
35,815
Blams:
37
Saves:
226
B/P Bonus:
4%
Whistle:
Normal
Trophies:
5
Medals:
738
Supporter:
12y 2m 27d

Fixing Mouse Scroll in AS3

Posted by Zanzlanz - May 18th, 2016


Hi! Here's a quick tip for any Flash developers still out there!

In AS3, scrolling on the Flash Player will also scroll the page. The fix involving JavaScript injection is unhelpful because some sites don't allowScriptAccess, rendering the solution useless for most developers.

A better fix is to override the AS3 functionality with ActionScript 2 scrolling behavior. I present to you: Denis Kolyako's "MouseWheel" Class!

Here's my video explaining the solution:

Here's the download for the class: http://zanzlanz.com/YT/MouseWheel.as

I hope that helps someone!

- Zanz


Comments

Nice, thank you for sharing!

You're welcome! Thanks for commenting :)

Good stuff dude :)

Thanks WiLD!

Cool!