On 6/7/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> Can someone explain why this code does not work then? I tried to make it so
> that it will change the button color to red then back to its original color
> but its not working? 

> public function changecolor(){
>  oldColor= buttonthree.getStyle("color");
> buttonthree.setStyle("fillColors", [0xCCC333,0xCC0065]) 
>   
> }

You're saving "color", then setting "fillColors"...

> public function changebackcolor(){ 
>   
> buttonthree.setStyle("color", [oldColor])
> }
> </mx:Script> 

Then you're setting "color"  back to its original value (which you
never changed), but using array syntax (so suddenly it's an array and
it makes no sense to the component).

So.


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to