flash - 在 Spark 列表中设置项目渲染器的透明度

标签 flash actionscript-3 apache-flex colors itemrenderer

我有一个包含交替项目颜色的列表。

<s:List id="myList" change="selectionChanged(event)" alternatingItemColors="[0x000000, 0xFFFFFF]" dataProvider="{alResults}" itemRenderer="itemRenders.Results" width="100%"></s:List>

我只是想让项目背景透明。

在 ItemRenderer 的开始标签中,我试过了,但没有成功。

<s:ItemRenderer name="Results"
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    autoDrawBackground="true"
    contentBackgroundAlpha="0.2">

我也在数据覆盖方法中尝试了 setStyle,但也没有用。谢谢。

最佳答案

ItemRenderer:autoDrawBackground="false" 将禁用其背景。
列表:您可以使用contentBackgroundColor 更改背景颜色或使用contentBackgroundAlpha="0" 使其透明。

关于flash - 在 Spark 列表中设置项目渲染器的透明度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8997116/

相关文章:

ios - iPhone 上的补间动画效果(如 Flash),也许使用 cocos 2d?

c - AS3 两种算法的上次幂实现

android - 我们可以在 android 上使用 flex 和 c++ 吗?

apache-flex - 如何使用SWF加载程序播放youtube视频?

apache-flex - Speex 或 nellymoser

actionscript-3 - ActionScript/Flex - 在静音时停止录制

android - 如何找到20分钟MP3的结尾并将其停止在AS3(Flash CS6)中?

iphone - Flash中IOS开发中的default.png图片

actionscript-3 - AS3我正在尝试在未从外部加载的Sound对象上重现SampleDataEvent的data属性

apache-flex - 如何在 FLEX 中显示 SVG