For that type of scenario I sometimes set the button to toggle and
then skin the selected state.

Like this:

.playButton
{
    upSkin: Embed...(playButtonSkin)
    overSkin: Embed...(playButtonSkin)
    downSkin: Embed...(playButtonSkin)
    disabledSkin: Embed...(playButtonSkin)

    selectedUpSkin: Embed...(pauseButtonSkin)
    selectedOverSkin: Embed...(pauseButtonSkin)
    selectedDownSkin: Embed...(pauseButtonSkin)
    selectedDisabledSkin: Embed...(pauseButtonSkin)
}

<mx:Button toggle="true" styleName="playButton"/>

Juan
scalenine.com
degrafa.com

--- In [email protected], "williamkusumo" <[EMAIL PROTECTED]>
wrote:
>
> Argh, my newbie-ness shows. styleName is part of the property, I can
> just change it like any other prop. Sorry to waste your time :)
> 
> --- In [email protected], "williamkusumo" <williamkusumo@>
> wrote:
> >
> > Hi!
> > 
> > I have a skinned play button that needs to turn into a pause button
> > when clicked. Is it possible to change the styleName at run-time? If
> > not, what is the recommended way to change the button skin when user
> > clicks it?
> > 
> > Appreciate the help!
> >
>


Reply via email to