# Problem about \_x and \_y

**URL:** <https://forum.kirupa.com/t/problem-about--x-and--y/111967>\
**Category:** Uncategorized\
**Created:** [June 2, 2004, 3:52am UTC](https://forum.kirupa.com/t/problem-about--x-and--y/111967 "2004-06-02T03:52:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thybalt](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@thybalt](https://forum.kirupa.com/u/thybalt)\
**Post date:** [June 2, 2004, 3:52am UTC](https://forum.kirupa.com/t/problem-about--x-and--y/111967/1 "2004-06-02T03:52:23Z")

</div>

Need some help here guys. :be:

I made this movie with a square which follows \_xmouse and \_ymouse.  
I used ‘trace’ to output the corresponding \_x and \_y of the ‘square’ movieclip.  
This works perfectly fine.

However, when I tried to put this ‘square’ MC into another movieclip ‘container’. I could not correctly output the \_x and \_y of the ‘square’ movieclip. I suppose it is because the trace("\_x="+\_x) is referring to the \_x coordinates of the square INSIDE the ‘container’ MC. How do I output the \_x and \_y relative to the \_root coordinates.

Attached are the 2 fla files for reference.

Thank you for any help 🙂

[http://www.geocities.com/hytai\_83/square.fla](http://www.geocities.com/hytai_83/square.fla)  
[http://www.geocities.com/hytai\_83/square2.fla](http://www.geocities.com/hytai_83/square2.fla)
