# Calculating two positions, in the middle

**URL:** https://forum.kirupa.com/t/calculating-two-positions-in-the-middle/242137
**Category:** flash
**Created:** [October 22, 2007, 9:16pm UTC](https://forum.kirupa.com/t/calculating-two-positions-in-the-middle/242137 "2007-10-22T21:16:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gregmax](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@gregmax](https://forum.kirupa.com/u/gregmax)
#### Post date: [October 22, 2007, 9:16pm UTC](https://forum.kirupa.com/t/calculating-two-positions-in-the-middle/242137/1 "2007-10-22T21:16:14Z")

</div>

I know how to calculate the distance between two movieclips, but I want to know how do you keep a movieclip centered between two movieclips? For example, three movie clips evenly spaced out in a row. I drag either movie clip on the end and the one movie clip in the center positions it self to be in the center x and y wise.

Does anyone know to accomplish this feat?

Thank you
