Mark a Button as Toggle.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal"> <mx:Button id="toggleButton1" label="Button selected: {toggleButton1.selected}" toggle="true"/> <mx:Button id="toggleButton2" label="Button selected: {toggleButton2.selected}" toggle="true"/> </mx:Application>