function.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" fontSize="14">
<mx:Script>
<![CDATA[
private function a(word:String):void{
label1.text=word;
}
]]>
</mx:Script>
<mx:Label id="label1" width="176" x="360" y="183"></mx:Label>
<mx:Button id="button1" label="提交" x="360" y="233" click="a('hello the wolrd!')"></mx:Button>
<mx:Button id="button2" label="提交" x="420" y="233" click="a('the wolrd!')"></mx:Button>
<mx:Button id="button3" label="提交" x="488" y="233" click="a('侬好!')"></mx:Button>
</mx:Application>
如有问题,可以QQ搜索群1028468525加入群聊,欢迎一起研究技术
转载请注明:flex中函数带参数 出自老鄢博客 | 欢迎分享