1 Reply Latest reply on Sep 23, 2009 8:42 AM by DilipShah

    dynamic skinning of Spark button?

    DilipShah
      I wish to use Spark Button for my video player's  play / pause button. I thought I would create 2 different skin files and  dynamically assign them to the play / pause button in the ActionScript function  but found that Spark Button's skin property is read-only! Any suggestions on how  this can be done (without creating 2 different buttons)?
        • 1. Re: dynamic skinning of Spark button?
          DilipShah Level 1

          To answer my own question (thanks to Deepa Subramaniam of Adobe), you can use the new Flex 4 style to dynamically apply a skin to a component, as follows:

                      playPause.setStyle("skinClass", PlayButtonSkin);

          or

                      playPause.setStyle("skinClass", PauseButtonSkin);