In the current tutorial you will come to know about the LinkButton control of Flex. The Adobe LinkButton in Flex is much like the hyperlink option of HTML. It helps us to open a URL in a web browser.
LinkButton in Adobe Flex:
The LinkButton in Flex is much like the hyperlink option of HTML. It helps us to open a URL in a web browser. <mx:LinkButton> tag is used to define this control.
We can put an id to this component if we intend to refer this control elsewhere in the current MXML file or ActionScript file. Whenever we move the mouse pointer over the button the color of the button changes. Following examples will help you to learn LinkButton in details:
Flex LinkButton Example:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"><mx:Script>
<![CDATA[
import mx.controls.Alert;txtarea.text=
"Hello";}
]]>
</mx:Script>
<mx:Panel width="200" height="200" title="LinkButton Example" horizontalCenter="10" verticalCenter="10"></mx:Application>
Output:

Example:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"><mx:Script>
<![CDATA[
import mx.formatters.DateFormatter;dateForm=
new DateFormatter();date=
new Date();dispDate=dateForm.format(date);
Alert.show(dispDate);
}
]]>
</mx:Script>
</mx:Application>
Output:
