PGemitter.kill() Method

Availability

ActionScript 2.0; Flash Player 6

Since

Partigen 1.0

Usage

PGemitter.kill(particleID:Number [, de:Boolean])

Parameters

particleID (Number) ID of particle to kill.

de (Boolean) Send onDeath event.

Returns

Boolean - if successful kill.

Description

Method; Kills the specified particle. Use this method instead of removeMovieClip. By default, an onDeath event will be fired.

Example

The following example will kill all living particles on click:

Partigen.createEmitter(this, 'my_em', 0); //create an emitter with all the defaults
my_em._x = my_em._y = 200; //set the emitters x&y position to 200 so we can see it
my_em.start();
_root.onMouseDown = function() {
for(var i in my_em._particles){
  my_em.kill(my_em._particles[i][1], true); //remove the emitter and all current particles
}
}

See Also

PGparticle.kill()


Documentation generated by BLDoc Community Edition from B-Line Express.