1 <?xml version="1.0" encoding="utf-8"?> 2 <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 3 xmlns:s="library://ns.adobe.com/flex/spark" 4 xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> 5 <fx:Declarations> 6 <!-- 将非可视元素(例如服务、值对象)放在此处 --> 7 </fx:Declarations> 8 <fx:Style> 9 @namespace s "library://ns.adobe.com/flex/spark"; 10 @namespace mx "library://ns.adobe.com/flex/mx"; 11 12 @font-face{ 13 src: url("fonts/SIMHEI.TTF"); 14 fontFamily: "Heiti_font"; 15 embed-as-cff: true; 16 } 17 @font-face{ 18 src:url("fonts/MSYH.TTF"); 19 fontFamily:"Yahei_font"; 20 embed-as-cff:true; 21 } 22 s|Label{ 23 fontFamily: "Heiti_font"; 24 fontSize: 30; 25 } 26 s|TextArea{ 27 fontFamily: "Yahei_font"; 28 fontSize: 20; 29 } 30 </fx:Style> 31 <s:Label left="20" top="20" text="海阔天空-黄家驹-beyond" /> 32 <s:Label left="20" top="70" text="海阔天空-黄家驹-beyond" /> 33 <s:Label left="20" top="120" text="海阔天空-黄家驹-beyond" fontFamily="Yahei_font" fontSize="20" /> 34 <s:TextArea left="20" top="170" text="海阔天空-黄家驹-beyond" /> 35 36 </s:Application>