     public function FxButton()
     {
         super();
-
-        // DisplayObjectContainer properties.
-        // Setting mouseChildren to false ensures that mouse events
-        // are dispatched from the Button itself,
-        // not from its skins, icons, or TextField.
-        // One reason for doing this is that if you press the mouse button
-        // while over the TextField and release the mouse button while over
-        // a skin or icon, we want the player to dispatch a "click" event.
-        // Another is that if mouseChildren were true and someone uses
-        // Sprites rather than Shapes for the skins or icons,
-        // then we we wouldn't get a click because the current skin or icon
-        // changes between the mouseDown and the mouseUp.
-        // (This doesn't happen even when mouseChildren is true if the skins
-        // and icons are Shapes, because Shapes never dispatch mouse events;
-        // they are dispatched from the Button in this case.)
-        mouseChildren = false;
-        
-        // add event listeners to the button
-        addHandlers();
     }   
-
-    //--------------------------------------------------------------------------
-    //
-    //  Skin Parts
-    //
-    //--------------------------------------------------------------------------
-
-    [SkinPart(required="false")]
-
-    /**
-     *  A skin part that defines the  label of the button. 
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public var labelElement:TextGraphicElement;
 
     //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  content
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the content property.
-     */
-    private var _content:Object;
-    
-    [Bindable("contentChange")]
-
-    /**
-     *  The <code>content</code> property lets you pass an arbitrary object
-     *  to be used in a custom skin of the button.
-     * 
-     *  When a skin defines the optional part <code>labelElement</code> then
-     *  a string representation of <code>content</code> will be pushed down to
-     *  that part's <code>text</code> property.
-     *
-     *  The default skin uses this mechanism to render the <code>content</code>
-     *  as the button label.  
-     * 
-     *  <p>The <code>label</code> property is a <code>String</code> typed
-     *  facade of this property.  This property is bindable and it shares
-     *  the "contentChange" event with the <code>label</code> property.</p>
-     * 
-     *  @default null
-     *  @eventType contentChange
-     *  @see #label
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get content():Object
-    {
-        return _content;
-    }
-
-    /**
-     *  @private
-     */
-    public function set content(value:Object):void
-    {
-        _content = value;
-
-        // Push to the optional labelElement skin part
-        if (labelElement)
-            labelElement.text = label;
-        dispatchEvent(new Event("contentChange"));
-    }
-
-    //----------------------------------
-    //  label
-    //----------------------------------
-
-    [Bindable("contentChange")]
-
-    /**
-     *  Text to appear on the FxButton control.
-     * 
-     *  <p>If the label is wider than the FxButton control,
-     *  the label is truncated and terminated by an ellipsis (...).
-     *  The full label displays as a tooltip
-     *  when the user moves the mouse over the control.
-     *  If you have also set a tooltip by using the <code>tooltip</code>
-     *  property, the tooltip is displayed rather than the label text.</p>
-     *
-     *  <p>This is the default FxButton property.</p>
-     *
-     *  <p>This property is a <code>String</code> typed facade to the
-     *  <code>content</code> property.  This property is bindable and it shares
-     *  dispatching the "contentChange" event with the <code>content</code>
-     *  property.</p> 
-     *  
-     *  @default ""
-     *  @see #content
-     *  @eventType contentChange
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function set label(value:String):void
-    {
-        // label property is just a proxy to the content.
-        // The content setter will dispatch the event.
-        content = value;
-    }
-
-    /**
-     *  @private
-     */
-    public function get label():String          
-    {
-        return (content != null) ? content.toString() : "";
-    }
-    
-    //----------------------------------
-    //  hovered
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the hovered property 
-     */
-    private var _hovered:Boolean = false;    
-
-    /**
-     *  Indicates whether the mouse pointer is over the button.
-     *  Used to determine the skin state.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */ 
-    protected function get hovered():Boolean
-    {
-        return _hovered;
-    }
-    
-    /**
-     *  @private
-     */ 
-    protected function set hovered(value:Boolean):void
-    {
-        if (value == _hovered)
-            return;
-
-        _hovered = value;
-        invalidateButtonState();
-    }
-
-    //----------------------------------
-    //  mouseCaptured
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the mouseCaptured property 
-     */
-    private var _mouseCaptured:Boolean = false;    
-
-    /**
-     *  Indicates whether the mouse is down and the mouse pointer was
-     *  over the button when MouseEvent.MOUSE_DOWN was first dispatched.
-     *  Used to determine the skin state.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */    
-    protected function get mouseCaptured():Boolean
-    {
-        return _mouseCaptured;
-    }
-    
-    /**
-     *  @private
-     */
-    protected function set mouseCaptured(value:Boolean):void
-    {
-        if (value == _mouseCaptured)
-            return;
-
-        _mouseCaptured = value;        
-        invalidateButtonState();
-
-        // System mouse handlers are not needed when the button is not mouse captured
-        if (!value)
-            removeSystemMouseHandlers();
-    }
-    
-    /**
-     *  @private
-     */
-    override public function set enabled(value:Boolean):void
-    {
-        if (enabled == value)
-            return;
-
-        super.enabled = value;
-        invalidateButtonState();
-    }
-    
-    //----------------------------------
-    //  keyboardPressed
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the keyboardPressed property 
-     */
-    private var _keyboardPressed:Boolean = false;    
-
-    /**
-     *  Indicates whether a keyboard key is pressed while the button is in focus.
-     *  Used to determine the skin state.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */ 
-    protected function get keyboardPressed():Boolean
-    {
-        return _keyboardPressed;
-    }
-    
-    /**
-     *  @private
-     */
-    protected function set keyboardPressed(value:Boolean):void
-    {
-        if (value == _keyboardPressed)
-            return;
-
-        _keyboardPressed = value;
-        invalidateButtonState();
-    }
-    
-    //----------------------------------
-    //  stickyHighlighting
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the stickyHighlighting property 
-     */
-    private var _stickyHighlighting:Boolean = false;    
-
-    /**
-     *  If <code>false</code>, the button displays its down skin
-     *  when the user presses it but changes to its over skin when
-     *  the user drags the mouse off of it.
-     *  If <code>true</code>, the button displays its down skin
-     *  when the user presses it, and continues to display this skin
-     *  when the user drags the mouse off of it.
-     *
-     *  @default false
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get stickyHighlighting():Boolean
-    {
-        return _stickyHighlighting
-    }
-
-    /**
-     *  @private
-     */
-    public function set stickyHighlighting(value:Boolean):void
-    {
-        if (value == _stickyHighlighting)
-            return;
-
-        _stickyHighlighting = value;
-        invalidateButtonState();
-    }
 
     //----------------------------------
     //  emphasized


