Hello Saurabh and others,

I am sorry for such a late response, got stuck in something very
important...

The major change that I did was converted my skin to use spark states
instead of mx states --

Old Skin Code using mx states  --
        <!-- states -->
        <s:states>
                <mx:State name="up" />
                <mx:State name="over" stateGroups="overStates" />
                <mx:State name="down" stateGroups="downStates" />
                <mx:State name="disabled" stateGroups="disabledStates" />
                <mx:State name="upAndSelected" stateGroups="selectedStates,
selectedUpStates" />
                <mx:State name="overAndSelected" stateGroups="overStates,
selectedStates" />
                <mx:State name="downAndSelected" stateGroups="downStates,
selectedStates" />
                <mx:State name="disabledAndSelected" 
stateGroups="selectedUpStates,
disabledStates, selectedStates" />
        </s:states>

New Skin Code using spark states --
<!-- states -->
        <s:states>
                <s:State name="up" />
                <s:State name="over" stateGroups="overStates" />
                <s:State name="down" stateGroups="downStates" />
                <s:State name="disabled" stateGroups="disabledStates" />
                <s:State name="upAndSelected" stateGroups="selectedStates,
selectedUpStates" />
                <s:State name="overAndSelected" stateGroups="overStates,
selectedStates" />
                <s:State name="downAndSelected" stateGroups="downStates,
selectedStates" />
                <s:State name="disabledAndSelected" 
stateGroups="selectedUpStates,
disabledStates, selectedStates" />
        </s:states>

This was the code for my older skin, try to see if you can reproduce
as well, and then enlighten me why would this start working if I start
using spark skin.

<?xml version="1.0" encoding="utf-8"?>


<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009";
xmlns:s="library://ns.adobe.com/flex/spark"
                         xmlns:fb="http://ns.adobe.com/flashbuilder/2009";
                         xmlns:mx="library://ns.adobe.com/flex/mx"
                         minWidth="21" minHeight="21" 
alpha.disabledStates="0.5">

        <!-- host component -->
        <fx:Metadata>
                <![CDATA[
                /**
                * @copy spark.skins.spark.ApplicationSkin#hostComponent
                */
                [HostComponent("spark.components.ToggleButton")]
                ]]>
        </fx:Metadata>

        <!-- states -->
        <s:states>
                <mx:State name="up" />
                <mx:State name="over" stateGroups="overStates" />
                <mx:State name="down" stateGroups="downStates" />
                <mx:State name="disabled" stateGroups="disabledStates" />
                <mx:State name="upAndSelected" stateGroups="selectedStates,
selectedUpStates" />
                <mx:State name="overAndSelected" stateGroups="overStates,
selectedStates" />
                <mx:State name="downAndSelected" stateGroups="downStates,
selectedStates" />
                <mx:State name="disabledAndSelected" 
stateGroups="selectedUpStates,
disabledStates, selectedStates" />
        </s:states>


        <s:Rect  left="0" right="0" top="0" bottom="0" radiusX="0"  >

                <s:fill.down>
                        <mx:SolidColor color="#4f76b0" />
                </s:fill.down>

                <s:fill.selectedStates>
                        <mx:SolidColor color="#4f76b0"/>
                </s:fill.selectedStates>




                <s:fill.up>
                        <mx:LinearGradient rotation="90">
                                <mx:GradientEntry alpha="1" color="#FFFFFF" 
ratio="0"/>
                                <mx:GradientEntry alpha="1.0" color="#BFD7FF" 
ratio="1"/>
                        </mx:LinearGradient>
                </s:fill.up>

                <s:stroke.over>
                        <mx:SolidColorStroke caps="none" color="#5380D0" 
joints="miter"
miterLimit="4" weight="1"/>
                </s:stroke.over>
                <s:stroke.selectedStates>
                        <mx:LinearGradientStroke caps="none" joints="miter" 
miterLimit="4"
rotation="90" weight="1">
                                <mx:GradientEntry alpha="1" color="#5380D0" 
ratio="0"/>
                                <mx:GradientEntry alpha="1.0" color="#4870B5" 
ratio="1"/>
                        </mx:LinearGradientStroke>
                </s:stroke.selectedStates>

                <s:stroke.up>
                        <mx:SolidColorStroke caps="none" color="#4f76b0" 
joints="miter"
miterLimit="4" weight="1"/>
                </s:stroke.up>
        </s:Rect>

        <!-- layer 8: text -->
        <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay --
>

        <s:Label id="labelDisplay"
                        color="#0b3339"
                        color.down="#f2f7fa"
                        color.selectedStates="#f2f7fa"
                        textAlign="center"
                        verticalAlign="middle"
                        maxDisplayedLines="1"
                        horizontalCenter="0" verticalCenter="1"
                        left="4" right="4" top="2" bottom="2">
        </s:Label>

</s:SparkSkin>

*** Many congratulations to everyone Flex 4 certified...looking
forward to everyone's experiences and pointers to get certified. ****

Thanks,
Vicky

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_in...@googlegroups.com.
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to