How to remove cocos2d background image when a cocos2d-html5 project is booting up in the browser?

I created a project by doing:

cocos new myProjectName -p com.myproject.me -l js

When running the project in my web browser, initially it shows a cocos2d image in the background. How do I remove or change it ? I cannot find a reference to it in main.js, index.html or app.js

In {PATH_TO_COCOS2D-JS}/frameworks\cocos2d-html5\cocos2d\core\scenes

CCLoaderScene.js is the scene that you are seeing with the cocos logo.
Then you can extend from this and use it your main.js with a custom cc._loadImage (codified in base64 because the assets are not loaded yet).

Here some code to help you out:

http://pastebin.com/q6GSMei5 //this is in my main.js
http://pastebin.com/q6GSMei5 //this is my custom loader, careful there are custom label from my project, if you want to copy the code it would be better use the code in CCLoaderScene.js and modify it as you like.

2 Likes

@alexgg Awesome bro…! :slight_smile: