enterFrame problem

Why my block just move down one time .

function moveBlockDown( obj ) local c,r = obj.location[1], obj.location[2] local newy = obj.y + blockSize obj.location[1] = c obj.location[2] = r+1 if gridTable[c+1][r+1] == 0 and obj.y \< newy then obj.y = obj.y + 1 else --set gridTable to 1 gridTable[c+1][r] =1 ready = true end end block.enterFrame = moveBlockDown Runtime:addEventListener("enterFrame" , block)