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 model:IModel;
		public function AlertView (aModel:IModel=null,aController:IControlHandler=null):void
		{
			super (aModel,aController);
			model = 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
		{
			var md:IModel = model as IModel;
			if (md.getAlertTarget() != null)
			{
				//
				// Opening a new Alert window with parameters obtained from the Model class.
				//
				newAlert = new CallAlert  ;
				newAlert.initAlert (md.getAlertText(),md.getAlertYesno(),md.getAlertTarget());
			}
		}
	}
}