Different Dynamic Text area question

Hi all

I have a dynamic text area which reads from a .txt file. All works well and I’m quite happy with it.

However, I cannot for the life of me, work out how to format the text - ie make some elements bold, as para headers.

Can a dynamic text box parse html? Is that the way to do it?

Look forward to sorting this one out.

Thx for any help.

Cello

firstly you have to html enable the text field…

myTextField.html = true;

or in the properties panel select render text as html.

then assign the text through the htmlText property or a variable.

and here’s a list of the supported tags http://www.macromedia.com/support/flash/ts/documents/htmltext.htm :wink:

hope it helps =)

Thx for the reply kax - unfortunately I’m not getting this to work.

I’m using the following code:

<AS>
loadText = new loadVars();
loadText.load(“biography.txt”);
loadText.onLoad = function() {
scroller.text = this.biography;
scroller.html = true;

};
</AS>

I’ve checked the render as HTML box in properties as well - all I get back is the text box, with scroller, with the content just the HTML and not the formatted text

Any ideas appreciated!

Cello

Originally posted by kax
then assign the text through the htmlText property or a variable.

scroller.htmlText = this.biography;

:wink:

Kax - that did the trick!

Thx for your patience and help.

Cello

no problem Cello =)