# Loading Text from Multiple External Sources

**URL:** https://forum.kirupa.com/t/loading-text-from-multiple-external-sources/52119
**Category:** flash
**Created:** [May 20, 2004, 8:50am UTC](https://forum.kirupa.com/t/loading-text-from-multiple-external-sources/52119 "2004-05-20T08:50:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![webelf](https://avatars.discourse-cdn.com/v4/letter/w/f4b2a3/32.png) [@webelf](https://forum.kirupa.com/u/webelf)
#### Post date: [May 20, 2004, 8:50am UTC](https://forum.kirupa.com/t/loading-text-from-multiple-external-sources/52119/1 "2004-05-20T08:50:15Z")

</div>

So I have this button that when I click on it I want it to load two different text files into two different text boxes. This code works just fine for loading 1 file into one box, but not when I try to do the other thing. Whats wrong with it?

```auto

on (release) {
	loadText = new loadVars();
	loadText.load("TEXT5.txt");
	loadText.onLoad = function(success) {
		if (success) {
			// trace(success);
			newsBox2.html = true;
			newsBox2.htmlText = this.myNews;
		}
	};
	loadText = new loadVars();
	loadText.load("TEXT6.txt");
	loadText.onLoad = function(success) {
		if (success) {
			// trace(success);
			newsBox.html = true;
			newsBox.htmlText = this.myNews;
		}
	};
}

```
