I'm in the process of making a game and I want to import json animation file from remote resource into the game using Typescript, currently using Xampp as the localhost. There is no problem for me to import those file from assets using the function in Cocos Creator, but I wish to import it from remote resource.

The original code can import purely PNG image into the game very well, however when I want to import json animation file, the code can't read the file at all. My json animation file contain a PNG image, a json file, a text document with .atlas at the end of file naming. What is the correct syntax or coding to import it?

* Setup mainboard background and foreground sprite from remote resources
setRemoteImageToMainboardSprites () {
   if (this.mainBoardBackgroundSprite) {
if (this.mainBoardForegroundSprite) {



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.