OK, so maybe you have to straight me out on this, and I would love not to need it, but this is my usecase. I need to add FlexViewer as a component that can be drooped into a bigger application. So lets call it FlexViewerComponent.mxml. I don't want to add all the FlexViewer sourcecode to the bigger project when in this case what I want is a library that allows me to add flexviewer as a tab in my application. Something like:<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
xmlns:viewer="com.mycompany.component.*" >
<s:layout>
<s:VerticalLayout/>
</s:layout>
<fx:Style source="defaults.css"/>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:TabNavigator width="100%" height="100%">
<s:NavigatorContent label="Simulator" width="100%" height="100%">
<viewer:SimulatorComponent />
</s:NavigatorContent>
<s:NavigatorContent label="FlexViewer" width="100%" height="100%">
<viewer:FlexViewerComponent />
</s:NavigatorContent>
</mx:TabNavigator>
</s:Application>
and where viewer:FlexViewerComponent looks ofcourse like the index.swf pretty much, so something like
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:managers="com.esri.viewer.managers.*"
xmlns:viewer="com.esri.viewer.*" height="100%" width="100%">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Metadata>
[ResourceBundle("ViewerStrings")]
</fx:Metadata>
<s:layout>
<s:BasicLayout/>
</s:layout>
<viewer:ViewerContainer>
<viewer:mapManager>
<managers:MapManager/>
</viewer:mapManager>
<viewer:uiManager>
<managers:UIManager/>
</viewer:uiManager>
<viewer:widgetManager>
<managers:WidgetManager/>
</viewer:widgetManager>
<viewer:configManager>
<managers:ConfigManager/>
</viewer:configManager>
<viewer:dataManager>
<managers:DataManager/>
</viewer:dataManager>
</viewer:ViewerContainer>
</s:Group>
Does it make sense?