Dynamic text with HTML code

Im loading a .txt file into a dynamic text field with the html feature pressed down but my text wont render as html. Check out the links on my site at http://www.sondrehylland.com to wiew my code in the .txt file. Whats wrong?

Please help.:crazy:

hrm, I wonder if you save it as a .html file and then import it like that instead of as a txt file.

I’ve done the html rendering successfully using a php as the loaded variable.

but try the html option…

btw: very cool layout, HOWEVER…it takes a long time to load on my cable internet…is there anyway you can slim it down? Maybe change the background audio to a lesser quality? But I do like it :slight_smile:

Well there is a trick to how it works.

The text only renders as HTML if you html enable your text box and dynamically load the text in or add the text using AS, but it will not render if you just put the text in the box yourself.

Try this…

Create a text box with the INSTANCE name “textBox” (no quotes) and add these actions to a frame…

myText="<B>Hello</B>, Please visit <A TARGET='_blank' HREF='URL'>HERE</A>"
textBox.html = true
textBox.htmlText = myText

Thanks man. Now its finally working the way its supposed to. I only had to modify my AC to:

loadText = new loadVars();
loadText.load(“link.txt”);
loadText.onLoad = function() {
loadedText.text = this.linktext;
loadedText.html = true
loadedText.htmlText = this.linktext;
};

I think I could skip the “loadedText.text = this.linktext;”
What do you think?

Yeah htmlText replaces text

.text says it is regular text and so the textbox translates it that way

.htmlText says the incoming text has HTML font formatting tags and it needs to interpret them.

So remove the .text line and you are set.

Keep in mind ONLY font formatting tags and such work for this. Tables, CSS, advanced HTML all will not work

Just thigs like Bold, Italics, Underline, Links, break tags, font color and family, and I think font size.