# Resize and stage.stageHeight

**URL:** <https://forum.kirupa.com/t/resize-and-stage-stageheight/310824>\
**Category:** Uncategorized\
**Created:** [June 20, 2010, 6:50pm UTC](https://forum.kirupa.com/t/resize-and-stage-stageheight/310824 "2010-06-20T18:50:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknownelementx](https://avatars.discourse-cdn.com/v4/letter/u/85f322/32.png) [@unknownelementx](https://forum.kirupa.com/u/unknownelementx)\
**Post date:** [June 20, 2010, 6:50pm UTC](https://forum.kirupa.com/t/resize-and-stage-stageheight/310824/1 "2010-06-20T18:50:00Z")

</div>

I have two problems.

1. the page still will not resize properly until the window is resized. I assume I have the code wrong somehow.

2. I changed the height of my menu object to stage.stageHeight, but its now coming up squished and only about 30% of the actual height of the stage. I am not sure what I did as it seemed to be working before, but I cant seem to fix it.

```auto
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, stageresizeListener); 

function stageresizeListener (e:Event):void {
positioner(null);
scale(null);
contentsmcright(null);
} 

function positioner (e:Event):void {
menu.x = 0;
menu.y = 0;
window.x = 0;
window.y = 0;
Contentsmc.y = 347.9;
window.scaleX = window.scaleY;
window.height = stage.stageHeight;
window.width = stage.stageWidth;
menu.scaleX = menu.scaleY;
Contentsmc.scaleX = Contentsmc.scaleY;
} 

function scale (e:Event):void {
    if( stage.stageHeight > 400){
        menu.height = stage.stageHeight
        Contentsmc.height = stage.stageHeight + 2976
    }else{
        menu.height = 400
        Contentsmc.height = 400 + 2976;
    }}

function contentsmcright (e:Event):void {
    if( stage.stageWidth > menu.width/2 + 400)
        Contentsmc.x = stage.stageWidth - 400
    else
        Contentsmc.x = menu.width/2;
}
//Initialize
stageresizeListener(null);

```
