Question, quick

Hey. I’m trying to create a small .fla that will randomly position a certain number instances (of a movie clip) accross the background of my animation. I’ve started with some simple code but I’ve run into problems.

This is just attached to the layer

i = 0;
do {
attachMovie(movieclip, moviclip1, +1);
} while (i<300, i++);

And this is in the movie clip itself.

onClipEvent (load) {
this._x = Math.round(-10+Math.random()*350);
this._y = Math.round(-10+Math.random()*350);
this._alpha = (10+Math.random()*90);
} 

(btw some of this code is inspired by the waving grass tutorial here…so I’d just like to point out that I’m not taking any credit for the code)

Anyways, my problem here is that when the code exicutes it randomly places one instance and re-draws it constantly. What I want is say, 300 instances, to appear all at once in just one frame, like a generator or something. Anyways, if any of you have an idea of what I’m doing wrong here, point it out for me. Thanks in advance!