Friday, January 29, 2010

swffit auto-resizes Flash websites to browser window size

Among the many usability problems plaguing Flash websites is the problem of fluidity. Pure CSS based websites has the property of auto adjusting the contents of the page to fit the browser window size. If the window size is small the content can wrap itself to always remain visible. Of course, the site designer must allow for this behavior.

swffit_logoOn the other hand, on a Flash website if you set the Flash size to 100% width and/or height (full bleed) the browser won't generate scrollbars and maybe an important content will be hidden for the user. If you must use Flash on a website, you should take a look at swffit.

swffit, formerly called FitFlash, is a smart script that resizes your flash movie automatically if your browser window size is smaller or greater than your flash minimum desired size keeping it accessible independent of screen resolution.

swffit automatically resizes the Flash to 100% width and 100% height (full bleed) when your browser window is greater than the minimum desired size and resizes flash to the minimum desired size when the browser window is smaller. It can also resize the flash movie to a maximum size if the browser window size is greater than the maximum size.

Using swffit is simple. Just include the swffit.js Javascript file in your pages and then just call one simple javascript function with the desired dimensions.

<script type="text/javascript" src="swffit.js"></script>
<script type="text/javascript">
<!--"my_flash", 1000, 590);

You can find a number of live examples (and download link) at the bottom of this page.


Post a Comment

Popular Posts