tags:

views:

88

answers:

1

I am new to flex, how do you change the text inside of a text control when a user has clicked a button. I could not find a way to do this. I used an event handler to input a .xml to a string and then to the text control. This doesn't seem to work. Any suggestions?

A: 

let's see if I can do this off the top of my head:

<mx:Button [all your button properties] onClick"buttonClick()"/>
<mx:Script>
  <![CDATA[
    public function buttonClick():void{
      myText.text = "My new String";
    }
  ]]>

yeah, that should do it.

invertedSpear