Hi Christophe!
Both swf are creating their own ApplicationContext.
Before loading S2, S1 loads the ApplicationContext this way:
Code:
var APPLICATION_CONTEXT:String = "http://localhost:49660/applicationContext.xml";
import org.springextensions.actionscript.context.support.XMLApplicationContext;
var xmlAppContext:XMLApplicationContext;
xmlAppContext = new XMLApplicationContext(APPLICATION_CONTEXT);
xmlAppContext.addEventListener(Event.COMPLETE, onContextLoaded);
xmlAppContext.load();
import com.hola_riviera_maya_elearning.Aplicacion;
var appDetails:Aplicacion;
function onContextLoaded(e:Event):void {
appDetails = xmlAppContext.getObject("aplicacion");
trace("Load S1's context");
play();
}
S2 loads his ApplicationContext in the same way:
Code:
var APPLICATION_CONTEXT:String = "http://localhost:49660/examen.xml";
import org.springextensions.actionscript.context.support.XMLApplicationContext;
var xmlAppContext:XMLApplicationContext;
xmlAppContext = new XMLApplicationContext(APPLICATION_CONTEXT);
xmlAppContext.addEventListener(Event.COMPLETE, onContextLoaded);
xmlAppContext.load();
import com.hola_riviera_maya_elearning.Examen;
var exam:Examen;
function onContextLoaded(e:Event):void {
exam = xmlAppContext.getObject("examen");
trace("Load S2's context");
}
The error returned can be seen in here.
All files and classes are available here (you will need flash cs3 or higher).
Thanks a lot for your help!