3 Replies Latest reply: Mar 10, 2013 6:44 AM by DeanLoganBH RSS

    Initializer for 'color': cannot parse value of type uint from text 'colorUint'.

    fsoender Community Member

      What is wrong with my code? I get this error:

       

       

      Initializer for 'color': cannot parse value of type uint from text 'colorUint'.

       

      Code:

       

      public static function convertStringToUint(value:String, mask:String):uint
         { 
          var colorString:String = "0x" + value; 
          var colorUint:uint = mx.core.Singleton.getInstance("mx.styles::IStyleManager2").getColorName( colorString ); 
         
          return colorUint; 
         }    


      <s:Button id="Battery" x="10" y="44" width="60" height="30" label="Battery" fontSize="10" color="colorUint"/>