# Grabbing external data from text file:

**URL:** https://forum.kirupa.com/t/grabbing-external-data-from-text-file/51528
**Category:** flash
**Created:** [May 13, 2004, 6:07pm UTC](https://forum.kirupa.com/t/grabbing-external-data-from-text-file/51528 "2004-05-13T18:07:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Bwoods](https://avatars.discourse-cdn.com/v4/letter/b/e495f1/32.png) [@Bwoods](https://forum.kirupa.com/u/Bwoods)
#### Post date: [May 13, 2004, 6:07pm UTC](https://forum.kirupa.com/t/grabbing-external-data-from-text-file/51528/1 "2004-05-13T18:07:21Z")

</div>

I am trying to load data from a text file and input it into a textfield:

Previously the data was hard coded as such:

this.clip.createEmptyMovieClip(“desc”,l++);  
this.clip.desc.\_x=485;  
this.clip.desc.\_y=18;  
this.clip.desc.createTextField(“desc”,1,0,0,164,317);  
this.clip.desc.desc.wordWrap=1;  
this.clip.desc.desc.html=1;  
this.clip.desc.desc.embedFonts=1;  
this.clip.desc.\_alpha=0;  
\*\*\* this.desc=["\<font face=‘century gothic’\>Jacara Cunningham\<br\> SA Charlotte Acq\</font\>",]  
}

And I’m wanting to take out the last line marked with \*\*\* and insert code to pull it from a text file, split it into an array based off a comma and show it in the text box. Example:

…  
this.clip.desc.\_alpha=0;  
loadVariables (“data.txt”,“desc”);  
this.clip.desc.desc = myitemsVar.split(’,’);  
this.clip.desc.currentValue = items[0];  
}

Please help!!!
