Jump to content
Spriter Forums

Recommended Posts

Posted

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: 192.168.8.1 192.168.100.1 where am i

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.

Thanks in advance!

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...