 	});
 	view.tBoardShow = Tween.to(view.gameOverBoard, {alpha: 1}, 0.5);
 	view.tBoardHide = Tween.to(view.gameOverBoard, {alpha: 0}, 0.3);
-	view.boardBackgroud = $.createShape({
+	var boardBackgroud = $.createShape({
 		lifeTime: 0,
 		x: 0,
 		y: 0,
 		parent: view.gameOverBoard
 	});
-	var g = view.boardBackgroud.graphics;
+	var g = boardBackgroud.graphics;
 	g.beginFill(0xffffff);
 	g.lineStyle(1, 0x000000,1,true);
 	g.drawRoundRect(0,0,250,200,20,20);

main();

//todo 
//声音
//按键设置
//鼠标点击

    };

    //游戏过程中不允许改键
    manager.keySets = function(index){
    	if(this.gameFlag == GAME_PLAYING || this.gameFlag == KEYSETTING){
    		return;
    	}
    	this.flagCache = this.gameFlag;
    	this.gameFlag = KEYSETTING;
    	this.gameView.kmButton[index].text = (index+1) + ": 按下设置";
    	this.ksIndex = index;
    };

    //改变按键 检查冲突
    manager.keyChange = function(key){
trace("chang index: "+this.ksIndex+" to key: "+key);
    	var ks = $G._get("keySet");
    	var index = this.ksIndex;
    	var k = ks[index];
//trace("ks:"+ks+" k:"+k);
    	if(ks.indexOf(key) != -1 || key == 37 || key == 38 || key == 39 || key == 40){
    		this.gameView.kmButton[index].text = (index+1) + ": " + KEYMAP[k];
    	}else{

    		ks[index] = key;
    		$G._set("keySet",ks);
    		trace("#6 "+ this.ksIndex +":"+ this.gameView.kmButton[index]);

    		this.gameView.kmButton[index].text = (index+1) + ": " + KEYMAP[key];
    	}

    	//恢复状态
    	this.gameFlag = this.flagCache;
    };

    manager._keyTrigger = function(key){
    	trace("you press key "+key);
    	trace("this.gameFlag: "+manager.gameFlag);
    	switch(manager.gameFlag){
    		case GAME_IDLE:
    			manager.gameStart();
    		case GAME_PLAYING:
    			manager.linePress(key);
    			break;

    		case KEYSETTING:
    			manager.keyChange(key);
    			break;
    	}
    };
