# Loading external text into a movie

**URL:** <https://forum.kirupa.com/t/loading-external-text-into-a-movie/169147>\
**Category:** flash\
**Created:** [November 14, 2005, 12:22am UTC](https://forum.kirupa.com/t/loading-external-text-into-a-movie/169147 "2005-11-14T00:22:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbbco](https://avatars.discourse-cdn.com/v4/letter/b/aeb1de/32.png) [@bbbco](https://forum.kirupa.com/u/bbbco)\
**Post date:** [November 14, 2005, 12:22am UTC](https://forum.kirupa.com/t/loading-external-text-into-a-movie/169147/1 "2005-11-14T00:22:31Z")

</div>

Hi all…

I am attempting to load some external text into a “home.swf” dyanmic text box as per tutorial [http://www.kirupa.com/developer/mx/multiple\_dynamictext.htm](http://www.kirupa.com/developer/mx/multiple_dynamictext.htm)

However, I have it set up so that an “index.swf” loads the “home.swf” file into it, and then I would like to load the external text.

I was able to make it work with the home.swf using this code:

```auto
loadText = new LoadVars();
	loadText.load("text/home.txt");
	loadText.onLoad = function(success) {
		if (success) {
			// trace(success);
			this.home_text.html = true;
			this.home_text.htmlText = this.homeNews;
		}
	}

```

But I cannot make it load correctly with the index.swf using this code:

```auto
loadText = new LoadVars();
	loadText.load("text/home.txt");
	loadText.onLoad = function(success) {
		if (success) {
			// trace(success);
			_root.content.home_text.html = true;
			_root.content.home_text.htmlText = this.homeNews;
		}
	}

```

(my logic is that \_root will refer to the index, which then refers to the “content” container inside the index.swf that loads home.swf, which should then refer to the “home\_text” dynamic textbox located inside home.swf).

Any ideas?

Charis,

bbbco
