Tag Archive for 'resize'

Flash JavaScript Resizer - fill the browser window without cropping

Creating Flash content that fills the entire browser window right up to the chrome is nothing new. Normally it is accomplished by setting the swf’s width and height to 100% in the object and embed tags and controlling how different elements respond to resizing with ActionScript within the Flash Movie. But in a recent project I needed to ensure that the swf did not scale below a certain size so that the browser is forced to display it’s scrollbars. This is because while the stage of the movie scales the main content is not scaled, only centered. That makes the browser crop your swf, effectively rendering the use of small(er) screen resolutions impossible.

See for yourself: Resize Example

Because of this I had to write a small JavaScript to gain back some control over how the move resized. Here you go, you can either download only the JS-file or the entire zipped example above.

flashresizer.js flashresizer.js

ResizeExample.zip Entire zipped example

Enjoy!