# Difficulty Loading Text from External Sources

**URL:** https://forum.kirupa.com/t/difficulty-loading-text-from-external-sources/58948
**Category:** flash
**Created:** [July 27, 2004, 10:09am UTC](https://forum.kirupa.com/t/difficulty-loading-text-from-external-sources/58948 "2004-07-27T10:09:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![OrangeHeart](https://avatars.discourse-cdn.com/v4/letter/o/3d9bf3/32.png) [@OrangeHeart](https://forum.kirupa.com/u/OrangeHeart)
#### Post date: [July 27, 2004, 10:09am UTC](https://forum.kirupa.com/t/difficulty-loading-text-from-external-sources/58948/1 "2004-07-27T10:09:38Z")

</div>

Hello everyone I’m new to the forum and I just wanted to ask for some help. I’m new to flash and I have been working with flash for about a couple of months now and I’m still new to everything especially ActionScript.

I have been working on my first site which is my personal blog and I’m having trouble getting my external text files to load in my dynamic text field. I have even followed the tutorial that is given here and still seem to be doing something wrong. Basically want I want to accomplish is the same results as the tutorial. I would like to have my buttons when clicked to load my text files. This is the swf file that I have been working with: [SWF FILE](http://www.orangeheart.com/gm1.3/work.htm) and these are my current dynamic text settings:  
[center] ![](http://www.orangeheart.com/settings.jpg)[/center]  
This is the altered code that I used from the tutorial page!

```auto
  on (release) {
	loadText.load("index.txt");
	loadText.onLoad = function(success) {
		if (success) {
			// trace(success);
			main.html = true;
		  main.htmlText = this.index;
		}
	};
}

```

---

<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: [July 27, 2004, 10:40am UTC](https://forum.kirupa.com/t/difficulty-loading-text-from-external-sources/58948/2 "2004-07-27T10:40:41Z")

</div>

you forgot loadText = new LoadVars();  
should look like this:

```auto

 on (release) {
	loadText = new LoadVars();
	loadText.load("index.txt");
	loadText.onLoad = function(success) {
		if (success) {
			// trace(success);
			main.html = true;
		  main.htmlText = this.index;
		}
	};
}

```

Hope it works!

Cheers  
MZA

---

<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: [July 27, 2004, 10:47am UTC](https://forum.kirupa.com/t/difficulty-loading-text-from-external-sources/58948/3 "2004-07-27T10:47:41Z")

</div>

OMG that worked, Thanks!!!
