tags:

views:

70

answers:

1

I've got the following CSS which I'd like to get working. I'm sure I've done something similar once, but I can't find the answer on google.

Basically some style properties have child properties which can be changed, suchas Container.borderSkin. You can set borderThickness, borderStyle etc, all on the borderSkin style.

<mx:Style>
        .myBorderSkin
        {
            borderThickness: 5;
            borderColor: #FF0000;
            /*borderStyle: none;*/
        }

        MyControl
        {
            borderSkin: .myBorderSkin;
        }
</mx:Style>

Unfortunatly when I run the application, I get the error "TypeError: Error #1034: Type Coercion failed: cannot convert "myBorderSkin" to Class."

A: 

This is what I was thinking of:

ButtonBar 
{ 
        buttonStyleName: "buttonBarButton"; 
        firstButtonStyleName: "firstButtonBarButton"; 
        lastButtonStyleName: "lastButtonBarButton";
}

.buttonBarButton 
{
        color: #000000;
        textRollOverColor: #000000;
        textSelectedColor:#000000; 
}

By setting the {x}StyleName property you can point it at a CSS selector.

Mark Ingram