Share on Google+Share on Google+

Button in Flex4

The rectangular button is usually used by the Button component in Flex 4 which looks like to be suppressed.

Button in Flex 4:

The rectangular button is usually used by the Button component in Flex 4 which looks like to be  suppressed. The text label is the default label of this button.Whenever the select the control button to perform any actioin, it uses event listeners. As soon as the button control is clicked through mouse, it  enables and dispatches a click event and a buttonDown event. A button can perform various events like  mouseMove, mouseOver, mouseOut, rollOver, rollOut, mouseDown, and mouseUp events whether it is enabled or disabled.

The button size ranges between minimum 21*21pixels to 10000*10000 pixels maximum.


<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx=""


xmlns:mx="library://" width="100%" height="100%">



import mx.controls.Text;

public var text1:Text = new Text();

public function text():void{

text1.text = "My Name is::"+myTextInput1.text;



public function text12():void{






<s:Panel title="Button control Example"

width="250" height="160" x="18" y="18">

<s:VGroup horizontalAlign="center" paddingLeft="5" paddingTop="5"

id="myVGroup"  x="28" y="9">


<s:Label text="Enter Name :"/>

<s:TextInput id="myTextInput1" width="100" />


<s:Button id="submit" label="Submit" click="text()"/>

<s:Button id="reset" label="Reset" click="text12()"/>





Running Application:

To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.

Download this code


Posted on: April 21, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.


Advertisement null