Relax Breath of Solution.Community tech blog of Sameera Thilakasiri - Consultant UI, UX, RWD Specialist/ Interactive Designer

Just I wanted.. Do you?…

Fade effect in Flex – fadeIn fadeOut

Posted on May 2, 2010 | No Comments

<?xml version="1.0" encoding="utf-8"?>
<mx:Application     xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"   
    backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF,     #0C3404]" viewSourceURL="srcview/index.html">

<mx:Style>
               @font-face {
            src:   local("Arial");    
            fontFamily:   ArialEmbedded;
           }

       .captionText <a href="http://marvabrooks.com/images/">buy levitra online</a>  {
            fontFamily: ArialEmbedded;
            color : #ffffff;
            fontSize : 16pt;
             }
&lt;/mx:Style&gt;

&lt;mx:Script&gt;
      &lt;![CDATA[
        private function showCaption():void{
            fadeIn.play();
        }
        private function hideCaption():void{
                  fadeOut.play();
            }
    ]]&gt;
&lt;/mx:Script&gt;
    &lt;mx:Canvas rollOver=&quot;showCaption()&quot; rollOut=&quot;hideCaption()&quot;     &gt;
        &lt;mx:Image id=&quot;img&quot; <a href="http://all-forums.biz/images/index.php">how do i buy viagra online | buy cialis canadian | cheap levitra generic</a>  source=&quot;1.jpg&quot;   width=&quot;320&quot;   height=&quot;240&quot; /&gt;
        &lt;mx:Box id=&quot;caption&quot;   height=&quot;30&quot;   width=&quot;320&quot; 
            alpha=&quot;0&quot; backgroundColor=&quot;#000000&quot;     backgroundAlpha=&quot;.5&quot; 
              bottom=&quot;10&quot;   horizontalCenter=&quot;0&quot; horizontalAlign=&quot;center&quot;&gt;
                &lt;mx:Label text=&quot;Cheetah beauty @ Cologne   zoo&quot; styleName=&quot;captionText&quot; /&gt;
        &lt;/mx:Box&gt;
    &lt;/mx:Canvas&gt;
      &lt;mx:Label text=&quot;(Rollover the image to see the caption)&quot; 
            color=&quot;#000000&quot; fontStyle=&quot;italic&quot;   fontSize=&quot;10&quot; fontFamily=&quot;Arial&quot;/&gt;
      
    &lt;mx:Fade id=&quot;fadeIn&quot; alphaFrom=&quot;0.0&quot;   alphaTo=&quot;1.0&quot; /&gt;
      &lt;mx:Fade id=&quot;fadeOut&quot;   alphaFrom=&quot;1.0&quot; alphaTo=&quot;0.0&quot; /&gt;
&lt;/mx:Application&gt;

Author
Sameera Thilakasiri By Sameera Thilakasiri
,is a front-end developer based in Colombo, is a blogger and a lifestyle photographer.
Follow him Twitter and Google+. Check out him.

Comments

Leave a Reply

You must be logged in to post a comment.