# MovieClip Location (x and y)

**URL:** <https://forum.kirupa.com/t/movieclip-location-x-and-y/73253>\
**Category:** flash\
**Created:** [December 14, 2004, 4:37pm UTC](https://forum.kirupa.com/t/movieclip-location-x-and-y/73253 "2004-12-14T16:37:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodeLegion](https://avatars.discourse-cdn.com/v4/letter/c/ed655f/32.png) [@CodeLegion](https://forum.kirupa.com/u/CodeLegion)\
**Post date:** [December 14, 2004, 4:37pm UTC](https://forum.kirupa.com/t/movieclip-location-x-and-y/73253/1 "2004-12-14T16:37:22Z")

</div>

Yo guys and gals, im trying to load a movie clip from the libary and get it to match the x and y coordinates of the move of which it is called from. I.e roll over Home movieclip and then this movieclip appears over the home movie instance.

Here is my code:

**on (rollOver) {  
targetX = Home.\_x;  
targetY = Home.\_y;  
\_root.attachMovie(“Button\_Effect”,BeClip1,0);  
BeClip.\_x = targetX;  
BeClip.\_y = targetY;  
}**

thanks in advance legion.  
p.s sorry if it is a stupid question lol. :thumb:
