package modules.start
{
	
	import classes.fl.motion.easing.Exponential;
	import classes.greensock.TweenMax;
	import classes.greensock.plugins.*;
	import classes.matutoDesktop.core.Core;
	import classes.matutoDesktop.view.BaseView;
	
	import flash.events.MouseEvent;
	import flash.utils.setTimeout;
	
	import genericos.ModelApp;
	
	import modules.login.Login;
	import modules.menu.Menu;
	
	
	

	public class Start extends BaseView 
	{
		
		private var model:ModelApp;
		
		public function Start() 
		{
			super();
		}
		
		public function init():void 
		{
			
		

			
			
			
			alpha = 0;
			width  = Main.INSTANCE.stage.stageWidth;
			height = Main.INSTANCE.stage.stageHeight;
			
			model  = new ModelApp();
			
			TweenMax.to(this,1.5,{autoAlpha:1,ease:Exponential.easeInOut,onComplete:function(){
			
			
				
			}});
			
			TweenMax.to(this,1.5,{autoAlpha:0,delay:1.5,ease:Exponential.easeInOut});
			setTimeout(onClick,0);
			
			

		}
		
		private function onClick(e:MouseEvent=null):void 
		{
			
			Core.ref.updateLocal(new Menu());
			


			if(model.LOAD_LOCAL("login") == "n")
			{
				visible = false;
				Core.ref.updateLocal(new Login());
				
			}else
			{
				Core.ref.updateLocal(new Menu());
				
			}

					
		}
		public function close():void 
		{
			//setTimeout(Core.ref.updateLocal, 800, new Foto());
			
		}
		
		public function dispose():void 
		{
			
			
		}
		
		public function resize():void 
		{
			
		}
		
	}//END CLASS

}