Frame 1
function init() {
var _local4 = 0;
var _local3 = 0;
while (_local3 < COLUMNS) {
j = 0;
while (j < ROWS) {
var _local2 = this.attachMovie("hole", (("hole_" + _local3) + "_") + j, _local4++);
_local2._x = _local3 * TILE_X;
_local2._y = (j * TILE_Y) + TILE_Y_OFFSET;
_local2.column = _local3;
_local2.row = j;
if (Math.random() > 0.5) {
_local2.gotoAndPlay(20);
}
j++;
}
_local3++;
}
}
function trollClick() {
this.play();
this._parent[(("hole_" + (this.column - 1)) + "_") + this.row].play();
this._parent[(("hole_" + (this.column + 1)) + "_") + this.row].play();
this._parent[(("hole_" + this.column) + "_") + (this.row - 1)].play();
this._parent[(("hole_" + this.column) + "_") + (this.row + 1)].play();
}
COLUMNS = 7;
ROWS = 5;
TILE_X = 100;
TILE_Y = 100;
TILE_Y_OFFSET = 0;
init();
Symbol 5 MovieClip [hole] Frame 1
this.onRelease = this._parent.trollClick;
stop();
Symbol 5 MovieClip [hole] Frame 20
this.onRelease = this._parent.trollClick;
stop();