<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:mvc="com.digitaldogbyte.*"
    layout="absolute" 
    creationComplete="init();" 
    viewSourceURL="srcview/index.html">
    <mx:Script>
        <![CDATA[
            import com.digitaldogbyte.ApplicationFacade;
            import com.digitaldogbyte.model.proxy.GetTeamProxy;
            
            public function init():void
            {
                ApplicationFacade.getInstance().startup(this);
            }
            
            public function load():void
            {
                ApplicationFacade.getInstance().sendNotification(ApplicationFacade.LOAD_TEAM_DATA);
            }
            
            public function prev():void
            {
                ApplicationFacade.getInstance().sendNotification(ApplicationFacade.PREV_TEAM);
            }
            
            public function next():void
            {
                ApplicationFacade.getInstance().sendNotification(ApplicationFacade.NEXT_TEAM);
            }
            
        ]]>
    </mx:Script>
    
    <mx:VBox paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
        
        <mx:Label text="1. Press Load button to load XML data file" fontSize="14"/>
        <mx:Button id="btnLoad" label="Load" click="load();"/>
        
        <mx:Label text="2. data file contents will display in datagrid:" fontSize="14"/>
        <mx:DataGrid id="dgContent"/>
        
        <mx:HBox paddingTop="10">
            <mx:Label text="Current data item:" fontSize="14"/>
            <mx:Label id="lblContent" text="none" fontSize="14" color="0xFF0000"/>
        </mx:HBox>
        
        
        <mx:Label text="3. Press Previous or Next to cycle through loaded data" fontSize="14"/>
        <mx:HBox paddingTop="10">
            <mx:Button id="btnPrev" label="Previous" click="prev();"/>
            <mx:Button id="btnNext" label="Next" click="next();"/>
        </mx:HBox>
                
    </mx:VBox>
    
</mx:Application>