Multiple snap target help

hey flash gurus i have a question i have a block that i want to snap to a tightly to 64 boxes on a "fake isometric grid "

–the boxes have instance names of snap1 snap2 snap 3 etc

–heres the code i came up with can someone help me out it isnt working for some reason the reason why i want to do it this way is because i was handcoding the xand y quardinate of each drop target now i want to make it more dynamic so i think i want one script for all the droptargets

–also it must be a for loop problem because all i want flash to do is snap to the nearest point on the grid

this.onRelease=function(){
var snap =myarray.length;
for(var i = 0; i< 64; i++){
gridName = “snap” + i;
abs_x = Math.abs(loc_x-x);
abs_y = Math.abs(loc_y-y);
if (abs_x>28 || abs_y>17) {
if (eval(this._droptarget) == “snap”) {
_x = loc_x;
_y = loc_y;
music = new Sound();
music.attachSound(“click6”);
music.start(0, 1);
setProperty(this, _alpha, 100);
trace(“pointsnapping”);
}
}

–by the way the fla file thats posted only works for the 2x2s white to give you an example of what im trying to do

can someone at least post a tutorial