2

I am trying to figure out why I am getting an error when using the chromeColor (or other spark style related items):

            <s:Button x="10" y="208" label="CALL" width="185" fontWeight="bold" id="bCall" chromeColor="#F90000"/>

This is the error:

The style 'chromeColor' is only supported by type 'spark.components.Button' with the theme(s) 'spark'.

Yet in project - properties, the theme is set to Spark. I also tried setting it to Halo and then back to Spark.

Here is my app definition:

<?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%">

I have seen references that define the mx namespace as "xmlns:mx="library://ns.adobe.com/flex/halo", but then my mx components break (TabNavigator for example) - not sure if that would fix it anway.

I is using flex 4.1 library (I believe the project was originally created when flex builder was at 4.0 if that matters). No other libraries included. Project - properties is set to MX+Spark.

Also, if I remove that chromeColor, the project compiles, BUT there are warnings such as:

The style 'borderAlpha' is only supported by type 'spark.components.TitleWindow' with the theme(s) 'spark'. Flex Problem

(and others - borderColor, cornerRadius, dropShadowVisible)

Kyle Hale
  • 7,912
  • 1
  • 37
  • 58
Scott Szretter
  • 3,938
  • 11
  • 57
  • 76

2 Answers2

2

I finally found it - I had a compiler flag set referencing mx/halo, I took that out and it works fine now. I may have put that in when I was trying to use some halo related code in the project.

Scott Szretter
  • 3,938
  • 11
  • 57
  • 76
  • 2
    Would you mind elaborating on this? I seem to have a related problem in my code at the moment... http://xkcd.com/979/ – finalman Oct 26 '12 at 14:09
0

Two issues I see:

  1. chromeColor is not a documented style of the Button class.

  2. borderAlpha is not a documented style of the titleWindow class.

    The error you're seeing does sound misleading, for sure, but what makes you think you can use those styles?

The "proper" way to change the border alpha in the titleWindow would be to create a custom skin. I assume the same is true for chromeColor [but It is not obvious to me what that should do].

Community
  • 1
  • 1
JeffryHouser
  • 39,401
  • 4
  • 38
  • 59
  • Even better, I did not write any code to style the titleWindow! The warnings are coming up on line numbers higher than the number of lines of code in my app! For chromeColor on the button, again, I did not type that - Flex Builder generated it when I clicked the button in design view and used the color picker to change the color of the button. – Scott Szretter May 04 '11 at 11:05