Jump to content

image is not loading


akwa6950
 Share

Recommended Posts

Hello guys,

I'm just starting out with Phaser and i have an error, my image wil not load when using:

var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });

function preload() {
   game.load.image('background', 'assets/background.jpg');
}

function create() {
    game.add.sprite(0, 0, 'background');
}

function update() {
}

all i get is a little green box, what could it be? 

greetings 

Link to comment
Share on other sites

Hi akwa6971,

The image hasn't loaded by the sounds of it, check your console for error messages.  Is the image file name/path correct, is the upper/lower case correct?

Also. this post should be in the main Phaser thread, rather than this Phaser3-Beta thread - you'll get more help there.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...