package mx.components
{
    
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.ui.Keyboard;
import flash.utils.Timer;

import mx.components.baseClasses.FxComponent;
import mx.core.IButton;
import mx.events.FlexEvent;
import mx.events.SandboxMouseEvent;
import mx.graphics.baseClasses.TextGraphicElement;
import mx.managers.IFocusManagerComponent;
import mx.utils.StringUtil;

include "../styles/metadata/BasicTextLayoutFormatStyles.as"

/**
 *  @copy mx.components.baseClasses.GroupBase#focusColor
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */ 
[Style(name="focusColor", type="uint", format="Color", inherit="yes")]

/**
 *  Dispatched when the user presses the FxButton control.
 *  If the <code>autoRepeat</code> property is <code>true</code>,
 *  this event is dispatched repeatedly as long as the button stays down.
 *
 *  @eventType mx.events.FlexEvent.BUTTON_DOWN
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
[Event(name="buttonDown", type="mx.events.FlexEvent")]

/**
 *  Number of milliseconds to wait after the first <code>buttonDown</code>
 *  event before repeating <code>buttonDown</code> events at each 
 *  <code>repeatInterval</code>.
 * 
 *  @default 500
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
[Style(name="repeatDelay", type="Number", format="Time", inherit="no")]

/**
 *  Number of milliseconds between <code>buttonDown</code> events
 *  if the user presses and holds the mouse on a button.
 *  
 *  @default 35
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
[Style(name="repeatInterval", type="Number", format="Time", inherit="no")]

/**
 *  Up State of the Button
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
[SkinState("up")]

/**
 *  Over State of the Button
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
[SkinState("over")]

/**
 *  Down State of the Button
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
[SkinState("down")]

/**
 *  Disabled State of the Button
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
[SkinState("disabled")]
 
//--------------------------------------
//  Other metadata
//--------------------------------------

[DefaultTriggerEvent("click")]

[DefaultProperty("label")]

[IconFile("FxButton.png")]


 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
public class FxButton extends ButtonBase implements IButton
{
    include "../core/Version.as";

