<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Button x="73" y="56" label="点我" width="117" height="46" id="btnClick" click="OnClick()"/>
<mx:Button x="71" y="152" label="清空" width="119" height="61" id="btnclear" click="OnClear()"/>
<mx:TextArea x="288" y="56" width="349" height="157" id="txtArea"/>
<mx:Script>
<![CDATA[
public function OnClick():void
{
txtArea.text="Hello World!";
}
//internal
public function OnClear():void
{
txtArea.text="";
}
]]>
</mx:Script>
</mx:Application>