欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Flex中 给图片添加倒影效果

程序员文章站 2022-05-05 22:09:49
...

首先到 http://code.google.com/p/gonta/下载Gonta.swc plugin.

然后添加到lib中

<?xml version="1.0" encoding="utf-8"?>
<!--created:Nov 22, 2010 file:ImageReflex.mxml  author:Michael -->
<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"
               backgroundColor="0"
               xmlns:filters="org.gonta.filters.*" viewSourceURL="srcview/index.html">

    <s:layout>
        <s:VerticalLayout verticalAlign="middle"
                          horizontalAlign="center"/>
    </s:layout>
    <s:BitmapImage id="img"
                   source="@Embed('images/reflex.png')">
        <s:filters>
            <filters:WetFloorFilter alpha=".5"
                                    y="{img.height}"
                                    height="50"/>
        </s:filters>

    </s:BitmapImage>
</s:Application>