如何使用Flex Dissolve effect

<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the Dissolve effect. -->
<!--
如何使用Flex Dissolve effect
MyShareBook.cn 翻譯
-->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Dissolve id="dissolveOut" duration="1000" alphaFrom="1.0" alphaTo="0.0"/>
<mx:Dissolve id="dissolveIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>

<mx:Panel title="Dissolve Effect Example"
width="95%" height="95%" layout="horizontal"
paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">

<mx:VBox height="100%">
<mx:Label text="Nokia 9930"
fontSize="14"
visible="{cb1.selected}"
hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>

<mx:Image source="@Embed(source='assets/Nokia_6630.png')"
visible="{cb1.selected}"
hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>
</mx:VBox>

<mx:VBox height="100%" width="100%">
<mx:Text width="100%" color="blue"
text="Use the Dissolve effect to show or hide the text, image, and button."/>

<mx:Spacer height="100%"/>

<mx:Button label="Purchase"
visible="{cb1.selected}"
hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>
</mx:VBox>

<mx:ControlBar>
<mx:CheckBox id="cb1" label="visible" selected="true"/>
</mx:ControlBar>
</mx:Panel>
</mx:Application>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章