1 Reply Latest reply on Oct 27, 2010 12:51 PM by Jacob G

    How to skin buttons spark and mx

    actionscript2n3

      Hi,
      Can anyone tell me about how to skin spark and mx button components in Flash Builder 4. It is not same as in Flex 3 like:

       

      up-skin: Embed(“assets/images/leftAlign_btn.png”); this syntax is not working for both spark and mx buttons

       


      Thanks for any help

        • 1. Re: How to skin buttons spark and mx
          Jacob G Adobe Employee

          There is more than one way this can be done.


          One way is to create a custom Spark Button skin, and then use the BitmapImage component, along with the "up" state.

           

          You specify the new skin for the Spark Button using the skinClass property, for example:

           

          <s:Button skinClass="myCustomSkin"/>

           

          In the custom skin, you can use BitmapImage to embed your image for the up state, as follows:

           

          <s:BitmapImage source.up="@Embed('assets/images/leftAlign_btn.png')"/>

           

          You may also want to use height/width and/or constraints in order to position the image as desired on the Button