3 Replies Latest reply on Mar 27, 2011 7:38 AM by kglad

# AS2 8 digit color values

I have an AS2 flash web site which has the following color values defined in the ActionScript :

var txtFormat2 = createTF(24, 10066329, 2, 8, false);
var txtFormat3 = createTF(14, 3355443, 1);
var txtFormat4 = createTF(11, 11184810, 1.500000E+000);
var txtFormat5 = createTF(10, 7829367, 2);
var txtFormat6 = createTF(11, 12632256, 1, 6);
var txtFormat67 = createTF(12, 11184810, 1, 8);
var txtFormat7 = createTF(12, 4539717, 1);
var txtFormat8 = createTF(10, 10066329, 1);
var txtFormat11 = createTF(10, 4539717, 1);
var txtFormat9 = createTF(11, 10066329, 1.500000E+000);
var whiteFormat = new TextFormat();
whiteFormat.color = 13421772;
var darkFormat = new TextFormat();
darkFormat.color = 6710886;
var centerTxt = new TextFormat();

I thought the 8 digit color values represented ( first 2 digits = transparency value, remaing 6 digits = RGB values ).

Could you verify if the above statement is correct ?

If not correct, could you explain how to interpret the 8 digit color values and recommend a chart or color conversion

tool which will provide a visual representation of each color value ?

Thanks

• ###### 1. Re: AS2 8 digit color values

in flash, you must use 0x to indicate a hexadecimal number:

0xaarrggbb

• ###### 2. Re: AS2 8 digit color values

Well you don't HAVE to do that. You can represent the number in decimal. It just makes sense to use the 0x to make it hex.

If you have a decimal number and you want to know what it is in hex you can use this:

trace("0x"+Number(10066329).toString(16));  \\ traces 0x999999

• ###### 3. Re: AS2 8 digit color values

if you want:

"...the 8 digit color values represented ( first 2 digits = transparency value, remaing 6 digits = RGB values )"

you must prefix with 0x.