As3 flash getChildAt (0) .someMethod access

I can do this getChildAt (0) .alpha = 0;

But this raises the error getChildAt (0) .gotoAndStop (2);

How do I access movie clip methods using an array of displayed lists?

+3
source share
1 answer

getChildAt does not return a movie clip, so you need to execute it first using the keyword as:

(getChildAt(0) as MovieClip).gotoAndStop(2);
+6
source

Source: https://habr.com/ru/post/1720078/


All Articles