You'll want to set the style of the button in Actionscript:

In MXML:

<mx:Button id="myButton" label="Change Color" click="changeColor()" />

In script:

        public function changeColor():Void { 
                var colorArray:Array = [ "red", "red" ];
                myButton.setStyle("fillColors", colorArray);
        }


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of sandip_patil01
Sent: Friday, November 11, 2005 3:00 AM
To: [email protected]
Subject: [flexcoders] changing color of button when it is pressed

Hi all,

Can anybody know how to change color of button when we press a button.

i.e. when we press button say it should change its color form red to 
white.


Sandip P








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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