Hi, Malo.
So, the swf runs by itself, just not when being loaded by a Loader?
From your stack trace, it appears everything has gone perfectly up until the actual StartupCommand's execute method.
In that method you instantiate and register your DataProxy. I have no reason to believe this is causing a problem in this circumstance.
I also see no reason why the loaded app should not be able to access the stage in order to create and register the StageMediator.
So here are my thoughts for further investigation:
I think it could have to do with the LoaderContext or ApplicationDomain.
If your loading application is ALSO a PureMVC app, it's just possible that the default behavior for the Loader is getting in the way. It wants the loaded swf to be allowed to access the classes of the parent swf. If the loaded swf tries to define a class that's already been defined in the parent, then it is ignored. This may not be what you are wanting.
From the live doc:
# Child of loader's ApplicationDomain. The default. You can explicitly represent this choice with the syntax new ApplicationDomain(ApplicationDomain.currentDomain). This allows the loaded SWF file to use the parent's classes directly, for example by writing new MyClassDefinedInParent(). The parent, however, cannot use this syntax; if the parent wishes to use the child's classes, it must call ApplicationDomain.getDefinition() to retrieve them. The advantage of this choice is that, if the child defines a class with the same name as a class already defined by the parent, no error results; the child simply inherits the parent's definition of that class, and the child's conflicting definition goes unused unless either child or parent calls the ApplicationDomain.getDefinition() method to retrieve it.
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/system/LoaderContext.htmlhttp://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/system/ApplicationDomain.htmlThis is just a direction for your research. Please let me know what you find - if this is or isn't the answer.
-=Cliff>