vendredi 27 novembre 2015

SolidColorStroke - caps property is not working

I am trying to set corner and weight for a rectangle

<fx:Script>
    <![CDATA[
        protected function weight_changeHandler(event:Event):void
        {
            borderStroke.weight = wght.value;
        }           
        protected function corner_changeHandler(event:Event):void
        {
            border.topLeftRadiusX= border.bottomLeftRadiusX =border.topRightRadiusX=border.bottomRightRadiusX=corner.value;
        }           
    ]]>
</fx:Script>

<s:layout >
    <s:VerticalLayout paddingLeft="50" paddingTop="50"/>
</s:layout>
<s:Rect horizontalCenter="0" verticalCenter="0" height="300" width="300" id="border">
    <s:stroke>
        <s:SolidColorStroke id="borderStroke" color="#000000" caps="square" weight="1" alpha="1"/>
    </s:stroke>
</s:Rect>
<s:NumericStepper id="wght" change="weight_changeHandler(event)" maximum="100"/>
<s:NumericStepper id="corner" change="corner_changeHandler(event)" maximum="100"/>

when I am increasing the weight, the rect corner also changing. I am getting like this enter image description here

Anybody can tell me what I missed? what is my mistake?

Aucun commentaire:

Enregistrer un commentaire