0 Replies Latest reply on Apr 23, 2008 3:48 PM by ArtKohn

    Dynamic HTML Formatting

      The HTMLText of many Display Objects seems extremely limited. I am trying to DYNAMICALLY add bold <b> tags to an HTML string, but the tags conflict with other, pre-existing formatting tags.

      For example, the initial line looks like this:
      "This is some html text and this is <font color="red" >text I want to highlight over here.</font>"

      Now imagine that the user dynamically adds a BOLD that is supposed to highlight the words “This is the red text I want to highlight over here.” Here is how the text comes out:

      Example: This is some html text and <b>this is <font color="red" >text I want to highlight</b> over here.</font>

      I realize that nesting the opening FONT tag within the BOLD tags causes problems within Flash Display Objects (and it is just bad coding anyways). On a normal HTML page I would ad CSS styling to a given area with Div tags for example, but I am not able to do so on Flash HTML Objects.

      Is there any other way I can add styling to text within a string without splitting tags up?