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

Age 27, Male

Game Developer

Computer Scientist, 2018

Detroit

Joined on 9/9/11

Level:
17
Exp Points:
3,166 / 3,210
Exp Rank:
17,226
Vote Power:
5.93 votes
Audio Scouts
4
Art Scouts
1
Rank:
Scout
Global Rank:
35,747
Blams:
37
Saves:
225
B/P Bonus:
4%
Whistle:
Normal
Trophies:
5
Medals:
716
Supporter:
11y 6m 4d

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!