Snapping on predefined grid

I’ve got a movie clip that’s basically a grid with small little boxes that total 84 rows, and 20 columns…

I’m trying to get the user to be able to snap to the y position of one of the small little boxes.

You click on a square, and position it over one of the small boxes in the grid, but it always snaps “wrong”. I’ve tried –

square_on_grid.y = Math.round(square_y/g_gridSpacing) * g_gridSpacing;

Where g_gridSpacing is 12.5, the y value spacing of each small grid square cell.

Help!