Hi, <mx:Button id="myButton"/>
and Private function setButtonState() : Void { myButton.enabled = ( someval == otherval ); } Its all in the docs.... Ali -- Alistair McLeod Development Director iteration::two [EMAIL PROTECTED] Office: +44 (0)131 338 6108 This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened. -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of joao_m_fernandes Sent: 19 April 2005 18:06 To: flexcoders@yahoogroups.com Subject: [flexcoders] setting conditional "enabled" with AS Hi there, This may be a basic question. I know that if I use <mx:Button enabled="{someval == otherval}"/> My button will be enabled whenever someval = otherval is true. How can I set this kind of conditional values to a button created with ActionScript ? Thanks, Joćo Fernandes Yahoo! Groups Links 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/