During the last project I worked on for ChocolatFrey I had a small problem that was bugging me. with the help of our inhouse stagemanager class where you can define minimum width & height of the stage the flash website always looked good, but as sson as the screen was smaller then the minimum defined width & height it broke the layout.
After a few minutes of searching I found this awesome little JavaScript called SWFFit it resizes the flash movie based on the minimum dimensions set.
The usage of it is let’s say SIMPLE!! Even if you didn’t really care about JS, you can easily understand how it works, this is a simple example of how to use it:
swffit.fit("my_flash", 960, 670);
What the script above would do, is just create browser scrollbars when the defined size has been reached.
You can even set more options like min/max width & height and how the flash content should be centered.
Below a short explanation of the possible options:
swffit.fit('flashID', minW, minH, maxW, maxH, hCenter, vCenter);
flashID: the id of the flash embed/object tag
minW: minimum width in pixels
minH: minimum height in pixels
maxW: maximum width in pixels
maxH: maximumheight in pixels
hCenter: flash content will be centered horizontally when the maximum size has been reached ( Boolean )
vCenter: flash content will be centered vertically when the maximum size has been reached ( Boolean )
This is one of the Javascripts that should always be handy as Flash Developer together with SWFObject & SWFAddress.
So go have a look at it, and try it out, I can only recommend it and give a big thank you out to Miller Medeiros for sharing this with us.

The Must have: SWFFit by Tiago's Weblog, unless otherwise expressly stated, is licensed under a Creative Commons Attribution 2.5 Switzerland License.




It’s Medeiros not Demeiros
You can also check out his blog, it’s a “must have” in your Bookmarks or RSS Feed : http://blog.millermedeiros.com/
Thanks JHead.