Skip to main content
Participant
March 26, 2011
Answered

AS2 8 digit color values

  • March 26, 2011
  • 1 reply
  • 1193 views

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

Stage.addListener(StageL);

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

This topic has been closed for replies.
Correct answer kglad

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

0xaarrggbb

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
March 26, 2011

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

0xaarrggbb

Inspiring
March 27, 2011

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

kglad
Community Expert
Community Expert
March 27, 2011

if you want:

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

you must prefix with 0x.