# Full Browser (centered without resizing window)

**URL:** <https://forum.kirupa.com/t/full-browser-centered-without-resizing-window/150719>\
**Category:** Uncategorized\
**Created:** [June 9, 2005, 7:33pm UTC](https://forum.kirupa.com/t/full-browser-centered-without-resizing-window/150719 "2005-06-09T19:33:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![uncius](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@uncius](https://forum.kirupa.com/u/uncius)\
**Post date:** [June 9, 2005, 7:33pm UTC](https://forum.kirupa.com/t/full-browser-centered-without-resizing-window/150719/1 "2005-06-09T19:33:30Z")

</div>

[font=Arial]What I do wrong in the code below, that object is not centered unless the window resized. It cause unpleasant “jump” beside bad positioning at the start:[/font]

Stage.align = “LT”;  
Stage.scaleMode = “noScale”;  
stageListener = new Object();  
stageListener.onResize = function ()  
{

}

Stage.addListener(stageListener);

stageListener.onResize = function ()  
{

var stageXCenter = Stage.width \* .5;  
var stageYCenter = Stage.height \* .5;

myClip.\_x = stageXCenter;  
myClip.\_y = stageYCenter;  
}
