# Full Browser Flash

**URL:** <https://forum.kirupa.com/t/full-browser-flash/194433>\
**Category:** Uncategorized\
**Created:** [July 23, 2006, 1:44pm UTC](https://forum.kirupa.com/t/full-browser-flash/194433 "2006-07-23T13:44:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![floydboy](https://avatars.discourse-cdn.com/v4/letter/f/7bcc69/32.png) [@floydboy](https://forum.kirupa.com/u/floydboy)\
**Post date:** [July 23, 2006, 1:44pm UTC](https://forum.kirupa.com/t/full-browser-flash/194433/1 "2006-07-23T13:44:52Z")

</div>

Hi all,

I’m new to this board so apologies if this is a question/topic that has been raised before. I have been experimenting with full browser flash sites for a while and have been looking at the different ways to set the background image to scale. I am currently using the following script to set the scaling values of the background swf to automatically adjust to the width and hieght of the browser window. However, would I would like to do is have a little more flexibility and limit how ‘distorted’ the background can become.

For a comparison…

[www.hi-res.net](http://www.hi-res.net) \<this site uses the code I currently have, which simply scales the background image to fit the width and height properties of the stage/browser window.

[www.dfgw.co.uk/flash.html](http://www.dfgw.co.uk/flash.html) \<this site shows what I would like to do. If you watch the background image it does scale, but doesn’t distort in the same fashion as Hi-Res. Instead, the code seems to adopt a ‘best fit’ approach, with some of the image moving off the stage in certain extreme width/height scenarios to stop it from distorting.

So, here’s my code (apologies it’s a bit messy). Does anyone have any suggetsions as to what the Action Script stage property for the Movieclip ‘testt’ would be to achieve something similar to DFGW??

// Assign a listener for the Stage object  
Stage.addListener(stageListener);

//new stuff here  
// \*\*\*Stage aligned top left  
Stage.align = “TL”;  
// \*\*\* Stop the stage from scaling with the browser window.  
Stage.scaleMode = “noScale”;  
stop ();  
// initiate postitions and scaling values for objects  
testt.\_width = Stage.width;  
testt.\_height = Stage.height;

// end initial position setting

//create a listner that checks to see if the browser window is resized  
sizeListener = new Object();  
sizeListener.onResize = function() {  
// change movieclip properties when the window is resized.  
testt.\_width = (Stage.width );  
testt.\_height = Stage.height;
