flex效果示例代码

<!--*************************==特效==*******************************-->
   <!--发光特效-->
     <mx:Glow id="BtnGlow" alphaFrom="0.8" alphaTo="0.0" blurXFrom="0.0" blurXTo="50.0" blurYFrom="0.0" blurYTo="50.0"
   duration="1000" color="red"/>
   <!--模糊效果-->
   <mx:Blur id="LblBlur" duration="1000" blurXFrom="10.0" blurXTo="0.0" blurYFrom="10.0" blurYTo="0.0"/>
   <!--拉伸效果-->
   <mx:AnimateProperty id="animateProperty" duration="2000" property="scaleX" fromValue="1" toValue="3" />
   <!--溶解效果-->
   <mx:Dissolve id="dissolve" alphaFrom="1.0" alphaTo="0.8" color="red" duration="2000"/>
   <!--淡入淡出效果-->
   <mx:Fade id="fade" duration="2000" alphaFrom="0.2" alphaTo="1.0" />
   <!--从小变大效果-->
   <mx:Iris id="iris" duration="2000" />
   <!--移动效果-->
   <!--尺寸缩放效果-->
   <mx:Resize id="resize" duration="2000" heightFrom="20" heightTo="200" widthFrom="20" widthTo="200"/>
   <mx:Resize id="resize1" duration="2000" heightFrom="200" heightTo="20" widthFrom="200" widthTo="20"/>
   <!--旋转效果-->
   <mx:Rotate id="rotate" duration="2000"   angleFrom="0" angleTo="360" originX="100" originY="100"/>
   <!--缩放效果-->
   <mx:Zoom id="zoom" duration="2000" zoomWidthFrom="1" zoomWidthTo="0" />
   <mx:Zoom id="zoom1" duration="2000" zoomWidthFrom="0" zoomWidthTo="1" />
<!--***********************************************************-->

<mx:HBox>
 
   <!--发光的特效-->
   <mx:Button id="GlowButton" label="发光" width="55" height="55" rollOverEffect="{BtnGlow}" />
   <!--模糊效果-->
   <mx:Label id="BlurLabel" text="模糊效果" visible="true" rollOverEffect="{LblBlur}" />
   <!--拉伸效果-->
   <mx:Label id="anLabel" text="拉伸效果" rollOverEffect="{animateProperty}"/>
   <!--溶解效果-->
   <mx:Button id="dissBtn" label="溶解效果" rollOverEffect="{dissolve}"/>
   <!--淡入淡出效果-->
   <mx:Button id="fadeBtn" label="淡入淡出效果" rollOverEffect="{fade}"/>
   <!--从小变大效果-->
   <mx:Button id="irisBtn" label="缩小效果" rollOverEffect="{iris}"/>
   <!--移动效果-->
   <mx:Button id="moveBtn" label="移动效果" />
   </mx:HBox>
   <mx:HBox>
   <!--尺寸缩放效果-->
   <mx:Button id="resizeBtn" label="尺寸缩放效果" rollOverEffect="{resize}" rollOutEffect="{resize1}"/>
   <!--旋转效果-->
   <mx:Button id="rotateBtn" label="旋转效果" width="200" height="200" rollOverEffect="{rotate}"/>
   <!--缩放效果-->
   <mx:Panel id="zoomPanel1" label="缩放效果" width="200" height="200" rollOverEffect="{zoom}"/>
   <mx:Panel id="zoomPanel2" title="缩放效果zoomPanel2" width="200" height="200" rollOverEffect="{zoom1}"/>
 
   </mx:HBox>

你可能感兴趣的:(Flex)