toString() not adding 0 in front

Hi,

I’m trying to convert 0xcolour into colour using toString(16). The problem I’ve got is it’s not adding the zeroes in front of the number.

here is the code

[AS]var aColours:Array=new Array(0x000000,0x0000FF,0xFF0000,0x009933,0xFFFFFF);

for (var i = 0; i<aColours.length; i++) {
trace(aColours*.toString(16));
}
[/AS]

This is what I get back

0
ff
ff0000
9933
ffffff