Dynamically Load CSS in Adobe AIR/FLEX / Load css in Adobe AIR/FLEX using Class.

By | March 2, 2011

This example shows how to dynamically load css in Adobe AIR / FLEX.
Here in this example Panel id the tag name for the panel control. Drag a panel control to your design then copy the code to your source file. “myTabs” is the class for the CSS.




	Panel {
   borderColor:  #CBE0FF;
   border-style:solid;
   borderThickness: 1;
   borderThicknessLeft: 0;
   borderThicknessTop: 0;
   borderThicknessBottom: 0;
   borderThicknessRight: 0;
   cornerRadius: 4;
   highlightAlphas: 1, 0.49;
   headerColors: #0066ff, #ffffff;
   backgroundColor: #F5FAFF;
}
TitleWindow{
	borderColor:#CBE0FF;
   border-style:solid;
   borderThickness: 1;
   borderThicknessLeft: 0;
   borderThicknessTop: 0;
   borderThicknessBottom: 0;
   borderThicknessRight: 0;
   cornerRadius: 4;
   backgroundAlpha: 1;
   highlightAlphas: 1, 0.49;
   headerColors: #0066ff, #ffffff;
   backgroundColor: #F5FAFF;
   footerColors: #0099ff, #ffffff;
}

ComboBox
{
	cornerRadius: 4;
  	highlightAlphas: 0.52, 0.52;
	fillAlphas: 0, 1, 1, 1;
	fillColors: #0066ff, #ffffff, #ff9900, #eeeeee;
	borderColor: #cccccc;
	font-family:arial;
	font-size:11px;
	font-weight:normal;
	color:#000000;
}

ApplicationControlBar {
   highlightAlphas: 1, 0.42;
   fillAlphas: 0.78, 0.8;
   fillColors: #619ffc, #ffffff;
   backgroundAlpha: 1;
   cornerRadius: 1;
   shadowDistance: 1;
}
TabBar {
	tab-style-name: "myTabs";
	selected-tab-text-style-name: "mySelectedTabs";
    padding-left:0px;
	padding-right:0px;
	padding-top:0px;
	padding-bottom:0px;
	vertical-gap:0px;
	horizontal-gap:0px;
}
.myTabs {
   cornerRadius: 4;
   highlightAlphas: 0.30, 0;
   fillAlphas: 0.60, 0.40;
   /* fillColors: #c0dcf9, #e8f0f8; */
   fillColors: #95d0fe, #95d0fe;
   borderColor: #ffffff;
   border-thickness:4px;
   color: #0b333c;
   fontFamily: Arial;
   font-weight:bold;
   font-size:11px;
   backgroundColor: #f8d49d;
   padding-left:1;
   text-align:left;
   horizontal-gap:4px;
   vertical-align:middle;

}

.mySelectedTabs {
   textAlign: left;
   fontFamily: Arial;
   fontWeight: normal;
}
HBox{
 backgroundColor: #ffffff;
}


	
	
		
	
	
	
	
	
		
			
			
			
		
	
	
		
	
	
	
	
		
		
		
		
	
	
	
	
	
		
	
	
	
	


Leave a Reply

Your email address will not be published. Required fields are marked *