Random+duplicate+width.. help please?

hi… i have a little problem with a script i found…


for (i=0; i<30; i++) {
	newBall = mask_mc.duplicateMovieClip("mask_mc"+i, i);
	newBall._x = Math.random*600;

	newBall.targX = Math.random()*600;

	newBall.i = 0;
	newBall.rand = Math.random()*50;
	newBall.onEnterFrame = function() {
		this.i++;
		if (this.i>this.rand) {
			this.targX = Math.random()*600;

			this.i = 0;
			this.rand = Math.random()*50;
		}
		this._x -= (this._x-this.targX)/5;

	};
}

Problem is this does’nt seem to work in a mc with a mask… it works i know that cos if i unmask my layer it starts perfectly but as soon as i make the layer mask again it stops working…

how come and how do i fix this?

Ps, and wile your at it… how do i add a random width section to this script?

After putting in the code my mask just flickers?? Can someone post the fla again so i can see exactly what I’m doing wrong here?

Much Thanks.

there you go :stuck_out_tongue:

Much thanks.

nice script