# Centralise container if Stage.height \> 1000

**URL:** https://forum.kirupa.com/t/centralise-container-if-stage-height-1000/291819
**Category:** flash
**Created:** [July 6, 2009, 10:08am UTC](https://forum.kirupa.com/t/centralise-container-if-stage-height-1000/291819 "2009-07-06T10:08:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![butbeautiful](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@butbeautiful](https://forum.kirupa.com/u/butbeautiful)
#### Post date: [July 6, 2009, 10:08am UTC](https://forum.kirupa.com/t/centralise-container-if-stage-height-1000/291819/1 "2009-07-06T10:08:18Z")

</div>

Hello.

I have a container its loaded content (700 pixels) is aligned to top but when the Stage.height is \> 1000, I want to have the container to be centralised and its footer is always aligned to the bottom no matter what the Stage height is.

Right now the footer doesn’t align to the bottom whichever height the Stage is. What went wrong in my codes?

My flash file is embedded to be ‘exact fit’ and ‘100%’

> Stage.scaleMode = “noScale”;  
> fscommand(“fullscreen”, “true”);

var stageListener:Object = {};  
stageListener.onResize = reposition;

Stage.addListener(stageListener);

function reposition():Void {  
if (Stage.width \> 1000) {  
sWidth = Stage.width;  
} else {  
sWidth = 1000  
}  
if (Stage.height \> 900) {  
container.\_y = (Stage.height - 700)/2  
footer\_mc.\_y = Stage.height - footer\_mc.height;  
} else {  
container.\_y = Stage.height - Stage.height  
footer\_mc.\_y = Stage.height - footer\_mc.height;  
}  
// footermc.\_y = Stage.height;  
}

reposition();  
container.loadMovie(“base.swf”,1);  
stop();
