# AS for full screen

**URL:** https://forum.kirupa.com/t/as-for-full-screen/198410
**Category:** flash
**Created:** [August 24, 2006, 7:51pm UTC](https://forum.kirupa.com/t/as-for-full-screen/198410 "2006-08-24T19:51:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Multi\_Task](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Multi\_Task](https://forum.kirupa.com/u/Multi_Task)
#### Post date: [August 24, 2006, 7:51pm UTC](https://forum.kirupa.com/t/as-for-full-screen/198410/1 "2006-08-24T19:51:14Z")

</div>

Made first full screen flash. However, container\_mc doesnt move to center until window is resized (draged with cursor or minimized then reopened) thus if end user never resizes it container\_mc is always half way out of the window. Here is my AS can anyone tell me what I am doing wrong pleeeeeeeeeeeeeeeeease with a pretty in front of that please:

```auto

import flash.display.BitmapData;
container._x = (Stage.width / 2) - (container._width / 2);
container._y = (Stage.height / 2) - (container._height / 2);

var tile:BitmapData = BitmapData.loadBitmap("tile");
function fillBG() {
 this.beginBitmapFill(tile);
 this.moveTo(0,0);
 this.lineTo(Stage.width,0);
 this.lineTo(Stage.width,Stage.height);
 this.lineTo(0,Stage.height);
 this.lineTo(0,0);
 this.endFill();
}
fillBG();
var stageL:Object = new Object();
stageL.onResize = function() {
 fillBG();
 container._x = (Stage.width / 2) - (container._width / 2);
 container._y = (Stage.height / 2) - (container._height / 2);
}
stageL.onResize();
Stage.addListener(stageL);
 

```

Thanks in advance yall. I really appreciate it.  
MT
