I have a holder movieclip, its base class is foo.
package {
import flash.display.MovieClip;
public class Foo extends MovieClip {
public function Foo() {
trace("foo");
}
}
}
Within foo are a number of other movieclips, with a base class of bar.
package {
import flash.display.MovieClip;
public class Bar extends MovieClip {
public function Bar() {
trace("bar");
}
}
}
I put a trace in the constructor of bar so I can tell if it's being loaded properly, and when I drag out foo onto the scene and run the clip, all the little bars within it fire off correctly. However, when I add it to the scene dynamically, such as like this in the Main class:
package {
import flash.display.MovieClip;
public class Main extends MovieClip {
public function Main() {
this.addChild(new Foo());
}
}
}
Suddenly, all the little bar movieclips within foo revert to regular old movieclips and don't fire. Is there any way to fix this?