# Movieclip resizes to width/height of browser

**URL:** <https://forum.kirupa.com/t/movieclip-resizes-to-width-height-of-browser/255915>\
**Category:** Uncategorized\
**Created:** [March 28, 2008, 6:47am UTC](https://forum.kirupa.com/t/movieclip-resizes-to-width-height-of-browser/255915 "2008-03-28T06:47:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubsfan](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@dubsfan](https://forum.kirupa.com/u/dubsfan)\
**Post date:** [March 28, 2008, 6:47am UTC](https://forum.kirupa.com/t/movieclip-resizes-to-width-height-of-browser/255915/1 "2008-03-28T06:47:59Z")

</div>

Hello

I have a Fla with many movieclips arranged on it. I’ve figured out how to reposition them dynamically in AS 2 using a listener (i.e. nav stays at bottom, main content in center regardless of user changing window size, etc.).

Now I want to add another movieclip (“vid\_bg” is the instance name) which always resizes to be the width and height of the browser. Think of it as a movieclip background under the other content that stretches to fill the browser.

Is there some code I can add to the function portion to make it resize just the one movieclip (but not the others) to 100% width and 100% height of browser. Thx for any help!

Here’s what I’m using for the non resizing movieclips:

function itemsalign() {

```
container_bg._x = Stage.width / 2 - 1280;
container_bg._y = Stage.height / 2 - 402;

container_popwelcome._x = Stage.width / 2 - 360;
container_popwelcome._y = Stage.height / 2 - 280;

container_main._x = Stage.width / 2 - 450;
container_main._y = Stage.height / 2 - 225;

container_portfolio_bg._x = Stage.width / 2 - 450;
container_portfolio_bg._y = Stage.height / 2 - 225;

container_art._x = Stage.width / 2 - 450;
container_art._y = Stage.height / 2 - 225;

container_bottom._x = Stage.width / 2 - 450;
container_bottom._y = Stage.height-120;

container_top._x = Stage.width / 2 - 450;
container_top._y = "0";

```

}

itemsalign();

var stageListener1:Object = new Object();  
stageListener1.onResize = function() {  
itemsalign();  
}

Stage.addListener(stageListener1);
