|
function hitothers(xx, yy, num, rot) {
switch (num) { case 1 : switch (rot) { case 0 : x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; x2 = (xx-40)/10; y2 = (330-yy)/10+1; x3 = (xx-40)/10+1; y3 = (330-yy)/10+1; x4 = (xx-40)/10; y4 = (330-yy)/10; break; case 90 : x1 = (xx-40)/10; y1 = (330-yy)/10+1; x2 = (xx-40)/10; y2 = (330-yy)/10; x3 = (xx-40)/10; y3 = (330-yy)/10-1; x4 = (xx-40)/10-1; y4 = (330-yy)/10; break; case 180 : x1 = (xx-40)/10; y1 = (330-yy)/10; x2 = (xx-40)/10-1; y2 = (330-yy)/10; x3 = (xx-40)/10-2; y3 = (330-yy)/10; x4 = (xx-40)/10-1; y4 = (330-yy)/10+1; break; case -90 : x1 = (xx-40)/10-1; y1 = (330-yy)/10+2; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; x3 = (xx-40)/10; y3 = (330-yy)/10+1; x4 = (xx-40)/10-1; y4 = (330-yy)/10; break; } break; case 2 : switch (rot) { case 0 : x1 = (xx-40)/10-2; y1 = (330-yy)/10+1; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; x3 = (xx-40)/10; y3 = (330-yy)/10+1; x4 = (xx-40)/10+1; y4 = (330-yy)/10+1; break; case 90 : x1 = (xx-40)/10; y1 = (330-yy)/10+2; x2 = (xx-40)/10; y2 = (330-yy)/10+1; x3 = (xx-40)/10; y3 = (330-yy)/10; x4 = (xx-40)/10; y4 = (330-yy)/10-1; break; case 180 : x1 = (xx-40)/10-2; y1 = (330-yy)/10; x2 = (xx-40)/10-1; y2 = (330-yy)/10; x3 = (xx-40)/10; y3 = (330-yy)/10; x4 = (xx-40)/10+1; y4 = (330-yy)/10; break; case -90 : x1 = (xx-40)/10-1; y1 = (330-yy)/10+2; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; x3 = (xx-40)/10-1; y3 = (330-yy)/10; x4 = (xx-40)/10-1; y4 = (330-yy)/10-1; break; } break; case 3 : x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; x2 = (xx-40)/10; y2 = (330-yy)/10+1; x3 = (xx-40)/10; y3 = (330-yy)/10; x4 = (xx-40)/10-1; y4 = (330-yy)/10; break; case 4 : switch (rot) { case 0 : x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; x2 = (xx-40)/10; y2 = (330-yy)/10+1; x3 = (xx-40)/10; y3 = (330-yy)/10; x4 = (xx-40)/10+1; y4 = (330-yy)/10; break; case 90 : x1 = (xx-40)/10; y1 = (330-yy)/10+1; x2 = (xx-40)/10; y2 = (330-yy)/10; x3 = (xx-40)/10-1; y3 = (330-yy)/10; x4 = (xx-40)/10-1; y4 = (330-yy)/10-1; break; case 180 : x1 = (xx-40)/10-2; y1 = (330-yy)/10+1; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; x3 = (xx-40)/10-1; y3 = (330-yy)/10; x4 = (xx-40)/10; y4 = (330-yy)/10; break; case -90 : x1 = (xx-40)/10-1; y1 = (330-yy)/10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; x3 = (xx-40)/10; y3 = (330-yy)/10+1; x4 = (xx-40)/10; y4 = (330-yy)/10+2; break; } break; case 5 : switch (rot) { case 0 : x1 = (xx-40)/10-2; y1 = (330-yy)/10; x2 = (xx-40)/10-1; y2 = (330-yy)/10; x3 = (xx-40)/10-1; y3 = (330-yy)/10+1; x4 = (xx-40)/10; y4 = (330-yy)/10+1; break; case 90 : x1 = (xx-40)/10-1; y1 = (330-yy)/10+2; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; x3 = (xx-40)/10; y3 = (330-yy)/10+1; x4 = (xx-40)/10; y4 = (330-yy)/10; break; case 180 : x1 = (xx-40)/10-1; y1 = (330-yy)/10; x2 = (xx-40)/10; y2 = (330-yy)/10; x3 = (xx-40)/10; y3 = (330-yy)/10+1; x4 = (xx-40)/10+1; y4 = (330-yy)/10+1; break; case -90 : x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; x2 = (xx-40)/10-1; y2 = (330-yy)/10; x3 = (xx-40)/10; y3 = (330-yy)/10; x4 = (xx-40)/10; y4 = (330-yy)/10-1; break; } break; case 6 : switch (rot) { case 0 : x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; x2 = (xx-40)/10-1; y2 = (330-yy)/10; x3 = (xx-40)/10; y3 = (330-yy)/10; x4 = (xx-40)/10+1; y4 = (330-yy)/10; break; case 90 : x1 = (xx-40)/10; y1 = (330-yy)/10+1; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; x3 = (xx-40)/10-1; y3 = (330-yy)/10; x4 = (xx-40)/10-1; y4 = (330-yy)/10-1; break; case 180 : x1 = (xx-40)/10-2; y1 = (330-yy)/10+1; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; x3 = (xx-40)/10; y3 = (330-yy)/10+1; x4 = (xx-40)/10; y4 = (330-yy)/10; break; case -90 : x1 = (xx-40)/10-1; y1 = (330-yy)/10; x2 = (xx-40)/10; y2 = (330-yy)/10; x3 = (xx-40)/10; y3 = (330-yy)/10+1; x4 = (xx-40)/10; y4 = (330-yy)/10+2; break; } break; case 7 : switch (rot) { case 0 : x1 = (xx-40)/10-2; y1 = (330-yy)/10; x2 = (xx-40)/10-1; y2 = (330-yy)/10; x3 = (xx-40)/10; y3 = (330-yy)/10; x4 = (xx-40)/10; y4 = (330-yy)/10+1; break; case 90 : x1 = (xx-40)/10-1; y1 = (330-yy)/10+2; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; x3 = (xx-40)/10-1; y3 = (330-yy)/10; x4 = (xx-40)/10; y4 = (330-yy)/10; break; case 180 : x1 = (xx-40)/10-1; y1 = (330-yy)/10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; x3 = (xx-40)/10; y3 = (330-yy)/10+1; x4 = (xx-40)/10+1; y4 = (330-yy)/10+1; break; case -90 : x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; x2 = (xx-40)/10; y2 = (330-yy)/10+1; x3 = (xx-40)/10; y3 = (330-yy)/10; x4 = (xx-40)/10; y4 = (330-yy)/10-1; break; } break; } if ((_root.box[y1][x1] == 1) || (_root.box[y2][x2] == 1) || (_root.box[y3][x3] == 1) || (_root.box[y4][x4] == 1)) { _root.hit = true; } else { _root.hit = false; } } function attachsquares(xx, yy, num, rot) { switch (num) { case 1 : switch (rot) { case 0 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x+10; _root["w"+(_root.iii+2)]._y = _root.currentmove._y-10; x3 = (xx-40)/10+1; y3 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y; x4 = (xx-40)/10; y4 = (330-yy)/10; break; case 90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x; _root["w"+(_root.iii+1)]._y = _root.currentmove._y; x2 = (xx-40)/10; y2 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y+10; x3 = (xx-40)/10; y3 = (330-yy)/10-1; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y; x4 = (xx-40)/10-1; y4 = (330-yy)/10; break; case 180 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x; _root["w"+_root.iii]._y = _root.currentmove._y; x1 = (xx-40)/10; y1 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y; x2 = (xx-40)/10-1; y2 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x-20; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10-2; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y-10; x4 = (xx-40)/10-1; y4 = (330-yy)/10+1; break; case -90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y-20; x1 = (xx-40)/10-1; y1 = (330-yy)/10+2; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y-10; x3 = (xx-40)/10; y3 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y; x4 = (xx-40)/10-1; y4 = (330-yy)/10; break; } break; case 2 : switch (rot) { case 0 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-20; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10-2; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y-10; x3 = (xx-40)/10; y3 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x+10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y-10; x4 = (xx-40)/10+1; y4 = (330-yy)/10+1; break; case 90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x; _root["w"+_root.iii]._y = _root.currentmove._y-20; x1 = (xx-40)/10; y1 = (330-yy)/10+2; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y+10; x4 = (xx-40)/10; y4 = (330-yy)/10-1; break; case 180 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-20; _root["w"+_root.iii]._y = _root.currentmove._y; x1 = (xx-40)/10-2; y1 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y; x2 = (xx-40)/10-1; y2 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x+10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y; x4 = (xx-40)/10+1; y4 = (330-yy)/10; break; case -90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y-20; x1 = (xx-40)/10-1; y1 = (330-yy)/10+2; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10-1; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y+10; x4 = (xx-40)/10-1; y4 = (330-yy)/10-1; break; } break; case 3 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y; x4 = (xx-40)/10-1; y4 = (330-yy)/10; break; case 4 : switch (rot) { case 0 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x+10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y; x4 = (xx-40)/10+1; y4 = (330-yy)/10; break; case 90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x; _root["w"+(_root.iii+1)]._y = _root.currentmove._y; x2 = (xx-40)/10; y2 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10-1; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y+10; x4 = (xx-40)/10-1; y4 = (330-yy)/10-1; break; case 180 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-20; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10-2; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10-1; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y; x4 = (xx-40)/10; y4 = (330-yy)/10; break; case -90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y; x1 = (xx-40)/10-1; y1 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y-10; x3 = (xx-40)/10; y3 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y-20; x4 = (xx-40)/10; y4 = (330-yy)/10+2; break; } break; case 5 : switch (rot) { case 0 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-20; _root["w"+_root.iii]._y = _root.currentmove._y; x1 = (xx-40)/10-2; y1 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y; x2 = (xx-40)/10-1; y2 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+2)]._y = _root.currentmove._y-10; x3 = (xx-40)/10-1; y3 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y-10; x4 = (xx-40)/10; y4 = (330-yy)/10+1; break; case 90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y-20; x1 = (xx-40)/10-1; y1 = (330-yy)/10+2; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y-10; x3 = (xx-40)/10; y3 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y; x4 = (xx-40)/10; y4 = (330-yy)/10; break; case 180 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y; x1 = (xx-40)/10-1; y1 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x; _root["w"+(_root.iii+1)]._y = _root.currentmove._y; x2 = (xx-40)/10; y2 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y-10; x3 = (xx-40)/10; y3 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x+10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y-10; x4 = (xx-40)/10+1; y4 = (330-yy)/10+1; break; case -90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y; x2 = (xx-40)/10-1; y2 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y+10; x4 = (xx-40)/10; y4 = (330-yy)/10-1; break; } break; case 6 : switch (rot) { case 0 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y; x2 = (xx-40)/10-1; y2 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x+10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y; x4 = (xx-40)/10+1; y4 = (330-yy)/10; break; case 90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10-1; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y+10; x4 = (xx-40)/10-1; y4 = (330-yy)/10-1; break; case 180 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-20; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10-2; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y-10; x3 = (xx-40)/10; y3 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y; x4 = (xx-40)/10; y4 = (330-yy)/10; break; case -90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y; x1 = (xx-40)/10-1; y1 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x; _root["w"+(_root.iii+1)]._y = _root.currentmove._y; x2 = (xx-40)/10; y2 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y-10; x3 = (xx-40)/10; y3 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y-20; x4 = (xx-40)/10; y4 = (330-yy)/10+2; break; } break; case 7 : switch (rot) { case 0 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-20; _root["w"+_root.iii]._y = _root.currentmove._y; x1 = (xx-40)/10-2; y1 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y; x2 = (xx-40)/10-1; y2 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y-10; x4 = (xx-40)/10; y4 = (330-yy)/10+1; break; case 90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y-20; x1 = (xx-40)/10-1; y1 = (330-yy)/10+2; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10-1; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y; x4 = (xx-40)/10; y4 = (330-yy)/10; break; case 180 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y; x1 = (xx-40)/10-1; y1 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x-10; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10-1; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y-10; x3 = (xx-40)/10; y3 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x+10; _root["w"+(_root.iii+3)]._y = _root.currentmove._y-10; x4 = (xx-40)/10+1; y4 = (330-yy)/10+1; break; case -90 : _root.attachMovie("square", "w"+_root.iii, 100+_root.iii); _root["w"+_root.iii]._x = _root.currentmove._x-10; _root["w"+_root.iii]._y = _root.currentmove._y-10; x1 = (xx-40)/10-1; y1 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+1), 100+_root.iii+1); _root["w"+(_root.iii+1)]._x = _root.currentmove._x; _root["w"+(_root.iii+1)]._y = _root.currentmove._y-10; x2 = (xx-40)/10; y2 = (330-yy)/10+1; _root.attachMovie("square", "w"+(_root.iii+2), 100+_root.iii+2); _root["w"+(_root.iii+2)]._x = _root.currentmove._x; _root["w"+(_root.iii+2)]._y = _root.currentmove._y; x3 = (xx-40)/10; y3 = (330-yy)/10; _root.attachMovie("square", "w"+(_root.iii+3), 100+_root.iii+3); _root["w"+(_root.iii+3)]._x = _root.currentmove._x; _root["w"+(_root.iii+3)]._y = _root.currentmove._y+10; x4 = (xx-40)/10; y4 = (330-yy)/10-1; break; } break; } _root.box[y1][x1] = 1; _root.box[y2][x2] = 1; _root.box[y3][x3] = 1; _root.box[y4][x4] = 1; _root.iii += 4; judgescore(); } function judgescore() { if (_root.box[29][6] == 1 || _root.box[29][7] == 1 || _root.box[29][8] == 1 || _root.box[29][9] == 1 || _root.box[29][10] == 1) { nextFrame(); } _root.fill1 = -1; _root.fill2 = -1; _root.fill3 = -1; _root.fill4 = -1; for (var m = 0; m<=29; m++) { _root.gain = true; for (var n = 0; n<=15; n++) { if (_root.box[m][n] == 0) { _root.gain = false; } } if (_root.gain == true) { _root.fill1 = m; } } if (_root.fill1 != -1) { _root.top.score = Number(_root.top.score)+100; for (var z = 0; z<=_root.iii; z++) { if (_root["w"+z]._y == 330-_root.fill1*10) { _root["w"+z].removeMovieClip(); } } for (var z = 0; z<=_root.iii; z++) { if (_root["w"+z]._y<330-_root.fill1*10) { _root["w"+z]._y += 10; } } for (var c = _root.fill1; c<=28; c++) { for (var d = 0; d<=15; d++) { _root.box[c][d] = _root.box[c+1][d]; } } for (var m = 0; m<=29; m++) { _root.gain = true; for (var n = 0; n<=15; n++) { if (_root.box[m][n] == 0) { _root.gain = false; } } if (_root.gain == true) { _root.fill2 = m; } } if (_root.fill2 != -1) { _root.top.score = Number(_root.top.score)+200; for (var z = 0; z<=_root.iii; z++) { if (_root["w"+z]._y == 330-_root.fill2*10) { _root["w"+z].removeMovieClip(); } } for (var z = 0; z<=_root.iii; z++) { if (_root["w"+z]._y<330-_root.fill2*10) { _root["w"+z]._y += 10; } } for (var c = _root.fill2; c<=28; c++) { for (var d = 0; d<=15; d++) { _root.box[c][d] = _root.box[c+1][d]; } } for (var m = 0; m<=29; m++) { _root.gain = true; for (var n = 0; n<=15; n++) { if (_root.box[m][n] == 0) { _root.gain = false; } } if (_root.gain == true) { _root.fill3 = m; } } if (_root.fill3 != -1) { _root.top.score = Number(_root.top.score)+300; for (var z = 0; z<=_root.iii; z++) { if (_root["w"+z]._y == 330-_root.fill3*10) { _root["w"+z].removeMovieClip(); } } for (var z = 0; z<=_root.iii; z++) { if (_root["w"+z]._y<330-_root.fill3*10) { _root["w"+z]._y += 10; } } for (var c = _root.fill3; c<=28; c++) { for (var d = 0; d<=15; d++) { _root.box[c][d] = _root.box[c+1][d]; } } for (var m = 0; m<=29; m++) { _root.gain = true; for (var n = 0; n<=15; n++) { if (_root.box[m][n] == 0) { _root.gain = false; } } if (_root.gain == true) { _root.fill4 = m; } } if (_root.fill4 != -1) { _root.top.score = Number(_root.top.score)+400; for (var z = 0; z<=_root.iii; z++) { if (_root["w"+z]._y == 330-_root.fill4*10) { _root["w"+z].removeMovieClip(); } } for (var z = 0; z<=_root.iii; z++) { if (_root["w"+z]._y<330-_root.fill4*10) { _root["w"+z]._y += 10; } } for (var c = _root.fill4; c<=28; c++) { for (var d = 0; d<=15; d++) { _root.box[c][d] = _root.box[c+1][d]; } } } } } } _root.fill1 = -1; _root.fill2 = -1; _root.fill3 = -1; _root.fill4 = -1; }
|