Little problem with a "for" loop

here my AS code :


for (i=1; i<20; i++) {
this["lc"+i].onRollOver = function() {
    this["p"+i].gotoAndPlay("go");
};
this["lc"+i].onRollOut = function() {
    this["p"+i].gotoAndPlay("out");
};
}

“lc+i” is a mc button.
“p+i” is a another mc button.

the problem is only the lc20 and p20 button work !
( i have 20 buttons, and the number of “lc” must be the same as “p”)

the “for” loop don’t consider lc1 to lc20 and p1 to p20 buttons !!

what’s the problem and the tip ?

thanks