i have a class Team.as that imports another class CustomMenu.as. This works fine, when i launch Team.fla, the content of CustomMenu appears well.
But, in my project, Main.as imports Team.swf, and then the content of Team appears on screen EXCEPT the content of CustomMenu.as.
So, i added a ADDED_TO_STAGE to the three of them, by example :
public function Team() {
addEventListener(Event.ADDED_TO_STAGE, initStage);
}
public function initStage(e:Event){
But CustomMenu never appears in the loader. It’s not a problem with the size of the container, or anything like that, because i tried to put a black rectangle in the loaded swf and it works. Do you have any solution?
Thanks a lot
Is initStage(e:Event) called when you addChild(myTeam); in your main project file?
You can just write some public init() method in Team class. Then cast your loaded content in main file to Team(loadedSWF), then call Team(loadedSWF).init() when you make sure it’s already on the stage.