dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Newline character ignored in htmlText for Flash Player 6?

  1. #1
    Junior Member
    Join Date
    Jun 2006
    Posts
    26

    Newline character ignored in htmlText for Flash Player 6?

    Is the newline character "\n" ignored in Flash Player 6 when it is included in an html text box? I'm testing backwards compatibility for my completed site with Flash Player 6 and none of the newline characters or tab characters are working if the text box has the html property set to true. All of the text boxes work fine in Flash Player 8.

    Is there a different character I need to use? Or is it just not supported for Flash Player 6?

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    try newline
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Junior Member
    Join Date
    Jun 2006
    Posts
    26
    After more testing I've found that both newline and \n are ignored if an <a href immediately follows the commands in Flash Player 6. You have to use <br> immediately preceeding <a href> for it to make a new line in Flash Player 6. It must be a bug in Flash player 6. Below is an example:

    Example_txt.html = true;
    Example_txt.htmlText = "<b>Links</b>\n" +
    "<a href='this.example.link.html'>Example Link</a>";

    Output in Flash Player 6 would be:
    LinksExample Links
    Output in Flash Player 8 would be:
    Links
    Example Links

    This works for Flash Player 6:

    Example_txt.html = true;
    Example_txt.htmlText = "<b>Links</b><br>" +
    "<a href='this.example.link.html'>Example Link</a>";

    I've also noticed that in Flash Player 6, text boxes must have their html property set to true, otherwise the html tags are ignored. In Flash Player 8, the text box automatically reads the tags if the text is assigned to the text box via the htmlText property.

    Now I have to figure out how to get the tabs (\t) to work as well. I have a lot of pages with external and asfunction links that have \n and \t in front of them. All of them broke when I exported to Flash player 6.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center