# Loading external text from within MC

**URL:** <https://forum.kirupa.com/t/loading-external-text-from-within-mc/63823>\
**Category:** Uncategorized\
**Created:** [September 10, 2004, 8:52am UTC](https://forum.kirupa.com/t/loading-external-text-from-within-mc/63823 "2004-09-10T08:52:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stocs101](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@stocs101](https://forum.kirupa.com/u/stocs101)\
**Post date:** [September 10, 2004, 8:52am UTC](https://forum.kirupa.com/t/loading-external-text-from-within-mc/63823/1 "2004-09-10T08:52:16Z")

</div>

Hey guys hows it going

I have been searchign for ages and I seem to have come up short on this. What I have is a simple menu system withn a MC. I want the buttons within that movie clip to load an external tex file into a dynamic text box, but it does not want to work for me.  
The code I used previously worked when the buttons weren’t in the movie clip, but now they dont want to work. I have tried using teh tellTarget function to no avail, and now i am stuck. Here is the code i was using before

on (release) {  
loadText = new loadVars();  
loadText.load(“testing.txt”);  
loadText.onLoad = function(success) {  
if (success) {  
// trace(success);  
textbox.html = true;  
textbox.htmlText = this.myNews;  
}  
};  
}

Any ideas on how to modify that so it can be put on a button within a MC to load an external text file.

thanks heaps.

christian

---

<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 10, 2004, 5:20pm UTC](https://forum.kirupa.com/t/loading-external-text-from-within-mc/63823/2 "2004-09-10T17:20:50Z")

</div>

you could just use one text file and use different sections of it.

```auto

textbox.htmlText = this.myNews;

```

could be used on one button

```auto

textbox.htmlText = this.myNews2;

```

on another button.

---

<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 10, 2004, 5:38pm UTC](https://forum.kirupa.com/t/loading-external-text-from-within-mc/63823/3 "2004-09-10T17:38:24Z")

</div>

something like this?

---

<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 12, 2004, 12:53am UTC](https://forum.kirupa.com/t/loading-external-text-from-within-mc/63823/4 "2004-09-12T00:53:22Z")

</div>

Yeah thats what i had before, but now those buttons are within a movie clip and the scripting doesn’t work anymore :(. I am still trying to get the text to load in a dynamic text box, but i cant figure out why it wont do it.

Christian
