# Deeply embedded MCs

**URL:** https://forum.kirupa.com/t/deeply-embedded-mcs/178390
**Category:** flash
**Created:** [February 10, 2006, 3:14am UTC](https://forum.kirupa.com/t/deeply-embedded-mcs/178390 "2006-02-10T03:14:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jwopitz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jwopitz/32/1556_2.png) [@jwopitz](https://forum.kirupa.com/u/jwopitz)
#### Post date: [February 10, 2006, 3:14am UTC](https://forum.kirupa.com/t/deeply-embedded-mcs/178390/1 "2006-02-10T03:14:48Z")

</div>

I am trying to develop some sort of localToGlobal \_rotation method, much like getting localToGlobal coordinates. For instance, let’s say you have a particular clip with the following scope:

\_root.group\_mc.subGroup\_mc.item\_mc

I want to find the total \_rotation of item\_mc using something like this:

```
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#000000] **function** [/COLOR] totalRotation [COLOR=#000000]([/COLOR]target_mc:[COLOR=#0000FF]MovieClip[/COLOR][COLOR=#000000])[/COLOR]:[COLOR=#0000FF]Number[/COLOR][COLOR=#000000]{[/COLOR]

```

[COLOR=#000000]\*\* var\*\*[/COLOR] \_tRotation:[COLOR=#0000FF]Number[/COLOR] = target\_mc.[COLOR=#0000FF]\_rotation[/COLOR];  
[COLOR=#808080]\* //so then somehow I access the following and add it to the above var\*[/COLOR]  
\_tRotation += target\_mc.[COLOR=#0000FF]\_parent[/COLOR].[COLOR=#0000FF]\_rotation[/COLOR] [COLOR=#808080]_//ie. subGroup\_mc.\_rotation;_[/COLOR]  
\_tRotation += target\_mc.[COLOR=#0000FF]\_parent[/COLOR].[COLOR=#0000FF]\_parent[/COLOR].[COLOR=#0000FF]\_rotation[/COLOR] [COLOR=#808080]_//group\_mc.\_rotation;_[/COLOR]  
[COLOR=#808080]\* // and so on and so on till you get to \_root\*[/COLOR]  
[COLOR=#0000FF] return[/COLOR] \_tRotation;  
[COLOR=#000000]}[/COLOR]  
[/LEFT]  
[/FONT]

I guess the next issue after writing that would be how do you heirachically target the \_parent of each mc through some loop?

Thanks for any help
