vvAve Posted August 12, 2017 Share Posted August 12, 2017 Hello, I have started tutorial on the Phaser site, page 2 at the moment https://phaser.io/tutorials/making-your-first-phaser-game/part2 Tutorial suggests putting script in index.html instead of separate .js file. I tried doing so and now images won't load, even after changing path to '../assets/image.png'. I could just skip that, but I feel like I need to figure this out before I go further. Turorial.zip Link to comment Share on other sites More sharing options...
jjwallace Posted August 12, 2017 Share Posted August 12, 2017 Its because your scripts will be running in index so you will be 'assets/image.png'. Doesn't matter where the js files, just matters where the canvas is located and in this case its located on index.html vvAve 1 Link to comment Share on other sites More sharing options...
vvAve Posted August 12, 2017 Author Share Posted August 12, 2017 Thanks. I also realized that when using .js file cash gets stuck, so I can't update anything without cleaning it. I guess it is why they put script in html for that tutorial. Link to comment Share on other sites More sharing options...
jjwallace Posted August 12, 2017 Share Posted August 12, 2017 Yeah, get an extension for use with development. I use this one, https://chrome.google.com/webstore/detail/clear-cache/cppjkneekbjaeellbfkmgnhonkkjfpdn?hl=en vvAve 1 Link to comment Share on other sites More sharing options...
Recommended Posts