Why doesn't this code produce another moving mc?

Hey all,

I am trying to produce a scolling mc that is duplicated every 30 pixels. Each duplicate will scroll right behind the other along the x-axis.

My code will make the first mc scoll and it even produces a duplicate(s) at pixel 40, but the dups don’t move and I think there are even a lot of dups that are just laying on top of each other.

BELOW IS THE CODE:
[COLOR=Blue]
[/COLOR]
[COLOR=Blue]var ball:MovieClip;
var speed:Number=5;

ball.onEnterFrame = function():Void
{
this._x += speed;

    if(ball._x==300){
        ball._x=0;
}

//Start of duped mc
if(ball._x==40)
{
duplicateMovieClip(ball, “ball”+i, getNextHighestDepth()+i);
for(i=0; i<20; i++)
{

        ball*.onEnterFrame = function():Void 
            {    ball*._x = 0;
                this._x += (speed + (i*20));
    
                if(ball*._x==300)
                {
                    ball*._x=0;
                }
            }    
            //removeMovieClip(ball*);//does this really work?
            
        }
    }
    trace(ball*._x);

};[/COLOR]

Anyone have any ideas on how to make this work correctly?

Thanks.