I used cc.resources.load() and modify the value of parameter in properties, but it doesn't work when I read the value of parameter out of callback function. Is there anybody who can help me, thanks!!!!The language is JavaScript.

Cocos Creator JavaScript the callback function of cc.resources.load not work
598 Views Asked by yilin cai At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in COCOS2D-JS
- How can I correct this error in cocos2d-x
- Issue with compiling a cocos2d-x 3.17.2 JS/web project
- Cocos Creator JavaScript the callback function of cc.resources.load not work
- Cocos Typescript Error Global variable cc was dropped since 3.0. Use ES6 module syntax to import Cocos Creator APIs
- Add a function to a class defined inside a declared namespace (Typescript)
- Cocos-2dx JS can't load scene from JSON file with version 3.10.0.0
- A problem occurred configuring project ':game'. > java.lang.NullPointerException (no error message)
- How to solve nginx server restart issue?
- Create common modules between projects [COCOS2D]
- How to send final game score between Cocos Creator scenes?
- Couldn't call Objective-C method from Cocos-2d via JavaScriptObjCBridge
- cocos2d JS WebGL rendering is not working in iOS 14 public beta
- TypeError: Cannot read property 'load' of undefined at cc.resources
- cocos2d, can we call a function in "sequence" on a sprite?
- position AnchorPoint of a sprite in Cocos2d
Related Questions in COCOSCREATOR
- How to get mouse button with node.on(Node.EventType.TOUCH_START) in CC 3.8?
- How to get indexOf nested array in any array?
- TypeScript Replace Between Letters
- Cocos Creator & VSCode breakpoint error in Mac
- How to use context leaderboard in facebook instant game sdk
- How to add npm package to cocos creator project?
- Why Cocos creator 3.8 tween doesnt work into async func (with Promise)
- Add edge/boundary for moving a node based on finger movement and scale of the node to make zoom feature in mobile using Cocos creator 2.4.10v
- Shifting a node when opening the keyboard
- FBInstant games SDK gives the error "Cannot find name 'FBInstant'.ts(2304)" in Cocos Creator 3.8
- How do I make the plane turn and move in a circle to a new angle and not turn immediately?
- Secure WebSocket SSL certificate installation in Cocos Creator 3.8+
- Is it possible to implement Typescript class which has a protected property?
- Admob rewarded video will only appear once
- Unbound Breakpoint When Importing in CocosCreator
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The problem is the second
console.logis executed right afterresources.loadis called, but the first log is asynchronous when loaded. It may take 0.1s, 1s, or more. The correct program order is: