Skip navigation
Currently Being Moderated

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

Mar 5, 2013 4:39 PM

Hi,

 

Im trying to change color on my button text. When I write it "red" or "blue" its ok, but when I use a sting it wont work. Any suggestion?

 

Error:

 

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

 

Code:

 

public var Status:String;

 

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

 
Replies
  • Currently Being Moderated
    Mar 6, 2013 9:09 AM   in reply to fsoender

    The compiler has special case knowledge for a small set of color names.

     

    You can try to use binding syntax and StyleManager.getColorName

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points