Problem with textures


#1

var frame0 = [
‘8888888888’,
‘8888888888’,
‘8888888888’,
‘…88…8888’,
‘…88…8888’,
‘8888888888’,
‘8888888888’,
‘8888888888’,
‘88…88’,
‘88…’,
‘8888888888’,
‘8888888888’,
‘8888888888’,
‘…88…8888’,
‘…88…8888’,
‘8888888888’,
‘8888888888’,
‘8888888888’,
‘88…88’,
‘…88’,
‘8888888888’,
‘8888888888’,
‘8888888888’,
‘8888…88…’,
‘8888…88…’,
‘8888888888’,
‘8888888888’,
‘8888888888’,
‘88…88’,
‘88…’,
‘8888888888’,
‘8888888888’,
‘8888888888’,
‘8888…88…’,
‘8888…88…’,
‘8888888888’,
‘8888888888’,
‘8888888888’,
‘88…88’,
‘…88’];
Hi! This code will only show images if the page the game is shown in is reloaded an extra time. Can anybody help?
var pixelSize = 2
var frameWidth = pixelSize * 10;
var frameHeight = pixelSize * 10;
var frameMax = 4;
var margin = 0;
var spacing = 0;
var texture = game.create.texture(‘txt’, frame0, 2, 2, 0);
game.cache.addSpriteSheet(‘pinky’, null, texture.baseTexture.source, frameWidth, frameHeight, frameMax, margin, spacing);