flowerspring

 
   private var urlDataLoader:URLLoader;

   //---------------------------------------------------------------
   // xml 형식의 파일을 불러온다.
   //----------------------------------------------------------------
   var dataRequest:URLRequest = new URLRequest("gshhs_l_data.xml");
   urlDataLoader = new URLLoader();
   urlDataLoader.addEventListener(Event.COMPLETE, loadDatasXML);
   urlDataLoader.load(dataRequest);
   
   
   
   //----------------------------------------------------------------
   // txt 형식의 파일을 불러온다.
   //----------------------------------------------------------------
   var requestConfig:URLRequest = new URLRequest("bdy_config.txt");
   var loaderConfig:URLLoader = new URLLoader();
   loaderConfig.addEventListener(Event.COMPLETE, completeConfigHandler);
   loaderConfig.load(requestConfig);



/**
   * configXML 설정파일 xml을 셋팅한다.
   */
  private function loadDatasXML(e:Event):void
  {
         //dataXML = new XML(e.target).children();
         dataXML = new XML(urlDataLoader.data).children();
         //trace(dataXML.length());
         //draw();
         // todo..
 
  }
 
private function completeConfigHandler(e:Event):void
{
    var src:String = e.target.data as String;
    tempConfigRowArray = src.split("\n");
    //mainHeaderConfigRowArray = tempConfigRowArray[0].split(",");
    //trace("config row count::" + tempConfigRowArray.length);
    //etc. etc.
}

Comment +0