Mega Code Archive
Style class selector on different targets
private var myButtonStyle:CSSStyleDeclaration = new CSSStyleDeclaration('myButtonStyle');
private var myLabelStyle:CSSStyleDeclaration = new CSSStyleDeclaration('myLabelStyle');
private var myTextAreaStyle:CSSStyleDeclaration =new CSSStyleDeclaration('myTextAreaStyle');
private function initApp():void {
myButtonStyle.setStyle('color', 'blue');
myLabelStyle.setStyle('color', 'blue');
myTextAreaStyle.setStyle('color', 'blue');
}
private function applyStyles():void {
styleManager.setStyleDeclaration("spark.components.Button", myButtonStyle, false);
styleManager.setStyleDeclaration("spark.components.Label", myLabelStyle, false);
styleManager.setStyleDeclaration("spark.components.TextArea", myTextAreaStyle,true);
}