# localToGlobal function

**URL:** <https://forum.kirupa.com/t/localtoglobal-function/79010>\
**Category:** flash\
**Created:** [February 9, 2005, 10:00pm UTC](https://forum.kirupa.com/t/localtoglobal-function/79010 "2005-02-09T22:00:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chapster](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@chapster](https://forum.kirupa.com/u/chapster)\
**Post date:** [February 9, 2005, 10:00pm UTC](https://forum.kirupa.com/t/localtoglobal-function/79010/1 "2005-02-09T22:00:30Z")

</div>

I asked this on another forum but got no answer to it I thought this would be an easy one to solve but it’s been kicking my butt for a while now. I can never get this function to work like it’s meant to do.

I have a mc in an external swf that loads into a movieClip on the main swf.  
this all works.

The clip in the external swf has a registration point set to left center. Now in the main swf I have an overlay solid mc on the root level that I need to cover over the loaded in mc. So I set the registration point of the overlay solid the same as the external mc. Then I tried to use local to global but it didn’t end up matching.  
What am I doing wrong.

```auto

function local_global(externalClip) {
	point = {x:externalClip._x, y:externalClip._y};
	trace("externalClip :"+externalClip);
	textPanel.localToGlobal(point);
	textPanel._x = point.x;
	textPanel._y = point.y;
}

```

Here is also a link to the two fla movies.  
[LINK TO FLA](http://www.artaholic.com/localtoglobal.zip)

Any help on this would be great as it’s giving me a hard time.
