Dynamic Text in a movie clip

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?

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:

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 :slight_smile:

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