var menuItemPlay = cc.MenuItemSprite.create(
new cc.Sprite(res.start_n_png), // normal state image
new cc.Sprite(res.start_s_png), //select state image
this.onPlay, this);
var menu = new cc.Menu(menuItemPlay); //7. create the menu
menu.setPosition(centerpos);
this.addChild(menu);
run in browser 可以触发play()函数
在jsb模式运行,点击menubu 不会触发play()函数,
cocos code IDE 提示:if the index doesn’t exist, it is an error
touchesEnded or touchesCancel: size = 0