CindySchroer Posted November 2, 2016 Share Posted November 2, 2016 Hello I need some help with my game. I wanted to work with game states so I've got this code (see attachment) In boot.js I've got this: var Game ={}; Game.Boot = function(game){ }; Game.Boot.prototype = { init:function(){ this.input.maxPointers =1; this.stage.disableVisibilityChange=true; }, preload:function(){ this.load.image('preloaderBar', 'assets/meme.jpg'); }, create:function(){ this.state.start('Preloader'); } } Just a simple picture has to come up but when I load my game this error shows up: Uncaught ReferenceError: windows is not defined(…)Can anyone explain what is happening here? A little step-by-step would help because I'm a beginner. Link to comment Share on other sites More sharing options...
oddkraken Posted November 2, 2016 Share Posted November 2, 2016 It should be "window.onload = function() ..." Link to comment Share on other sites More sharing options...
Recommended Posts