# Loading dynamic text, using HTML tags

**URL:** <https://forum.kirupa.com/t/loading-dynamic-text-using-html-tags/67410>\
**Category:** flash\
**Created:** [October 15, 2004, 3:40pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-using-html-tags/67410 "2004-10-15T15:40:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JRoss](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@JRoss](https://forum.kirupa.com/u/JRoss)\
**Post date:** [October 15, 2004, 3:40pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-using-html-tags/67410/1 "2004-10-15T15:40:08Z")

</div>

I would like to load an external .txt file into flash. I would also like the text to contain HTML formatting, ie. \<a\> \<li\> etc. Here’s an example of what I’m currently trying:

## In the .txt file, I have the following: &header=Here is my header &one=This is where the first set of text would go &two=This is where the second set of text would go, with a \<a href=“[http://www.kirupaforum.com](http://www.kirupaforum.com)”\>link\</a\> right here.

In the .fla file, I have three dynamic text fields with “Render text as HTML” selected. In a movie clip on the main timeline, I have the following actionscript:

var mainVars = new LoadVars();  
mainVars.onLoad = function(loaded) {  
if(loaded) {  
\_parent.contentText.heading.text = this.heading;  
\_parent.contentText.theText1.text = this.one;  
\_parent.contentText.theText2.text = this.two;  
for(items in this) {  
trace("item: "+items);  
}  
}  
else {  
trace(“Nope, didn’t work”);  
}  
}  
mainVars.load(“text/productsText.txt”);  
stop();

When I preview the movie, the text fields come up as undefined. I could use some help!
