# localToGlobal way off, Y is right, but X is right

**URL:** <https://forum.kirupa.com/t/localtoglobal-way-off-y-is-right-but-x-is-right/304948>\
**Category:** flash\
**Created:** [February 17, 2010, 1:42am UTC](https://forum.kirupa.com/t/localtoglobal-way-off-y-is-right-but-x-is-right/304948 "2010-02-17T01:42:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hokeyplyr48](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@hokeyplyr48](https://forum.kirupa.com/u/hokeyplyr48)\
**Post date:** [February 17, 2010, 1:42am UTC](https://forum.kirupa.com/t/localtoglobal-way-off-y-is-right-but-x-is-right/304948/1 "2010-02-17T01:42:11Z")

</div>

I have a bunch of enemy ships in a container on the stage. I am moving the container around every second and I’m creating bullets that the enemy ship are firing.

So I need to have the bullets get created on the stage where the enemy ship is located currently so I can have it y-- on an enter frame event.

The Y coordiantes are accurate but for some reason the X coordinates get scaled across the screen. So the first enemy ship is only off by 10 pixels or so, but the 2nd ship, the bullet gets created about 50-60 pixels over to the right. Is there any reason why the Y would be right but the X isn’t?

```auto
point = new Point(this.x,this.y);
trace(point.x);
resultPoint = this.localToGlobal(point);
trace(resultPoint.x);
enemyBullet.x = resultPoint.x;
enemyBullet.y = resultPoint.y;

```
