I’m trying to make a basic particle system and am running into a pretty simple problem I just can’t seem to find the answer to. For some reason none of the particles are moving. Here is my basic code just to start:

onClipEvent (enterFrame) {

i = 0;

totalParticles = 10;

gravity = 1;

}

onClipEvent (enterFrame) {

for (i; i<totalParticles;i++) {

attachMovie (“particle”, “particle” + i, i);

_root.emitter[“particle”+i].xSpeed = random(5);

_root.emitter[“particle”+i].ySpeed = -5;

_root.emitter[“particle”+i].onEnterFrame = function () {

ySpeed = ySpeed + gravity;

this._x += xSpeed;

this._y += ySpeed;

}

}

}

I’m sure the answer is pretty easy I just can’t seem to see it. Thanks in advance.