Sign in to follow this  

Phaser 2 is sometimes incorrectly loading remote images?

Recommended Posts

I have a system where I'm trying to load images from two sources remotely. They work half the time... but then a third of that, it suddenly attempts to add an additional http to the domain which causes the load to fail. I'm not 100% sure what is going on here, and it's been baffling. Part of it is that the images are being loaded in a loop - could that be causing the issue?

This is the error that I'm getting: error loading asset from URL https:

This is the code I'm currently using:

    if (this.gameData.length < 0)
      for(let i = 0; i < this.gameData.length; i++)

    this.gameData = [];

    this.gameData = data['gameData'];

    for(let i = 0; i < this.gameData.length; i++)
      game.load.image(this.gameData[i]['id'], this.gameData[i]['gameImage']);

    setTimeout( () => {
    }, 3500 );      
    game.load.onLoadComplete.add(this.loadCheck, this);

    //let testImage = game.add.sprite(0, 0, this.gameData[0]['id']); 

I do have allowed access to the images through Cors - has anyone else run into this problem before?


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.