Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ActionScript 3.0, htmlText set to bold

Community Beginner ,
Sep 04, 2018 Sep 04, 2018

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

610
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Sep 04, 2018 Sep 04, 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>.

Translate
LEGEND ,
Sep 04, 2018 Sep 04, 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>.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 04, 2018 Sep 04, 2018
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines