<s:transitions>
<s:Transition fromState="default">
<s:Parallel>
<mx:Resize target="{loginPanel}" duration="100"/>
<s:Wipe direction="right" target="{confirm}"/>
</s:Parallel>
</s:Transition>
<s:Transition fromState="Register">
<s:Sequence>
<mx:Resize target="{loginPanel}" duration="100"/>
</s:Sequence>
</s:Transition>
</s:transitions>
<s:transitions>
<s:Transition id="trans" fromState="*" toState="*">
<s:Sequence>
<s:Resize duration="800" target="{viewBox}"/>
<s:Rotate angleBy="180" autoCenterTransform="true" duration="300" target="{bt}"/>
</s:Sequence>
</s:Transition>
</s:transitions>

transitions: 一个 Transition 对象 Array,其中的每个 Transition 对象都定义一组效果,用于在视图状态发生更改时播放。

普通效果:定义后,在指定的时候播放。

指定的时间:

1.在执行play(),end()的时候播放。

2.在指定发生事件里播放,比如: hideEffect="{dissolveOut}"  showEffect="{dissolveIn}"

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"> <fx:Script>
<![CDATA[
protected function button1_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub }
]]>
</fx:Script> <fx:Declarations>
<!--动画效果-->
<mx:AnimateProperty id="animateProperty" property="scaleX" fromValue="1" toValue="2" duration="1000"/>
<mx:AnimateProperty id="animateProperty1" property="scaleX" fromValue="2" toValue="1" duration="1000"/>
<!--模糊效果-->
<mx:Blur id="blurImage" duration="1000" blurXFrom="0.0" blurXTo="10.0" blurYFrom="0.0" blurYTo="10.0"/>
<mx:Blur id="blurImage1" duration="1000" blurXFrom="10.0" blurXTo="0.0" blurYFrom="10.0" blurYTo="0.0"/>
<!--发光效果-->
<mx:Glow id="glowImage" duration="1000" alphaFrom="1.0" alphaTo="0.3" blurXFrom="0.0" blurXTo="50.0" blurYFrom="0.0" blurYTo="50.0" color="0xFF0000"/>
<mx:Glow id="glowImage1" duration="1000" alphaFrom="0.3" alphaTo="1" blurXFrom="50.0" blurXTo="0.0" blurYFrom="50.0" blurYTo="0.0" color="0xFF0000"/> <!--dissolve效果,,,用于显示和隐藏-->
<mx:Dissolve id="dissolveOut" duration="1000" alphaFrom="1.0" alphaTo="0.0" color="0xff0000"/>
<mx:Dissolve id="dissolveIn" duration="1000" alphaFrom="0.0" alphaTo="1.0" color="0xff0000"/>
<!--fade淡入淡出效果-->
<mx:Fade id="fadeOut" duration="1000" alphaFrom="1.0" alphaTo="0.0"/>
<mx:Fade id="fadeIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>
<!--虹效果,-->
<mx:Iris id="irisOut" duration="1000" showTarget="true"/>
<mx:Iris id="irisIn" duration="1000" showTarget="false"/>
<!--Rotate旋转效果-->
<mx:Rotate id="rotate" angleFrom="-45" angleTo="0" target="{img2}" duration="2000"/> <mx:Resize id="expand" target="{img3}" widthTo="265" heightTo="265"/>
<mx:Resize id="contract" target="{img3}" widthTo="25" heightTo="40"/>
</fx:Declarations> <mx:HBox>
<mx:VBox>
<mx:Image id="img1" source="asdf.jpg" rollOverEffect="{animateProperty}" rollOutEffect="{animateProperty1}" />
<mx:Image id="img" source="asdf.jpg" rollOverEffect="{blurImage}" rollOutEffect="{blurImage1}" />
<mx:Image source="asdf.jpg" rollOverEffect="{glowImage}" rollOutEffect="{glowImage1}"/>
</mx:VBox>
<mx:VBox>
<mx:VBox>
<mx:CheckBox id="cbx2" label="visible" selected="true"/>
<mx:Image source="asdf.jpg" visible="{cbx2.selected}" hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>
</mx:VBox> <mx:VBox>
<mx:CheckBox id="cbx" label="visible" selected="true"/>
<mx:Image source="asdf.jpg" visible="{cbx.selected}" hideEffect="{fadeOut}" showEffect="{fadeIn}"/>
</mx:VBox>
<mx:VBox>
<mx:CheckBox id="cbx1" label="visible" selected="true"/>
<mx:Image id="Flex" source="asdf.jpg" visible="{cbx1.selected}" showEffect="{irisIn}" hideEffect="{irisOut}"/>
</mx:VBox>
</mx:VBox>
<mx:VBox>
<mx:Image id="img2" source="asdf.jpg" addedEffect="rotate"/>
</mx:VBox>
<mx:VBox> <mx:ControlBar>
<mx:Button label="Expand" click="expand.end();expand.play();"/>
<mx:Button label="Contract" click="contract.end();contract.play();"/>
</mx:ControlBar>
<mx:Image id="img3" width="25" height="40" source="asdf.jpg"/>
</mx:VBox> </mx:HBox> </s:Application>
<s:states>
<s:State name="collapsed"/>
<s:State name="expanded"/>
</s:states>
<s:transitions>
<s:Transition id="trans" fromState="*" toState="*">
<s:Sequence>
<s:Resize duration="800" target="{viewBox}"/>
</s:Sequence>
</s:Transition>
</s:transitions>
<s:Group id="viewBox" right="0" bottom="0" width="186" height="186"
right.collapsed="0" bottom.collapsed="0" width.collapsed="0" height.collapsed="0">
<s:BorderContainer id="zzz" left="5" right="5" top="5" bottom="5" width="180" height="180"
borderStyle="solid" cornerRadius="3"/>
<mx:Box visible="{ovmap_show}" width="186" height="186" backgroundColor="#0D84CD"
borderStyle="solid" cornerRadius="3" horizontalAlign="center"
includeInLayout="{ovmap_show}" verticalAlign="middle"
right.collapsed="0" bottom.collapsed="0" width.collapsed="0" height.collapsed="0">
<s:Group width="180" height="180" cacheAsBitmap="true"
creationComplete="viewBox_creationCompleteHandler(event)" mask="{zzz}"
right.collapsed="30" bottom.collapsed="30" width.collapsed="0"
height.collapsed="0">
<s:Rect id="vborder" left="0" right="0" top="0" bottom="0">
<s:fill>
<s:SolidColor alpha="1" color="0xFFFFFF"/>
</s:fill>
</s:Rect>
<esri:Map id="ovMap" width="180" height="180" clickRecenterEnabled="false"
doubleClickZoomEnabled="false" keyboardNavigationEnabled="false"
load="ovMapLoaded(event)" logoVisible="false" panArrowsVisible="false"
panEnabled="false" rubberbandZoomEnabled="false" scaleBarVisible="false"
scrollWheelZoomEnabled="false" zoomSliderVisible="false"/>
<s:filters>
<mx:DropShadowFilter alpha="0.3" angle="45" distance="5" inner="true"/>
</s:filters>
</s:Group>
</mx:Box>
</s:Group>
<mx:SWFLoader id="bt" right="2" bottom="2" width="20" height="20" click="toggleView(event)"
complete="overviewbtn_complete(event)"
source="widgets/OverviewMap/assets/overviewbtn.swf"
toolTip.collapsed="{openToolTip}"
toolTip.expanded="{closeToolTip}" toolTipShow="bt_toolTipShowHandler(event)"/>

