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.
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.
Got it! Thanks so much for the helpful answer!