[SOLVED] Avoid black screen before preloading

Is there a way to avoid the black screen before the game starts preloading?
Or the black canvas is unavoidable?

Thanks!

Ok, I’ve found that Cocos wasnt showing cc._loadingImage from Base64.js, I’ve changed these lines at CCBoot.js and now the image is there, right before the preloading.

CCBoot.js

Line 640–645

jsLoadingImg.src = "data:image/png;base64,iVBORw0KGgoAAAA....";

//if (cc._loadingImage)
       //jsLoadingImg.src = cc._loadingImage;
1 Like

How to remove the loading animation marked in red ?? in cocos2d-html5

You can change the source code, cocos/web/CCBoot.js:

Line 130 canvasNode.parentNode.appendChild(jsLoadingImg);

Maybe there is a better way, :smile:

Also in source there is a file named: Bas64Images.js with the loader images.

@josempan
i’ve tried both of there still the loading is coming…i tried commenting it but somehow it is coming :frowning:

@AbhyudaiRagh

Have you try clear your browser cache?

You may still loading the old code.

yeaa i’ve cleared and checked …it is still there…