Zef Posted March 7, 2014 Share Posted March 7, 2014 Hi there, I am currently using Phaser for a University assignment and absolutely love it! Despite this I am having an issue trying to get a sprite atlas to work. I have created a sprite sheet and corresponding atlas using shoebox and I am loading it into the game like so:game.load.atlasXML('bee', 'assets/images/bee/beeAtlas.png', 'assets/images/bee/beeAtlas.xml');I think everything is working fine at this point. Then within my Bee object I am doing the following:this.sprite = game.add.sprite(50, 50, 'bee');this.sprite.animations.add('fly', Phaser.Animation.generateFrameNames('fly', 1, 11, '', 2), 30, true);this.sprite.animations.play('fly');For some reason this isn't working and I am getting the error:TypeError: 'null' is not an object (evaluating 'this.currentFrame.uuid')Has anyone got any idea why this might be? I should note that I been able to get animation working fine without an atlas, but I would like to use an atlas now so I can switch easily. I have attached the sprite sheet and atlas as well for you to take a look. Thanks in advance!beeAtlas.xml Link to comment Share on other sites More sharing options...
rich Posted March 7, 2014 Share Posted March 7, 2014 What format XML file did you pick in Shoebox when exporting? atlasXML is for Starllng / Sparrow XML files, which shoebox generates but not by default (you have to pick them from the drop-down right-click menu). Link to comment Share on other sites More sharing options...
Zef Posted March 7, 2014 Author Share Posted March 7, 2014 Hi Thanks for the super fast reply! Yes I did choose starling / sparrow so not sure why it isn't working. Thanks Link to comment Share on other sites More sharing options...
rich Posted March 7, 2014 Share Posted March 7, 2014 Interesting, because your XML file says TexturePacker in the header?! Link to comment Share on other sites More sharing options...
Zef Posted March 7, 2014 Author Share Posted March 7, 2014 Whoops sorry, I was messing around with TecturePacker to see if I could get that to work too and upload the wrong one. The correct one is attached and I have double checked that this is the one I am using in the game: beeAtlas.xml Link to comment Share on other sites More sharing options...
rich Posted March 7, 2014 Share Posted March 7, 2014 Honestly if you can, just use TexturePacker instead and use the JSON export! It's faster (no XML parsing overhead) and imho easier I will check the Shoebox export in the meantime. Link to comment Share on other sites More sharing options...
Zef Posted March 7, 2014 Author Share Posted March 7, 2014 Ok I'll give that a try thanks! Link to comment Share on other sites More sharing options...
shohan4556 Posted February 18, 2016 Share Posted February 18, 2016 On 3/7/2014 at 8:10 AM, Zef said: Ok I'll give that a try thanks! Did you solve the problem ? I have the same problem.please share how you solve this issue. Link to comment Share on other sites More sharing options...
Recommended Posts