title: Is it possible to read only the first line of a file with Actionscript?
body: <p>I've got a PHP-based site where we allow users to upload a comma-separated text file of data to be imported by some server side scripts. However, sometimes we need to adjust the column order of the data that is uploaded, and it would be immensely helpful if we could identify the columns in the CSV file <em>before</em> the upload takes place.</p>
  
  <p>The only way I can think of to access local file I/O is with a Java plugin or an embedded Flash script, and I'd much prefer the latter. Is there any way in Flash to select a text file on the local hard drive, and then use ActionScript to examine <strong>only</strong> the first line (which corresponds to the column headings, in this example)?</p>
  
  <p>Sometimes these files can be >100 MB, so loading the whole thing into memory and then throwing out all but the first line probably wouldn't work efficiently, so I'm wondering if there's syntax in ActionScript to limit the amount of data read in at a time.</p>