<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function Luas():void
{
var z:int;
z=Number(panjang.text)*Number(lebar.text)
Alert.show(String(z),"Luas")
}
]]>
</mx:Script>
<mx:Label x="43" y="56" text="panjang"/>
<mx:Label x="43" y="101" text="lebar"/>
<mx:TextInput x="154" y="54" id="panjang"/>
<mx:TextInput x="154" y="99" id="lebar"/>
<mx:Button x="114" y="175" label="Luas" click="Luas()"/>
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function Luas():void
{
var z:int;
z=Number(panjang.text)*Number(lebar.text)
Alert.show(String(z),"Luas")
}
]]>
</mx:Script>
<mx:Label x="43" y="56" text="panjang"/>
<mx:Label x="43" y="101" text="lebar"/>
<mx:TextInput x="154" y="54" id="panjang"/>
<mx:TextInput x="154" y="99" id="lebar"/>
<mx:Button x="114" y="175" label="Luas" click="Luas()"/>
</mx:Application>