0
votes

Can anyone provide me solution for this facing problem: I am using dropdownlist in flash 4.6 , where I have applied custom skin. custom skin contained on button , label, Datagroup. So, I want to change the color of specific item from list, as given option is only to change background rollOverColor,selectionColor but not contant color. Help me please If anyone have its solution.

custom Skin code is following:

<s:Scroller left="0" top="0" right="0" bottom="0" focusEnabled="false" minViewportInset="1" >

            <fx:Script>
                <![CDATA[
                    import mx.events.FlexEvent;
                    import mx.utils.ObjectUtil;
                    protected function dataGroup_creationCompleteHandler(event:FlexEvent):void
                    {
                        dataGroup.setStyle('rollOverColor','black');
                        dataGroup.setStyle('selectionColor','black');
                    }


                ]]>
            </fx:Script>

            <s:DataGroup id="dataGroup" itemRenderer="spark.skins.spark.DefaultItemRenderer" 
                         creationComplete="dataGroup_creationCompleteHandler(event)"  mouseDown="mosuedownEvt(event)">
                <s:layout>
                    <s:VerticalLayout gap="0" horizontalAlign="contentJustify" />
                </s:layout>
            </s:DataGroup>
        </s:Scroller>
1
Can you provide your full custom skin code? Do you just need to set the rollOverColor and selectionColor styles? help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/… help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/… - JeffryHouser
yes let me share my custom skin code with you. custom skin consist of two classes , you can download these class from following links :(dropbox.com/s/cjyi91p441inbwy/CustomSkinForProductDropDown.mxml) and (dropbox.com/s/q6zcv17lhyp8ur6/…) rollOverColor and selectionColor change background color of content. I need to change content color rather than to change background color. - user1498234
Please add edit your question to add the code; do not give us links to external sites. - JeffryHouser

1 Answers

0
votes

In your DefaultItemRenderer override the

set data 

method and change to color depending if it the "default"-value or the specific one you are looking for.