# Formatting text dynamically read with html ... possible?

**URL:** <https://forum.kirupa.com/t/formatting-text-dynamically-read-with-html-possible/59706>\
**Category:** flash\
**Created:** [August 3, 2004, 5:31am UTC](https://forum.kirupa.com/t/formatting-text-dynamically-read-with-html-possible/59706 "2004-08-03T05:31:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcdalton](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@dcdalton](https://forum.kirupa.com/u/dcdalton)\
**Post date:** [August 3, 2004, 5:31am UTC](https://forum.kirupa.com/t/formatting-text-dynamically-read-with-html-possible/59706/1 "2004-08-03T05:31:46Z")

</div>

Hi all, new here & enjoying the tuts … esp. liked the one about reading a .txt file into a dynamic scrolling box for the content section of a site. BUT I have one question … is there anyway to format this text within the .txt file with html (or something else) … in other words I want my headers bold etc & Im worried about hyperlinks within the text. When I tried to add html tags flash just displays them in the text area … not exactly what I was looking for!

Any help would be appreciated, Im trying this out with a client that doesnt want frames or a full scrollbar on the side but cant have the background of the page tile either so I really thought this was my answer.

---

<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:** [August 3, 2004, 6:36am UTC](https://forum.kirupa.com/t/formatting-text-dynamically-read-with-html-possible/59706/2 "2004-08-03T06:36:12Z")

</div>

it’s pretty easy, just set the textField’s html value to true and use its .htmlText property and not its .text property. here i’ll demo:

[AS]  
my\_txt.html = true;  
my\_txt.htmlText = ‘\<b\>test\</b\>’;  
[/AS]

the html tags that flash supports are a subset of the true html tags so watch out! the formatting of the text will adhere to the html tags and not the textField’s properties when using this method.
