# Working in player 6, but not 8

**URL:** <https://forum.kirupa.com/t/working-in-player-6-but-not-8/236120>\
**Category:** Uncategorized\
**Created:** [August 17, 2007, 12:43pm UTC](https://forum.kirupa.com/t/working-in-player-6-but-not-8/236120 "2007-08-17T12:43:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![apertureboy](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@apertureboy](https://forum.kirupa.com/u/apertureboy)\
**Post date:** [August 17, 2007, 12:43pm UTC](https://forum.kirupa.com/t/working-in-player-6-but-not-8/236120/1 "2007-08-17T12:43:13Z")

</div>

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();
