I have two Swfs that are supposed to do exactly the same thing. On works on MouseDown the other is supposed to work when the movie is played.
I have included both swf as an example. Don’t forget to click on stage for explosion002.
Here is the code of the NON-Working .fla.
Thanks for all the help.
function particle () {
for (var i = 0; i < 25; i++) {
this.attachMovie ("ball", "ball", +i, i);
_x = Stage.width / 2;
_y = Stage.height / 2;
var rn = Math.floor (Math.random () * (300 - 25)) + 25;
this._xscale = rn;
this._yscale = rn;
this.duplicateMovieClip ("ball" + this.i, this.i);
removeMovieClip ("ball" + (this.i - 20));
x_speed = .5 + (10 - random (20));
y_speed = .5 + (10 - random (20));
this.x_speed *= .98;
this._alpha -= 0;
this._x += this.x_speed;
this._y += this.y_speed;
if (this._y > 450 || this._y < 0 || this._x > 750 || this._x < 0 || this._alpha <= 0) {
this.removeMovieClip ();
updateAfterEvent ();
}
}
}
particle (this);