//stop the random number of ciders to up position, on the last number of ciders to down
Código :
// draw cidergrid
function init() {
var ciderCount = 0;
for (var i = 0; i < COLUMNS; i++) {
for (var j = 0; j < ROWS; j++) {
var h = this.attachMovie("hole", ("hole_" + i + "_" + j), ciderCount++);
h._x = i * TILE_X;
h._y = j * TILE_Y + TILE_Y_OFFSET;
h.column = i;
h.row = j;
// send a random number of ciders to up position
if (Math.random() > .5) h.gotoAndPlay(10);
}
}
}
function ciderClick() {
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();
delete this.onRelease;
} 