package classes.matuto.utils.display
{
	import flash.display.DisplayObjectContainer;

	public class Clear
	{
		public static function clearSprite(sprite :DisplayObjectContainer) :void
		{
			var arr_sprites	:Array 	= new Array();
			var numChildren	:uint 	= sprite.numChildren;
			
			for(var i :uint=0; i<numChildren; i++){
				arr_sprites.push(sprite.getChildAt(i));
			}
			
			arr_sprites.forEach(function(child :*, index :uint, arr :Array) :void{
				sprite.removeChild(child);
			});
		}
	}
}