Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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"
- width="950" height="620" minWidth="950" minHeight="620" backgroundAlpha="1.0"
- backgroundColor="#808080" creationComplete="{doInit()}" currentState="PRIN010"
- >
- <s:states>
- <s:State name="SNHA010"/>
- <s:State name="PRIN010"/>
- <s:State name="ADSD30A"/>
- <s:State name="SNHA020"/>
- </s:states>
- <fx:Script>
- <![CDATA[
- import components.AlertObject;
- import mx.controls.Alert;
- import mx.controls.SWFLoader;
- import mx.core.IVisualElementContainer;
- private function doInit():void
- {
- addSubApplication(nav_PaginaInicial, "PaginaInicial.swf");
- }
- private function addSubApplication(navigatorName:IVisualElementContainer, nameSubApplication:String):void
- {
- navigatorName.removeAllElements();
- var swfLoadSubApplication: SWFLoader = new SWFLoader();
- swfLoadSubApplication.percentWidth = 100;
- swfLoadSubApplication.percentHeight = 100;
- swfLoadSubApplication.source = nameSubApplication;
- navigatorName.addElement(swfLoadSubApplication);
- }
- protected function navigatorContent_Click(event:MouseEvent):void
- {
- //Alert.show("navigatorContent is clicked: " + event.currentTarget.selectedItem.id);
- if (event.currentTarget.selectedItem.id == nav_PaginaInicial.id)
- addSubApplication(event.currentTarget.selectedItem, "PaginaInicial.swf");
- if (event.currentTarget.selectedItem.id == nav_Graficos.id)
- addSubApplication(event.currentTarget.selectedItem, "Graficos.swf");
- }
- ]]>
- </fx:Script>
- <!-- PRIN010 !-->
- <s:VGroup includeIn="PRIN010" left="10" right="10" top="10" bottom="10" verticalCenter="0" horizontalCenter="0" gap="0">
- <s:VGroup width="100%" height="100%" gap="0">
- <s:Group width="100%" height="20">
- <s:TabBar id="tabBar" height="100%" dataProvider="{viewStack}" right="5" click="navigatorContent_Click(event)"/>
- </s:Group>
- <mx:ViewStack id="viewStack" width="100%" height="100%">
- <s:NavigatorContent id="nav_PaginaInicial" label="Pagina Inicial"/>
- <s:NavigatorContent id="nav_Graficos" label="Gráficos"/>
- <s:NavigatorContent id="nav_Chamados" label="Chamados"/>
- <s:NavigatorContent id="nav_Equipamentos" label="Equipamentos"/>
- </mx:ViewStack>
- </s:VGroup>
- </s:VGroup>
- </s:Application>
Advertisement
Add Comment
Please, Sign In to add comment