# X and Y in Full Screen

**URL:** <https://forum.kirupa.com/t/x-and-y-in-full-screen/171918>\
**Category:** flash\
**Created:** [December 9, 2005, 9:17am UTC](https://forum.kirupa.com/t/x-and-y-in-full-screen/171918 "2005-12-09T09:17:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dinsdale](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@Dinsdale](https://forum.kirupa.com/u/Dinsdale)\
**Post date:** [December 9, 2005, 9:17am UTC](https://forum.kirupa.com/t/x-and-y-in-full-screen/171918/1 "2005-12-09T09:17:57Z")

</div>

Hi,

I have made a flash doc in fullscreen and can control X and Y from left and top ([http://www.bremell.com/fullscreen/start.htm](http://www.bremell.com/fullscreen/start.htm)). The red square is set to always stay in middle of the window.

But how do I control bottom and right side of the document? For example see [http://www.christianehaid.de/index2.html](http://www.albrechtgerlach.com/)

This is the code I’m using:  
//////////////////////////////////////////////////////////////////  
// set the stage object  
Stage.scaleMode = “noScale”;  
Stage.align = “LT”;  
//set the intial size of our movie clips when the movie first starts  
window\_mc.\_height = Stage.height;  
window\_mc.\_width = Stage.width;  
window\_mc.\_x = 0;  
window\_mc.\_y = 0;  
mainContent.\_x = Stage.width/2;  
mainContent.\_y = Stage.height/2;  
//add the stage listener incase the user re-sizes the window  
window\_mc.onResize = function() {  
this.\_width = Stage.width;  
this.\_height = Stage.height;  
this.\_x = 0;  
this.\_y = 0;  
};  
Stage.addListener(window\_mc);  
mainContent.onResize = function() {  
this.\_y = Stage.height/2;  
this.\_x = Stage.width/2;  
};  
Stage.addListener(mainContent);  
//////////////////////////////////////////////////////////////////

Regards,

Dinsdale
