# Align object during stage resize and fullscreen

**URL:** <https://forum.kirupa.com/t/align-object-during-stage-resize-and-fullscreen/279167>\
**Category:** flash\
**Created:** [January 10, 2009, 1:29pm UTC](https://forum.kirupa.com/t/align-object-during-stage-resize-and-fullscreen/279167 "2009-01-10T13:29:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scarjoh](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@scarjoh](https://forum.kirupa.com/u/scarjoh)\
**Post date:** [January 10, 2009, 1:29pm UTC](https://forum.kirupa.com/t/align-object-during-stage-resize-and-fullscreen/279167/1 "2009-01-10T13:29:42Z")

</div>

If my movie clip in which I am loading external swf alings itself on stage like this:

```auto
swfLoader = new Loader();
var swfRequest:URLRequest = new URLRequest(url);
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadComplete);
swfLoader.load(swfRequest);

function LoadComplete(e:Event):void {

swf_mc.addChild(swfLoader);
[COLOR=Red] swf_mc.x = Math.floor((stage.stageWidth / 2) - (swfLoader.content.width/2));
swf_mc.y = Math.floor((stage.stageHeight / 2) - (swfLoader.content.height/2));[/COLOR]

}

```

how can I pass these values in these 2 functions:

```auto
stage.addEventListener(Event.RESIZE , resizing );
function resizing(e:Event = null):void {
  
}

stage.addEventListener(Event.FULLSCREEN, handleFullScreen);
function handleFullScreen(e:FullScreenEvent):void {
    if (e.fullScreen) {

    } else {

    }
}

```

Because swfLoader.content.width and swfLoader.content.height wont be accesible outside ‘LoadComplete’ function, so I really dont know how to handle that, please help!
