Posts Tagged hexadecimal
I feel guilty that I haven’t written in a two weeks but I have been working on a longer article and it seems that I am limited on the number of words I can write in a week. Anyway I wanted to make a small post about this topic because I had a bit of trouble to find how to do it. When you work with colours, the common way to write a colour is to write it a has hex string to a uint; example: 0xff0000. When you trace that uint what you will get is the base 10 equivalent which is not really readable and gives no hint about what colour it is. So to solve this problem here is a quick way to convert a uint into a Hexadecimal String for tracing or tracking purpose:
var myUint:uint = 0xff000; // this is the colour red trace (myUint.toString(16)); //will trace ff0000;
My guess is that it will trace the number using 16 as a base.
Well that’s it for now might have more on AIR later on.