getChildByName mc inside mc

Hey,
I’m trying to declare a movieclip variable in a class by finding the instance name of the movieclip.

On my stage I have a ‘Container’ (linkage class name) MC, inside that is a ‘PlayerInfo’ (linkage class name) MC inside that is a ‘healthBar_mc’ (instance name) MC.
healthBar_mc is what I’m trying to access.

the class where I’m trying to run this function is linked to a MC inside ‘Container’

So I tried the following code:


_healthBar_mc = parent.PlayerInfo.getChildByName("healthbar_mc") as MovieClip;

I get an error: “Undefined property PlayerInfo”

If healthbar was just inside ‘Container’ and not ‘PlayerInfo’ then the following would work:


 _healthBar_mc = parent.getChildByName("healthbar_mc") as MovieClip;

But I need it to be inside PlayerInfo.

What am I doing wrong?

Thanks