Change button's text:

This tutorial will help you to learn how to change the label of a button on clicking on itself.

Change button's text:

Change button's text:

     

 

This tutorial will help you to learn how to change the label of a button on clicking on itself. It is another easy example on flex tutorial. Whenever a user click on the button the label of the button will change from clik me to Nice.

 

 

 

Button.mxml

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
  <mx:Panel title="New"  height="125"   x="150" y="20" layout="absolute">
  <mx:Button id="btn" label="click me" click="btn.label='Nice'" x="5" y="50"/>
  </mx:Panel>
</mx:Application>