Skip to main content
dalcde
Inspiring
July 10, 2010
Answered

Html Text

  • July 10, 2010
  • 1 reply
  • 724 views

How do you add html text by actionscript in flash? (I'm using flash 😎

By the way, how do you remove a character from a string (it's the last character I want to remove)?

This topic has been closed for replies.
Correct answer kglad

enable the html property of your textfield and asign htmlText:

yourTF.html=true;

yourTF.htmlText="<b>this is bold</b> and <i>this is italic</i>";

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
July 10, 2010

enable the html property of your textfield and asign htmlText:

yourTF.html=true;

yourTF.htmlText="<b>this is bold</b> and <i>this is italic</i>";

dalcde
dalcdeAuthor
Inspiring
July 10, 2010

Thanks! It worked well for bold but not superscript. Why?

kglad
Community Expert
Community Expert
July 10, 2010

there are a very limited number of html tags that as2 can parse.  if you use google to search (flash as2 supported html tags), you'll find those supported tags.

for sub/superscripts in as2 you have to use custom fonts.