View Sidebar
SWFFit – Flash Resize Script

SWFFit – Flash Resize Script

October 10, 2010 23:46

Often developers slog to develop a website which would be displayed properly on different screen sizes and resolutions. Nowadays most of the sites use Resize, Realign techniques to achieve this and reach larger audience. But everything goes haywire on smaller screen resolutions if window dimensions are smaller than content.

This is where this small javascript library comes in handy thanks to Miller Medeiros. It automatically resizes your flash to 100% width and 100% height (full bleed) when your browser window is greater than the minimum desired dimensions and resizes flash to the minimum desired size and activate the browser scrollbars when the browser window is smaller. It works with SWFObject which is used to embed flash file in html. Only two lines of code are required to do the trick.

Include the file in your html head tag.

<script type=”text/javascript” src=”swffit.js”></script>

And paste this after the swfobject embed code.“name of the flash object written in embed tag”, minimum width, minimumheight);

Click here for further details

Click to Download

If you like the article please share

Comments are closed