求Flex3中的淡入淡出效果代码

longwords 2011-03-21 04:54:26
Flex3中的淡入淡出效果代码,要求要实现SWF文件的淡入淡出
...全文
136 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
longwords 2011-03-22
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 xuhuanchao 的回复:]
看看文档mx.effects.Fade


<mx:Fade id="fadeIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>

<mx:Label text="Nokia 9930"
fontFamily="MyMyriad" fontSize="14"
showEffect="{fadeIn}"/>
[/Quote]

谢谢 我找到帮助文档了 但是还是出了一点小状况!还请解答
longwords 2011-03-22
  • 打赏
  • 举报
回复
<?xml version="1.0"?>
<!-- Simple example to demonstrate the Fade effect. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
initialize="Font.registerFont(myriad_font);">

<mx:Script>
<![CDATA[

import flash.text.Font;

[Embed("source='E:/ChenyulongGX/222.jpg'", fontName="MyMyriad")]
public var myriad_font:Class;
]]>

</mx:Script>

<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:Panel title="Fade Effect Example" width="95%" height="95%"
paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">

<mx:Text width="100%" color="blue"
text="Use the Fade effect to show or hide the text and image. Use an embedded font when applying the Fade effect to text."/>

<mx:Label text="Nokia 9930"
fontFamily="MyMyriad" fontSize="14"
visible="{cb1.selected}"
hideEffect="{fadeOut}" showEffect="{fadeIn}"/>

<mx:Image source="@Embed(source='E:/ChenyulongGX/333.jpg')"
visible="{cb1.selected}"
hideEffect="{fadeOut}" showEffect="{fadeIn}"/>

<mx:CheckBox id="cb1" label="visible" selected="true"/>

</mx:Panel>
</mx:Application>

这句有错,但是我不知道怎么修改,请高手指点:[Embed("source='E:/ChenyulongGX/222.jpg'", fontName="MyMyriad")]
水中影子 2011-03-21
  • 打赏
  • 举报
回复
看看文档mx.effects.Fade


<mx:Fade id="fadeIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>

<mx:Label text="Nokia 9930"
fontFamily="MyMyriad" fontSize="14"
showEffect="{fadeIn}"/>

4,327

社区成员

发帖
与我相关
我的任务
社区描述
多媒体/设计 Flex
社区管理员
  • Flex
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