swffit - Smart Flash Resize Script
February 5th, 2010 by
Adrian Parr
I remember stumbling across swffit ages ago, but never really gave it much thought at the time. However, a little while ago I put a small Flash site together (www.beauseat.com) for a friend, and it was scaled to fill the browser window. But when you resized the browser down to a small size you lost some of the navigation at the bottom. But today I re-found swffit, and it was just what I needed. It is really easy to use and just works!
Check out the swffit site and Google Code site
Thanks Miller Medeiros

February 22nd, 2010 at 11:42 am
An alternative to this seems to be SWFsize …
http://chargedweb.com/swfsize/
April 7th, 2010 at 5:21 pm
Yeah, that’s my lib. Well, can’t say it’s an alternative, these two libs are a bit different, but still i use them both ^_^
April 10th, 2010 at 4:32 am
Can you tell exactly how you put it? Been trying, it’s failing.
April 13th, 2010 at 2:23 pm
Well, it’s all listed at the docs: http://chargedweb.com/swfsize/docs.html
Here’s a sample code on how to include the swfsize in yr project:
var attributes = {id:’swfID’};
var flashvars = {};
var params = {menu:’false’};
swfobject.embedSWF(’mywebsite.swf’, ‘mywebsite’, “100%”, “100%”, ‘9′, ‘expressInstall.swf’, flashvars, params, attributes);
// now all you need to do is pass swf’s attributes.id to SWFSize
swfsize.id = attributes.id;
That’s it. You just have to implement this line to enabled swfsize:
swfsize.id = attributes.id;
And inside your as3 project simple call the singleton construction to initialize the lib:
// import the SWFSize api
import com.chargedweb.swfsize.SWFSize;
import com.chargedweb.swfsize.SWFSizeEvent;
// initialize SWFSize
var swfSizer:SWFSize = SWFSize.getInstance();
April 13th, 2010 at 2:34 pm
Hi Arrow,
I’m not sure if you are trying to use swffit or SWFsize.
jloa has posted some sample code for using SWFsize above.
swffit is really straight forward to use too. Firstly, link to the JavaScript file in your HTML …
And then you need to call the ‘fit’ method in your JavaScript in your HTML page, and pass the attributeId, minWidth and minHeight …
View the HTML source of this page to see what I did …
http://www.beauseat.com
I hope that helps.
The documentation on the swffit site is pretty clear and easy to follow.