I can do this getChildAt(0).alpha = 0;
But this throws an error getChildAt(0).gotoAndStop(2);
How do I access a movieclip's methods using the display list array?
I can do this getChildAt(0).alpha = 0;
But this throws an error getChildAt(0).gotoAndStop(2);
How do I access a movieclip's methods using the display list array?
getChildAt does not return a movieclip, so you need to cast it first, using the as
keyword:
(getChildAt(0) as MovieClip).gotoAndStop(2);