最新文章

  1. socket网络间通信初识
  2. C#根据当前时间获取周,月,季度,年度等时间段的起止时间
  3. Hadoop中JAVA不经过Catch(Exception e)直接到finally或者退出原因
  4. IOS关于UIViewController之间的切换
  5. ios html5 网页取消默认样式
  6. equals()和hashcode()
  7. Moses manual 中Basline System 2.3.4节用IRSTLM创建语言模型的命令有误
  8. 将CMD内的显示内容输出到txt文件
  9. for循环,列表和格式化输出
  10. NOI 2013 书法家
  11. vs2008+opencv2.4.9 +win7X64位系统 2.
  12. Oracle实践--PL/SQL表分区的基础
  13. 滤波器——BoxBlur均值滤波及其快速实现
  14. App跟web定位元素页面相互切换
  15. C语言:开平方根sqrt程序02
  16. IDEA项目找不到浏览器报错的情况
  17. MySQL之当数据库数据源被锁(Table Metadata Lock)时的解决方案
  18. 【资料收集】OpenCV入门指南 系列文章
  19. 服务容错保护断路器Hystrix之二:Hystrix工作流程解析
  20. spark shuffle 机制

热门文章

  1. php sso单点登录原理阐述
  2. ZeroMQ 在 centos 6.5_x86_64 下的安装
  3. mp3 切割
  4. Codeforces Round #FF (Div. 1) A. DZY Loves Sequences
  5. mac上安装port
  6. IIS网站打不开错误解决方案集锦(一):编译器错误消息: 编译器失败,错误代码为 -1073741502。
  7. NF3 里面的z cull reverse reload
  8. PowerDesigner(五)-概念数据模型(CDM生成LDM,PDM和OOM)(转)
  9. Codeforces Round #247 (Div. 2) C题
  10. HTML页面处理以及资源文件的加载