<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    backgroundColor="#FFFFFF"
    backgroundAlpha="0"
    xmlns:custom="components.*">

    <mx:Script>
        <![CDATA[
            import mx.controls.Alert;

            private function showMonth():void{
                Alert.show("Thank you " + fullname.text +
                           '! \nYour gift will arrive in ' +
                           month.selectedItem + '.');
            }
        ]]>
    </mx:Script>

    <mx:Form>
        <mx:FormHeading label="Get a free gift!" />
        <mx:FormItem label="Name">
            <mx:TextInput id="fullname" />
        </mx:FormItem>
        <mx:FormItem label="Select delivery month">
            <custom:ComboBoxMonths id="month" />
        </mx:FormItem>
        <mx:FormItem>
            <mx:Button label="Submit"
                click="showMonth()" />
        </mx:FormItem>
    </mx:Form>
</mx:Application>
