TIP – Converting a textual HEX color value to int

1 actionscript,as3,flash,tip  |   May 28, 2009  |     2231

Hi Everyone,

just a short tip today on how to convert values like this : #00FF00 from a config file, letsay, to something you can use inside of your AS3 code.

Here it is

What this enables you to do, is read a xml file, lets say something like this

And extract the values for the colors, then use them.. Let us pretend that the XML file is in a variable named xmlConfig, you could do this:

And then use this value to draw, assign colors to a textField or …. anything you like!



  • December 5, 2012 at 2:21 am


    Thank you! It helped! 😀

Leave a Reply