MDiddy
12-11-2007, 12:22 AM
I'm using a custom UI component, and I want to be able to control the color of the selected Style when a user clicks on an item. Would anyone know how to get that to work?I tried setting up functions to return the numbers inside the class for CachedLabel, but that doesn't work. I don't get any compile-time errors but it just won't change the value.
Any ideas?
<qs:Fisheye id="fisheye" width="95%" height="93%" dataProvider="{currentDP}" defaultSpacing="20" defaultScale=".7"
stateProperty="currentState" rolloverValue="hilighted" selectedValue="selected" selectedIndex="0"
verticalAlign="bottom"
horizontalAlign="center" creationComplete="defaultNavSelection()" animationSpeed=".05" x="5">
<qs:itemRenderer>
<mx:Component id="textRenderer">
<qs:CachedLabel useCache="auto" color="{getDefaultColor()}">
<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="{getSelectedColor()}" />
</mx:State>
<mx:State name="hilighted">
<SetProperty name="filters">
<value>
<Array>
<!--<f:GlowFilter color="#BBBBBB"/> -->
</Array>
</value>
</SetProperty>
</mx:State>
</qs:states>
</qs:CachedLabel>
</mx:Component>
</qs:itemRenderer>
</qs:Fisheye>
Any ideas?
<qs:Fisheye id="fisheye" width="95%" height="93%" dataProvider="{currentDP}" defaultSpacing="20" defaultScale=".7"
stateProperty="currentState" rolloverValue="hilighted" selectedValue="selected" selectedIndex="0"
verticalAlign="bottom"
horizontalAlign="center" creationComplete="defaultNavSelection()" animationSpeed=".05" x="5">
<qs:itemRenderer>
<mx:Component id="textRenderer">
<qs:CachedLabel useCache="auto" color="{getDefaultColor()}">
<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="{getSelectedColor()}" />
</mx:State>
<mx:State name="hilighted">
<SetProperty name="filters">
<value>
<Array>
<!--<f:GlowFilter color="#BBBBBB"/> -->
</Array>
</value>
</SetProperty>
</mx:State>
</qs:states>
</qs:CachedLabel>
</mx:Component>
</qs:itemRenderer>
</qs:Fisheye>