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

Is it possible to give a text a colored background and certain distances?

Explorer ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

Hi,

 

is it possible to give a text a colored background and certain distances?

2021-02-23_12h21_21.jpg

Best regards,

René

 

 

TOPICS
How to

Views

157

Translate

Translate

Report

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

Community Expert , Feb 23, 2021 Feb 23, 2021

you can control somethings with the properties panel, but not nearly as much as you can control with code.

 

for a dynamic textfield with instance name tf, use:

 

var tfor:TextFormat = new TextFormat();
tfor.blockIndent = 40;
tfor.color = 0x46C944;

 

tf.width = 120;
tf.height = 50;
tf.background = true;
tf.backgroundColor = 0x000000;
tf.text = "Lorem Ipsum";
tf.setTextFormat(tfor);

Votes

Translate

Translate
Community Expert ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

yes.

 

html5 or actionscript?

Votes

Translate

Translate

Report

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
Explorer ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

actionscript. 

about properties it is not possible?

Votes

Translate

Translate

Report

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 Expert ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

LATEST

you can control somethings with the properties panel, but not nearly as much as you can control with code.

 

for a dynamic textfield with instance name tf, use:

 

var tfor:TextFormat = new TextFormat();
tfor.blockIndent = 40;
tfor.color = 0x46C944;

 

tf.width = 120;
tf.height = 50;
tf.background = true;
tf.backgroundColor = 0x000000;
tf.text = "Lorem Ipsum";
tf.setTextFormat(tfor);

Votes

Translate

Translate

Report

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