This might be a simple request, but I’m having problems finding a solution. I have states setup for my text color, and I need have the color values change based on an event. I thought I could just make a bindable var for the number associated with the color value but I get an error #1119.
“1119: Access of possibly undefined property selectedColor through a reference with static type module3_inlineComponent1.”
I’m assuming this is a scoping issue - that that my states are not in the same scope as the actioncript code where I define the var, thought its in the same MXML file. Here’s the pertient code:
[Bindable] public var selectedColor:uint;
private function loadLayout(index:Number):void {
this.selectedColor = moduleXML.getSelectedTextColorAt(index);
trace("color", this.selectedColor);
}
//States
<qs:states>
<mx:State id="navState" name="selected">
<SetProperty name="filters">
<value><Array>
<f:GlowFilter color="#FFFFFF"/>
</Array></value>
</SetProperty>
<SetStyle id="sColor" name="color" value="[COLOR="Red"]{this.selectedColor}[/COLOR]" />
</mx:State>
<mx:State name="hilighted">
<SetProperty name="filters">
<value>
<Array>
<f:GlowFilter color="#BBBBBB"/>
</Array>
</value>
</SetProperty>
</mx:State>
</qs:states>