Jump to content

Problems whit load image green square! Help me


sancthuz
 Share

Recommended Posts

Hello, I wrote down my first code with Phaser. but whe I tried to load an image.. a green squared apper o.o here \/

 

http://www.terebusca.com.br/yuleong/

 

 

and here is my javascript

 

 

var yulSprite;

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

function preload(){
    game.load.image('yul', 'yul.png');
}
function create(){
    yulSprite = game.add.sprite(game.world.centerX, 0,'yul');
}

function update(){
}

 

what I need to do? o.o it's seams to be right, cause I see a lot of guys with the same code. plz help me

 

 

Link to comment
Share on other sites

yes I do :C

 

------------------edit--------

 

OMG I though  it's like css and html stuff.. I think it's start the path from the "JS" folder.. o.o

 

but it's on the root where html is

Edited by sancthuz
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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