Karnage Posted March 17, 2014 Share Posted March 17, 2014 Hi Guys, Excellent work on releasing Phaser 2.0 - I thought it would be time to move over from Construct 2 and try my hand at coding (i'm a newb so please be gentle) I have loaded up the golf demo that comes with 2.0 and have not been able to get it to load correctly. Here is the error that I am seeing in Chrome's JavaScript console:- Uncaught TypeError: Cannot read property 'bounce' of null golf.js:45 creategolf.js:45 Phaser.StateManager.loadCompletephaser.js:13673 Phaser.SignalBinding.executephaser.js:14353 Phaser.Signal.dispatchphaser.js:14226 dispatchphaser.js:13993 Phaser.Loader.nextFilephaser.js:41327 Phaser.Loader.jsonLoadCompletephaser.js:41185 _xhr.onloadphaser.js:40888 Here is how I included the golf.js in my html doc:- <!doctype html><html> <head> <meta charset="UTF-8" /> <title>hello phaser!</title> <script src="phaser.js"></script> <script src="golf.js"></script> </head> <body> <div id="phaser-example"> </div> </body></html>Here is my file structure:- Here is the result in Chrome (its also the same in FireFox):- Maybe I have made a "Newb" mistake but any pointers in the right direction would be gratefully received ! Many thanks in advance. Link to comment Share on other sites More sharing options...
rich Posted March 17, 2014 Share Posted March 17, 2014 Hmm I thought we had removed the golf demo from 2.0! It needs updating to work with 2.0 as most the physics calls have changed. I just checked and it's not in the examples repo, did you find it somewhere else? Or have it left over from an earlier download? Link to comment Share on other sites More sharing options...
Karnage Posted March 17, 2014 Author Share Posted March 17, 2014 Hi Rich, Ahhh now that makes sense Its still included in the master branch on github https://github.com/photonstorm/phaser/tree/master/examples/games Link to comment Share on other sites More sharing options...
rich Posted March 17, 2014 Share Posted March 17, 2014 Thanks, I'll make sure it's removed asap! Link to comment Share on other sites More sharing options...
Recommended Posts