Creating a Killer Flash Site - Update 9: Browser Zoom and Flash
Published May 28th, 2007 in: Flash
One of the biggest challenges developing Flash applications has always been getting Flash to correspond with the internal browser navigation. Deep linking, back button, bookmarking, resizing and scrolling, just to name a few. In the resent years we have been able to solve almost all of these issues. One issue that has not yet received much focus is how Flash corresponds with browser text size/resizing and the more recent addition of browser zoom.
Zooming
Normally, if a SWF file is published without any browser adaptations, the movie will zoom in/out when ctrl + mousewheel/+/-/0 are triggered. This is just fine in some cases, but is problematic if you have an application with its own internal scrolling-logic. Why? Because the browser adds its own scrollbars when the zoom is above 100%, and you'll end up with a double set of scrollbars. Not good!
In this application (my website), and as I've previously posted, there is a mousewheel listener implemented through ExternalInterface. This has the added benefit that it also overrides the browsers mousewheel listener so I can implement my own zooming. However, this ctrl+mousewheel combination only works on Internet Explorer. I'm working on a solution for the other browsers. I'm hoping it will be possible to "steal/bypass" the ctrl-keyPress from the DOM, and then (based on the browsertype) do some logic in actionscript to trigger the zoomHandler.
It should also be noted that on the MacOS it is not possible to override these functions, because the OS has its own accessibility-tools implemented system wide. It basically takes a bitmap-snap of the current screen, and manipulates that (zoom/invert etc.) My mousewheel-listener does not appear to get into any conflicts with these built-in functions, so it's not a problem.
About
You are currently browsing the Øystein Wika weblog.
Blog Feed
Recent Posts
- The perfect 40th Birthday Gift
- onAIR tour Europe
- Flex/AIR Pre-Release Tour: Oslo
- Papervision3D Test
- Designing Wika Media
- Flash on the Beach '07
- Linpro wins NUUG Award
- SWFMouseWheel (alpha)
- Flash Player gets H.264 support
- Flash Business Logic
- Oslo Flash Platform User Group
- AIR Chat - Live from Dallas
- I got Pownce Invites
- Adobe onAIR Bus Tour Summer '07
- New Project: CTRL7.com