<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
public function textMerge(input1:String,input2:String):String
{
var x:String = input1 + input2;
return x;
}
]]>
</fx:Script>
<s:Group>
<s:layout>
<s:HorizontalLayout/>
</s:layout>
<s:TextInput id="value1"/>
<mx:Label text="and"/>
<s:TextInput id="value2"/>
<s:Button label="Join The Two"
click="Alert.show(textMerge(value1.text,value2.text))"/>
</s:Group>
</s:Application>