# Read line by line From .txt File In AS 3.0

**URL:** <https://forum.kirupa.com/t/read-line-by-line-from-txt-file-in-as-3-0/233409>\
**Category:** flash\
**Created:** [July 23, 2007, 7:11pm UTC](https://forum.kirupa.com/t/read-line-by-line-from-txt-file-in-as-3-0/233409 "2007-07-23T19:11:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![icekube12jr](https://avatars.discourse-cdn.com/v4/letter/i/c89c15/32.png) [@icekube12jr](https://forum.kirupa.com/u/icekube12jr)\
**Post date:** [July 23, 2007, 7:11pm UTC](https://forum.kirupa.com/t/read-line-by-line-from-txt-file-in-as-3-0/233409/1 "2007-07-23T19:11:56Z")

</div>

Hi,

I’m wondering how I can read from a .txt file in actionscript 3.0. I’m used to Java where when I want to read from a file I would do something like this.

```auto
Scanner scan = new Scanner(url.openStream());
String line;

while (scan.hasNextLine())
{
      line = scan.nextLine();
      //do something with that line
}

```

Is there something similar in Actionscript where I can read a file line by line?

icekube12jr
