Embedded Styles
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" horizontalAlign="center" layout="horizontal"> <mx:Style> @namespace mx "http://www.adobe.com/2006/mxml"; global { font-family:Times New Roman, Times, serif; color:purple; } mx|VBox { background-color:silver; border-style:solid; border-color:black; border-thickness:2; padding-top:5; padding-bottom:5; padding-left:5; padding-right:5; } mx|HBox { background-color:silver; border-style:solid; border-color:black; border-thickness:2; padding-top:5; padding-bottom:5; padding-left:5; padding-right:5; } .redFont { color:#ff0000; } </mx:Style> <mx:VBox> <mx:Label text="Hello World" styleName="redFont"/> <mx:Button label="Click me"/> </mx:VBox> <mx:HBox> <mx:Label text="Hello World"/> <mx:Button label="Click me"/> </mx:HBox> </mx:Application>