Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Actionscript 3, flexSDK, Blocking mouse wheel scrolling when it's over flash stage

I searched for this a lot, but I couldn't find a solution for this 'bug' as it's called here: http://fcontheweb.com/articles/scrollwheel/

Please, click on first flash, and use mouse wheel, then click on second flash and use mouse wheel again. Now You know perfectly what 'bug' I mean.

The thing is, I believe this bug can be solved WITHOUT externalinterface. This chat is made with AS 3: http://www.kongregate.com/games/UnknownGuardian/game-development-room-gdr Open 'codebox', hold ENTER to make a hundred of lines or so, and then test your mouse wheel.

It doesn't use any externalinterface technique (both obviously as it's Kongregate, and confirmed by author), just mx.component.textArea that itself implements the scrolling nicely.

I couldn't achieve that with even.preventDefault or stopPropagation. Any ideas?

E: Thank You, divillysausages! The question still isn't answered in 1% - what is textArea component's workaround?

like image 483
Markus von Broady Avatar asked Jan 19 '26 23:01

Markus von Broady


1 Answers

There's two methods proposed here: http://gamedev.rasmuswriedtlarsen.com/2010/01/18/quicktip-scrolling-only-in-swf-not-on-page/, but only the first one works on Kongregate

Apparently it uses ByteArray and LocalConnection to construct an AS2 swf that stops most browsers getting the scroll event

like image 95
divillysausages Avatar answered Jan 21 '26 18:01

divillysausages



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!