title: ActionScript 3: Get a File object's string value
body: <p>I have my Flash project properties set for: AIR 3.4 for Desktop and ActionScript 3.0...</p>
  
  <p>I created a button for the user to select a file (csv) from the local drive. I then want to be able to get the string value of the File Object but do not know how...</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>BTN_CSV.addEventListener(MouseEvent.CLICK, getCSV);
  
  var myFile:File = new File();
  
  function getCSV(e:MouseEvent):void {
      var docFilter:FileFilter = new FileFilter("Documents", "*.csv");
  
      myFile.browse([docFilter]);
      myFile.addEventListener(Event.COMPLETE, completeHandler);
  }
  
  
  function completeHandler(event:Event) {
      var csvData = myFile.nativePath;
      csvData = csvData.data.split("\n");
  
      parseCSV(csvData);
  }
  </code></pre>
  
  <p>I'm getting an error 1061: Call to a possibly undefined method split through a reference with static type flash.utils: ByteArray. I don't know how to get the file path for the file obj...</p>