Sign in to follow this  

image is not loading

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? 


Share this post

Link to post
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.

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.