That is usually because the height and width are not set correctly. Also, the local server tends to cache the images rather aggressively. Make sure you clear the cache. Control-f5 on windows usually does the trick.
Well, it seems the image got resized through some optimization of either the website or through the CDN. I’ve now added it in a zip file at the correct size.
in this example generateFrameNumbers function doesn’t work
Are you getting any errors in the console?
When I load and create the image, it shows the sprite sheet (multiple boy) rather than just 1 like in the video.
That is usually because the height and width are not set correctly. Also, the local server tends to cache the images rather aggressively. Make sure you clear the cache. Control-f5 on windows usually does the trick.
frame height and width or character height and width not set correctly ?
I checked to make sure both width and height match your example, and I clear the cache, but still no change.
And when I check for bugs with developer console, it saids
phaser.min.js:1 SpriteSheet frame dimensions will result in zero frames.
I have the same problems as Tony
Well, it seems the image got resized through some optimization of either the website or through the CDN. I’ve now added it in a zip file at the correct size.
After I download and unzipped the file you just give, it works ! Thank You !
I changed the framewidth value , that was the main reason that it did not work . Thanks for your answer William . I learnt a lot .