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

4.3K

Likes

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

Adobe Community Professional , Jun 10, 2011 Jun 10, 2011
if your textfield has reference name tf, use:tf.background=true;tf.backgroundColor=0xrrggbb;

Likes

Translate

Translate
Adobe Community Professional ,
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;

Likes

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";

Likes

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
Adobe Community Professional ,
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.

Likes

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? 

 

Likes

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

Copy link to clipboard

Copied

LATEST

it sure would.

Likes

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