Change fill.Color to yellow only if previous color is green
This seems somthing that should be easy, but I cannot get it to work, or maybe it just cannot be done!
Bascially, I have a field which background can be red, yellow or green.
I have a checkbox, that will make the color change. I want to change the color to yellow, only if the field is green. If the field is red, it will stay red.
if ((this.getField("AS").value == "1") && (this.getField("Exercise").fillColor == color.green))
{this.getField("Exercise").fillColor = color.yellow;}This code doesn't change to color of the field.
When I try fillColor = color.green; the color changes to yellow, even if it's red.
