Frame 2
stop();
Frame 3
stop();
Frame 4
stop();
sweets = 0;
house = 4;
MovieClip.prototype.randomMove = function (a) {
speed = 3;
diagonalSpeed = 2.12;
if (a == 0) {
if ((this._x >= 0) && ((this._x + speed) < 600)) {
this._x = this._x + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 1) {
if (((this._x - speed) >= 0) && (this._x < 600)) {
this._x = this._x - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 2) {
if ((this._y > 0) && ((this._y + speed) <= 400)) {
this._y = this._y + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 3) {
if (((this._y - speed) >= 0) && (this._y < 400)) {
this._y = this._y - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 4) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 5) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if ((this._y > 0) && ((this._y + diagonalSpeed) <= 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 6) {
if ((this._x >= 0) && ((this._x + DiagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 7) {
if ((this._x >= 0) && ((this._x + diagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
}
};
Instance of Symbol 132 MovieClip "player" in Frame 4
onClipEvent (load) {
speed = 5;
speed2 = 3;
scale = _xscale;
radius = 7;
}
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
this._y = this._y - speed2;
this.gotoAndStop(4);
}
if (Key.isDown(40)) {
this._y = this._y + speed2;
this.gotoAndStop(3);
}
if (Key.isDown(37)) {
this._x = this._x - speed;
this.gotoAndStop(2);
_xscale = (-scale);
}
if (Key.isDown(39)) {
this._x = this._x + speed;
this.gotoAndStop(2);
_xscale = scale;
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
_x = (_x-1);
}
}
onClipEvent (keyUp) {
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (this._y > 400) {
this._y = 400;
}
if (this._y < 0) {
this._y = 0;
}
if (this._x > 650) {
this._x = 650;
}
if (this._x < 0) {
this._x = 0;
}
}
Instance of Symbol 137 MovieClip in Frame 4
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(5);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 143 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_root.house < 1) {
this.nextFrame();
}
}
Frame 5
stop();
Frame 6
stop();
sweets = 0;
house = 4;
MovieClip.prototype.randomMove = function (a) {
speed = 3;
diagonalSpeed = 2.12;
if (a == 0) {
if ((this._x >= 0) && ((this._x + speed) < 600)) {
this._x = this._x + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 1) {
if (((this._x - speed) >= 0) && (this._x < 600)) {
this._x = this._x - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 2) {
if ((this._y > 0) && ((this._y + speed) <= 400)) {
this._y = this._y + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 3) {
if (((this._y - speed) >= 0) && (this._y < 400)) {
this._y = this._y - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 4) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 5) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if ((this._y > 0) && ((this._y + diagonalSpeed) <= 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 6) {
if ((this._x >= 0) && ((this._x + DiagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 7) {
if ((this._x >= 0) && ((this._x + diagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
}
};
Instance of Symbol 137 MovieClip in Frame 6
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(5);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 143 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.house < 1) {
this.nextFrame();
}
}
Instance of Symbol 137 MovieClip in Frame 6
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(5);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 137 MovieClip in Frame 6
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(5);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 132 MovieClip "player" in Frame 6
onClipEvent (load) {
speed = 5;
speed2 = 3;
scale = _xscale;
radius = 7;
}
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
this._y = this._y - speed2;
this.gotoAndStop(4);
}
if (Key.isDown(40)) {
this._y = this._y + speed2;
this.gotoAndStop(3);
}
if (Key.isDown(37)) {
this._x = this._x - speed;
this.gotoAndStop(2);
_xscale = (-scale);
}
if (Key.isDown(39)) {
this._x = this._x + speed;
this.gotoAndStop(2);
_xscale = scale;
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
_x = (_x-1);
}
}
onClipEvent (keyUp) {
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (this._y > 400) {
this._y = 400;
}
if (this._y < 0) {
this._y = 0;
}
if (this._x > 650) {
this._x = 650;
}
if (this._x < 0) {
this._x = 0;
}
}
Frame 7
stop();
Frame 8
stop();
sweets = 0;
house = 5;
MovieClip.prototype.randomMove = function (a) {
speed = 3;
diagonalSpeed = 2.12;
if (a == 0) {
if ((this._x >= 0) && ((this._x + speed) < 600)) {
this._x = this._x + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 1) {
if (((this._x - speed) >= 0) && (this._x < 600)) {
this._x = this._x - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 2) {
if ((this._y > 0) && ((this._y + speed) <= 400)) {
this._y = this._y + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 3) {
if (((this._y - speed) >= 0) && (this._y < 400)) {
this._y = this._y - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 4) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 5) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if ((this._y > 0) && ((this._y + diagonalSpeed) <= 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 6) {
if ((this._x >= 0) && ((this._x + DiagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 7) {
if ((this._x >= 0) && ((this._x + diagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
}
};
Instance of Symbol 176 MovieClip in Frame 8
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 137 MovieClip in Frame 8
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(5);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 176 MovieClip in Frame 8
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 176 MovieClip in Frame 8
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 143 MovieClip in Frame 8
onClipEvent (enterFrame) {
if (_root.house < 1) {
this.nextFrame();
}
}
Instance of Symbol 132 MovieClip "player" in Frame 8
onClipEvent (load) {
speed = 5;
speed2 = 3;
scale = _xscale;
radius = 7;
}
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
this._y = this._y - speed2;
this.gotoAndStop(4);
}
if (Key.isDown(40)) {
this._y = this._y + speed2;
this.gotoAndStop(3);
}
if (Key.isDown(37)) {
this._x = this._x - speed;
this.gotoAndStop(2);
_xscale = (-scale);
}
if (Key.isDown(39)) {
this._x = this._x + speed;
this.gotoAndStop(2);
_xscale = scale;
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
_x = (_x-1);
}
}
onClipEvent (keyUp) {
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (this._y > 400) {
this._y = 400;
}
if (this._y < 0) {
this._y = 0;
}
if (this._x > 650) {
this._x = 650;
}
if (this._x < 0) {
this._x = 0;
}
}
Frame 9
stop();
Frame 10
stop();
sweets = 0;
house = 8;
MovieClip.prototype.randomMove = function (a) {
speed = 3;
diagonalSpeed = 2.12;
if (a == 0) {
if ((this._x >= 0) && ((this._x + speed) < 600)) {
this._x = this._x + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 1) {
if (((this._x - speed) >= 0) && (this._x < 600)) {
this._x = this._x - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 2) {
if ((this._y > 0) && ((this._y + speed) <= 400)) {
this._y = this._y + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 3) {
if (((this._y - speed) >= 0) && (this._y < 400)) {
this._y = this._y - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 4) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 5) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if ((this._y > 0) && ((this._y + diagonalSpeed) <= 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 6) {
if ((this._x >= 0) && ((this._x + DiagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 7) {
if ((this._x >= 0) && ((this._x + diagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
}
};
Instance of Symbol 137 MovieClip in Frame 10
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(5);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 176 MovieClip in Frame 10
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 176 MovieClip in Frame 10
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 176 MovieClip in Frame 10
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 143 MovieClip in Frame 10
onClipEvent (enterFrame) {
if (_root.house < 1) {
this.nextFrame();
}
}
Instance of Symbol 176 MovieClip in Frame 10
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 132 MovieClip "player" in Frame 10
onClipEvent (load) {
speed = 5;
speed2 = 3;
scale = _xscale;
radius = 7;
}
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
this._y = this._y - speed2;
this.gotoAndStop(4);
}
if (Key.isDown(40)) {
this._y = this._y + speed2;
this.gotoAndStop(3);
}
if (Key.isDown(37)) {
this._x = this._x - speed;
this.gotoAndStop(2);
_xscale = (-scale);
}
if (Key.isDown(39)) {
this._x = this._x + speed;
this.gotoAndStop(2);
_xscale = scale;
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
_x = (_x-1);
}
}
onClipEvent (keyUp) {
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (this._y > 400) {
this._y = 400;
}
if (this._y < 0) {
this._y = 0;
}
if (this._x > 650) {
this._x = 650;
}
if (this._x < 0) {
this._x = 0;
}
}
Frame 11
stop();
Frame 12
stop();
sweets = 0;
house = 5;
MovieClip.prototype.randomMove = function (a) {
speed = 3;
diagonalSpeed = 2.12;
if (a == 0) {
if ((this._x >= 0) && ((this._x + speed) < 600)) {
this._x = this._x + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 1) {
if (((this._x - speed) >= 0) && (this._x < 600)) {
this._x = this._x - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 2) {
if ((this._y > 0) && ((this._y + speed) <= 400)) {
this._y = this._y + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 3) {
if (((this._y - speed) >= 0) && (this._y < 400)) {
this._y = this._y - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 4) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 5) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if ((this._y > 0) && ((this._y + diagonalSpeed) <= 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 6) {
if ((this._x >= 0) && ((this._x + DiagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 7) {
if ((this._x >= 0) && ((this._x + diagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
}
};
Instance of Symbol 176 MovieClip in Frame 12
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 137 MovieClip in Frame 12
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(5);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 176 MovieClip in Frame 12
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 176 MovieClip in Frame 12
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 143 MovieClip in Frame 12
onClipEvent (enterFrame) {
if (_root.house < 1) {
this.nextFrame();
}
}
Instance of Symbol 132 MovieClip "player" in Frame 12
onClipEvent (load) {
speed = 5;
speed2 = 3;
scale = _xscale;
radius = 7;
}
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
this._y = this._y - speed2;
this.gotoAndStop(4);
}
if (Key.isDown(40)) {
this._y = this._y + speed2;
this.gotoAndStop(3);
}
if (Key.isDown(37)) {
this._x = this._x - speed;
this.gotoAndStop(2);
_xscale = (-scale);
}
if (Key.isDown(39)) {
this._x = this._x + speed;
this.gotoAndStop(2);
_xscale = scale;
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
_x = (_x-1);
}
}
onClipEvent (keyUp) {
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (this._y > 400) {
this._y = 400;
}
if (this._y < 0) {
this._y = 0;
}
if (this._x > 650) {
this._x = 650;
}
if (this._x < 0) {
this._x = 0;
}
}
Frame 13
stop();
Frame 14
stop();
sweets = 0;
house = 8;
MovieClip.prototype.randomMove = function (a) {
speed = 3;
diagonalSpeed = 2.12;
if (a == 0) {
if ((this._x >= 0) && ((this._x + speed) < 600)) {
this._x = this._x + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 1) {
if (((this._x - speed) >= 0) && (this._x < 600)) {
this._x = this._x - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 2) {
if ((this._y > 0) && ((this._y + speed) <= 400)) {
this._y = this._y + speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 3) {
if (((this._y - speed) >= 0) && (this._y < 400)) {
this._y = this._y - speed;
_root.vamp.gotoAndStop(2);
}
} else if (a == 4) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 5) {
if (((this._x - diagonalSpeed) >= 0) && (this._x < 600)) {
if ((this._y > 0) && ((this._y + diagonalSpeed) <= 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x - diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 6) {
if ((this._x >= 0) && ((this._x + DiagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y - diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
} else if (a == 7) {
if ((this._x >= 0) && ((this._x + diagonalSpeed) < 600)) {
if (((this._y - diagonalSpeed) >= 0) && (this._y < 400)) {
this._y = this._y + diagonalSpeed;
this._x = this._x + diagonalSpeed;
_root.vamp.gotoAndStop(2);
}
}
}
};
Instance of Symbol 137 MovieClip in Frame 14
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(5);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 176 MovieClip in Frame 14
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 176 MovieClip in Frame 14
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 176 MovieClip in Frame 14
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 143 MovieClip in Frame 14
onClipEvent (enterFrame) {
if (_root.house < 1) {
this.nextFrame();
}
}
Instance of Symbol 176 MovieClip in Frame 14
onClipEvent (load) {
c = 30;
d = 0;
hp = 1000;
radius = 7;
}
onClipEvent (enterFrame) {
distanceX = _root.player._x - _x;
distanceY = _root.player._y - _y;
distance = (distanceX * distanceX) + (distanceY * distanceY);
if (distance <= 6900) {
this.gotoAndStop(2);
angle = (-Math.atan2(distanceX, distanceY)) / (Math.PI/180);
if ((_root.hero._x != _x) || (_root.hero._y != _y)) {
if (((distanceX * distanceX) + (distanceY * distanceY)) >= 25) {
_y = (_y + (3 * Math.cos(angle * (Math.PI/180))));
_x = (_x - (3 * Math.sin(angle * (Math.PI/180))));
} else {
c++;
if (c > 15) {
_root.sweets = _root.sweets - random(7);
c = 0;
this.gotoAndStop(1);
}
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
this.gotoAndStop(2);
}
randomMove(b);
}
} else {
d++;
if (d > 50) {
b = random(8);
d = 0;
}
randomMove(b);
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
this.gotoAndStop(1);
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
this.gotoAndStop(1);
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
this.gotoAndStop(1);
_x = (_x-1);
}
}
Instance of Symbol 132 MovieClip "player" in Frame 14
onClipEvent (load) {
speed = 5;
speed2 = 3;
scale = _xscale;
radius = 7;
}
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
this._y = this._y - speed2;
this.gotoAndStop(4);
}
if (Key.isDown(40)) {
this._y = this._y + speed2;
this.gotoAndStop(3);
}
if (Key.isDown(37)) {
this._x = this._x - speed;
this.gotoAndStop(2);
_xscale = (-scale);
}
if (Key.isDown(39)) {
this._x = this._x + speed;
this.gotoAndStop(2);
_xscale = scale;
}
while (_root.wall.hitTest(_x, _y + radius, true)) {
_y = (_y-1);
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
_y = (_y+1);
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
_x = (_x+1);
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
_x = (_x-1);
}
}
onClipEvent (keyUp) {
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (this._y > 400) {
this._y = 400;
}
if (this._y < 0) {
this._y = 0;
}
if (this._x > 650) {
this._x = 650;
}
if (this._x < 0) {
this._x = 0;
}
}
Frame 15
stop();
Symbol 27 Button
on (release) {
getURL ("http://www.newgrounds.com", "_blank");
}
Symbol 29 MovieClip Frame 40
stop();
Symbol 41 Button
on (release) {
_root.play();
}
Symbol 42 MovieClip Frame 1
function onEnterFrame() {
if (!loaded) {
var _local3 = _root.getBytesLoaded() / _root.getBytesTotal();
if (_local3 >= 1) {
play();
bar._x = initX;
loaded = true;
} else {
bar._x = initX + ((_local3 - 1) * bar._width);
}
}
var _local4 = getTimer() - time;
timeAccum = timeAccum + _local4;
while (timeAccum >= FRAME_TIME) {
var _local2 = 0;
while (_local2 < timeClips.length) {
if (timeClips[_local2]._currentframe < timeClips[_local2]._totalframes) {
timeClips[_local2].nextFrame();
} else {
timeClips[_local2].gotoAndStop(1);
}
_local2++;
}
if (loaded && (_currentframe < _totalframes)) {
nextFrame();
}
timeAccum = timeAccum - FRAME_TIME;
}
time = time + _local4;
}
stop();
_root.stop();
var initX = bar._x;
var time = getTimer();
var FRAME_TIME = 33.3333333333333;
var timeAccum = 0;
var loaded = false;
timeClips = [bargfx, tank.mc0, tank.mc1, tank.mc2, tank.mc3, tank.mc4, tank.mc4.mc0, tank.mc4.mc1, tank.mc4.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc0.mc2, tank.mc4.mc0.mc0.mc0.mc3, tank.mc4.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc2, tank.mc5.mc0];
var i = 0;
while (i < timeClips.length) {
timeClips[i].stop();
i++;
}
Symbol 42 MovieClip Frame 51
Symbol 52 MovieClip Frame 28
gotoAndPlay (1);
Symbol 53 MovieClip Frame 58
gotoAndPlay (1);
Symbol 63 Button
on (release) {
getURL ("http://www.newgrounds.com", "_blank");
}
Symbol 75 Button
on (release) {
_root.nextFrame();
}
Symbol 87 MovieClip Frame 8
stop();
Symbol 114 MovieClip Frame 1
stop();
Instance of Symbol 114 MovieClip "sweety" in Symbol 115 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(Math.round(Math.random() * 10));
}
Symbol 120 MovieClip Frame 1
stop();
Instance of Symbol 101 MovieClip in Symbol 120 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.player.hitTest(this)) {
if (Key.isDown(32)) {
_parent.play();
_parent.sweety.sw.gotoAndStop(Math.round(Math.random() * 10));
_root.aten.play();
}
}
}
Symbol 120 MovieClip Frame 2
_root.sweets = _root.sweets + random(10);
_root.aten.play();
_root.house = _root.house - 1;
Symbol 120 MovieClip Frame 22
stop();
Symbol 132 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 1
stop();
Instance of Symbol 142 MovieClip in Symbol 143 MovieClip Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.nextFrame();
updateAfterEvent();
}
}
Symbol 149 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 14
stop();
Symbol 159 Button
on (release) {
_root.nextFrame();
}
Symbol 163 Button
on (release) {
_root.gotoAndStop(1);
stopAllSounds();
}
Symbol 176 MovieClip Frame 1
stop();