Check it (the text file) is in the "bin" directory (normally set by default to be "[projectRoot]/bin" , but that may have been set differently in project properties), which is where the debug version will be running from... It's probably a reasonable idea to do a file.exists check in your code as well, just to help narrow it down. -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jon Bell Sent: 17 December 2007 06:37 To: flexcoders@yahoogroups.com Subject: [flexcoders] Reading from a file - file not found? Hello, I inherited some code and I'm trying to get it to compile. This code should be straight-forward, but it's saying it can't file the file: var termsFile:File = File.applicationStorageDirectory.resolvePath("Terms.txt"); var stream:FileStream = new FileStream(); stream.open(termsFile, FileMode.READ); Text(sender).text = stream.readUTFBytes(termsFile.size); stream.close(); break; The third line is where it's choking. I see the file in the root directory of the project, with the capital "T" and permissions are set correctly. Does anyone have any idea what might be going wrong here? Thanks, Jon
______________________________________________________________________ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. ______________________________________________________________________