Change the preload to this:
function preload() { game.load.spritesheet('user', 'user4.png', 95, 158, 48); }
and add animation for all directions:
player.animations.add('bottom', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], 12, true, true); player.animations.add('left', [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23], 12, true, true); player.animations.add('right', [24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35], 12, true, true); player.animations.add('top', [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], 12, true, true);
Also remember to write cursor inputs in your create () function:
cursors = game.input.keyboard.createCursorKeys();
Tested and earned. The sprite sheet is not 100% correct, but it looks fine.