Here is the function I ended up with if it's useful to anyone, somewhat
deluxe-ified:
public static function decimalToHexidecimal(number:Number,
upperCase:Boolean=false, addPound:Boolean=false, addOx:Boolean=false
):String
{
var hexString:String = Number(number).toString(16);
while (hexString.length < 6) hexString = "0" + hexString;
if (addPound) hexString = "#" + hexString;
if (addOx) hexString = "0x" + hexString;
if (upperCase) hexString = hexString.toUpperCase();
return hexString;
}
Thanks again for your help.
Jason Merrill
Bank of America
Enterprise Technology & Global Risk L&LD
Instructional Technology & Media
Join the Bank of America Flash Platform Developer Community
Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal GT&O Innovative Learning Blog & subscribe.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders