Question
Why is this a good thing?
I have my file working, but help me out here...I am trying to
understand why this is a good thing.
I have a document class called DocClass. It extends MovieClip. In it, I have a holder mc that calls in a dynamically generated mc (from library) that has in it another dynamically generated mc (also from the library). From DocClass, I wanted to make changes in the label that existed in the sub/sub mc.
In AS2, this would be done with:
holderMC.dynamMC1.dynamMC2.labelName = "changed text";
In AS3, it goes like this:
(DocClass(root) as MovieClip).holderMC.getChildByName("dynamMC1").getChildByName("dynamMC2").labelName.text = "changed text";
DocClass was already extending MovieClip AND it works elsewhere by just referencing DocClass(root).doSomething(). However, it seems like it loses the knowledge that it is the root MC when I am trying to dive into the sub clips. Am I missing something? Did I resolve it in a "best practices" way? If so...why does this happen and if Adobe intended it, why is it a good thing?
I have a document class called DocClass. It extends MovieClip. In it, I have a holder mc that calls in a dynamically generated mc (from library) that has in it another dynamically generated mc (also from the library). From DocClass, I wanted to make changes in the label that existed in the sub/sub mc.
In AS2, this would be done with:
holderMC.dynamMC1.dynamMC2.labelName = "changed text";
In AS3, it goes like this:
(DocClass(root) as MovieClip).holderMC.getChildByName("dynamMC1").getChildByName("dynamMC2").labelName.text = "changed text";
DocClass was already extending MovieClip AND it works elsewhere by just referencing DocClass(root).doSomething(). However, it seems like it loses the knowledge that it is the root MC when I am trying to dive into the sub clips. Am I missing something? Did I resolve it in a "best practices" way? If so...why does this happen and if Adobe intended it, why is it a good thing?