<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/03/11/calling-actionscript-functions-from-your-html-templates-using-the-externalinterface-api/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
		layout="vertical"
		verticalAlign="middle"
		backgroundColor="white"
		creationComplete="init();" viewSourceURL="srcview/index.html">

	<mx:Script>
		<![CDATA[
			import mx.controls.Alert;

			private var alert:Alert;

			private function init():void {
				ExternalInterface.addCallback("alert", showAlert);
			}

			private function showAlert(msg:String):void {
				var now:Date = new Date();
				alert = Alert.show(msg,now.toLocaleDateString());
				alert.status = now.toLocaleTimeString();
			}
		]]>
	</mx:Script>

</mx:Application>

