# Help with scaling a MC in a fluid layout

**URL:** <https://forum.kirupa.com/t/help-with-scaling-a-mc-in-a-fluid-layout/319315>\
**Category:** Uncategorized\
**Created:** [February 16, 2011, 4:36am UTC](https://forum.kirupa.com/t/help-with-scaling-a-mc-in-a-fluid-layout/319315 "2011-02-16T04:36:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![media\_mixx](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@media\_mixx](https://forum.kirupa.com/u/media_mixx)\
**Post date:** [February 16, 2011, 4:36am UTC](https://forum.kirupa.com/t/help-with-scaling-a-mc-in-a-fluid-layout/319315/1 "2011-02-16T04:36:55Z")

</div>

Hello,

I am using the following code on individual movie clips to keep the object centered in a fluid layout:

onClipEvent(load){

```
this._x= (Stage.width)/2;
this._y= (Stage.height)/2;

Stage.addListener(this)
this.onResize=function(){
	this._x= (Stage.width)/2;
	this._y= (Stage.height)/2;
}

```

}

My question is this: Cn I add/modify to this code to make the MC scale proportionately up as I drag the browser window farther open?

Right now it stays centered but it stays the same size.

I am a cut and paster with code so be gentle.

Any help would be greatly appreciated.

Thank you
