[flexcoders] Changing styleName at run-time

2007-09-17 Thread williamkusumo
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!



Re: [flexcoders] Changing styleName at run-time

2007-09-17 Thread Michael Schmalle
Hi,

.playSkins {
   upSkin:bla;
   overSkin:blah;
   etc...
}

.pauseSkins {
   upSkin:bla;
   overSkin:blah;
   etc...
}

playPauseButton.styleName = (isPlaying) ? playStyles : pauseStyles;

Peace, Mike

On 9/17/07, williamkusumo [EMAIL PROTECTED] 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!

  




-- 
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.