How to Underline, in a text box?

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

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 :slight_smile:

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

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

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

Or you could always just draw a line over the textbox :stuck_out_tongue:

*Originally posted by Jack_Knife *
**Or you could always just draw a line over the textbox :stuck_out_tongue: **

works every time

Originally posted by Jack_Knife
Or you could always just draw a line over the textbox :stuck_out_tongue:

I think that’s not a really good option. :stuck_out_tongue:

You could also use the TextFormat object.
[AS]this.createTextField(“myTextField”, 0, 0, 0, 0, 0);
myTextField.autoSize = true;
myTextField.text = “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. :slight_smile:

http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary788.html

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

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.