# Resizing images in mc from center point

**URL:** <https://forum.kirupa.com/t/resizing-images-in-mc-from-center-point/221079>\
**Category:** Uncategorized\
**Created:** [April 1, 2007, 7:26am UTC](https://forum.kirupa.com/t/resizing-images-in-mc-from-center-point/221079 "2007-04-01T07:26:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)\
**Post date:** [April 1, 2007, 7:26am UTC](https://forum.kirupa.com/t/resizing-images-in-mc-from-center-point/221079/1 "2007-04-01T07:26:14Z")

</div>

hi guys,  
I have an image that loads into an emty mc. When mouse over a button, i want the image to increase in size from the center. I am using a basic script that resizes the mc.

```auto

this.onEnterFrame =function(){
        this._width += (w-this._width)/speed;
        this._height += (h-this._height)/speed;
        this._alpha -= step;
        trace(this._width);
        if (Math.abs(this._width)>w and this._alpha<=0) {
            delete this.onEnterFrame;
        }
}

```

However the image resizes from the top left corner rather than resize from the center.

How do i acheive it so it resizes from the center?

Thanks

Daniel
