<?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"
               xmlns:views="com.afi.estimator.views.*" 
               width="1024" height="768" preloader="com.afi.estimator.views.preloader.AFIPreloader"
               creationComplete="init()" viewSourceURL="srcview/index.html">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
        <![CDATA[
            import com.afi.estimator.common.XMLConverter;
            import com.afi.estimator.model.EstimatorModel;
            import com.afi.estimator.model.Model;
            import com.afi.estimator.model.PremiumsModel;
            import com.afi.estimator.model.TextModel;
            import com.afi.estimator.views.AccessibilityView;
            import com.afi.estimator.views.View;
            import com.afi.estimator.views.vo.MonthlyRates;
            import com.afi.estimator.views.vo.Premium;
            import com.modernista.swffocus.SWFFocus;
            
            var estModel:PremiumsModel= new PremiumsModel();
            var converter:XMLConverter = new XMLConverter();
            var f:MonthlyRates
            
            private function callback():void {
                //convertXMLToVO();
                this.addElement(new View());
            }
            
            private function convertXMLToVO():void{
                
                var loader:URLLoader = new URLLoader(new URLRequest('com/afi/estimator/assets/xml/level10/fNic.xml'));
                loader.addEventListener(Event.COMPLETE, onLoadTracking);
            }
            
            private function onLoadTracking(e:Event):void
            {
                var dataXML:XML = XML(e.target.data);
                //estModel.fNic = converter.xmlToVo(dataXML) as Premium;
                trace("done");
            }
            
            private function init():void {
                new Model();
                TextModel.init(callback);
                SWFFocus.init(this.stage);
            }
            
        ]]>
    </fx:Script>
    
    <fx:Style source="com/afi/estimator/assets/css/styles.css"/>
    
    
</s:Application>