Finders_Keepers Posted March 11, 2017 Share Posted March 11, 2017 Hello everyone, I opened the Basic Phaser Template and wanted to play around with the example body debug.js from the repository. There is a code comment on the basic template index.html in the script tag which says:We did it in a window.onload event, but you can do it anywhere (requireJS load, anonymous function, jQuery dom ready, - whatever floats your boat I'm familiar with the window onload event done it many times and it works. Idk much about requireJS load, anonymous function, jQuery dom . And so It all boils down to a stupid question. I wanted to try opening the bodydebug.js from the basic template. I've changed the div container name from "Game Container" to "phaser-examples" as the bodydebug.js is referencing, i've substituted the path of an asset 'atari' to my local machine. And i pointed the script tag to read like <script type="text/javascript" src="bodydebug.js"></script> (i have changed the body debug.js to bodydebug.js too.) I'm looking for a quick way to just run the code from the js file.. Unfortunately all i see is a white screen, like it doesn't load anything. I can get the script to work if i use the modular approach. But i want to run the js file as is.. How do i do that? Please have a look at my files and tell me what's wrong? bodydebug.js index.html Link to comment Share on other sites More sharing options...
Finders_Keepers Posted March 12, 2017 Author Share Posted March 12, 2017 Okay i solved the problem, the script tag for phaser.min,js was not referenced in index.html file. Totally.my bad. My browser was throwing an error for favicon.ico and i couldn't find it in my code. Hope it helps someone else Link to comment Share on other sites More sharing options...
Recommended Posts