# Math question

**URL:** <https://forum.kirupa.com/t/math-question/294968>\
**Category:** Uncategorized\
**Created:** [August 23, 2009, 4:22pm UTC](https://forum.kirupa.com/t/math-question/294968 "2009-08-23T16:22:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hakka](https://avatars.discourse-cdn.com/v4/letter/h/e99b99/32.png) [@hakka](https://forum.kirupa.com/u/hakka)\
**Post date:** [August 23, 2009, 4:22pm UTC](https://forum.kirupa.com/t/math-question/294968/1 "2009-08-23T16:22:20Z")

</div>

hi there,  
i am really stuck.  
I have a movieClip c and in this a movieClip called mc.  
mc has the regristration point in the middle.  
I would like to move c so that mc is in the center of the stage, but the problem is that mc is also rotated, so i need to calculate how much x and y I have to add because of the rotation.  
this is what i have so far. My stage is 600x300.

```auto

const MID_STAGE_Y:Number = 200;
const MID_STAGE_X:Number = 300;

c.x= MID_STAGE_X-c.mc.x;
c.y= MID_STAGE_Y-c.mc.y;
c.rotation = c.mc.rotation*-1;

```

To understand the problem I set up a test fla. please take a short look. Probably this is pretty easy for someone understanding the math behind it. I would love to understand it myself but did not get it till now. Thanks in advance for any reply on this !
