Elastic Flash with scrollbars
In the past couple of years it has been common for Flash developers to design elastic sites, rather than sites with fixed dimensions. These elastic sites fill the browser window, and content is positioned programatically on the stage according to the size of the viewport. The trouble with this approach is that because the width and height of the embedded Flash swf are set to 100%, the browser will never display scrollbars. If the user sizes their browser window too small then content will begin to disappear off screen. Due to the lack of scrollbars, this hidden content is inaccessible to the user.
The download pack contains all of the files used in the FlashScaler demo. If you take a look at the HTML, Flash and CSS files included in the pack it shouldn’t be hard to figure out how it all fits together. Feel free to use my FlashScaler class in any of your personal or commercial projects.
The current version has been tested in the following browsers but probably works in older browsers too:
- Firefox 3+
- Internet Explorer 6+
- Safari 3 (Mac), Safari 4 (PC)
- Chrome 4
- Opera 9
Previous versions of FlashScaler have been confirmed to work in Firefox 1, Safari 1.3, and IE5, and Netscape 8, so it is safe to say that FlashScaler works in any modern browser.
v1.1, 04 March 2010:
I have updated FlashScaler to take advantage of the callback feature introduced in SWFObject 2.2. Now, when Flash detection fails, FlashScaler is disabled.