Flex字体特效---阴影,朦胧效果

首先申明:

<!-- 将非可视元素(例如服务、值对象)放在此处 -->
<fx:Declarations>


<s:GlowFilter id="glow" blurX="12" blurY="12" color="#88AEF7" quality="2" strength="1"/>  
<s:BlurFilter id="blur" blurX="4" blurY="4" quality="2" />  
<s:DropShadowFilter id="dropShadow" alpha="0.35" blurX="6" blurY="6" distance="6" color="#000000" angle="90" />  
<s:BevelFilter id="bevel" angle="45" blurX="0.5" blurY="0.5" distance="4" strength="0.7" highlightAlpha="0.7" shadowAlpha="0.7"  /> 

</fx:Declarations>


然后在使用它的地方使用之.

var filterArr:Array = []; 
// filterArr.push(blur);
filterArr.push(glow); 
filterArr.push(dropShadow); 
filterArr.push(bevel); 


//加上文字特效
place.filters=filterArr;
currTimePannel.filters=filterArr;
currNongDatePannel.filters=filterArr;
todayWeather.filters=filterArr;
todayDegree.filters=filterArr;
txtName.filters=filterArr;
lname.filters=filterArr;
lposition.filters=filterArr;
txtPosition.filters=filterArr;

lTime.filters=filterArr;
txtTime.filters=filterArr;

lDepartment.filters=filterArr;
txtDepartment.filters=filterArr;
welcomeInfo.filters=filterArr;


解释: 如place申明如下:

<mx:GridRow>
<mx:GridItem rowSpan="2">
<mx:Image id="weatherImg"  x="15" y="10" />
</mx:GridItem>
<mx:GridItem>
<mx:Label id="place" styleName="yahei"   color="blue"  filters="{[bevel]}"/>
</mx:GridItem>
<mx:GridItem>
<mx:Label id="todayWeather"  styleName="yahei"   color="blue" filters="{[bevel]}"/>
</mx:GridItem>
</mx:GridRow>


<mx:GridRow>
<mx:GridItem colSpan="2">
<mx:Label id="todayDegree" styleName="yahei"   color="blue" filters="{[bevel]}"/>
</mx:GridItem>
</mx:GridRow>



你可能感兴趣的:(image,Flex,distance)