# UNDERLINE THE TEXT in MX?

**URL:** <https://forum.kirupa.com/t/underline-the-text-in-mx/5868>\
**Category:** flash\
**Created:** [September 24, 2002, 3:47pm UTC](https://forum.kirupa.com/t/underline-the-text-in-mx/5868 "2002-09-24T15:47:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![HTI](https://avatars.discourse-cdn.com/v4/letter/h/e19b73/32.png) [@HTI](https://forum.kirupa.com/u/HTI)\
**Post date:** [September 24, 2002, 3:47pm UTC](https://forum.kirupa.com/t/underline-the-text-in-mx/5868/1 "2002-09-24T15:47:15Z")

</div>

I know this may be sound stupid, but how do you underline the text. It seems like there is no such option there…or is there? and where?

---

<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:** [September 24, 2002, 6:09pm UTC](https://forum.kirupa.com/t/underline-the-text-in-mx/5868/2 "2002-09-24T18:09:13Z")

</div>

Looks like you’re going to have to script it, HTI.

---

<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:** [September 24, 2002, 6:10pm UTC](https://forum.kirupa.com/t/underline-the-text-in-mx/5868/3 "2002-09-24T18:10:43Z")

</div>

change ur text field to dynamic text and give it an instance name and use below code:

urTextFormat = new TextFormat();  
urTextFormat.underline = true;  
instance\_name.setTextFormat(urTextFormat);

go to help in flash mx for more detail on TextFormat, i also just learnt from there.

---

<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:** [September 24, 2002, 6:28pm UTC](https://forum.kirupa.com/t/underline-the-text-in-mx/5868/4 "2002-09-24T18:28:49Z")

</div>

that will underline ALL the text though.

The best way is to make a dynamic textbox and make it HTML enabled so you can use HTML underline tags on the word you want.

---

<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:** [September 24, 2002, 6:50pm UTC](https://forum.kirupa.com/t/underline-the-text-in-mx/5868/5 "2002-09-24T18:50:04Z")

</div>

yeah, that’s right!! i learnt another new things!!  
thanx for ur advice!!

---

<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:** [September 24, 2002, 6:52pm UTC](https://forum.kirupa.com/t/underline-the-text-in-mx/5868/6 "2002-09-24T18:52:07Z")

</div>

No problem, but beware, HTML enabled text only works if the text is dynamically loaded from an external text file or inputted through Actionscript.

---

<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:** [September 24, 2002, 7:19pm UTC](https://forum.kirupa.com/t/underline-the-text-in-mx/5868/7 "2002-09-24T19:19:14Z")

</div>

```php
this.createTextField("myText",-1,0,0,300,20);
myText.html=true;
myHTML="Hey Lost, <u>what's on your mind?</u>";
myText.htmlText=myHTML;

```

---

<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:** [September 24, 2002, 7:20pm UTC](https://forum.kirupa.com/t/underline-the-text-in-mx/5868/8 "2002-09-24T19:20:29Z")

</div>

Yeah, perhaps I should have added that part:)

Sorry.
