2 Replies Latest reply on Jan 21, 2010 6:20 AM by Gregory Lafrance

    readUTF error 2030

    MixMastaJames Level 1
      I've used this function before, and its always been fine, but now I'm getting an Error #2030 End of file was encountered when it tries to read a simple file.

      Here is the function:
      private function readFile(_path:String):String {
      var returnString:String = "";

      var fs:FileStream = new FileStream();
      fs.open(new File(_path), FileMode.READ);
      returnString = fs.readUTF();
      fs.close();

      return returnString;
      }

      And here is the file its trying to read:

      <login>
      <name/>
      <pass/>
      </login>

      thats it..

      anyone know why I'm getting that error?