# How to get the global position of the movieclip

**URL:** <https://forum.kirupa.com/t/how-to-get-the-global-position-of-the-movieclip/33772>\
**Category:** Uncategorized\
**Created:** [October 23, 2003, 1:42pm UTC](https://forum.kirupa.com/t/how-to-get-the-global-position-of-the-movieclip/33772 "2003-10-23T13:42:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBUH](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@SBUH](https://forum.kirupa.com/u/SBUH)\
**Post date:** [October 23, 2003, 1:42pm UTC](https://forum.kirupa.com/t/how-to-get-the-global-position-of-the-movieclip/33772/1 "2003-10-23T13:42:01Z")

</div>

Hello, I have one movieclip A within another movieclip B , and I use button to move movieclip B up and down. Then how can I get the position value of the movieclip A ( the global position not the relative position to movieclip B ). Thanks very much in advance and wait for your reply!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 23, 2003, 4:05pm UTC](https://forum.kirupa.com/t/how-to-get-the-global-position-of-the-movieclip/33772/2 "2003-10-23T16:05:25Z")

</div>

Look up the [font=courier new]MovieClip.localToGlobal()[/font] method in the ActionScript Dictionary. 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 24, 2003, 12:00pm UTC](https://forum.kirupa.com/t/how-to-get-the-global-position-of-the-movieclip/33772/3 "2003-10-24T12:00:01Z")

</div>

hi, I have checked but still now sure about how should do with it. Could u have some detailed guide about it.

I have the movieclip A in movieclip B with the relative position of x: -15.8 and y: -22.8

Then I have the button for moving movieclip B up with  
the action like  
on (release) {  
\_root.B.\_y -= 5;  
}

So the movieclip A is moved at the same time within movieclip B  
Then how should I write the code to get the global position of movieclip A then ?

Thanks very much in advance !

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 24, 2003, 5:31pm UTC](https://forum.kirupa.com/t/how-to-get-the-global-position-of-the-movieclip/33772/4 "2003-10-24T17:31:07Z")

</div>

```auto
var p = {x:b.a._x, y:b.a._y};
b.a._parent.localToGlobal(p);
trace("x:"+p.x+"\ry:"+p.y);

```

??
