package classes.matuto.core
{
	import classes.matuto.core.module.Module;
	import classes.matuto.interfaces.IDisplay;
	import classes.matuto.model.Model;
	
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class TesteExternal
	{
		
		private static var module:Module;
		
		public function TesteExternal()
		{
			super();
		}

		
		public static function init(_module:Module):void
		{
			
			module = _module;
			
			module.stage.scaleMode = 'noScale';
			module.stage.align	   = 'TL';
			
			
			SiteMaps.init(function():void
			{
				
				testeAmf(SiteMaps.getConfig.getNomePHP,SiteMaps.getConfig.getGateway);
				module.init();
			
			});
			
			module.stage.addEventListener(Event.RESIZE,resize);
			module.resize();	
		
		}
		
		
		public static function testeAmf(name:String,gateway:String):void
		{
			Model.INIT_AMF(name,gateway);			
		}
		
		public function close():void
		{
		
		}
		
		public static function resize(e:Event):void
		{
			module.resize();
		}
		
		public function dispose():void
		{
			
		}
		
	}
}