<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/09/10/creating-an-undraggable-alert-control-in-flex-redux/ -->
<mx:Application name=""
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white" viewSourceURL="srcview/index.html">

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

            private var a:Alert;

            private function showAlert():void {
                var title:String;
                if (checkBox.selected) {
                    title = "Draggable Alert";
                } else {
                    title = "Undraggable Alert";
                }
                a = Alert.show("The quick brown fox jumped over the lazy dog.", title);
                a.isPopUp = checkBox.selected;
                a.status = Capabilities.version;
            }
        ]]>
    </mx:Script>

    <mx:ApplicationControlBar dock="true" horizontalGap="40">
        <mx:CheckBox id="checkBox"
                label="isPopUp:"
                labelPlacement="left"
                selected="true" />

        <mx:Button id="button"
                label="Launch Alert"
                click="showAlert();" />
    </mx:ApplicationControlBar>

</mx:Application>