package modules.noticias  
{

	import flash.display.MovieClip;
	import modules.menu.*;

		import flash.display.MovieClip;
	import flash.events.Event;
	import classes.matuto.model.Model;
	import classes.matuto.loaders.*;
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import genericos.*;
	import flash.net.*;
	import modules.noticias.Noticias;
		//Matuto
	import classes.fl.motion.easing.*;
	import classes.greensock.*;
	import classes.matuto.core.*;
	import classes.matuto.core.module.*;
	import classes.matuto.events.*;
	import classes.matuto.interfaces.*;
	import classes.matuto.model.*;
	import classes.matuto.mtween.textinho.*;
	import classes.matuto.ui.*;
	import classes.matuto.utils.display.*;
	import classes.matuto.utils.model.*;	
	import modules.home.*;
	import modules.menu.*;
	
	public class NoticiasItem extends Button
	{
		
		
		private var image:ImagemLoad;

		
		
		public function NoticiasItem() 
		{
			super();
		}
		
		public function setModel(value:Object)
		{
			setParams = value;
			image = new ImagemLoad();
			image.alvo_mc = _foto;
			image.setComAlvo = true;
			image.load(value.image);
			_titulo.text = value.title;
			_data.text = value.date;
			
			
			
		}
		
		public override function over() :void
		{
			
			TweenMax.to(_mais._m,.3,{tint:0x6FA725,ease:Exponential.easeInOut});
			TweenMax.to(_mais._b,.3,{tint:0xFFFFFF,ease:Exponential.easeInOut});
		}
		
		public override function out() :void
		{
			if (enabled) 
			{	
				TweenMax.to(_mais._b,.3,{tint:null,ease:Exponential.easeInOut});
				TweenMax.to(_mais._m,.3,{tint:null,ease:Exponential.easeInOut});
			}
		}
		
		override public function set enabled(value:Boolean):void 
		{			
			super.enabled = value;
			
			if (value)out();
			else over();
		}
				
		public override function click() :void
		{
			dispatchEvent(new Event(Event.SELECT));
			
		}
		
		
	}//END CLASS

}