[英]Adobe Flex Transparency not working on Button icon
I am fairly inexperienced with Flex, but my googling has retrieved nothing to suggest this is an obvious question. 我对Flex缺乏经验,但是我的谷歌搜索没有发现任何暗示这是一个显而易见的问题。
I have an mx:Button with an Icon on it that is a png file with a transparent background, as below, however the transparency is not working, and the icon is painted with a white background. 我有一个带有图标的mx:Button,它是一个具有透明背景的png文件,如下所示,但是透明性不起作用,并且图标涂有白色背景。
<mx:Button label="Button" icon="@Embed(source='images/clearTracks.png')"/>
I have seen how to use a ByteArrayImage to get a transparency working on an image, but this technique doesn't appear available for a button's icon property. 我已经看到了如何使用ByteArrayImage来获得对图像的透明度,但是该技术似乎不适用于按钮的icon属性。
There's an existing bug in Adobe's Jira for this issue: http://bugs.adobe.com/jira/browse/SDK-8877 . Adobe的Jira中存在一个针对此问题的现有错误: http : //bugs.adobe.com/jira/browse/SDK-8877 。
Flex does support PNG transparency, but from what I've read, it decodes some pngs incorrectly when embedding them, causing the weird background issue you're seeing. Flex确实支持PNG透明性,但是据我所读,它在嵌入某些png时会错误地对其进行解码,从而导致您看到奇怪的背景问题。 Can you try creating the graphic again from photoshop?
您可以尝试再次从photoshop中创建图形吗?
use skin and overSkin styles rather than the icon property. 使用外观样式和overSkin样式,而不是icon属性。 Its working with transparent images for me.
它为我处理透明图像。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.