在:
<mx:WindowedApplication
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:filters="flash.filters.*"
...............
>
中加入上面红色语句,然后在Text或者Label中,例如:
<mx:Text id="bulletin" text="阿古柏" width="100%" textAlign="center" x="0" y="0" fontSize="20" verticalCenter="0" mouseDown="show(event);">
<mx:filters>
<filters:GlowFilter color="0xFFFFFF" strength="50"/>
</mx:filters>
</mx:Text>
加入红色字段,就出现了字体描边效果,这里显示字体的白色描边背景效果
----------------------------------------------------------------------------------------------
还有,在Flex中加入一些效果一定要在mx:WindowedApplication 下,例如:
<mx:Style>
Alert {
titleStyleName: "alertTitle";
messageStyleName: "alertMessage";
buttonStyleName: "alertButton";
dropShadowEnabled: true;
shadowDistance: 5;
shadowDirection: right;
cornerRadius: 5;
background-color: #E9FFEA;
}
.alertTitle {
letterSpacing: 0;
fontSize: 16;
color: red;
}
.alertMessage {
letterSpacing: 0;
fontSize: 16;
fontWeight: normal;
color: black;
}
.alertButton {
letterSpacing: 0;
fontSize: 16;
cornerRadius: 10;
fontWeight: normal;
}
txtArea {
backgroundAlpha: 1;
borderStyle:none;
backgroundColor: #ff0000;
verticalScrollPolicy:off;
}
ToolTip {
fontSize: 14;
fontWeight: normal;
backgroundColor: #22DD00;
dropShadowEnabled: true;
}
.body {
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
filter: style=1,startY=0,finishY=100,startX=100,finishX=100;
background-color: #666666;
}
</mx:Style>
否则,如果加载到了其他界面(非mx:WindowedApplication ),就不能显示此效果,难道是Flex 3的一个bug? |