# Converting x y coordinates to stage coordinates using globalToLocal

**URL:** https://forum.kirupa.com/t/converting-x-y-coordinates-to-stage-coordinates-using-globaltolocal/108605
**Category:** Uncategorized
**Created:** [April 27, 2004, 12:51am UTC](https://forum.kirupa.com/t/converting-x-y-coordinates-to-stage-coordinates-using-globaltolocal/108605 "2004-04-27T00:51:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![daheroes](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@daheroes](https://forum.kirupa.com/u/daheroes)
#### Post date: [April 27, 2004, 12:51am UTC](https://forum.kirupa.com/t/converting-x-y-coordinates-to-stage-coordinates-using-globaltolocal/108605/1 "2004-04-27T00:51:12Z")

</div>

Hi.

I was wondering if someone could show me an example of the MC.globalToLocal() function. I have a pointer that aims at a moving clip… however, I need to make it so that the pointer follows the moving clip, not just the moving clip in relation to its parent clip…

That was really convoluted… I have a zip file attached, which is way more helpful.

in the file, right now, the pointer targets \_root.s2.yo but if I move the \_root.s2 clip, then the pointer still follows where the yo clip would be, but it’s offset…

any help would be greatly appreciated.
