ps786 Posted October 17, 2016 Share Posted October 17, 2016 preload(){ this.game.load.image('main_background', 'assets/images/gamemenu/background.png'); } create(){ this.background = this.game.add.sprite(0, 0, 'main_background'); } i'm loading an image in preload function and using that as a background . but this gives me an error """" Key "main_background" not found in Cache. "" Link to comment Share on other sites More sharing options...
drhayes Posted October 17, 2016 Share Posted October 17, 2016 Are there any errors loading that image? What does the web console say? Link to comment Share on other sites More sharing options...
Recommended Posts