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

Adding background color to Dynamic Text boxes

Community Beginner ,
Jun 10, 2011 Jun 10, 2011

Copy link to clipboard

Copied

Is this possible?  Basically I want to make the background of the Dynamic Text box have a color.  How do I do this using AS3?

TOPICS
ActionScript

Views

5.5K

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 , Jun 10, 2011 Jun 10, 2011

if your textfield has reference name tf, use:

tf.background=true;

tf.backgroundColor=0xrrggbb;

Votes

Translate

Translate
Community Expert ,
Jun 10, 2011 Jun 10, 2011

Copy link to clipboard

Copied

if your textfield has reference name tf, use:

tf.background=true;

tf.backgroundColor=0xrrggbb;

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 Beginner ,
Jun 10, 2011 Jun 10, 2011

Copy link to clipboard

Copied

Thanks Kglad.  Works if you put quotes around the hex color.

tf.background=true;

tf.backgroundColor="0xrrggbb";

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 ,
Jun 10, 2011 Jun 10, 2011

Copy link to clipboard

Copied

you don't need quotes and, strictly speaking, you shouldn't use quotes.  color is a uint though flash will convert the string to a uint, if it can.

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 Beginner ,
Nov 14, 2020 Nov 14, 2020

Copy link to clipboard

Copied

Would this be different for html5 cancas? 

 

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 ,
Nov 14, 2020 Nov 14, 2020

Copy link to clipboard

Copied

LATEST

it sure would.

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