How can I access the children of the child?
function function1()
{
var parentz:Parentz=new Parentz;
addChild(parentz);
parentz.name=“parentz”;
//add the child
var childz:Childz=new Childz;
parentz.addChild(childz);
childz.name=“childz”;
}
function function2()
{
MovieClip(getChildByName(“parentz”)).visible=false; //I can do that
//How I do parentz.childz.visible=false ?
}
Acttualy I can define an Array as a class variable and push the ‘childz’ instance, or make the instance as a class variable, so all the function recognize it. Still, I still doubt if that’s a proper way. Is it?
I still fell that’s more flexible to define a new instance when I needed it. Am I wrong?
Is there a way to reference the instance by name (getChildByName) or any other ways , but still in a scope like that?
Thx in adv.