# Resizing flash poroprtionately with browser

**URL:** <https://forum.kirupa.com/t/resizing-flash-poroprtionately-with-browser/224687>\
**Category:** Uncategorized\
**Created:** [May 4, 2007, 1:26pm UTC](https://forum.kirupa.com/t/resizing-flash-poroprtionately-with-browser/224687 "2007-05-04T13:26:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandesign](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@brandesign](https://forum.kirupa.com/u/brandesign)\
**Post date:** [May 4, 2007, 1:26pm UTC](https://forum.kirupa.com/t/resizing-flash-poroprtionately-with-browser/224687/1 "2007-05-04T13:26:06Z")

</div>

Hi, I have a flash site that has various background images taking up the full browser window while the foreground elements remain the same. My problem is I want the background images to scale proportionately so they don’t distort. A example of what I have been trying to pull off is [redtettemer.com](http://redtettemer.com).

This is the script I am using where portfolio\_bg is the mc that has the background images:

Stage.scaleMode = “noScale”;  
Stage.align = “TL”;

var stageListener:Object = new Object ();  
stageListener.onResize = positionContent;  
Stage.addListener(stageListener);

function positionContent():Void {  
portfolio\_bg.\_width = Stage.width;  
portfolio\_bg.\_height = Stage.height;

}

positionContent();

any ideas? thanks in advance.
