Need Help plz

I am not that much good at scripting…
i am working on a web cam game i have almost done but stuck on one concept that is getting the hit count of duplicated movieclips…


var ballX:Number = (ball_mc._x-videoX)/sizeDif;
    var ballY:Number = (ball_mc._y-videoY)/sizeDif;
    now.draw(video_vobj);
    var valNow:Number = (now.getPixel(ballX, ballY) >> 16 & 0xFF);
    var valBefore:Number = (before.getPixel(ballX, ballY) >> 16 & 0xFF);
    if (valNow>valBefore+30 || valNow<valBefore-30) {
        trace("hit");
        if (ball_mc._currentframe == 1) {
            ball_mc.gotoAndPlay(2);
        }
    }

i got a code by searching the net

but it detects the single movieclip i need it to detect the duplicated moviclips also i have duplicated the movieclips by using



     i = 0;
while (i<10) {
    //duplicateMovieClip("ball_mc", "ball_mc"+i, i);
    dot.duplicateMovieClip("ball_mc"+i, i);
    trace("dot"+i);
    i++;
}

i tried calling the [“ball_mc”+i] in the place of ball_mc but it is giving me the hit count of the last movieclip i.e ball_mc 10

Plz any one who can help me out

thanks in advance