开发者

Adobe Flex:change the text in <mx:text> with a click effect

开发者 https://www.devze.com 2022-12-24 08:55 出处:网络
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开发者_JAV

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号