Jump to content

Problems whit preloader


Recommended Posts

Hi there I am trying to get Phaser to work I am using xampp Apache and Brackets but when I run this code:

<!DOCTYPE html><html><head><script src="phaser.js"></script></head><body><div><script>var game = new Phaser.Game(1000, 800, Phaser.AUTO, '', { preload:preload, create: create, render: render });function preload(){game.load.spritesheet('hero','heroes1.png');}function create(){hero = game.add.sprite('hero');}function render(){}</script><div></body></html> 

In the console it says "Uncaught ReferenceError: preload is not defined" I will appriciate if someone can help me 

Link to comment
Share on other sites

  • 6 months later...

  • Recently Browsing   0 members

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