Underlining text in flash couldn't be easier. actually it could be a lot easier if the people at macromedia / adobe flash put an underline button beside the bold and italics in the property panel. Anyhow, you came here to find out how to add an underline to dynamic text in flash.
NOTE: This will only work in flash 6 and up.
Unfortunately its not the most straightforward way of underlining text, we need to add a little ActionScript.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Step 1
Ok, so boot up flash, create a new document, make a text field in layer 1 frame 1 and name it myUnderlinedTxt.
Step 2
Add a new layer, let's call it Scripts, and add the following ActionScript.
var headertext:TextFormat = new TextFormat();
headertext.underline = true;
_root.myUnderlinedTxt.setTextFormat(headertext);
headertext can be whatever you want as long as it stays the same in all 3 instances.
Here are the files. You can mail me if you have any issues.
underlining dynamic text in flash (FLA)
underlining dynamic text in flash (swf)