Working in player 6, but not 8

Hi,

Would anyone out there be able to help me update the following code. It works in player 6, but not 8…and I simply cannot figure out whats wrong.

Thanks

var maxx = 24;
//height
var maxy = 8;
//width
var gridspace = 39;

function makeGrid()
gridList = new Array();
gridSpot = new Array();
var depth = 0;
for (var x = 0; x<maxx; x++) {
for (var y = 0; y<maxy; y++) {
point = {x:x, y:y};
gridSpot.push(point);
}
}
this.onEnterFrame = function() {
buildGrid();
}

}

function buildGrid() {

var n = random(gridspot.length);
point = gridSpot[n];

gridSpot.splice(n, 1);

var nombre = "qr"+String(depth++);
var init = {_x:point.x*gridspace+gridspace/2+12, _y:point.y*gridspace+gridspace/2+8, _xscale:gridspace, _yscale:gridspace};
var neo = this.attachMovie("quarterRound", nombre, depth, init);

var fr = 0;
var fr_mean = 0;
for (var k=0; k&lt;this.gridList.length; k++) {
	if (neo.hitTest(this.gridList[k])) {
		fr += this.gridList[k].shade._currentframe;
		fr_mean++;
	}
}
if (fr_mean == 0) {
	
	neo.setFrameRandom();
} else {
	
	fr = Math.round(fr/fr_mean);
	neo.setFrame(fr);
}
gridList.push(neo);
if (gridspot.length == 0) {
	
	delete this.onEnterFrame;
	gridmade=true;

	for (var n=0;n&lt;gridList.length;n++) {
		gridList[n].doFadeOut();
	}
	_root.gotoAndPlay("10");
}

};

this.onMouseUp = function() {
if (gridmade) {
for (var n=0;n<gridList.length;n++) {
gridList[n].doFadeOut();
}
gridmade=false;
makeGrid();
}
};
gridmade = false;
makeGrid();