# What will be the stage width and height?

**URL:** https://forum.kirupa.com/t/what-will-be-the-stage-width-and-height/330094
**Category:** flash
**Created:** [November 29, 2012, 6:44pm UTC](https://forum.kirupa.com/t/what-will-be-the-stage-width-and-height/330094 "2012-11-29T18:44:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![learner\_7n](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@learner\_7n](https://forum.kirupa.com/u/learner_7n)
#### Post date: [November 29, 2012, 6:44pm UTC](https://forum.kirupa.com/t/what-will-be-the-stage-width-and-height/330094/1 "2012-11-29T18:44:33Z")

</div>

Hi,

I have a Bkg\_mc which is registered to top left corner. Now, how can I change the code to keep my Bkg\_mc top left corner when the browser window resizes.

The following is the code:

```auto
stage.addEventListener(Event.RESIZE, resizeListener); 
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
Bkg.x = stage.stageWidth/2; 
Bkg.y = stage.stageHeight/2;

function resizeListener (e:Event):void {
}

```

The lines to be modified here are:  
[COLOR=#ff0000]Bkg.x = stage.stageWidth/2;[/COLOR]  
[COLOR=#ff0000]Bkg.y = stage.stageHeight/2;[/COLOR]
