Set toggle to true on the buttons and then you can check the selected property.
btn.toggle = true; trace(btn.selected); HTH, Ryan From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of ericmaslowski Sent: Monday, June 08, 2009 9:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Grab the Current State of a Button Hello, I have been trying to do something very simple here with Flex but have hit a wall. I have several toggle buttons throughout the UI that when one is activated others change their states depending on the states of others. So, if button one is pressed button 1 looks at what other buttons are pressed and makes a decision on what to do. Sometimes this involves resetting another button's state to UP or DOWN. The problem is that I can't find out how to query the state of any of these buttons. I would think it would be a simple member of the Button class that one can test like: if(button.getState() == ButtonStates.DOWN) {...} I looked into what Flex refers to as states, ButtonPhase (although there doesn't seem to be any documentation on this), and a few other methods. I would really hate to resort to creating over a dozen functions and event handlers to get this very simple query to work. Does anyone have any pointers or advice? Thanks! E. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.