Adobe Flex:change the text in <mx:text> with a click effect
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开发者_JAVA技巧 and then to the text control. This doesn't seem to work. Any suggestions?
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.
精彩评论