# How to retrieve global rotation?

**URL:** https://forum.kirupa.com/t/how-to-retrieve-global-rotation/266758
**Category:** flash
**Created:** [July 24, 2008, 4:14am UTC](https://forum.kirupa.com/t/how-to-retrieve-global-rotation/266758 "2008-07-24T04:14:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Stinker](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@Stinker](https://forum.kirupa.com/u/Stinker)
#### Post date: [July 24, 2008, 4:14am UTC](https://forum.kirupa.com/t/how-to-retrieve-global-rotation/266758/1 "2008-07-24T04:14:38Z")

</div>

Hey guys,

I did a search but to no avail. What I’m trying to achieve is to get the global rotation of a nested movie clip instance. Much like localToGlobal, except for rotation, not x,y.

The only solution I can think of currently is to add all the parent rotations together with the current rotation.

So something like,

```auto
obj = this;
while (obj.parent != null)
{
    totalRotation += obj.rotation;
    obj = obj.parent;
}

```

But I’m not much a fan of this as it is rather cumbersome. I am hoping there is some simple localToGlobal type function for rotation.

Does anyone know of any or a better solution than above?

Your help would be greatly appreciated :hugegrin:
