Note that there are some explanatory texts on larger screens.

plurals
  1. POmouseEnabledWhereTransparent not working as expected
    text
    copied!<p>I just cannot understand why mouseEnabledWhereTransparent does not work on this skin.</p> <p>The Skin this creates is basically a Button with a transparent background and a little triangle to the left side, like so: <strong>>ButtonText</strong> But the empty space around the Triangle does not receive mouse events.</p> <p>I've tried wrapping another group around the triangle path and i've tried wrapping it into a Graphic Object, also without success. I could create a Rect with 0 alpha below everything, but isn't that exactly what mouseEnabledWhereTransparent should be doing for me?</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minWidth="21" minHeight="21" alpha.disabled="0.5" mouseEnabledWhereTransparent="true"&gt; &lt;!-- host component --&gt; &lt;fx:Metadata&gt; &lt;![CDATA[ [HostComponent("spark.components.Button")] ]]&gt; &lt;/fx:Metadata&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;!-- triangle tip --&gt; &lt;s:Path data="M 0 0 L 0 14 L 10 7 L 0 0" bottom="5"&gt; &lt;s:fill&gt; &lt;s:SolidColor color="0xFFFFFF" /&gt; &lt;/s:fill&gt; &lt;/s:Path&gt; &lt;!-- text --&gt; &lt;s:Label id="labelDisplay" textAlign="center" verticalAlign="bottom" maxDisplayedLines="1" left="14" right="10" top="2" bottom="2" color="0x000000" fontSize="14"&gt; &lt;/s:Label&gt; &lt;/s:SparkSkin&gt; </code></pre>
 

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