One way to customise the colour of the progress bar is by first building the game and then accessing “style-desktop” or “style-mobile” based on your version of the build.
In there, you’ll find the “.progress-bar span” selector where you can edit the “background-color” property to set your custom colour.
I tried adding an image, but it doesn’t seem to be working. To control the flow of the progress bar, you’ll need to edit the “setLoadingDisplay ()” function in “main.js.”
@grimfangs thank you for your answer. I have been doing this in previous versions of Cocos Creator. But in version 3 we don’t have this function. I assume there is a way to put something similar in application.js.
But don’t know from where I should call this function.
Hi @wijesijp, checking the difference in CC2.4 and CC3.2 I found something that might help to start with. Not sure this will work.
The main difference I saw was the loadscene,
Here in 2.4 bundle.loadscene is used, but as shown in below image in 3.2 cc.director.loadscene is used.
So I think that changing this as in 2.4 and adding setLoadingDisplay() function in application.js will help.
Along with this changes in index.html, style.css might be needed.
Not sure if you are still looking for answers but this seems like it might be a good starting point…
After building your project to web mobile
1- Add this to your <body></body> inside your index.html.
<script src="https://connect.facebook.net/en_US/fbinstant.6.3.js"></script>
2 - Add this to your application.js file
function onGameStarted(cc, settings){
....
....
....
FBInstant.initializeAsync();
FBInstant.setLoadingProgress(100);
FBInstant.startGameAsync();
}
you can customize FBInstant.setLoadingProgress(100); across application.js functions so you can get a dynamic loading from 1 to 100```