A best practices way of loading a SWF withing another SWF is
public function Constructor() {
if (stage == null) {
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}else{
onAddedToStage();
}
}
private function onAddedToStage(event:Event = null):void{
init();
}
private function init(){
//typical constructor code
}
The problem with putting some types of code in the constructor is that the SWF may not yet be added to the Display tree, and stage-aware code will return nulls and errors. So, if an application works on the desktop but not on the test server when loading nested SWFs, have a look at this possibility.
A good description is here: