Note that there are some explanatory texts on larger screens.

plurals
  1. PODo filters break colorizeExclusions in Flex 4.5 skins, and if so, is there a workaround?
    text
    copied!<p>I have created an MXML spark button skin in Flex 4.5 that seems to work wonderfully, except that in the down-state, it ignores my <strong>colorizeExclusions</strong> array (which is currently protecting the text label and the highlight on the button). The <em>only</em> difference between the up-state and the down-state is that I am applying an inner drop shadow in the down-state.</p> <p>StackOverflow won't let me post images, because I'm a new user, so I've posted some elsewhere:</p> <p><a href="http://malkyne.org/images/stackoverflow/button_up.png" rel="nofollow noreferrer">Up State</a></p> <p><img src="https://i.stack.imgur.com/K34gY.png" alt="up state"></p> <p><a href="http://malkyne.org/images/stackoverflow/button_down.png" rel="nofollow noreferrer">Down State</a></p> <p><img src="https://i.stack.imgur.com/T2A52.png" alt="down state"></p> <p>See how the highlight and text are colorized with the blue color, in the second picture? That's just plain <em>wrong</em>.</p> <p>If I place no state restrictions on this inner shadow, I see the same issue: My colorizeExclusions are ignored, so it does not appear to have anything to do with the states, or any state-specific CSS (which there isn't any of, in this case, anyway).</p> <p>Here's the button skin code:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fb="http://ns.adobe.com/flashbuilder/2009" xmlns:fxg="assets.fxg.*" minWidth="18" minHeight="18" alpha.disabled="0.5"&gt; &lt;fx:Metadata&gt; &lt;![CDATA[ /** * @copy spark.skins.spark.ApplicationSkin#hostComponent */ [HostComponent("spark.components.Button")] ]]&gt; &lt;/fx:Metadata&gt; &lt;fx:Script fb:purpose="styling"&gt; &lt;![CDATA[ import spark.components.Group; /* Define the skin elements that should not be colorized. For button, the graphics are colorized but the label is not. */ static private const exclusions:Array = ["labelDisplay", "highlight"]; /** * @private */ override public function get colorizeExclusions():Array {return exclusions;} /** * @private */ override protected function initializationComplete():void { useChromeColor = true; super.initializationComplete(); } ]]&gt; &lt;/fx:Script&gt; &lt;!-- states --&gt; &lt;s:states&gt; &lt;s:State name="up" /&gt; &lt;s:State name="over" /&gt; &lt;s:State name="down" /&gt; &lt;s:State name="disabled" /&gt; &lt;/s:states&gt; &lt;s:Group left="0" right="0" top="0" bottom="0"&gt; &lt;!-- Background --&gt; &lt;s:Group id="background" left="0" right="0" top="0" bottom="0"&gt; &lt;fxg:GlassButtonBack excludeFrom="over" left="0" right="0" top="0" bottom="0"/&gt; &lt;fxg:GlassButtonBackBright includeIn="over" left="0" right="0" top="0" bottom="0"/&gt; &lt;/s:Group&gt; &lt;!-- layer 8: text --&gt; &lt;!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay --&gt; &lt;s:Label id="labelDisplay" left="16" right="16" top="8" bottom="8" fontWeight="bold" horizontalCenter="0" maxDisplayedLines="1" textAlign="center" verticalAlign="middle" verticalCenter="1"/&gt; &lt;s:Rect id="highlight" left="3" right="3" top="3" height="40%" radiusX="6" radiusY="6"&gt; &lt;s:fill&gt; &lt;s:LinearGradient rotation="90"&gt; &lt;s:entries&gt; &lt;s:GradientEntry ratio="0" alpha="0.9" color="#FFFFFF" /&gt; &lt;s:GradientEntry ratio="1" alpha="0" color="#FFFFFF" /&gt; &lt;/s:entries&gt; &lt;/s:LinearGradient&gt; &lt;/s:fill&gt; &lt;/s:Rect&gt; &lt;s:filters&gt; &lt;s:DropShadowFilter includeIn="down" inner="true" color="#000000" blurX="10" blurY="10" angle="90"/&gt; &lt;/s:filters&gt; &lt;/s:Group&gt; </code></pre> <p></p> <p>Does anyone have any idea what on earth is going on here? Is this a Flex bug? Is there a workaround? Did I do something stupid? I'm really at a loss, here.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload