本文主要是介绍flex fade,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
fade 类:<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" alpha="0.1"rollOut="rollOutH(event)"rollOver="rollOverH(event)"width="400" height="300"><mx:Script><![CDATA[[Embed(source="assets/info_bubble.png")][Bindable]public var myImage:Class;private function rollOutH(event:MouseEvent):void {fade01.stop();fade10.play([this]);}private function rollOverH(event:MouseEvent):void {fade10.stop();fade01.play([this]);}]]></mx:Script><mx:Image id="img1" source="{myImage}"/><mx:Fade id="fade01" alphaFrom="0.1" alphaTo="1.0" duration="500"/><mx:Fade id="fade10" alphaFrom="1.0" alphaTo="0.1" duration="500"/></mx:Canvas>
测试类:<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"xmlns:ns1="com.esri.ags.samples.*"><ns1:fade1 x="100" y="80"></ns1:fade1></mx:Application>
这篇关于flex fade的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!