SWFObject add-on: Size limiting for full window flash
[slug]swfforcesize[/slug]Here’s another add-on for SWFObject. This one allows you to create a full-window flash movie, but when the browser window is set below the specified size, the div containing the flash is kept at the minimum size and horizontal/vertical scrollbars are displayed.
Firstly, you have to remove the !DOCTYPE declaration from the very top of the HTML document, as, for some reason, this causes the browser to scroll, even though the flash container is set to 100% height. Then modify the CSS so the the html’s overflow is set to auto. Also, the #flashcontent div needs to have it’s positioning set to absolute, this stops Safari on Mac OS from showing the vertical scrollbar.
var so = new SWFObject(‘flash.swf’, ‘website’, ’100%’, ’100%’, ’8′, ‘#333333′);
if( so.write(‘flashcontent’) )
var forcesize = new SWFForceSize( so, 900, 600 );
When you call the ‘SWFForceSize’ constructor, the last two arguments are the minimum width and height of the movie, in this case the minimum size is 900×600 px.
Download SWFForceSize here.