Hyperlink Control

Problem
One of my friends had been asking me about how to change the style of the LinkButton like an HTML hyperlink, since people liketo display the link as like as HTML.
Solution
I developed a simple Hyperlink control in Flex that has the same look and feel as an HTML anchor tag.
Detailed explanation
Just create class which extends Text, and change the style on mouseOver to meet the same feel like html hyperlink.

public class Hyperlink extends Text
{

    /**
     * Constructor. Creates new instance of Hyperlink class.
     */
    public function Hyperlink()
    {
        //TODO: implement function
        super();
        selectable = false;
        addEventListener(MouseEvent.CLICK, clickHandler);
        addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
        addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
        buttonMode = true;
        mouseChildren = false;
    }

    //--------------------------------------------------------------------------
    //
    //    Properties
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  url
    //----------------------------------

    /**
     * @private
     * it stores the value of url property
     */
    private var _url:String = "#";

    /**
     * Gets or sets the value to url property
     */
    public function get url():String
    {
        return _url;
    }

    /**
     * @private
     */
    public function set url(value:String):void
    {
        _url = value;
    }

    //----------------------------------
    //  window
    //----------------------------------
    /**
     * @private
     * it stores the value of window property
     */
    private var _window:String = "_self";

    /**
     * Gets or sets the value to window property
     */
    public function get window():String
    {
        return _window;
    }

    /**
     * @private
     */
    public function set window(value:String):void
    {
        _window = value;
    }

    //--------------------------------------------------------------------------
    //
    //    Event Handlers
    //
    //--------------------------------------------------------------------------

    private function clickHandler(event:MouseEvent):void
    {
        navigateToURL(new URLRequest(_url), _window);
    }

    private function mouseOverHandler(evnt:MouseEvent):void
    {
        setStyle("textDecoration", "underline");
    }

    private function mouseOutHandler(event:MouseEvent):void
    {
        setStyle("textDecoration", "none");
    }
}

You just code like below and you can set the styles same as other controls.

<controls:hyperlink text="My Web Log" url="http://beasrilankan.com" window="_blank"/>