10 Replies Latest reply on Sep 26, 2014 5:01 AM by SirRookie

    How do I underline text in Flash?

    cre8tor10 Level 1

      There doesn't seem to be any clearcut instructions on how to underline text in Flash.  I did a search and there seems to be many solutions by adding code, etc.  I tried using the Line Tool to underline some text and it shows up fine on the stage but when I preview it, the line does not show up.  Any idea why?

       

      Is there a simple solution on how to underline text for someone new to Flash?

        • 1. Re: How do I underline text in Flash?
          kglad Adobe Community Professional & MVP

          use htmlText and the u tags:

           

          yourTF.htmlText = "<u>underlined text</u>";

          1 person found this helpful
          • 2. Re: How do I underline text in Flash?
            cre8tor10 Level 1

            Thanks, I've heard of this before.  I'm new to Flash so can you tell me exactly where I enter these tags?

            • 3. Re: How do I underline text in Flash?
              Ned Murphy Adobe Community Professional & MVP

              If you are working with a static textfield, drawing a line as you did should work.  So you may want to keep trying to see if you can figure out why it isn't appearing.

              • 4. Re: How do I underline text in Flash?
                kglad Adobe Community Professional & MVP

                that's it.

                 

                create an html-enabled textfield, give it an instance name (eg, yourTF) and in the actions panel use:

                 

                yourTF.htmlText = "<u>underlined text</u>";

                • 5. Re: How do I underline text in Flash?
                  cre8tor10 Level 1

                  Ok I finally saw it, but that text doesn't correspond to the text that I originally typed in the text field.  I guess the code will override whatever you type on the stage, eh?  I might as well just delete what's on the stage and just use the code.

                   

                  The text field had room for 4 lines.  But the code you mentioned appears to be only for 1 line.  So if I type something long, the text gets cut off (ie/ it doesn't wrap to the next line of the field).  What is the code to put a second line of text beneath the first?  Would the only option be creating a new text field beneath the first?

                  • 6. Re: How do I underline text in Flash?
                    kglad Adobe Community Professional & MVP

                     

                     

                    Ok I finally saw it, but that text doesn't correspond to the text that I originally typed in the text field.  I guess the code will override whatever you type on the stage, eh?  (yes) I might as well just delete what's on the stage and just use the code (yes)

                     

                    The text field had room for 4 lines.  But the code you mentioned appears to be only for 1 line.  So if I type something long, the text gets cut off (ie/ it doesn't wrap to the next line of the field).  What is the code to put a second line of text beneath the first?

                     

                    1.  make sure you're using a multiline textfield with wordwrap.  you can then use <br> to manually insert a line break or let flash wrap text that doesn't fit on one line.

                     

                     

                     

                    Would the only option be creating a new text field beneath the first?

                    no

                    1 person found this helpful
                    • 7. Re: How do I underline text in Flash?
                      cre8tor10 Level 1

                      That's a lot of steps for just underlining text when this really ought to be done with the click of a button.  But thanks for the info kglad, very helpful...

                      • 8. Re: How do I underline text in Flash?
                        kglad Adobe Community Professional & MVP

                        you're welcome.

                        • 9. Re: How do I underline text in Flash?
                          James22s22 Level 1

                          Why is this issue still not fixed?  There is no reason why there shouldn't be an underline button or underline option in the font style dropdown in Flash when a text field is set to render as HTML.  If I can select a specific word in the TextFieldield and set it to bold and/or italic, I should also be able to set it to underline.  It's not like classic text fields don't support the underline format.

                           

                          The switch from having individual buttons for bold and italic, to having a style drop down was stupid, IMO.  First of all, you have to list all the combinations.  With regular, narrow, black, bold, and italic, it currently has 9 combinations listed, and it's missing black/italic combination.  Adding underline would probably double that list length, which is why they should have stuck with buttons, or give just the mutually exclusive categories their own list like bold, black, and other font weights.

                           

                          Assigning the text through ActionScript just to get a simple underline is a terrible workaround, because you completely lose the ability to lay out the text on the stage to see what it looks like.

                           

                          Meanwhile, the TLF is not an option at all, given its epic implementation failure and rediculous workaround hacks (moving assets to frame 2 to prevent caching, embedding TLF classes bloating download size, or using a SafeLoader wrapper for Loader?): http://helpx.adobe.com/flash/kb/loading-child-swfs-tlf-content.html

                          • 10. Re: How do I underline text in Flash?
                            SirRookie Level 1

                            ANd for the fact, that TLF is depreciated in CC ther must be an Easy Way of formating text.

                             

                            1. I need UNDERLINE

                            2. I need Paragraph margin bottom

                             

                            please sign