Specifying headerColors for Actionscript Alert in CSS

spentroseandhip003

 

Simple idea – you want Alert pop-ups in Actionscript to have a header color that is different from the default (which is same color as the background).  The only difficulty comes in knowing the correct syntax, because two colors are necessary.  They can be the same color if you just want a solid color, or two colors if you want one color to fade into the other.  These two colors get converted to an array at run-time.

After trying various combinations with and without quotes, square brackets, squiggly brackets, I finally got the correct syntax.  So just writing it down here to keep track.

mx|Alert
{
dropShadowEnabled: true;
headerColors: blue, blue;
headerHeight: 20;
}

It’s just a comma-delimited list of two colors – no quotes or brackets or anything fancy.  Also the numeric red green blue values may be used instead of color keywords.  The first color in the list is the top of the gradient; the second the bottom.

By the way a low-tech way to get the RGB value of a color is to copy something with that color into Paint, and then use the dropper tool to select the color, then click on “Edit colors”.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s