1 Reply Latest reply on Oct 29, 2010 12:37 AM by Shongrunden

    Can I use a mask on <s:HGroup> (need only part of hgroup' s  content visible)

    nadpal Level 1

      Hi,

       

      I would like to know whether I can use a mask on an spark HGroup

       

      And how to implement that.

       

      What I need to do is make only part of hgroup' s  content visible.

       

      Or you if u have any suggestions how I can achieve this please go ahead.

       

      THANK YOU,

      Nadeesha

        • 1. Re: Can I use a mask on <s:HGroup> (need only part of hgroup' s  content visible)
          Shongrunden Adobe Employee

          Yes you can use a mask on an Group, here is an example:

           

          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                         xmlns:s="library://ns.adobe.com/flex/spark">

              <fx:Declarations>
                  <s:Group id="myMask" width="50" height="50">
                      <s:Ellipse top="0" left="0" right="0" bottom="0">
                          <s:fill>
                              <s:SolidColor color="black" />
                          </s:fill>
                      </s:Ellipse>
                  </s:Group>
              </fx:Declarations>
             
              <s:HGroup mask="{myMask}">
                  <s:Button label="1" />
                  <s:Button label="2" />
              </s:HGroup>

          </s:Application>