# AS3 classes, cross communicating objects

**URL:** <https://forum.kirupa.com/t/as3-classes-cross-communicating-objects/314986>\
**Category:** flash\
**Created:** [October 14, 2010, 4:45am UTC](https://forum.kirupa.com/t/as3-classes-cross-communicating-objects/314986 "2010-10-14T04:45:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chronoshift](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@chronoshift](https://forum.kirupa.com/u/chronoshift)\
**Post date:** [October 14, 2010, 4:45am UTC](https://forum.kirupa.com/t/as3-classes-cross-communicating-objects/314986/1 "2010-10-14T04:45:58Z")

</div>

alright, I’m currently working on a game, and I have some parent objects in the root Class file that often contain at least one layer of child MCs, so I’ve found that i can’t use

```auto
MovieClip(root).MovieClip.child.child;

```

to achieve my desired result. I was hoping there might be a way to create a var inside of the class file, that when I input it in to the root class file I could do something like

```auto
var enemy1:Enemy1 = new Enemy1(thatobject);

```

where that object would instantiate a var that would point to the object I want enemy1 to communicate with.

I really hope that I’ve explained this in a way that is understandable. any help would be greatly appreciated.
