# How to Underline, in a text box?

**URL:** <https://forum.kirupa.com/t/how-to-underline-in-a-text-box/29998>\
**Category:** Uncategorized\
**Created:** [September 2, 2003, 8:07pm UTC](https://forum.kirupa.com/t/how-to-underline-in-a-text-box/29998 "2003-09-02T20:07:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ffoeg78](https://avatars.discourse-cdn.com/v4/letter/f/6f9a4e/32.png) [@ffoeg78](https://forum.kirupa.com/u/ffoeg78)\
**Post date:** [September 2, 2003, 8:07pm UTC](https://forum.kirupa.com/t/how-to-underline-in-a-text-box/29998/1 "2003-09-02T20:07:49Z")

</div>

I have a text box, and i have a link to an external url in that text box, i need to know how to underline the link so people will know it is indeed a link. In the properties panel, there is the “B” and the “I” to bold and italisize, but i dont see an underline button, is there an easy way to make this happen.

Thanks  
Ffoeg

---

<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 2, 2003, 8:22pm UTC](https://forum.kirupa.com/t/how-to-underline-in-a-text-box/29998/2 "2003-09-02T20:22:25Z")

</div>

The easiest way would probably to do it in HTML. After you’ve HTML-enabled your text, you can put whatever you want to underline between \< u \> tags.

pom 🙂

---

<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 2, 2003, 8:32pm UTC](https://forum.kirupa.com/t/how-to-underline-in-a-text-box/29998/3 "2003-09-02T20:32:50Z")

</div>

I have it set on html mode, but when i put the “u” tag in, it just thinks it is more regular text.

I have a basic text box, it is not being called dynamically or anything. And when i put the underline attributes right in the text box, it renders the tag and the text with no underline. Its like i am doign it in the wrong spot or something. Is there a special html area or something?

Thanks  
Ffoeg

---

<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 2, 2003, 8:43pm UTC](https://forum.kirupa.com/t/how-to-underline-in-a-text-box/29998/4 "2003-09-02T20:43:36Z")

</div>

I you can’t get something to work in the authoring environment, script it! 😛

```auto
this.createTextField("a", 0, 0, 0, 100, 200) ;
a.html = true ;
a.htmlText = "<u>Ilyas Da Pom</u>" ;

```

---

<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 2, 2003, 10:42pm UTC](https://forum.kirupa.com/t/how-to-underline-in-a-text-box/29998/5 "2003-09-02T22:42:52Z")

</div>

Or you could always just draw a line over the textbox 😛

---

<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 2, 2003, 11:31pm UTC](https://forum.kirupa.com/t/how-to-underline-in-a-text-box/29998/6 "2003-09-02T23:31:01Z")

</div>

> \*Originally posted by Jack\_Knife \*  
> \*\*Or you could always just draw a line over the textbox 😛 \*\*

works every time

---

<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 2, 2003, 11:51pm UTC](https://forum.kirupa.com/t/how-to-underline-in-a-text-box/29998/7 "2003-09-02T23:51:55Z")

</div>

> _Originally posted by Jack\_Knife_  
> **Or you could always just draw a line over the textbox 😛**

I think that’s not a really good option. 😛

You could also use the TextFormat object.  
[AS]this.createTextField(“myTextField”, 0, 0, 0, 0, 0);  
myTextField.autoSize = true;  
myTextField.text = “[kirupa.com](http://kirupa.com)”;  
var myTextFormat = new TextFormat();  
myTextFormat.font = “Verdana”;  
myTextFormat.size = 10;  
myTextFormat.underline = true;  
myTextField.setTextFormat(myTextFormat);[/AS]  
HTML formatting is easier and faster, though. 🙂

[http://www.macromedia.com/support/flash/action\_scripts/actionscript\_dictionary/actionscript\_dictionary788.html](http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary788.html)

---

<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 3, 2003, 2:41pm UTC](https://forum.kirupa.com/t/how-to-underline-in-a-text-box/29998/8 "2003-09-03T14:41:42Z")

</div>

I am not too sure where to do the scripting?? I tried putting the code right in the text box, with html enabled, but it still renders as text.

Where do i put this code you are suggesting?

I there is no “built in” underline feature, like bold or italics, in MX?

Thanks  
Ffoeg

---

<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 3, 2003, 6:37pm UTC](https://forum.kirupa.com/t/how-to-underline-in-a-text-box/29998/9 "2003-09-03T18:37:33Z")

</div>

You put the code on the frame actions (highlight the frame, open the Actions Panel (F9), put the code).

HTML formatted text must be assigned through the htmlText property, that’s why it isn’t working when you write the text directly into the TextField.
