# Cannot display whole .txt file with loadVars();

**URL:** <https://forum.kirupa.com/t/cannot-display-whole-txt-file-with-loadvars/47183>\
**Category:** Uncategorized\
**Created:** [March 31, 2004, 11:47pm UTC](https://forum.kirupa.com/t/cannot-display-whole-txt-file-with-loadvars/47183 "2004-03-31T23:47:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claudiog8](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@Claudiog8](https://forum.kirupa.com/u/Claudiog8)\
**Post date:** [March 31, 2004, 11:47pm UTC](https://forum.kirupa.com/t/cannot-display-whole-txt-file-with-loadvars/47183/1 "2004-03-31T23:47:06Z")

</div>

Hi everybody!

I used following Action script, but the attached here does not show completely in the dynamic text box. (only about 26 lines) Do you think you could help?

loadVarsText = new loadVars();  
loadVarsText.load(“txt/redWine.txt”);

//assign a function which fires when the data is loaded:  
loadVarsText.onLoad = function(success) {  
if (success) {  
//Now that we know the data is loaded,  
//set the text content of the Text Field  
//with the instance name “scroller” equal to the  
//contents of the variable  
scroller.html = true;  
scroller.htmlText = this.var1;  
[//scroller.text](https://scroller.text) = this.var1;

```
} else {
	trace("not loaded");
}
stop();

```

};  
**text file**
