Hey!
I’ve got a question that might make me look like a fool. But the question is:
Is it possible to somehow change a dynamic variable or call a dynamic function of an object using
container.getChildAt(index).variable = 234;
container.getChildAt(index).function();
I mean, if I write a class with some functions and variables that are public. And I need many instances of that class (which extends MovieClip, and is tied to a object in the library) inside the container object. and I want to run some functions and set some variables of the first object in the container object when the container.numChildren > 10.
like this:
if (content.numChildren > 10) {
content.getChildAt(0).function1();
content.getChildAt(0).function2();
content.getChildAt(0).variable1 = "yay!";
}
I get the error
1119: Access of possibly undefined property variable1 through a reference with static type flash.display:DisplayObject.
and equivalent.
Cheers,
Artheus