Animating a Group of Sprites

Hello everyone,
it’s been a while since i’ve been trying to figure out how to animate a sprite inside a group.
I’ve looked over the internet and all the solutions dont seem to work for me: the sprite do not change the frame and sticks to just the first one as the animation does not start. I do not get any kind of error so i cannot figure out how to fix this.

I’ll paste my code and what i’m trying to do, if you could help me it would be great.

//create
bullets=game.add.group();
bullets.enableBody = true;
bullets.physicsBodyType = Phaser.Physics.ARCADE;
weapon = game.add.weapon(20, ‘bullet’)
weapon.bullets.setAll(‘scale.x’, 1.5);
weapon.bulletSpeed=400;
bullets.callAll(‘animations.add’, ‘animations’, ‘uku’, [0,1,2,3,4], 24, true);

//update
if ( fireButton.isDown)
{
player.animations.play(‘fire’);
bullets.callAll(‘play’, ‘animations’, ‘uku’);
game.time.events.add(400, function (){weapon.fire ();});

}

Because you’re setting it in the update function the player animation is constantly starting as long as that button is down. You need to set a flag to play the animation only one time, and reset the flag after your animation is complete.

Thanks for your help. Unfortunately im new to javascritp and coding in general so i do not know very well how to do this. I can guess it’s a simple variable that turn false or true based on the animation process. am i right? if not, could you please type a quick example of it? thanks a lot

I think bullets is empty (no sprites), so it has nothing to animate.

weapon.bullets is a different group.