_addEvent:function(){ var btn; btn=this._getWidgetByName(this._startGav,"Button_7");//获取按钮的点击实事件 btn.addTouchEventListener(this._inputHandler.bind(this),this._startGav); }, _inputHandler:function(sender,type){ if(type == ccui.Widget.TOUCH_ENDED){ // var str =sender.name.split("Button_")[1]; if(sender.name== "Button_7") this._backMenuScene(); //如果满足条件机会就会执行backMenuScene }_backMenuScene();},_backMenuScene:function(){ //这里主要是跳转的语句,括号里面的特效,然后调用不同的页面 cc.director.runScene( new cc.TransitionProgressHorizontal(2,new HelloWorldScene())); },//这里主要是getWidgetByName的封装的方法,记得里面的参数_getWidgetByName:function(par,name){ return ccui.helper.seekWidgetByName(par,name);},