# Preloading Loading Textfiles

**URL:** <https://forum.kirupa.com/t/preloading-loading-textfiles/22158>\
**Category:** flash\
**Created:** [May 31, 2003, 1:32am UTC](https://forum.kirupa.com/t/preloading-loading-textfiles/22158 "2003-05-31T01:32:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 31, 2003, 1:32am UTC](https://forum.kirupa.com/t/preloading-loading-textfiles/22158/1 "2003-05-31T01:32:21Z")

</div>

A site I am working on, mainly runs off textfiles. So some of them do have a lot of information. How can I send a message to the user that the information is loading instead of having a horrific blank textfield until the file loads?

Here’s my code  
[AS]  
loadText = new loadVars();  
loadText.load(“publications.txt”);  
loadText.onLoad = function() {  
scroller.html = true;  
scroller.htmlText = this.publicationsText;  
};  
[/AS]

I tryed a few different things but I was not successful.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 31, 2003, 2:06am UTC](https://forum.kirupa.com/t/preloading-loading-textfiles/22158/2 "2003-05-31T02:06:29Z")

</div>

```auto
scroller.text = "loading text... please wait.";
loadText = new LoadVars();
loadText.load("publications.txt");
loadText.onLoad = function(success) {
if (success) {
scroller.html = true;
scroller.htmlText = this.publicationsText;
} else {
scroller.text = "error: text not loaded!";
}
};

```

?? 😛 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 31, 2003, 2:27am UTC](https://forum.kirupa.com/t/preloading-loading-textfiles/22158/3 "2003-05-31T02:27:07Z")

</div>

boy did you answer my question, thanks a lot 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 31, 2003, 2:28am UTC](https://forum.kirupa.com/t/preloading-loading-textfiles/22158/4 "2003-05-31T02:28:58Z")

</div>

you’re welcome. =)
