function LSouSouSMapMenuCtrl(x,y){
	var self = this;
	base(self,LSprite,[]);
	self.addMenu(x,y);
}
LSouSouSMapMenuCtrl.prototype.addMenu = function(x,y){
	var self = this;
	LSouSouObject.sMap.smapClick.removeClickEvent(); 
	var menuLayer = new LSprite();
	var buttonAtk = new LButtonSample1("攻击");
	buttonAtk.backgroundCorl = "red";
	buttonAtk.x = 15;
	buttonAtk.y = 15;
	menuLayer.addChild(buttonAtk);
	var buttonTactics = new LButtonSample1("策略");
	buttonTactics.x = 15;
	buttonTactics.y = buttonAtk.getHeight() + buttonAtk.y;
	menuLayer.addChild(buttonTactics);
	var buttonProps = new LButtonSample1("道具");
	buttonProps.x = 15;
	buttonProps.y = buttonAtk.getHeight()*2 + buttonAtk.y;
	menuLayer.addChild(buttonProps);
	var buttonStop = new LButtonSample1("停止");
	buttonStop.x = 15;
	buttonStop.y = buttonAtk.getHeight()*3 + buttonAtk.y;
	menuLayer.addChild(buttonStop);
	var buttonCancel = new LButtonSample1("取消");
	buttonCancel.backgroundCorl = "red";
	buttonCancel.x = 15;
	buttonCancel.y = buttonAtk.getHeight()*4 + buttonAtk.y;
	menuLayer.addChild(buttonCancel);
	var selfWidth = buttonAtk.getWidth()+30;
	var selfHeight = buttonAtk.getHeight()*5+30;
        var bar = LSouSouObject.getBar(selfWidth,selfHeight);
	menuLayer.addChild(bar);
	self.addChild(menuLayer);
	x += LSouSouObject.sMap.nodeLength;
	if(x + LSouSouObject.sMap.backLayer.x + selfWidth > LSouSouObject.sMap.SCREEN_WIDTH){
		x -= (selfWidth + LSouSouObject.sMap.nodeLength); 
	}
	if(y + LSouSouObject.sMap.backLayer.y + selfHeight > LSouSouObject.sMap.SCREEN_HEIGHT){
		y = LSouSouObject.sMap.SCREEN_HEIGHT - selfHeight - LSouSouObject.sMap.backLayer.y;
	}
	self.x = x + LSouSouObject.sMap.backLayer.x;
	self.y = y + LSouSouObject.sMap.backLayer.y;
	
	buttonAtk.addEventListener(LMouseEvent.MOUSE_UP,self.onclickAtk);
	buttonCancel.addEventListener(LMouseEvent.MOUSE_UP,self.onclickCancel);
};
LSouSouSMapMenuCtrl.prototype.onclickAtk = function(e){
	var i,nodeChild;

	LSouSouObject.sMap.menu.parent.removeChild(LSouSouObject.sMap.menu);
	LSouSouObject.sMap.menu = null;
	var attackRange = LSouSouObject.sMap.attackRange = LSouSouObject.charaSNow.member.getRangeAttack();
	for(i=0;i<attackRange.length;i++){
		nodeChild = attackRange[i];
		LSouSouObject.sMap.attackRangeLayer.graphics.drawRect(1,"#000000",
			[nodeChild.x*LSouSouObject.sMap.nodeLength + LSouSouObject.charaSNow.x - LSouSouObject.sMap.backLayer.x,
			nodeChild.y*LSouSouObject.sMap.nodeLength + LSouSouObject.charaSNow.y - LSouSouObject.sMap.backLayer.y,
			LSouSouObject.sMap.nodeLength,LSouSouObject.sMap.nodeLength],true,"#FF0000");
	}
	LSouSouObject.sMap.menu = LSouSouSMapMenu.addSMenu(LSouSouObject.charaSNow.x,LSouSouObject.charaSNow.y,"cancel");
	LSouSouObject.sMap.menuLayer.addChild(LSouSouObject.sMap.menu);
	LSouSouObject.sMap.menu.clickEvent = function(event){
		LSouSouObject.sMap.menu.parent.removeChild(LSouSouObject.sMap.menu);
		LSouSouObject.sMap.menu = null;
		LSouSouObject.sMap.attackRangeLayer.graphics.clear();
		LSouSouObject.sMap.showCtrlMenu();
	};
	LSouSouObject.sMap.smapClick.setAtkClickEvent();
};
LSouSouSMapMenuCtrl.prototype.onclickCancel = function(e){
	LSouSouObject.sMap.menu.parent.removeChild(LSouSouObject.sMap.menu);
	LSouSouObject.sMap.menu = null;
	LSouSouObject.returnFunction();
};