Question

I have a css that defines de skin-class for a custom component, like this :

view|PlaceHolderView {
    skin-class:ClassReference('view.skin.PlaceHolderSkin');
}

Is there a way to change that value at runtime, so that all instances of the component switch skin?

Was it helpful?

Solution

I found the answer to my question after a bit more digging around.

var dec:CSSStyleDeclaration = styleManager.getStyleDeclaration('view.PlaceHolderView')
dec.setStyle('skinClass', MyOtherSkinClass);
styleManager.setStyleDeclaration('view.PlaceHolderView', dec, true);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top