Skip to main content
Known Participant
September 4, 2018
Answered

ActionScript 3.0, htmlText set to bold

  • September 4, 2018
  • 1 reply
  • 669 views

Hi everybody,

I am using the following code in order to have 2 or more different font sizes in a single text field.

firsttext.htmlText = '<font size="27">' + loadedData[2][0] + '</font>' + '<font size="27">' + loadedData[2][1] + '</font>' + " " + loadedData[2][2];

my problem is that I need also to set the weight of the last "loadedData" to bold. The first two loadedDatas are meant to be regular, so the text field font is set to regular.

Thanks in Advance

Mike

This topic has been closed for replies.
Correct answer ClayUUID

I assume you already tried <b> tags and they didn't work. It seems AS3 is kind of stupid about properly embedding the required font variants, even when you've explicitly added them to the library.

actionscript 3 - Flash CS4 <b> tag in with htmlText - Stack Overflow

Looks like the easiest approach is to use something like <font face="arial bold"> instead of <b>.

1 reply

ClayUUIDCorrect answer
Legend
September 4, 2018

I assume you already tried <b> tags and they didn't work. It seems AS3 is kind of stupid about properly embedding the required font variants, even when you've explicitly added them to the library.

actionscript 3 - Flash CS4 <b> tag in with htmlText - Stack Overflow

Looks like the easiest approach is to use something like <font face="arial bold"> instead of <b>.

Known Participant
September 4, 2018

Thanks ClayUUID,

you were correct I did try the <b> tags but nothing, thankfully your suggestion was also correct, the <font face="arial bold"> code worked.

thanks again