So I have this movievlip in my library, which is an instance of TestClass
. There are four other movieclips in the parent movieclip. This is TestClass
:
package {
import flash.display.MovieClip;
public class TestClass extends MovieClip{
public function TestClass() {
for(var i:int = 0; i < numChildren; i++){
trace(getChildAt(i));
}
}
}
}
However, this traces null
four times, while it should trace [object MovieClip]
right? Also, when I set the names of the movieclips under the accessibility tab and then use getChildByName('test')
, it still traces null
.
My question is: how can I get specific children from a movieclip in my library? For instance, when there are two children, I only want to get the child with the name test