# Coordinates problem

**URL:** <https://forum.kirupa.com/t/coordinates-problem/260280>\
**Category:** Uncategorized\
**Created:** [May 14, 2008, 4:30am UTC](https://forum.kirupa.com/t/coordinates-problem/260280 "2008-05-14T04:30:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnlouis](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/johnlouis/32/568_2.png) [@johnlouis](https://forum.kirupa.com/u/johnlouis)\
**Post date:** [May 14, 2008, 4:30am UTC](https://forum.kirupa.com/t/coordinates-problem/260280/1 "2008-05-14T04:30:13Z")

</div>

how do I position a child movieclip of another movieclip on the stage relative to the stage, and still be able to position it relative to it’s parent when wanted?  
[whisper]i hope that makes sense[/whisper]

---

<div class="post-metadata">

**Author:** ![hasch2o](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@hasch2o](https://forum.kirupa.com/u/hasch2o)\
**Post date:** [May 14, 2008, 4:56am UTC](https://forum.kirupa.com/t/coordinates-problem/260280/2 "2008-05-14T04:56:34Z")

</div>

I hope I understood you correctly:

Let’s say you have MC1 and MC2, MC2 is child of MC1

```auto

function posToStage(yourX:Number,yourY:Number){
MC2.x = yourX - MC1.x;
MC2.y = yourY - MC1.y;
}

function posToParent(yourX:Number,yourY:Number){
MC2.x = yourX;
MC2.y = yourY;
}

```

hth
