kriket Posted October 5, 2015 Share Posted October 5, 2015 http://i.imgur.com/4cwh4G4.png The game is still a work in progress but you can try it in action here - jetset.site44.com The animation should be running and not showing all frames at the same time. I tried both XML and JSON. Here's the code: In Preload()// this.game.load.atlas('bricks_FX', 'assets/images/bricks_FX.png', 'assets/images/bricks_FX.json'); this.game.load.atlasXML('bricks_FX', 'assets/images/bricks_FX.png', 'assets/images/bricks_FX.xml');In create() this.bricks_animation = this.game.add.sprite(0, this.game.height*2, 'bricks_FX'); this.bricks_animation.animations.add('bricks_explode', Phaser.Animation.generateFrameNames('bricks_FX', 1, 23), 24, false); this.bricks_animation.animations.play('bricks_explode'); Link to comment Share on other sites More sharing options...
Tom Atom Posted October 5, 2015 Share Posted October 5, 2015 Hi! All frames are shown when Phaser can not find frames for atlas or you are asking for incorrect frame - it shows default frame, which is frame 0, which is whole texture. You are not showing atlas xml data in your post, but is name of your frame really "bricks_explode" or "bricks_explode.png"? Yesterday, there was similar question on this forum: http://www.html5gamedevs.com/topic/17634-atlas-problem/ - look there for additional details. Link to comment Share on other sites More sharing options...
Recommended Posts