Viewer: AlertView class

package flashscriptMVC.views
{
	import flashscriptMVC.AbstractClass;
	import flashscriptMVC.IModel;
	import flashscriptMVC.IControlHandler;
	import flash.events.Event;
	import biz.flashscript.components.alert.CallAlert;
	public class AlertView extends AbstractClass
	{
		private var newAlert:CallAlert;
		private var md:IModel;
		
		public function AlertView (aModel:IModel = null,aController:IControlHandler = null):void
		{
			super (aModel,aController);
			md = aModel;
		}
/*
* The AlertView class calls an Alert window in case the user needs
* to be informed about errors for example. The following update function
* is the communication with the Model class.
*/
		override public function update (event:Event = null):void
		{
			if (md.alertTarget != null)
			{
				//
				// Opening a new Alert window with parameters obtained from the Model class.
				//
				newAlert = new CallAlert  ;
				newAlert.initAlert (md.alertText,md.alertYesno,md.alertTarget);
			}
		}
	}
}