2 Replies Latest reply on Apr 9, 2009 10:28 AM by rckehoe

    working with multiple applications...

    rckehoe Level 1

      I have the main.mxml app that I am working with... then I have an additional sample.mxml application that I would like to incorporate into the main.mxml. How would this be done?

       

      Basically in shot... I want to be able to access the sample.mxml application from within the main.mxml application.

       

      The reason, is because I would like to re-use that sample.mxml application without having to re-develop the forms that are on there and code and such.

        • 1. Re: working with multiple applications...
          Gregory Lafrance Level 6

          If you really need the secondary app to have a top-level <mx:Application> tag, you will need to compile it into a SWF and use SWFLoader to load it into the primary app.

           

          If it can be a component, not an application (top-level tag <mx:VBox>, <mx:Panel>, <mx:ComboBox>, etc.) then simple declare the namespace where the file is located and create an instance of the component in the primary app.

           

          If in the same folder as the main app MXML file:

          xmlns:comp="*"    where comp can be anything (myComponents, components, etc.)

           

          If a sub-folder "components" of the main app MXML file:

          xmlns:comp="components.*"    where comp can be anything (myComponents, components, etc.)

           

          <comp:MyFancyComponent/>    declare an instance of the component.

           

          See Flex Builder help sys on using SWFLoader.

          • 2. Re: working with multiple applications...
            rckehoe Level 1

            Got it! Thanks so much for the helpful answer!