我试图弄清楚为什么在使用 chromeColor (或其他火花样式相关项目)时出现错误:
<s:Button x="10" y="208" label="CALL" width="185" fontWeight="bold" id="bCall" chromeColor="#F90000"/>
这是错误:
The style 'chromeColor' is only supported by type 'spark.components.Button' with the theme(s) 'spark'.
然而在项目 - 属性中,主题设置为 Spark。我还尝试将其设置为 Halo,然后再设置回 Spark。
这是我的应用程序定义:
<?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" minWidth="800" minHeight="600" width="100%" height="100%">
我已经看到将 mx 命名空间定义为“xmlns:mx="library://ns.adobe.com/flex/halo" 的引用,但随后我的 mx 组件中断(例如 TabNavigator) - 不确定这是否会修复它离。
我正在使用 flex 4.1 库(如果这很重要,我相信该项目最初是在 flex builder 为 4.0 时创建的)。不包括其他库。项目 - 属性设置为 MX+Spark。
此外,如果我删除该 chromeColor,项目会编译,但会出现以下警告:
The style 'borderAlpha' is only supported by type 'spark.components.TitleWindow' with the theme(s) 'spark'. Flex Problem
(和其他 -borderColor、cornerRadius、dropShadowVisible)