Cocos HTML5 (V3.0RC2) Modify loading loading page interface

Source: Internet
Author: User
Tags base64

When did the 1.Loading load page call?
A: Called in the Main.js of the project: The code is as follows:
Cc. Loaderscene.preload (g_resources, function () {
Cc.director.runScene (New Storyscene ());
}, this);
Inside the preload function, the load page starts running. (Can go to Code tracking view)

2. How do I customize my loading interface?
A: Enter the Ccloaderscene.js file, by the file name, this is the transition to download the resource page.
File location in: cocos2d-js-v3.0-rc2\frameworks\cocos2d-html5\cocos2d\core\scenes\ccloaderscene.js
The file creates a scene and then creates a dark black background layer (Bglayer) in the Init method.
Continue tracking code Cc._loaderimage, loaded with a base64 encoded picture.
Base64 's picture encoding string is defined in the cocos2d-js-v3.0-rc2\frameworks\cocos2d-html5\base64image.js.
I found a picture (150*150) and made a long list on the http://tool.css-js.com/base64.html website.
Note: If the loading page's picture is too large, the loading loaded text will be obscured. At that time I made a large full-screen image, the result is tragic.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.