# Targetting in AS3

**URL:** <https://forum.kirupa.com/t/targetting-in-as3/289577>\
**Category:** flash\
**Created:** [June 2, 2009, 4:29am UTC](https://forum.kirupa.com/t/targetting-in-as3/289577 "2009-06-02T04:29:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noahdecoco](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Noahdecoco](https://forum.kirupa.com/u/Noahdecoco)\
**Post date:** [June 2, 2009, 4:29am UTC](https://forum.kirupa.com/t/targetting-in-as3/289577/1 "2009-06-02T04:29:16Z")

</div>

Hey,

I think this is a common question for AS3, but I have to ask again, cuz I haven’t found a clear answer yet.

It’s about targeting movie clips… In AS2, you just target a movie clip like so :

trace (FirstMc.ChildMc1.ChildMc2.ChildMc3.\_x) // Will send out the x position of ChildMc3

But is AS3, i see that there’s a function called getChildByName(‘put child name here’). But what if it’s such a long way to go to that child??? Does it have to be:

FirstMc.getChildByName(“ChildMc1”). getChildByName(“ChildMc2”). getChildByName(“ChildMc3”).x

That just seems to tedious and I’m sure Adobe thought of a clean way of targetting??(i hope)

Someone please shed some light? I’m sure many can learn from this…

Cheers!
