PDA

View Full Version : Reading all text from a .txt file



Ayman
October 15th, 2009, 04:33 AM
Hi guys,

Quick question. Ofcourse I know that you can read flash variables from a text file, which is formatted like: @var1=firstVariable@var2=secondVariable and so on.

But is there a way to read normal text out of a textfile? Is it through the bytearray class?

Thanks!

TheCanadian
October 15th, 2009, 05:02 AM
Just make one variable for the whole file. If you're wanting formatted text I suggest XML with a CDATA node.

Ayman
October 15th, 2009, 06:32 AM
I actually dont have any control over the file. It is just there somewhere, and has plain text. Cant I just read the entire content as a string?