• Content Count

  • Joined

  • Last visited

  1. 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
  2. Thank you guys, I realized I have no other option but to write it by hand in other casees it opens it locally everything is ok now xd
  3. I already have a server and I open it from there....but it shows this
  4. I tried to run the Phaser example from the root of my Apache-Tomcat server and when the browser open there is nothing but just black screen and in the console it says : Image from origin 'file://' has been blocked from loading by Cross-Origin Resource Sharing policy: Received an invalid response. Origin 'null' is therefore not allowed access. What i am supposed to do to fix that...?