khleug35 Posted September 28, 2017 Share Posted September 28, 2017 My code is here var game = new Phaser.Game('100%','100%', Phaser.AUTO, '', { init: init, preload: preload, create: create, update: update, }); var background; function init(){ game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; } function preload() { game.load.image('space', 'assets/images/space.png'); } function create(){ background = game.add.tileSprite(0, 0, game.world.width, game.world.height, 'space'); background.autoScroll(0, 30); game.physics.enable(background,Phaser.Physics.ARCADE); } function update(){} When I run the game first time, It was worked, I can success to load the background. but when I refresh the game, it have error message and can't run the game. it said that phaser.2.7.7.min.js:3 Phaser.Cache.getImage: Key "__default" not found in Cache. getItem @ phaser.2.7.7.min.js:3 phaser.2.7.7.min.js:3 Phaser.Cache.getImage: Key "__missing" not found in Cache. getItem @ phaser.2.7.7.min.js:3 phaser.2.7.7.min.js:3 Uncaught TypeError: Cannot read property 'base' of null so when this error is happen, I need to clear cache form chrome or go to other page then return the game, it can success to run the game. but when I refresh the game, an error occurred.Does anyone know what problem is that ?? Thanks you very much Link to comment Share on other sites More sharing options...
samme Posted September 28, 2017 Share Posted September 28, 2017 Update to latest Phaser CE. Link to comment Share on other sites More sharing options...
khleug35 Posted September 29, 2017 Author Share Posted September 29, 2017 7 hours ago, samme said: Update to latest Phaser CE. OH!!!! Thanks!!!!When i update to Phaser CE 2.8.8!!!! It worked for me!!!!! https://phaser.io/download/stable Thanks!!!!!!samme!!!!!! Link to comment Share on other sites More sharing options...
Recommended Posts