Flex 4的透明背景的问题? [英] Flex 4 transparent background problem?

查看:121
本文介绍了Flex 4的透明背景的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经发现了几个解决方案,这一点,但非这些解决方案的工作me.Can有人能帮我解决这个请。 这里是我的code:

I have found several solutions for this,but non of those solutions work for me.Can someone help me with this please. here is my code :

<?xml version="1.0" encoding="utf-8"?>
<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" name="app_clock" 
               minWidth="150" minHeight="150" width="150" height="150" backgroundAlpha="0.0">


               <fx:Script>
        <![CDATA[   

        ]]>
    </fx:Script>
    <fx:Declarations>
    </fx:Declarations>  

               <s:Graphic id="clock_graphics">  
        <s:Ellipse width="90" height="90" x="5" y="5">
            <s:stroke>
                <s:LinearGradientStroke weight="50" rotation="60">
                    <s:entries>
                        <s:GradientEntry color="#B5B5B5">                           
                        </s:GradientEntry>
                        <s:GradientEntry color="#494949">                           
                        </s:GradientEntry>
                    </s:entries>
                </s:LinearGradientStroke>
            </s:stroke>
        </s:Ellipse>    
        </s:Graphic>

</s:Application>

和我有安装在JS这个 params.wmode =透明; 和对象

And I have setup in js to this params.wmode = "transparent"; and in object

<param name="bgcolor" value="transparent" />
<param name="wmode" value="transparent" />  

难道anybode有工作的一个解决方案吗? TNX提前。

Does anybode have a solution that work ? Tnx in advance.

推荐答案

Backgroundalpha将无法正常工作。你需要创建一个自定义应用程序的透明外观类。事情是这样的:

'Backgroundalpha' won't work. You'll need to create a custom transparent application skin class. Something like this:

<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark">

<fx:Metadata>
    [HostComponent("spark.components.Application")]
</fx:Metadata>

<s:states>
    <s:State name="normal" />
    <s:State name="disabled" />
</s:states>

<s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0">
    <s:fill>
        <s:SolidColor alpha="0" />
    </s:fill>
</s:Rect>

<s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" 
         minWidth="0" minHeight="0" />

</s:Skin>

和它分配给你的应用程序:

and assign it to your Application:

 <s:Application ... skinClass="MyTransparentApplicationSkin" ... />

我测试过的所有主要浏览器这一解决方案。 (是的,包括Safari浏览器)

I've tested this solution on all major browsers. (Yes, that includes Safari)

此外,&LT; PARAM NAME =BGCOLOR值=透明/&GT; 对你没有好处。虽然这会花颜色的十六进制codeS。

Furthermore, <param name="bgcolor" value="transparent" /> will do you no good. It will only take color hex codes.

这篇关于Flex 4的透明背景的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