当弹出窗口打开时,为什么我的rect填充了不同的颜色?

时间:2012-11-05 22:37:34

标签: flash flex flex4 flex-spark

我在面板中添加一个包含Rect填充的Group。该面板包含两个状态normal和normalWithControlBar。该组位于normalWithControlBar中。在隔离测试中,它可以正常工作。当它在我的应用程序中显示时,Rect背景填充不会显示正确的颜色。

我认为可能会在某处设置blendMode,但我不确定是否是它或者应用的地点和原因。

我也有Rotate3D效果可能是它的原因。既然它是一个大型的应用程序,我正在努力通过它可能是什么,但在那之前有没有人听说过这个或可能导致它的原因?感谢

示例代码:

在小组中:

<MyPanel>
    <s:controlBarContent>
        <local:MyGroup width="500" height="230"/><!--appears tinted-->
    </s:controlBarContent>

    <local:MyGroup width="500" height="230"/><!--appears normal-->
</MyPanel>

在MyGroup中:

<s:Rect width="100%" height="80"
        top="100"
            >
    <s:fill>
        <s:SolidColor color="#dddddd"/>
    </s:fill>
</s:Rect>

1 个答案:

答案 0 :(得分:0)

找到它。它发生的原因是因为该组未被添加到Panel的外观类中的排除列表中,并且在Application CSS中指定了chromeColor。

在MyPanelSkin中:

之前:

/* Define the skin elements that should not be colorized. */
static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup", "border"];

之后:

/* Define the skin elements that should not be colorized. */
static private const exclusions:Array = ["myGroup", "background", "titleDisplay", "contentGroup", "controlBarGroup", "border"];

一旦我将我的皮肤部分添加到排除列表中,填充颜色就会正确显示。

相关问题