     //--------------------------------------------------------------------------
     
     [SkinPart(required="false")]
+    /**
+     *  A skin part that defines the  label of the button. 
+     */
     public var labelField:TextBox;
     
     //--------------------------------------------------------------------------

    //
    //--------------------------------------------------------------------------
    
	[Bindable("labelChanged")]
	public function set label(value:String):void
	{
		content = value;
		dispatchEvent(new Event("labelChanged"));
		
		if (labelField)
			labelField.text = label;
	}
	public function get label():String			
	{
		return (content != null) ? content.toString():"";
	}
	
	[Bindable]
	public var content:*

	// -----------------------------------------------------------------------
	//
	// Public properties defining the state of the button.
	//
	// -----------------------------------------------------------------------
	
	/**
	 *  @return Returns true when the mouse cursor is over the button. 
	 */	
	public function get isHoveredOver():Boolean
	{
		return flags.isSet(isHoveredOverFlag);
	}
	
	/**
	 *  Sets the flag indicating whether the mouse cursor
	 *  is over the button.
	 */	
	protected function setHoveredOver(value:Boolean):void
	{
		if (!flags.update(isHoveredOverFlag, value))
			return;

		invalidateSkinState();
	}

	/**
	 *  @return Returns true when the mouse button is down and it was pressed 
	 *  while cursor was over the button.
	 */    
	public function get isMouseCaptured():Boolean
	{
		return flags.isSet(isMouseCapturedFlag);
	}
	
	/**
	 *  Sets the flag indicating whether the mouse has been pressed
	 *  while cursor was over the button.
	 */	
	protected function setMouseCaptured(value:Boolean):void
	{
		if (!flags.update(isMouseCapturedFlag, value))
			return;

		invalidateSkinState();

		// System mouse handlers are not needed when the button is not mouse captured
		if (!value)
			removeSystemMouseHandlers();
	}
	
	/**
	 *  @return Returns true when the button is enabled. 
	 */	
	public function get isEnabled():Boolean { return enabled; }

    /**
     *  @inheritDoc
     */
	override public function set enabled(value:Boolean):void
	{
		if (isEnabled == value)
			return;
		super.enabled = value;
		invalidateSkinState();
	}
	
	/**
	 *  @return Returns true when key has been pressed
	 *  while button is in focus.
	 */	
	public function get isKeyboardPressed():Boolean
	{
		return flags.isSet(isKeyboardPressedFlag);
	}
	
	/**
	 *  Sets the flag indicating whether key has been pressed while 
	 *  button is in focus.
	 */	
	protected function setKeyboardPressed(value:Boolean):void
	{
		if (!flags.update(isKeyboardPressedFlag, value))
			return;
		invalidateSkinState();
	}
	
    /**
     *  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.
     *
     *  <p>Button subclasses, such as the SliderThumb and ScrollThumb classes
     *  or the up and down arrows of a ScrollBar, set 
     *  this property to <code>true</code>.</p>
     *
     *  @default false
     */
    public function get stickyHighlighting():Boolean
    {
    	return flags.isSet(stickyHighlightingFlag);
    }
    public function set stickyHighlighting(value:Boolean):void
    {
    	if (!flags.update(stickyHighlightingFlag, value))
    		return;

    	invalidateSkinState();
    }

	protected static const isHoveredOverFlag:uint 		= 1 << 0;
	protected static const isMouseCapturedFlag:uint 	= 1 << 1;
	protected static const isKeyboardPressedFlag:uint	= 1 << 2;
	protected static const autoRepeatFlag:uint			= 1 << 3;
	protected static const stickyHighlightingFlag:uint	= 1 << 4;
	protected static const downEventFiredFlag:uint		= 1 << 5;
	protected static const lastFlag:uint				= 1 << 5;

	protected var flags:Flags32 = new Flags32();
    
    //--------------------------------------------------------------------------
    //

import mx.managers.IFocusManagerComponent;

/**
 *  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.
 *
