1 Reply Latest reply on Oct 27, 2009 1:02 PM by Flex harUI

    Application within an application and the Application.application property

    Ugo Ducharme Level 1

      Hi,

       

      I have two Flex 3 applications, App A and App B.

       

      App A runs App B using a SWFLoader (App B runs inside App A) using this code:

                      wLoaderContext = new LoaderContext();
                      wLoaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
                     
                      swfLoader.loaderContext = wLoaderContext;
                      swfLoader.load();

       

      My problem occurs in App B. The application code uses Application.application quite a bit and in this case, the value of Application.application is equal to App A  (the container application). This is not the value intended by App B and it crashes.

       

      Is there a way to truly separate App A and App B so that Application.application would return App B (instead of App A)?