# Importing (and analyzing) a raw text file

**URL:** <https://forum.kirupa.com/t/importing-and-analyzing-a-raw-text-file/189451>\
**Category:** flash\
**Created:** [June 2, 2006, 5:24pm UTC](https://forum.kirupa.com/t/importing-and-analyzing-a-raw-text-file/189451 "2006-06-02T17:24:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayme65](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@Jayme65](https://forum.kirupa.com/u/Jayme65)\
**Post date:** [June 2, 2006, 5:24pm UTC](https://forum.kirupa.com/t/importing-and-analyzing-a-raw-text-file/189451/1 "2006-06-02T17:24:56Z")

</div>

I have to import a (long) text with that structure (this is the 5 first lines of the text)  
The text will be often updated, so I can’t edit it…it should be imported as it is

```auto

[Category]
item1=big / red
item2=thin / blue
item3=big / blue
item4=thin / yellow

```

I’ve understood that in Flash I must use the LoadVars() object:

```auto

loadText = new LoadVars();
loadText.load("test.txt");
loadText.onLoad = function() {
 trace(this)
};

```

If I import the text like that, here’s the result in the output window:

```auto

%5BCategory%5D%0D%0Aitem1=big%20%2F%20red%0D%0Aitem2%3Dthin%20%2F%20blue%0D%0Aitem3%3Dbig%20%2F%20blue%0D%0Aitem4%3Dthin%20%2F%20yellow&onLoad=%5Btype%20Function%5D

```

So, my question is:  
How should I proceed to have that properly filtered and put in an array?  
Thanks very much!
