# Dynamic Text in a movie clip

**URL:** https://forum.kirupa.com/t/dynamic-text-in-a-movie-clip/111398
**Category:** Uncategorized
**Created:** [May 26, 2004, 3:55pm UTC](https://forum.kirupa.com/t/dynamic-text-in-a-movie-clip/111398 "2004-05-26T15:55:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![stermer](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@stermer](https://forum.kirupa.com/u/stermer)
#### Post date: [May 26, 2004, 3:55pm UTC](https://forum.kirupa.com/t/dynamic-text-in-a-movie-clip/111398/1 "2004-05-26T15:55:18Z")

</div>

so i have a this movie clip, inside the movie clip i am dynamically loading images into little movie clips and i wanna dynamically load text into text fields in the clip as well. currently i am using this code to load the text into the fields, but it’s not working.

loadText = new LoadVars();  
loadText.load("…/images/news.txt");  
loadText.onLoad = function() {  
myNews.html = true;  
myNews.htmlText = \_root.one.city1;  
};

it is cause i can’t trace a path to a text field like i can a movie clip?

---

<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: [May 26, 2004, 3:58pm UTC](https://forum.kirupa.com/t/dynamic-text-in-a-movie-clip/111398/2 "2004-05-26T15:58:57Z")

</div>

I think the problem is with this line:

> myNews.htmlText = \_root.one.city1

You are using the path to a movie clip instead of the variable in your text file?

Are you using the tutorial from Kirupa? In the example there it is written as:

> newsBox.htmlText = this.myNews;

where myNews is the variable in the text file. So the .txt starts out as

> myNews=this is the text in my text file etc.

Hope this helps!  
:hr:

---

<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: [May 26, 2004, 6:19pm UTC](https://forum.kirupa.com/t/dynamic-text-in-a-movie-clip/111398/3 "2004-05-26T18:19:47Z")

</div>

i found out if i just gave the text field a var name, then it worked fine, so i didn’t have the issue i was having. thanks though 🙂

---

<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: [May 26, 2004, 6:23pm UTC](https://forum.kirupa.com/t/dynamic-text-in-a-movie-clip/111398/4 "2004-05-26T18:23:25Z")

</div>

That’s funny, that was going to be my second suggestion. 😉
