How to stop emitter after it's lifespan done?

How to stop emitter after it’s lifespan done ???

You may want to look into the explode method.

yes it does the work … but i am using img to create the flow … explode mode makes the flow disappear instantly … any idea with noraml flow mode using stop method … thank you

You can use .start and .stop, which will set the emitter’s .on value.

i am trying to listen to any event or use an interval related to the emitter then will call .stop() … how can i capture the time the emitter was alive within it … thank you for help .

Hey Andrew,
I would suggest just creating a timer event with the same lifespan as the particles and stop the emitter at the end of the time.

Ex:

this.emitter = this.add.particles('myTexture').createEmitter({
    lifespan: 1000,
    speed: 100
});
this.time.delayedCall(1000, ()=>{
    this.emitter.stop();
});

yeb yeb … i think this should do it … thanks a lot .