Archive for category Adobe RIA
Flash ScrollPane Mouse Wheel Event
Posted by Scott in Adobe RIA, Blog, Web Browsers, Web Development on December 10, 2010
Getting the ScrollPane in flash to work with a mouse wheel can be tricky. It will not allow the mouse wheel to scroll if there is not acutal content right underneath the mouse pointer. This can be cumbersome for dynamic content in the pane. To fix this, you can use the following AS3 code to scroll the ScrollPane without having to mess with background sizes in the pane.
1: // Listen for mouse wheel event on the stage to scroll content
2: stage.addEventListener( MouseEvent.MOUSE_WHEEL,
3: function( event:MouseEvent ):void
4: {
5: if( scrollPane !== null )
6: {
7: scrollPane.verticalScrollPosition += - ( event.delta * 8 );
8: }
9: });
You can adjust the “( event.delta * 8 )” to only “event.delta” if you don’t want to change the amount of scrolling that is performed.
Flash and the Scroll Wheel in the Browser
Posted by Scott in Adobe RIA, Blog, Web Browsers, Web Design, Web Development on December 9, 2010
I have built many AS3 flash apps before, but on this one project I needed to enable scrolling with the mouse wheel. I added a flash scrollpane but it would not respond to the mouse wheel. So I tried adding an event listener to the entire stage to see if I could capture any mouse wheel event. No luck with that either. Countless searches turned up maybe two possible resolutions to the problem, but they did not work either.
The resolution was out there to find, but I did not find it because I didn’t use the right keywords.
The resolution revealed to me was the parameter called “wmode”. The wmode param has three values; opaque, transparent, window(default). While normally most people do not set this parameter, I have a habit of setting it due to it’s necessity when building flash widgets for various web pages. In this case, if you set wmode to either transparent or opaque, the flash will not detect the mouse scroll wheel at all. So be sure not to set this parameter. If you do set it to “window” otherwise your flash app will not detect the mouse wheel events.
Adobe Air Web Browser
Posted by Scott in Adobe RIA, Blog, Web Browsers, Web Development on May 31, 2008
I’ve been playing with Flex and Adobe Air for a while now, and I’ve wanted to test the abilities of the Air HTML component for future projects. So I built my own mini Air Web Browser.
