I have a Flex application in which I draw a rectangle using:
<s:Rect height="20" width="115" top="1" id="myRect">
<s:stroke>
<s:SolidColorStroke color="#FF0000" weight="2" alpha="0"/>
</s:stroke>
</s:Rect>
I want to set the value of alpha for myRect dynamically. Is it possible to set alpha using Actionscript? If so, how to access the alpha property?
I thought something like this would work, but I’m getting error Access of undefined property SolidColorStroke:
searchRect.stroke.SolidColorStroke.alpha=1;
Give the
s:SolidColorStrokean id, as in:Then you can set alpha such as:
This example updates the alpha based on a slider: