Frame 1
var savefile = SharedObject.getLocal("musicping");
stopAllSounds();
_root.bytesLoaded = _root.getBytesLoaded();
_root.bytesTotal = _root.getBytesTotal();
_root.percentLoaded = Math.round(100 * (_root.bytesLoaded / _root.bytesTotal));
_root.percentLoadedText = _root.percentLoaded + "%";
_root.bar.gotoAndStop(percentLoaded);
_root.menu = new ContextMenu();
_root.menu.hideBuiltInItems();
Frame 2
if (_root.percentLoaded == 100) {
gotoAndStop (3);
} else {
gotoAndPlay (1);
}
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
Frame 6
stop();
Instance of Symbol 95 MovieClip in Frame 6
onClipEvent (load) {
_root.level = 1;
_root.grid.gotoAndStop(1);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
timenum = 0;
_root.times = "00";
_root.timem = 0;
_root.fulltime = 0;
refreshwait = 0;
restart = 0;
_root.seconds = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(1);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 113 MovieClip in Frame 6
onClipEvent (load) {
music = 1;
}
on (press) {
music++;
if (music == 1) {
_root.music.play();
this.gotoAndStop(1);
} else if (music == 2) {
_root.music.stop();
this.gotoAndStop(2);
music = 0;
}
}
Instance of Symbol 115 MovieClip in Frame 6
onClipEvent (load) {
qdown = 0;
quality = 3;
}
onClipEvent (enterFrame) {
if (Key.isDown(81)) {
if (qdown == 0) {
qdown = 1;
if (quality < 3) {
quality++;
} else {
quality = 1;
}
}
}
if (qdown == 1) {
if (!Key.isDown(81)) {
qdown = 0;
}
}
if (quality == 3) {
_quality = "HIGH";
} else if (quality == 1) {
_quality = "LOW";
} else if (quality == 2) {
_quality = "MEDIUM";
}
}
Instance of Symbol 95 MovieClip in Frame 7
onClipEvent (load) {
_root.level = 2;
_root.grid.gotoAndStop(2);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(2);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 8
onClipEvent (load) {
_root.level = 3;
_root.grid.gotoAndStop(3);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(3);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 9
onClipEvent (load) {
_root.level = 4;
_root.grid.gotoAndStop(4);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(4);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 10
onClipEvent (load) {
_root.level = 5;
_root.grid.gotoAndStop(5);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(5);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 11
onClipEvent (load) {
_root.level = 6;
_root.grid.gotoAndStop(6);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(6);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 12
onClipEvent (load) {
_root.level = 7;
_root.grid.gotoAndStop(7);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(7);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 13
onClipEvent (load) {
_root.level = 8;
_root.grid.gotoAndStop(8);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(8);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 14
onClipEvent (load) {
_root.level = 9;
_root.grid.gotoAndStop(9);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(9);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 15
onClipEvent (load) {
_root.level = 10;
_root.grid.gotoAndStop(10);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(10);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 16
onClipEvent (load) {
_root.level = 11;
_root.grid.gotoAndStop(11);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(11);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 17
onClipEvent (load) {
_root.level = 12;
_root.grid.gotoAndStop(12);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(12);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 18
onClipEvent (load) {
_root.level = 13;
_root.grid.gotoAndStop(13);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(13);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 19
onClipEvent (load) {
_root.level = 14;
_root.grid.gotoAndStop(14);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(14);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 20
onClipEvent (load) {
_root.level = 15;
_root.grid.gotoAndStop(15);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(15);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 21
onClipEvent (load) {
_root.level = 16;
_root.grid.gotoAndStop(16);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(16);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 22
onClipEvent (load) {
_root.level = 17;
_root.grid.gotoAndStop(17);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(17);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 23
onClipEvent (load) {
_root.level = 18;
_root.grid.gotoAndStop(18);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(18);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 24
onClipEvent (load) {
_root.level = 19;
_root.grid.gotoAndStop(19);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(19);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Instance of Symbol 95 MovieClip in Frame 25
onClipEvent (load) {
_root.level = 20;
_root.grid.gotoAndStop(20);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
timenum = 0;
}
onClipEvent (enterFrame) {
_root.fulltime = (_root.timem + ":") + _root.times;
timenum++;
if (timenum == 45) {
_root.times++;
_root.seconds++;
if ((_root.times > -1) and (_root.times < 10)) {
_root.times = "0" + _root.times;
}
timenum = 0;
}
if (_root.times == 60) {
_root.times = "00";
_root.timem++;
}
if (win == 1) {
_root.slide.play();
winwait++;
if (winwait == 1) {
_root.slide.play();
}
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (restart == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
restart = 1;
}
}
if (restart == 1) {
refreshwait++;
if (refreshwait == 1) {
_root.slide.gotoAndPlay(1);
}
if (refreshwait > 30) {
_root.grid.gotoAndStop(20);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
refreshwait = 0;
restart = 0;
}
}
}
Frame 26
stop();
submit._visible = true;
submit.onRelease = function () {
ab20_09 = new LoadVars();
ab20_09.z = namevar.text;
ab20_09.x = _root.seconds;
ab20_09.c = 806;
ab20_09.v = "LFHYPA";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
this._visible = false;
getURL ("http://www.armorbot.com/mytable/?id=806", _blank);
gotoAndStop (5);
};
Instance of Symbol 95 MovieClip in Frame 26
onClipEvent (load) {
_root.grid.gotoAndStop(15);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
}
onClipEvent (enterFrame) {
if (win == 1) {
winwait++;
if (winwait > 30) {
_root.nextFrame();
}
}
if (_root.block1.hitTest(_root.grid.win)) {
if (bmovetime == 11) {
if (_root.block1._currentframe == 1) {
_root.block1.gotoAndStop(2);
win = 1;
}
}
} else if (_root.block1._currentframe == 2) {
_root.block1.gotoAndStop(1);
}
i = 1;
while (i < maxblocks) {
_root.blocks["b" + i]._x = _root["block" + i]._x - _root.blocks._x;
_root.blocks["b" + i]._y = _root["block" + i]._y - _root.blocks._y;
i++;
}
if (win == 0) {
if (bmovetime == 11) {
if (movetime == 11) {
if ((!Key.isDown(39)) and ((!Key.isDown(37)) and ((!Key.isDown(40)) and (!Key.isDown(38))))) {
lastkey = 0;
}
if (Key.isDown(32)) {
if (lastkey == 1) {
if (_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 20), _root.char._y, true)) {
pushblock = 1;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 2) {
if (_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (_root.grid.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 20), _root.char._y, true)) {
pushblock = 2;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 3) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 20), true)) {
pushblock = 3;
bmovetime--;
start = 0;
}
}
}
} else if (lastkey == 4) {
if (_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 20), true)) {
pushblock = 4;
bmovetime--;
start = 0;
}
}
}
}
}
if (Key.isDown(39) and (!Key.isDown(37))) {
lastkey = 1;
_root.char.char._rotation = 90;
if (_root.grid.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(37) and (!Key.isDown(39))) {
lastkey = 2;
_root.char.char._rotation = 270;
if (_root.grid.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
if (!_root.blocks.hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
movetime--;
}
}
} else if (Key.isDown(40) and (!Key.isDown(38))) {
lastkey = 3;
_root.char.char._rotation = 180;
if (_root.grid.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
movetime--;
}
}
} else if (Key.isDown(38) and (!Key.isDown(40))) {
lastkey = 4;
_root.char.char._rotation = 0;
if (_root.grid.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
if (!_root.blocks.hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
movetime--;
}
}
}
} else {
if (lastkey == 1) {
_root.char._x = _root.char._x + speed;
} else if (lastkey == 2) {
_root.char._x = _root.char._x - speed;
} else if (lastkey == 3) {
_root.char._y = _root.char._y + speed;
} else if (lastkey == 4) {
_root.char._y = _root.char._y - speed;
}
movetime--;
if (movetime == 0) {
movetime = 11;
}
}
}
if (pushblock == 1) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x + (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x + speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 2) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x - (speed * 10), _root.char._y, true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._x = _root.char._x - speed;
_root["block" + blocknum]._x = _root["block" + blocknum]._x - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 3) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y + (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y + speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y + speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
} else if (pushblock == 4) {
if (start == 0) {
i = 0;
while (i < maxblocks) {
if (_root["block" + i].hitTest(_root.char._x, _root.char._y - (speed * 10), true)) {
blocknum = i;
}
i++;
}
start = 1;
} else {
_root.char._y = _root.char._y - speed;
_root["block" + blocknum]._y = _root["block" + blocknum]._y - speed;
bmovetime--;
if (bmovetime == 0) {
bmovetime = 11;
pushblock = 0;
}
}
}
}
if (win == 0) {
if (Key.isDown(17)) {
_root.grid.gotoAndStop(15);
speed = 5.2;
movetime = 11;
lastkey = 0;
pushblock = 0;
bmovetime = 11;
start = 0;
blocknum = 0;
win = 0;
winwait = 0;
_root.char._x = _root.grid.charstart._x + _root.grid._x;
_root.char._y = _root.grid.charstart._y + _root.grid._y;
maxblocks = 11;
i = 1;
while (i < maxblocks) {
_root["block" + i]._x = _root.grid[("b" + i) + "start"]._x + _root.grid._x;
_root["block" + i]._y = _root.grid[("b" + i) + "start"]._y + _root.grid._y;
i++;
}
}
}
}
Symbol 21 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local4 = sX / this._width;
var _local3 = sY / this._height;
_parent._x = cX - (this._x * _local4);
_parent._y = cY - (this._y * _local3);
_parent._xscale = 100 * _local4;
_parent._yscale = 100 * _local3;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
Symbol 22 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 29 MovieClip Frame 148
_root.play();
Symbol 33 MovieClip Frame 205
_root.nextFrame();
Symbol 40 Button
on (press) {
nextFrame();
}
Symbol 42 Button
on (press) {
gotoAndStop (27);
}
Symbol 44 Button
on (press) {
getURL ("http://www.armorbot.com/mytable/?id=806", _blank);
}
Symbol 46 Button
on (press) {
getURL ("http://www.armorgames.com", _blank);
}
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 2
stop();
Symbol 85 MovieClip Frame 3
stop();
Symbol 85 MovieClip Frame 4
stop();
Symbol 85 MovieClip Frame 5
stop();
Symbol 85 MovieClip Frame 6
stop();
Symbol 85 MovieClip Frame 7
stop();
Symbol 85 MovieClip Frame 8
stop();
Symbol 85 MovieClip Frame 9
stop();
Symbol 85 MovieClip Frame 10
stop();
Symbol 85 MovieClip Frame 11
stop();
Symbol 85 MovieClip Frame 12
stop();
Symbol 85 MovieClip Frame 13
stop();
Symbol 85 MovieClip Frame 14
stop();
Symbol 85 MovieClip Frame 15
stop();
Symbol 85 MovieClip Frame 16
stop();
Symbol 85 MovieClip Frame 17
stop();
Symbol 85 MovieClip Frame 18
stop();
Symbol 85 MovieClip Frame 19
stop();
Symbol 85 MovieClip Frame 20
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 2
stop();
Symbol 98 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 3476
gotoAndPlay (1);
Symbol 113 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 2
stop();
Symbol 145 Button
on (press) {
gotoAndStop (5);
}