brentstrandy Posted May 3, 2016 Share Posted May 3, 2016 I've downloaded the Phaser min.js file from here (http://phaser.io/download/stable) Whenever I run my code and look at the console (both on Chrome and Firefox) it shows Phaser v1.1.3 Also I get the error: "Uncaught TypeError: this.load.SetPreloadSprite is not a function". I assume for some reason Phaser reverts to an old version that doesn't implement SetPreloadSprite, but my Phaser.min.js file shows v.2.4.7 Any help would be appreciated! - Brent Link to comment Share on other sites More sharing options...
rich Posted May 3, 2016 Share Posted May 3, 2016 I just went to that page, downloaded both min.js and the js files from the big buttons at the top of the page, and it was definitely Phaser 2.4.7. The errors you're getting are because of the version of course, but I'd start with checking the obvious - like is it really the files downloaded from the site that your code is picking up? And not another version from somewhere else. Perhaps an old template, or example, or tutorial? Link to comment Share on other sites More sharing options...
brentstrandy Posted May 3, 2016 Author Share Posted May 3, 2016 I honestly only have one phaser.min.js file on my entire machine (I just searched). Would it be weird if I told you: When turning on my Apache Server (MAMP) and I access the html file via localhost I see v1.1.3 When turning off my Apache Server and open the index.html file directly I see v2.4.7 Link to comment Share on other sites More sharing options...
rich Posted May 3, 2016 Share Posted May 3, 2016 Try this: Open Chrome Dev Tools, open the Network tab, open the page that gives you 1.1.3. Find the phaser.min.js in the network tab. Hover over it. What does the URL say? because that's your culprit (that or some insanely aggressive browser caching, but having Dev Tools open will nullify that) brentstrandy 1 Link to comment Share on other sites More sharing options...
brentstrandy Posted May 3, 2016 Author Share Posted May 3, 2016 It was browser cache!! I even had the Chrome Dev Tools open the entire time I was debugging this crazy thing. Thanks for the tip! Link to comment Share on other sites More sharing options...
Recommended Posts