# Help with loading extrenal text!

**URL:** <https://forum.kirupa.com/t/help-with-loading-extrenal-text/63317>\
**Category:** flash\
**Created:** [September 5, 2004, 11:56am UTC](https://forum.kirupa.com/t/help-with-loading-extrenal-text/63317 "2004-09-05T11:56:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![White\_Rabbit](https://avatars.discourse-cdn.com/v4/letter/w/dbc845/32.png) [@White\_Rabbit](https://forum.kirupa.com/u/White_Rabbit)\
**Post date:** [September 5, 2004, 11:56am UTC](https://forum.kirupa.com/t/help-with-loading-extrenal-text/63317/1 "2004-09-05T11:56:01Z")

</div>

[left][font=Arial][size=2][font=&quot]If anyone can help I would be very grateful.[/font][/size][/font][font=Arial]  
[/font][font=Arial][size=2][font=&quot] [/font][/size][/font][font=Arial]  
[/font][font=Arial][size=2][font=&quot] I’m loading an external swf into a movie, which loads perfectly well, however the external swf has text that loads from a txt. file.[/font][/size][/font][font=Arial]  
[/font][font=Arial][size=2][font=&quot] [/font][/size][/font][font=Arial]  
[/font][font=Arial][size=2][font=&quot] As I said the swf loads into the movie but it loads without the external text :(.[/font][/size][/font][font=Arial]  
[/font][font=Arial][size=2][font=&quot] [/font][/size][/font][font=Arial]  
[/font][font=Arial][size=2][font=&quot] I’m totally confused as to what the problem is and worried if this actually possible to achieve. I would be extremely grateful to anyone who could help.[/font][/size][/font][/left]

---

<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:** [September 5, 2004, 12:11pm UTC](https://forum.kirupa.com/t/help-with-loading-extrenal-text/63317/2 "2004-09-05T12:11:46Z")

</div>

Try this: your external SWF that gets loaded in your main movie must contain a dynamic text field with scrollbar. I suppose you already did this. Instance name your textfield \*\*myText\_txt \*\*and make sure your scrollbar points to the same name when checking its property \*Target Textfield \*(otherwise the scrollbar doesn’t know what it has to scroll…).

Once you’ve done this, add this code to the actions of your textfield:

```auto
 myData = new LoadVars(); 
myData.onLoad = function() {
 myText_txt.htmlText = this.content;
};
myData.load("yourtxtfile.txt");

```

The last step is to make your TXT file that is going to be loaded. Make sure to put the word “content=” at the beginning of the file. Like this:

content=EXAMPLE\<br\>your text here

Voilà. Hope this helps.

---

<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:** [September 5, 2004, 12:25pm UTC](https://forum.kirupa.com/t/help-with-loading-extrenal-text/63317/3 "2004-09-05T12:25:40Z")

</div>

[font=Arial][font=&quot]Thanks but it’s a little more complicated problem :(. I’ve made a customised scrollbar that scrolls a movie clip (in this case the text box) and to complicated things I have a menu system where a certain text file loads on the press of corresponding button, sorry I should have made that clear first. If any solution springs to mind please post back.[/font][/font]

```auto

  on (release) {
  	loadText = new loadVars();
  	loadText.load(''loadedtext.txt");
  	loadText.onLoad = function(success) {
  		if (success) {
  			// trace(success);
 			_root.scrolledMCrecipient.scrolledMC.newsBox.html = true;
 			_root.scrolledMCrecipient.scrolledMC.newsBox.htmlText = this.myNews;
  		}
  	};
  }
  

```
