function LSouSouSMap(){
	var self = this;
	base(self,LSprite,[]);
	LSouSouObject.sMap = self;
	self._objectData = null;
	self._loadBar = null;
	self._mapData = null;
	self.mapW = 0;
	self.mapH = 0;
	self._mapLayer = new LSprite();
	
	self.addChild(self._mapLayer);
	LGlobal.script.scriptLayer.addChild(self);
	LSouSouSMapScript.analysis();
}
/**
* 读取地图
* param [地图名]
**/
LSouSouSMap.prototype.addMap = function(param){
	var self = this;
	var smapName = "images/smap/" + param;
	//显示读取进度
	self._loadBar = new LoadingSample3();
	self.addChild(self._loadBar);
	//开始读取战场地图文件
	var urlloader = new LURLLoader();
	urlloader.parent = self;
	urlloader.addEventListener(LEvent.COMPLETE,self.loadMapFileOver);
	urlloader.load(smapName+(LGlobal.traceDebug?("?"+(new Date()).getTime()):""),"text");
};
LSouSouSMap.prototype.loadMapFileOver = function(event){
	var self = event.target.parent;
	//保存战场地图文件内容
	self._objectData = JSON.parse(event.target.data);
	//保存地形
	self._mapData = self._objectData.data;
	//描绘进度条
	self._loadBar.setProgress(50);
	//获取战场大小
	self.mapW = self._mapData[0].length*48;
	self.mapH = self._mapData.length*48;
	//开始读取战场缩略图
	loader = new LLoader();
	loader.parent = self;
	loader.addEventListener(LEvent.COMPLETE,self.loadMapSmallOver);
	loader.load("images/smap/imgs/" + self._objectData["img-small"]+(LGlobal.traceDebug?("?"+(new Date()).getTime()):""),"bitmapData");
};
LSouSouSMap.prototype.loadMapSmallOver = function(event){
	var self = event.target.parent;
	//移除进度条
	self.removeChild(self._loadBar);
	var bitmapData = new LBitmapData(event.currentTarget);
	//计算缩略图和完整图的比例
	var scale = self.mapW/bitmapData.width;
	//将缩略图作为战场背景地图进行显示
	self._map = new LSouSouSMapBackground();
	self._map.setSmall(bitmapData,scale);
	self._mapLayer.addChild(self._map);

	//显示战场缩略图
	self._miniWindow = new LSouSouSMapMiniView(bitmapData);
	self._mapLayer.addChild(self._miniWindow);

	//开始读取战场完整图
	loader = new LLoader();
	loader.parent = self;
	loader.addEventListener(LEvent.COMPLETE,self.loadMapBigOver);
	loader.load("images/smap/imgs/" + self._objectData["img-big"]+(LGlobal.traceDebug?("?"+(new Date()).getTime()):""),"bitmapData");
};
LSouSouSMap.prototype.loadMapBigOver = function(event){
	var self = event.target.parent;
	self.removeChild(self._loadBar);
	var bitmapData = new LBitmapData(event.currentTarget);
	//战场完整图读取完成，替换战场地图
	self._map.setBig(bitmapData);
	trace("loadMapBigOver");
};