5 Replies Latest reply on Dec 24, 2012 8:24 PM by Flex harUI

    applicationComplete event not fired when Flex Application (SWF) loaded into Flex Application

    pbeeeeee

      Using Flex SDK 4.6 and Flash CS6,   I am able to to load an internally developed Flex Application (MXML project) into a Flash container application using code similar to the following:

       

      var loader:Loader = new Loader();

      // flexContainer is a MovieClip object

      flexContainer.addChild(loader);

      loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(event:Event) : void {

            event.target.content.addEventListener("applicationComplete", function(event:Event) : void {

                 var view:IView = event.target.application as IView;

            });

      });

      loader.load(new URLRequest("child.swf"));

       

      However, when running inside of a Flex container application (MXML project), the "applicationComplete" event is never fired. I can see that the child.swf (and dependent RSLs) are loaded by watching the debug console.

       

      Any ideas?

       

      Unfortunately, I cannot use Flex Modules or any other Flex specific construct to get this working. Ultimately this must work inside a Flash container; however, our testing platform dictates that these Flex components be loaded into a Flex Application container.