targeting a movie clip from a nested clip using absolute path
I'm fairly new to AS3 and am having a hard time targeting a clip from within a nested clip. I am following instructions from books and advice on the web but keep getting errors. Very frustrating.
This is how the nested clips are set up:
Main timeline > MC1
> mc1a
> mc1b
> mc1c
I want to get the height of mc1a from the timeline of mc1b and then change the height of mc1c with that information.
The book says to declare the main timeline as a display object
var myRoot:MovieClip = root as MovieClip;
So now should I be able to do this from the timeline of mc1b? :
trace(myRoot.MC1.mc1a.height)
I get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
This is harder than it needs to be. With AS2 I could just use _root.MC1.mc1a.
