title: change button appearance on click
body: <p>I wahnt to change button appearance when it was clicked.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:Button xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" 
            xmlns:mx="library://ns.adobe.com/flex/mx"
            creationComplete="init()"&gt;        
      &lt;fx:Script&gt;
          &lt;![CDATA[
              public var _clicked:Boolean = false;
  
              public function init():void{
                  addEventListener(MouseEvent.CLICK, changeButtonClickStatus);            
              }
  
              public function changeButtonClickStatus(event:MouseEvent):void{
                  var that:TopMenuButton = event.currentTarget as TopMenuButton;
                  that._clicked = !(that._clicked);
  
                  if(that._clicked == true){
                  //change button appearance
                  }else{
                  //change button appearance
                  }
              }   
          ]]&gt;
      &lt;/fx:Script&gt;
  &lt;/s:Button&gt;
  </code></pre>
  
  <p>Is there a method using states? I could then use the skin convention.
  Thanks in advance for Your help.</p>