Scene switch in Main.js, the Startscene as our init run scene, the code is as follows:     CC. Loaderscene.preload (g_resources, function () { Cc.director.runScene (New playscene ()); }, this); Add the scene switch code to the response function of the Start menu button in Startscene. Click the Start button to toggle the scene into our playscene. The code is as follows:     VAR STARTITEM = NEW CC. Menuitemimage ( res. Start_n_png, res. start_s_png, function () { cc.log ("menu is clicked! "); Cc.director.replaceScene ( CC. Transitionpageturn (1, new playscene (), false)  ); }, this); Cc.director is used to get the director Singleton entity, Cc.transitionpageturn creates a scene toggle animation of the page-flipping effect, and of course you can not use transition animations. Direct incoming new secondscene (). The effect of transition jumps is achieved by Transitionscene series classes between scenes in Cocos2d-js. Transitionscene inherits from scene, which is primarily a class of usage related to scene switching effects. such as Transitionfadedown, Transitionpageturn, Transitionjumpzoom and so on. Note: Transition animations require careful browser compatibility. such as page flipping effect is not supported on the browser
This article ish5eduAgency officialHTML5 Trainingtutorials, the main introduction:JavaScript Intensive Tutorials--cocosjs Scene Switching
JavaScript Intensive Tutorial--COCOSJS scene switch