Frame 2
if (_framesloaded < 3) {
gotoAndPlay (1);
}
Frame 3
stop();
Frame 4
crashing = true;
yOffset = 0;
yOffset = 0;
Instance of Symbol 216 MovieClip in Frame 4
onClipEvent (enterFrame) {
this._x = this._x + -2;
if (this._x < -130) {
this._x = 680;
}
}
Instance of Symbol 218 MovieClip in Frame 4
onClipEvent (enterFrame) {
this._x = this._x + -1.5;
if (this._x < -100) {
this._x = 600;
}
}
Instance of Symbol 246 MovieClip in Frame 4
onClipEvent (load) {
mcHandle._x = mcBoundL._x;
stop();
up = false;
firstframe = _root._currentframe;
lastframe = 3037;
}
onClipEvent (enterFrame) {
if (this.mcHit.hitTest(_root._xmouse, _root._ymouse, false)) {
if (!up) {
up = true;
this.gotoAndPlay("down");
}
} else if (up) {
up = false;
this.gotoAndPlay("up");
}
}
Instance of Symbol 289 MovieClip in Frame 279
onClipEvent (load) {
self = this;
xVel = (Math.random() * -34) - 6;
yVel = (Math.random() * -50) - 24;
gravity = 4.6;
rotVel = (Math.random() * -24) - 6;
}
onClipEvent (enterFrame) {
self._x = self._x + xVel;
yVel = yVel + gravity;
self._y = self._y + yVel;
self._rotation = self._rotation + rotVel;
if (_root.crashing && (self._y > 500)) {
self._x = 600 + xOffset;
self._y = 500 - _root.yOffset;
xVel = (Math.random() * -34) - 6;
yVel = (Math.random() * -50) - 24;
rotVel = (Math.random() * -24) - 6;
}
}
Instance of Symbol 291 MovieClip in Frame 279
onClipEvent (load) {
self = this;
xVel = (Math.random() * -34) - 6;
yVel = (Math.random() * -40) - 24;
gravity = 4.4;
rotVel = (Math.random() * -24) - 6;
}
onClipEvent (enterFrame) {
self._x = self._x + xVel;
yVel = yVel + gravity;
self._y = self._y + yVel;
self._rotation = self._rotation + rotVel;
if (_root.crashing && (self._y > 600)) {
self._x = 600 + xOffset;
self._y = 600 - _root.yOffset;
xVel = (Math.random() * -34) - 6;
yVel = (Math.random() * -40) - 24;
rotVel = (Math.random() * -24) - 6;
}
}
Instance of Symbol 293 MovieClip in Frame 279
onClipEvent (load) {
self = this;
xVel = (Math.random() * -34) - 6;
yVel = (Math.random() * -40) - 24;
gravity = 4.2;
rotVel = (Math.random() * -24) - 6;
}
onClipEvent (enterFrame) {
self._x = self._x + xVel;
yVel = yVel + gravity;
self._y = self._y + yVel;
self._rotation = self._rotation + rotVel;
if (_root.crashing && (self._y > 500)) {
self._x = 600 + xOffset;
self._y = 500 - _root.yOffset;
xVel = (Math.random() * -34) - 6;
yVel = (Math.random() * -40) - 24;
rotVel = (Math.random() * -24) - 6;
}
}
Frame 321
crashing = false;
Instance of Symbol 216 MovieClip in Frame 331
onClipEvent (enterFrame) {
this._x = this._x + -2;
if (this._x < -130) {
this._x = 680;
}
this._alpha = 70;
}
Instance of Symbol 218 MovieClip in Frame 331
onClipEvent (enterFrame) {
this._x = this._x + -1.5;
if (this._x < -100) {
this._x = 600;
}
this._alpha = 70;
}
Instance of Symbol 216 MovieClip in Frame 332
onClipEvent (enterFrame) {
this._x = this._x + -2;
if (this._x < -130) {
this._x = 680;
}
this._alpha = 40;
}
Instance of Symbol 218 MovieClip in Frame 332
onClipEvent (enterFrame) {
this._x = this._x + -1.5;
if (this._x < -100) {
this._x = 600;
}
this._alpha = 40;
}
Instance of Symbol 216 MovieClip in Frame 333
onClipEvent (enterFrame) {
this._x = this._x + -2;
if (this._x < -130) {
this._x = 680;
}
this._alpha = 15;
}
Instance of Symbol 218 MovieClip in Frame 333
onClipEvent (enterFrame) {
this._x = this._x + -1.5;
if (this._x < -100) {
this._x = 600;
}
this._alpha = 15;
}
Frame 371
crashing = true;
xOffset = 100;
yOffset = 200;
Frame 435
crashing = false;
Instance of Symbol 335 MovieClip in Frame 494
onClipEvent (load) {
yVel = (Math.random() * 2) + 4;
gravity = 0.2;
}
onClipEvent (enterFrame) {
if (this._y < 360) {
yVel = yVel + gravity;
this._y = this._y + yVel;
} else {
this.stop();
}
}
Instance of Symbol 335 MovieClip in Frame 494
onClipEvent (load) {
this.gotoAndPlay(6);
yVel = (Math.random() * 2) + 4;
gravity = 0.2;
}
onClipEvent (enterFrame) {
if (this._y < 230) {
yVel = yVel + gravity;
this._y = this._y + yVel;
} else {
this.stop();
}
}
Instance of Symbol 335 MovieClip in Frame 494
onClipEvent (load) {
this.gotoAndPlay(9);
yVel = (Math.random() * 2) + 4;
gravity = 0.2;
}
onClipEvent (enterFrame) {
if (this._y < 340) {
yVel = yVel + gravity;
this._y = this._y + yVel;
} else {
this.stop();
}
}
Instance of Symbol 335 MovieClip in Frame 494
onClipEvent (load) {
this.gotoAndPlay(12);
yVel = (Math.random() * 2) + 4;
gravity = 0.2;
}
onClipEvent (enterFrame) {
if (this._y < 360) {
yVel = yVel + gravity;
this._y = this._y + yVel;
} else {
this.stop();
}
}
Instance of Symbol 335 MovieClip in Frame 494
onClipEvent (load) {
this.gotoAndPlay(14);
yVel = (Math.random() * 2) + 4;
gravity = 0.2;
}
onClipEvent (enterFrame) {
if (this._y < 354) {
yVel = yVel + gravity;
this._y = this._y + yVel;
} else {
this.stop();
}
}
Instance of Symbol 335 MovieClip in Frame 494
onClipEvent (load) {
this.gotoAndPlay(14);
yVel = 3;
gravity = 0.16;
}
onClipEvent (enterFrame) {
if (this._y < 348) {
yVel = yVel + gravity;
this._y = this._y + yVel;
} else {
this.stop();
}
}
Instance of Symbol 289 MovieClip in Frame 620
onClipEvent (load) {
self = this;
xVel = Math.random() * 14;
yVel = Math.random() * -40;
gravity = 4.2;
rotVel = Math.random() * -18;
}
onClipEvent (enterFrame) {
self._x = self._x + xVel;
yVel = yVel + gravity;
self._y = self._y + yVel;
self._rotation = self._rotation + rotVel;
}
Instance of Symbol 289 MovieClip in Frame 630
onClipEvent (load) {
self = this;
xVel = 10;
yVel = -26;
gravity = 4.4;
rotVel = 22;
}
onClipEvent (enterFrame) {
self._x = self._x + xVel;
yVel = yVel + gravity;
self._y = self._y + yVel;
self._rotation = self._rotation + rotVel;
}
Instance of Symbol 289 MovieClip in Frame 630
onClipEvent (load) {
self = this;
xVel = 4;
yVel = -32;
gravity = 4.2;
rotVel = 16;
}
onClipEvent (enterFrame) {
self._x = self._x + xVel;
yVel = yVel + gravity;
self._y = self._y + yVel;
self._rotation = self._rotation + rotVel;
}
Instance of Symbol 289 MovieClip in Frame 633
onClipEvent (load) {
self = this;
xVel = 24;
yVel = -14;
gravity = 4;
rotVel = 22;
}
onClipEvent (enterFrame) {
self._x = self._x + xVel;
yVel = yVel + gravity;
self._y = self._y + yVel;
self._rotation = self._rotation + rotVel;
}
Frame 1118
xMove = 0;
yMove = 0.11;
walking = true;
Instance of Symbol 495 MovieClip "mcWall" in Frame 1118
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Instance of Symbol 497 MovieClip in Frame 1118
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Instance of Symbol 497 MovieClip in Frame 1118
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Instance of Symbol 497 MovieClip in Frame 1118
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Instance of Symbol 497 MovieClip in Frame 1118
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Instance of Symbol 497 MovieClip in Frame 1118
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Instance of Symbol 497 MovieClip in Frame 1118
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Instance of Symbol 497 MovieClip in Frame 1118
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Instance of Symbol 497 MovieClip in Frame 1118
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Instance of Symbol 497 MovieClip in Frame 1118
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Frame 1202
mcWall.gotoAndPlay("broken");
yMove = 0.07;
monsterShooting = false;
Instance of Symbol 537 MovieClip "mcMonster" in Frame 1202
onClipEvent (load) {
xVel = 0;
}
onClipEvent (enterFrame) {
this._x = this._x + xVel;
}
Frame 1205
yMove = 0;
walking = false;
Instance of Symbol 540 MovieClip in Frame 1212
onClipEvent (enterFrame) {
target1 = _parent;
mult = (this._xscale + 30) / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Instance of Symbol 540 MovieClip in Frame 1212
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Instance of Symbol 540 MovieClip in Frame 1212
onClipEvent (enterFrame) {
target1 = _parent;
mult = this._xscale / 100;
if (target1.xMove != 0) {
this._x = this._x + (target1.xMove * mult);
}
if (target1.yMove != 0) {
this._y = this._y + (target1.yMove * mult);
this._xscale = this._xscale + ((target1.yMove * mult) * 2);
this._yscale = this._yscale + ((target1.yMove * mult) * 2);
if (target1.yMove > 0) {
this._x = this._x + ((this._x - target1.mcCenter._x) / 150);
} else {
this._x = this._x - ((this._x - target1.mcCenter._x) / 150);
}
}
}
Frame 1216
xMove = 0;
yMove = -0.07;
walking = true;
monsterWalking = true;
Frame 1220
xMove = 0;
yMove = -0.15;
mcGun.gotoAndPlay("fire");
monsterShooting = true;
Frame 1224
xMove = -0.12;
yMove = -0.2;
Frame 1231
xMove = -0.32;
Frame 1243
mcGun.gotoAndPlay("fire");
Frame 1279
xMove = -0.07;
mcGun.gotoAndPlay("fire");
Frame 1291
xMove = 10;
yMove = 0.1;
mcMonster.xVel = 10;
Frame 1295
monsterShooting = false;
Frame 1312
mcMonster.xVel = 0;
Frame 1318
monsterShooting = true;
Frame 1320
yMove = 0.1;
mcMonster.xVel = -5;
Frame 1329
mcGun.gotoAndPlay("fire");
mcMonster.xVel = 0;
Frame 1337
xMove = 5;
yMove = 0.1;
mcMonster.xVel = -5;
Frame 1349
mcMonster.xVel = 0;
Frame 1359
xMove = -5;
yMove = -0.2;
monsterShooting = false;
mcMonster.xVel = -5;
Frame 1373
monsterShooting = true;
Frame 1378
mcGun.gotoAndPlay("fire");
mcMonster.xVel = 0;
Frame 1402
xMove = 1;
yMove = 0.2;
Frame 1406
mcGun.gotoAndPlay("fire");
Frame 1425
xMove = 4;
mcMonster.xVel = 4;
Frame 1439
xMove = -5;
mcMonster.xVel = -5;
Frame 1444
mcGun.gotoAndPlay("fire");
Frame 1451
xMove = 5;
yMove = 0;
mcMonster.xVel = 0;
Frame 1458
monsterShooting = false;
Frame 1466
monsterWalking = false;
Frame 1481
xMove = 0;
Instance of Symbol 565 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 567 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 571 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 567 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 567 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Frame 1541
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 594 MovieClip in Frame 1541
onClipEvent (load) {
yVel = 8;
state = 1;
respawn = function () {
state = 1;
this._y = -100;
this._x = Math.random() * 400;
};
}
onClipEvent (enterFrame) {
if (state == 1) {
this._y = this._y + yVel;
if (this._y > 500) {
respawn();
}
if (this._y > 20) {
i = 1;
while (i < 32) {
if (this.hitTest(_parent.mcBullets["bullet" + i])) {
state = 2;
this.gotoAndPlay("death");
i = 33;
}
i++;
}
}
} else if (state == 2) {
this._y = this._y + 5;
} else if (state == 0) {
respawn();
}
}
Instance of Symbol 594 MovieClip in Frame 1541
onClipEvent (load) {
yVel = 8;
state = 1;
respawn = function () {
state = 1;
this._y = -100;
this._x = Math.random() * 400;
};
}
onClipEvent (enterFrame) {
if (state == 1) {
this._y = this._y + yVel;
if (this._y > 500) {
respawn();
}
if (this._y > 20) {
i = 1;
while (i < 32) {
if (this.hitTest(_parent.mcBullets["bullet" + i])) {
state = 2;
this.gotoAndPlay("death");
i = 33;
}
i++;
}
}
} else if (state == 2) {
this._y = this._y + 5;
} else if (state == 0) {
respawn();
}
}
Instance of Symbol 594 MovieClip in Frame 1541
onClipEvent (load) {
yVel = 8;
state = 1;
respawn = function () {
state = 1;
this._y = -100;
this._x = Math.random() * 400;
};
}
onClipEvent (enterFrame) {
if (state == 1) {
this._y = this._y + yVel;
if (this._y > 500) {
respawn();
}
if (this._y > 20) {
i = 1;
while (i < 32) {
if (this.hitTest(_parent.mcBullets["bullet" + i])) {
state = 2;
this.gotoAndPlay("death");
i = 33;
}
i++;
}
}
} else if (state == 2) {
this._y = this._y + 5;
} else if (state == 0) {
respawn();
}
}
Instance of Symbol 598 MovieClip in Frame 1541
onClipEvent (load) {
count = 0;
bullets = 0;
xVel = 10;
yVel = 10;
}
onClipEvent (enterFrame) {
count++;
if (count > 1000) {
count = 1;
}
if ((count % 6) == 0) {
bullets++;
if (bullets > 32) {
bullets = 1;
}
_parent.mcBullets.mcBullet.duplicateMovieClip("bullet" + bullets, 100 + bullets);
_parent.mcBullets["bullet" + bullets]._x = this._x + 232;
_parent.mcBullets["bullet" + bullets]._y = this._y - 345;
}
if ((count % 6) == 3) {
bullets++;
if (bullets > 32) {
bullets = 1;
}
_parent.mcBullets.mcBullet.duplicateMovieClip("bullet" + bullets, 100 + bullets);
_parent.mcBullets["bullet" + bullets]._x = this._x + 158;
_parent.mcBullets["bullet" + bullets]._y = this._y - 345;
}
if (((Key.isDown(37) || (Key.isDown(39))) || (Key.isDown(38))) || (Key.isDown(40))) {
if (Key.isDown(37)) {
this._x = this._x + (-xVel);
} else if (Key.isDown(39)) {
this._x = this._x + xVel;
}
if (Key.isDown(38)) {
this._y = this._y + (-yVel);
} else if (Key.isDown(40)) {
this._y = this._y + yVel;
}
} else {
if (_parent.moveLeft) {
this._x = this._x + (-xVel);
} else if (_parent.moveRight) {
this._x = this._x + xVel;
}
if (_parent.moveUp) {
this._y = this._y + (-yVel);
} else if (_parent.moveDown) {
this._y = this._y + yVel;
}
}
}
Frame 1546
moveLeft = true;
Frame 1556
moveUp = true;
Frame 1560
moveLeft = false;
Frame 1566
moveUp = false;
moveRight = true;
Frame 1574
moveDown = true;
Frame 1580
moveRight = false;
moveDown = false;
Frame 1588
moveLeft = true;
Frame 1594
moveUp = true;
Frame 1600
moveUp = false;
moveDown = true;
Frame 1605
moveLeft = false;
moveRight = true;
Frame 1613
moveRight = false;
moveDown = false;
Frame 1625
moveUp = true;
Frame 1631
moveUp = false;
moveDown = true;
Frame 1639
moveLeft = true;
moveDown = false;
Frame 1642
moveLeft = false;
moveRight = true;
Frame 1654
moveUp = true;
Frame 1664
moveRight = false;
Frame 1666
moveLeft = true;
Frame 1669
moveUp = false;
moveDown = true;
Frame 1671
moveLeft = false;
Frame 1676
moveLeft = true;
Frame 1679
moveDown = false;
Frame 1683
moveLeft = false;
Frame 1688
moveLeft = true;
Frame 1695
moveLeft = false;
moveRight = true;
Frame 1702
moveRight = false;
Frame 1708
moveRight = true;
Frame 1711
moveUp = true;
Frame 1718
moveRight = false;
Instance of Symbol 751 MovieClip in Frame 1827
onClipEvent (load) {
speed = (Math.random() * 70) + 40;
}
onClipEvent (enterFrame) {
if (this._x < (200 + this._width)) {
this._x = this._x + speed;
} else {
this._x = -100 - this._width;
this._y = (Math.random() * 400) - 200;
speed = (Math.random() * 70) + 40;
}
}
Instance of Symbol 751 MovieClip in Frame 1827
onClipEvent (load) {
speed = (Math.random() * 70) + 40;
}
onClipEvent (enterFrame) {
if (this._x < (200 + this._width)) {
this._x = this._x + speed;
} else {
this._x = -100 - this._width;
this._y = (Math.random() * 400) - 200;
speed = (Math.random() * 70) + 40;
}
}
Instance of Symbol 751 MovieClip in Frame 1827
onClipEvent (load) {
speed = (Math.random() * 70) + 40;
}
onClipEvent (enterFrame) {
if (this._x < (200 + this._width)) {
this._x = this._x + speed;
} else {
this._x = -100 - this._width;
this._y = (Math.random() * 400) - 200;
speed = (Math.random() * 70) + 40;
}
}
Instance of Symbol 751 MovieClip in Frame 1827
onClipEvent (load) {
speed = (Math.random() * 70) + 40;
}
onClipEvent (enterFrame) {
if (this._x < (200 + this._width)) {
this._x = this._x + speed;
} else {
this._x = -100 - this._width;
this._y = (Math.random() * 400) - 200;
speed = (Math.random() * 70) + 40;
}
}
Instance of Symbol 751 MovieClip in Frame 1827
onClipEvent (load) {
speed = (Math.random() * 70) + 40;
}
onClipEvent (enterFrame) {
if (this._x < (200 + this._width)) {
this._x = this._x + speed;
} else {
this._x = -100 - this._width;
this._y = (Math.random() * 400) - 200;
speed = (Math.random() * 70) + 40;
}
}
Instance of Symbol 751 MovieClip in Frame 1827
onClipEvent (load) {
speed = (Math.random() * 70) + 40;
}
onClipEvent (enterFrame) {
if (this._x < (200 + this._width)) {
this._x = this._x + speed;
} else {
this._x = -100 - this._width;
this._y = (Math.random() * 400) - 200;
speed = (Math.random() * 70) + 40;
}
}
Instance of Symbol 751 MovieClip in Frame 1827
onClipEvent (load) {
speed = (Math.random() * 70) + 40;
}
onClipEvent (enterFrame) {
if (this._x < (200 + this._width)) {
this._x = this._x + speed;
} else {
this._x = -100 - this._width;
this._y = (Math.random() * 400) - 200;
speed = (Math.random() * 70) + 40;
}
}
Instance of Symbol 751 MovieClip in Frame 1827
onClipEvent (load) {
speed = (Math.random() * 70) + 40;
}
onClipEvent (enterFrame) {
if (this._x < (200 + this._width)) {
this._x = this._x + speed;
} else {
this._x = -100 - this._width;
this._y = (Math.random() * 400) - 200;
speed = (Math.random() * 70) + 40;
}
}
Instance of Symbol 843 MovieClip in Frame 2644
onClipEvent (load) {
num = 0;
count = 0;
}
onClipEvent (enterFrame) {
count++;
if ((count % 2) == 0) {
num++;
_root.mcSparkle.duplicateMovieClip("sparkle" + num, num + 100);
_root["sparkle" + num]._x = Math.random() * 550;
_root["sparkle" + num]._y = Math.random() * 400;
rand = (Math.random() * 60) + 30;
_root["sparkle" + num]._xscale = rand;
_root["sparkle" + num]._yscale = rand;
}
if (count > 1000) {
count = 1;
}
if (num > 100) {
num = 0;
}
}
Instance of Symbol 847 MovieClip "mcSparkle2" in Frame 2644
onClipEvent (load) {
if (_name != "mcSparkle2") {
xVel = ((Math.ceil(Math.random() * 2) * 2) - 3) * ((Math.random() * 7) + 0.2);
yVel = ((Math.ceil(Math.random() * 2) * 2) - 3) * ((Math.random() * 7) + 0.2);
}
}
onClipEvent (enterFrame) {
_x = (_x + xVel);
_y = (_y + yVel);
}
Instance of Symbol 847 MovieClip "mcSparkle2b" in Frame 2644
onClipEvent (load) {
if (_name != "mcSparkle2") {
xVel = ((Math.ceil(Math.random() * 2) * 2) - 3) * ((Math.random() * 7) + 0.2);
yVel = ((Math.ceil(Math.random() * 2) * 2) - 3) * ((Math.random() * 7) + 0.2);
}
}
onClipEvent (enterFrame) {
_x = (_x + xVel);
_y = (_y + yVel);
}
Instance of Symbol 843 MovieClip in Frame 2647
onClipEvent (load) {
num = 0;
count = 0;
}
onClipEvent (enterFrame) {
count++;
if (count < 18) {
i = 0;
while (i < 4) {
num++;
if (Math.random() < 0.95) {
_root.mcSparkle2.duplicateMovieClip("sparkle" + (num + 100), num + 200);
} else {
_root.mcSparkle2b.duplicateMovieClip("sparkle" + (num + 100), num + 200);
}
_root["sparkle" + (num + 100)]._x = 175 + (Math.random() * 200);
_root["sparkle" + (num + 100)]._y = 150 + (Math.random() * 90);
rand = (Math.random() * 100) + 50;
_root["sparkle" + (num + 100)]._xscale = rand;
_root["sparkle" + (num + 100)]._yscale = rand;
i++;
}
}
if (count > 1000) {
count = 1;
}
if (num > 100) {
num = 0;
}
}
Instance of Symbol 843 MovieClip in Frame 2730
onClipEvent (load) {
num = 0;
count = 0;
}
onClipEvent (enterFrame) {
count++;
if (count < 18) {
i = 0;
while (i < 4) {
num++;
if (Math.random() < 0.95) {
_root.mcSparkle2.duplicateMovieClip("sparkle" + (num + 100), num + 200);
} else {
_root.mcSparkle2b.duplicateMovieClip("sparkle" + (num + 100), num + 200);
}
_root["sparkle" + (num + 100)]._x = 175 + (Math.random() * 200);
_root["sparkle" + (num + 100)]._y = 150 + (Math.random() * 90);
rand = (Math.random() * 100) + 50;
_root["sparkle" + (num + 100)]._xscale = rand;
_root["sparkle" + (num + 100)]._yscale = rand;
i++;
}
}
if (count > 1000) {
count = 1;
}
if (num > 100) {
num = 0;
}
}
Instance of Symbol 855 MovieClip in Frame 2749
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndPlay("play");
}
}
Instance of Symbol 843 MovieClip in Frame 2812
onClipEvent (load) {
num = 0;
count = 0;
}
onClipEvent (enterFrame) {
count++;
if (count < 18) {
i = 0;
while (i < 4) {
num++;
if (Math.random() < 0.95) {
_root.mcSparkle2.duplicateMovieClip("sparkle" + (num + 100), num + 200);
} else {
_root.mcSparkle2b.duplicateMovieClip("sparkle" + (num + 100), num + 200);
}
_root["sparkle" + (num + 100)]._x = 175 + (Math.random() * 200);
_root["sparkle" + (num + 100)]._y = 150 + (Math.random() * 90);
rand = (Math.random() * 100) + 50;
_root["sparkle" + (num + 100)]._xscale = rand;
_root["sparkle" + (num + 100)]._yscale = rand;
i++;
}
}
if (count > 1000) {
count = 1;
}
if (num > 100) {
num = 0;
}
}
Instance of Symbol 843 MovieClip in Frame 2892
onClipEvent (load) {
num = 0;
count = 0;
}
onClipEvent (enterFrame) {
count++;
if (count < 18) {
i = 0;
while (i < 4) {
num++;
if (Math.random() < 0.95) {
_root.mcSparkle2.duplicateMovieClip("sparkle" + (num + 100), num + 200);
} else {
_root.mcSparkle2b.duplicateMovieClip("sparkle" + (num + 100), num + 200);
}
_root["sparkle" + (num + 100)]._x = 175 + (Math.random() * 200);
_root["sparkle" + (num + 100)]._y = 150 + (Math.random() * 90);
rand = (Math.random() * 100) + 50;
_root["sparkle" + (num + 100)]._xscale = rand;
_root["sparkle" + (num + 100)]._yscale = rand;
i++;
}
}
if (count > 1000) {
count = 1;
}
if (num > 100) {
num = 0;
}
}
Instance of Symbol 877 MovieClip "mcTank" in Frame 2983
onClipEvent (load) {
tankSpeed = 3.5;
keyLeft = 37;
keyRight = 39;
keyShoot = 32;
lPressed = false;
rPressed = false;
sPressed = false;
state = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(keyLeft)) {
state = 1;
if (!lPressed) {
lPressed = true;
_root.mcTank.gotoAndPlay("move");
}
this._xscale = -25.7;
_root.mcTank._x = _root.mcTank._x - tankSpeed;
} else if (Key.isDown(keyRight)) {
state = 1;
if (!rPressed) {
rPressed = true;
_root.mcTank.gotoAndPlay("move");
}
this._xscale = 25.7;
_root.mcTank._x = _root.mcTank._x + tankSpeed;
} else {
if ((state == 1) || (state == 2.5)) {
state = 0;
_root.mcTank.gotoAndPlay("idle");
}
lPressed = false;
rPressed = false;
}
if (Key.isDown(keyShoot)) {
if (!sPressed) {
sPressed = true;
state = 2;
_root.mcTank.mcBody.gotoAndPlay("shoot");
rand = Math.ceil(Math.random() * 100);
_root.mcBlast.duplicateMovieClip("blast" + rand, rand + 100);
_root["blast" + rand]._y = this._y - 20;
if (this._xscale > 0) {
_root["blast" + rand]._x = this._x + 32;
_root["blast" + rand]._rotation = 110;
} else {
_root["blast" + rand]._x = this._x - 32;
_root["blast" + rand]._rotation = -25;
}
}
} else {
sPressed = false;
}
}
Frame 3041
stop();
Instance of Symbol 877 MovieClip "mcTank" in Frame 3045
onClipEvent (load) {
tankSpeed = 3.5;
keyLeft = 37;
keyRight = 39;
keyShoot = 32;
lPressed = false;
rPressed = false;
sPressed = false;
state = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(keyLeft)) {
state = 1;
if (!lPressed) {
lPressed = true;
_root.mcTank.gotoAndPlay("move");
}
this._xscale = -25.7;
_root.mcTank._x = _root.mcTank._x - tankSpeed;
} else if (Key.isDown(keyRight)) {
state = 1;
if (!rPressed) {
rPressed = true;
_root.mcTank.gotoAndPlay("move");
}
this._xscale = 25.7;
_root.mcTank._x = _root.mcTank._x + tankSpeed;
} else {
if ((state == 1) || (state == 2.5)) {
state = 0;
_root.mcTank.gotoAndPlay("idle");
}
lPressed = false;
rPressed = false;
}
if (Key.isDown(keyShoot)) {
if (!sPressed) {
sPressed = true;
state = 2;
_root.mcTank.mcBody.gotoAndPlay("shoot");
rand = Math.ceil(Math.random() * 100);
_root.mcBlast.duplicateMovieClip("blast" + rand, rand + 100);
_root["blast" + rand]._y = this._y - 20;
if (this._xscale == 32.1) {
_root["blast" + rand]._x = this._x + 32;
_root["blast" + rand]._rotation = 110;
} else {
_root["blast" + rand]._x = this._x - 32;
_root["blast" + rand]._rotation = -25;
}
}
} else {
sPressed = false;
}
}
Symbol 6 MovieClip Frame 9
if (Math.random() > 0.4) {
gotoAndPlay (1);
}
Symbol 9 MovieClip Frame 1
stop();
Symbol 9 MovieClip Frame 2
stop();
Symbol 9 MovieClip Frame 3
stop();
Symbol 9 MovieClip Frame 4
stop();
Symbol 9 MovieClip Frame 5
stop();
Symbol 9 MovieClip Frame 6
stop();
Symbol 9 MovieClip Frame 7
stop();
Symbol 9 MovieClip Frame 8
stop();
Symbol 9 MovieClip Frame 9
stop();
Symbol 9 MovieClip Frame 10
stop();
Symbol 28 MovieClip Frame 20
gotoAndStop (1);
Instance of Symbol 28 MovieClip "mcRubble" in Symbol 29 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop("idle");
}
Symbol 43 MovieClip Frame 9
if (Math.random() < 0.7) {
gotoAndPlay (1);
}
Symbol 122 MovieClip Frame 17
stop();
Symbol 134 MovieClip Frame 17
stop();
Instance of Symbol 28 MovieClip "mcRubble" in Symbol 140 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop("idle");
}
Instance of Symbol 28 MovieClip "mcRubble" in Symbol 145 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop("idle");
}
Symbol 149 Button
on (release) {
_parent._parent.reset();
_visible = false;
}
Symbol 156 MovieClip Frame 9
stop();
Symbol 156 MovieClip Frame 19
stop();
Symbol 156 MovieClip Frame 29
stop();
Symbol 175 MovieClip Frame 1
Symbol 175 MovieClip Frame 18
gotoAndPlay (20);
Symbol 175 MovieClip Frame 29
stop();
Symbol 175 MovieClip Frame 47
gotoAndPlay (20);
Symbol 175 MovieClip Frame 68
gotoAndPlay (20);
Symbol 175 MovieClip Frame 89
gotoAndPlay (20);
Symbol 175 MovieClip Frame 109
gotoAndPlay (20);
Symbol 175 MovieClip Frame 132
gotoAndPlay (20);
Symbol 175 MovieClip Frame 162
gotoAndPlay (20);
Symbol 175 MovieClip Frame 194
gotoAndPlay (20);
Symbol 175 MovieClip Frame 230
gotoAndPlay (20);
Symbol 179 MovieClip Frame 19
gotoAndStop (20);
Symbol 179 MovieClip Frame 29
stop();
Symbol 179 MovieClip Frame 49
gotoAndStop (20);
Instance of Symbol 31 MovieClip in Symbol 185 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
on (release) {
_quality = "LOW";
}
Instance of Symbol 31 MovieClip in Symbol 185 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
on (release) {
_quality = "MEDIUM";
}
Instance of Symbol 31 MovieClip in Symbol 185 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
on (release) {
_quality = "HIGH";
}
Instance of Symbol 175 MovieClip "mcBonus" in Symbol 185 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay("idle");
}
Instance of Symbol 179 MovieClip "mcBad" in Symbol 185 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay("idle");
}
Symbol 209 Button
on (release) {
_root.play();
}
Symbol 210 MovieClip Frame 1
percent = 0;
baseX = -167;
_root.mcBar._x = baseX;
_root.stop();
Symbol 210 MovieClip Frame 3
percent = Math.ceil((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
mcBar._x = baseX + (percent * 1.15);
textPercent.text = percent;
if (percent >= 75) {
gotoAndPlay (4);
} else {
gotoAndPlay (2);
}
Symbol 210 MovieClip Frame 7
stop();
Symbol 213 MovieClip Frame 1
function reset() {
gameover = false;
score = 0;
counter = 0;
fireNum = 0;
dustNum = 400;
crushCount = 0;
bugs = bugsTotal;
var bugMC = this;
var i = 1;
while (i <= bugsTotal) {
bugMC = this["mcBug" + i];
bugMC.reset();
i++;
}
i = 1;
while (i <= plants) {
plantMC = this["mcPlant" + i];
plantMC.active = true;
plantMC.mcPlant._y = plantMC.yStart;
plantMC.life = plantMC.lifeStart;
plantMC.gotoAndStop("idle");
i++;
}
}
gravity = 0.15;
gameover = true;
score = 0;
counter = 0;
fireNum = 0;
dustNum = 400;
crushCount = 0;
bugsTotal = 4;
bugs = bugsTotal;
plants = 3;
this.onEnterFrame = function () {
counter++;
if (counter > 10000) {
counter = 1;
}
if (bugs <= 0) {
bugs = 1;
gameover = true;
mcHUD.mcBonus.gotoAndPlay("win");
mcHUD.mcStart._visible = true;
}
if (!gameover) {
var inactive;
i = 1;
while (i <= plants) {
if (!this["mcPlant" + i].active) {
inactive++;
}
i++;
}
if (inactive >= plants) {
gameover = true;
mcHUD.mcBonus.gotoAndPlay("lose");
mcHUD.mcStart._visible = true;
}
}
if (gameover) {
if (Key.isDown(13)) {
reset();
mcHUD.mcStart._visible = false;
}
}
mcHUD.mcQuality.gotoAndStop(_quality);
if (crushCount < 0) {
crushCount = 0;
}
if (score < 0) {
score = 0;
}
mcHUD.textScore.text = score;
textDebug1.text = "Wink's yVel = " + mcShip.yVel;
};
Instance of Symbol 11 MovieClip "dustBack" in Symbol 213 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._name != "dustBack") {
name1 = this._name.substring(8, this._name.length);
name1 = _parent["dustFront" + name1];
this._x = name1._x + name1.xVel;
this._y = name1._y + name1.yVel;
this._xscale = name1._xscale;
this._yscale = name1._yscale;
this._alpha = name1._alpha;
if (this._xscale < 33) {
this.removeMovieClip();
}
} else {
_alpha = 0;
}
}
Instance of Symbol 13 MovieClip "firePartBackRight" in Symbol 213 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._name != "firePartBackRight") {
name1 = this._name.substring(17, this._name.length);
name1 = _parent["firePartRight" + name1];
this._x = name1._x + name1.xVel;
this._y = name1._y + name1.yVel;
this._alpha = name1._alpha;
if (this._alpha < 33) {
this.removeMovieClip();
}
} else {
_alpha = 0;
}
}
Instance of Symbol 15 MovieClip "firePartRight" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
xVel = (Math.random() / 2) + 0.4;
if (Math.random() > 0.5) {
yVel = Math.random() * 0.3;
yAccel = Math.random() * -0.01;
} else {
yVel = (-Math.random()) * 0.2;
yAccel = Math.random() * 0.01;
}
life = Math.random() + 1;
}
onClipEvent (enterFrame) {
if (life > 0) {
yVel = yVel + yAccel;
}
if (Key.isDown(17)) {
_x = (_x + (xVel * 4));
_y = (_y + (yVel * 4));
} else {
_x = (_x + xVel);
_y = (_y + yVel);
}
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 15 MovieClip "firePartWhiteRight" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
xVel = (Math.random() / 3) + 0.3;
if (Math.random() > 0.5) {
yVel = Math.random() / 4;
yAccel = Math.random() * -0.04;
} else {
yVel = (-Math.random()) / 4;
yAccel = Math.random() * 0.04;
}
life = (Math.random() / 2) + 1;
}
onClipEvent (enterFrame) {
if (life > 0) {
yVel = yVel + yAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 13 MovieClip "firePartBackDown" in Symbol 213 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._name != "firePartBackDown") {
name1 = this._name.substring(16, this._name.length);
name1 = _parent["firePartDown" + name1];
this._x = name1._x + name1.xVel;
this._y = name1._y + name1.yVel;
this._alpha = name1._alpha;
if (this._alpha < 33) {
this.removeMovieClip();
}
} else {
_alpha = 0;
}
}
Instance of Symbol 15 MovieClip "firePartDown" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
yVel = (Math.random() / 2) + 0.4;
if (Math.random() > 0.5) {
xVel = Math.random() * 0.3;
xAccel = Math.random() * -0.01;
} else {
xVel = (-Math.random()) * 0.2;
xAccel = Math.random() * 0.01;
}
life = Math.random() + 1;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
if (Key.isDown(17)) {
_x = (_x + (xVel * 4));
_y = (_y + (yVel * 4));
} else {
_x = (_x + xVel);
_y = (_y + yVel);
}
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 15 MovieClip "firePartWhiteDown" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
yVel = (Math.random() / 3) + 0.3;
if (Math.random() > 0.5) {
xVel = Math.random() / 4;
xAccel = Math.random() * -0.04;
} else {
xVel = (-Math.random()) / 4;
xAccel = Math.random() * 0.04;
}
life = (Math.random() / 2) + 1;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 29 MovieClip "mcPlant3" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
yStart = mcPlant._y;
this.swapDepths(1002);
lifeStart = 166;
life = lifeStart;
active = true;
this.gotoAndStop("idle");
}
onClipEvent (enterFrame) {
if (life <= 0) {
this.gotoAndStop("dead");
active = false;
}
}
Instance of Symbol 31 MovieClip "mcLeft" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 31 MovieClip "mcRight" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 13 MovieClip "firePartBackUp" in Symbol 213 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._name != "firePartBackUp") {
name1 = this._name.substring(14, this._name.length);
name1 = _parent["firePartUp" + name1];
this._x = name1._x + name1.xVel;
this._y = name1._y + name1.yVel;
this._alpha = name1._alpha;
if (this._alpha < 33) {
this.removeMovieClip();
}
} else {
_alpha = 0;
}
}
Instance of Symbol 15 MovieClip "firePartUp" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
yVel = (-(Math.random() / 2)) - 0.4;
if (Math.random() > 0.5) {
xVel = Math.random() * 0.3;
xAccel = Math.random() * -0.01;
} else {
xVel = (-Math.random()) * 0.2;
xAccel = Math.random() * 0.01;
}
life = Math.random() + 1;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
if (Key.isDown(17)) {
_x = (_x + (xVel * 4));
_y = (_y + (yVel * 4));
} else {
_x = (_x + xVel);
_y = (_y + yVel);
}
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 15 MovieClip "firePartWhiteUp" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
yVel = (-(Math.random() / 3)) - 0.3;
if (Math.random() > 0.5) {
xVel = Math.random() / 4;
xAccel = Math.random() * -0.04;
} else {
xVel = (-Math.random()) / 4;
xAccel = Math.random() * 0.04;
}
life = (Math.random() / 2) + 1;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 49 MovieClip "mcShip" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
function makeFire(x, y, direction) {
if ((_parent.counter % 1) == 0) {
_parent.fireNum++;
if (_parent.fireNum > 100) {
_parent.fireNum = 1;
}
if (Key.isDown(16)) {
fireColor.setRGB(10079487);
} else {
fireColor.setRGB(16776960);
}
tempName1 = "firePart" + direction;
tempName2 = "firePartBack" + direction;
tempName3 = "firePartWhite" + direction;
_parent[tempName1].duplicateMovieClip(tempName1 + _parent.fireNum, _parent.fireNum + 100);
_parent[tempName2].duplicateMovieClip(tempName2 + _parent.fireNum, _parent.fireNum);
_parent[tempName3].duplicateMovieClip(tempName3 + _parent.fireNum, _parent.fireNum + 200);
var fireName = _parent[tempName1 + _parent.fireNum];
var fireBackName = _parent[tempName2 + _parent.fireNum];
var fireWhiteName = _parent[tempName3 + _parent.fireNum];
fireName._x = x;
fireName._y = y;
rand = Math.random();
fireName._width = (rand * 5) + 7;
fireName._height = (rand * 5) + 7;
fireBackName._width = fireName._width + 4;
fireBackName._height = fireName._height + 4;
if (Key.isDown(16)) {
fireBackColor.setRGB(3368703);
} else {
fireBackColor.setRGB(16750848);
}
fireWhiteName._x = x;
fireWhiteName._y = y;
rand = Math.random();
fireWhiteName._width = (rand * 3) + 4;
fireWhiteName._height = (rand * 3) + 4;
}
}
function makeDust(x, y) {
_parent.dustNum++;
if (_parent.dustNum > 450) {
_parent.dustNum = 401;
}
tempName1 = "dustFront";
tempName2 = "dustBack";
_parent[tempName1].duplicateMovieClip(tempName1 + _parent.dustNum, _parent.dustNum + 100);
_parent[tempName2].duplicateMovieClip(tempName2 + _parent.dustNum, _parent.dustNum);
var dustName = _parent[tempName1 + _parent.dustNum];
var dustBackName = _parent[tempName2 + _parent.dustNum];
dustName._x = (x - 7) + (Math.random() * 14);
dustName._y = y;
rand = Math.random();
dustName._width = (rand * 8) + 8;
dustName._height = (rand * 8) + 8;
dustBackName._width = dustName._width + 6;
dustBackName._height = dustName._height + 6;
}
xAccel = 0.5;
xVel = 0;
xMax = 10;
yAccel = 0.5;
yVel = -2;
yMax = 14;
if (_name == "mcShip") {
this.swapDepths(315);
}
}
onClipEvent (enterFrame) {
if (!_parent.gameover) {
if (Key.isDown(37)) {
xVel = xVel + (-xAccel);
makeFire(this._x + this.mcRight._x, this._y + this.mcRight._y, "Right");
}
if (Key.isDown(39)) {
xVel = xVel + xAccel;
makeFire(this._x + this.mcLeft._x, this._y + this.mcLeft._y, "Left");
}
if (Key.isDown(38)) {
yVel = yVel + (-yAccel);
if (yVel <= 0) {
makeFire(this._x + this.mcDown1._x, (this._y + this.mcDown1._y) + 4, "Down");
makeFire(this._x + this.mcDown2._x, (this._y + this.mcDown2._y) + 4, "Down");
} else if (yVel > 0) {
makeFire(this._x + this.mcDown1._x, (this._y + this.mcDown1._y) + 10, "Down");
makeFire(this._x + this.mcDown2._x, (this._y + this.mcDown2._y) + 10, "Down");
}
}
if (Key.isDown(40)) {
yVel = yVel + yAccel;
if (yVel <= 0) {
makeFire(this._x + this.mcUp._x, (this._y + this.mcUp._y) - 10, "Up");
} else if (yVel > 0) {
makeFire(this._x + this.mcUp._x, this._y + this.mcUp._y, "Up");
}
}
if (xVel > xMax) {
xVel = xMax;
} else if (xVel < (-xMax)) {
xVel = -xMax;
}
if (yVel > yMax) {
yVel = yMax;
} else if (yVel < (-yMax)) {
yVel = -yMax;
}
if (xVel > 0) {
xVel = xVel + -0.04;
} else if (xVel < 0) {
xVel = xVel + 0.04;
}
if (Math.abs(xVel) < (xAccel - 0.1)) {
xVel = 0;
}
this._x = this._x + xVel;
this._y = this._y + yVel;
if (this._x < _parent.mcLeft._x) {
this._x = _parent.mcLeft._x;
xVel = (-xVel) / 2;
} else if (this._x > _parent.mcRight._x) {
this._x = _parent.mcRight._x;
xVel = (-xVel) / 2;
}
if (_parent.mcGround.hitTest(this._x + 275, this._y + 200, true)) {
if (yVel > 8) {
var missed = true;
var bugMC = this;
var i = 1;
while (i <= _parent.bugsTotal) {
bugMC = _parent["mcBug" + i];
if ((bugMC.life >= 0) && (this.hitTest(bugMC._x + 270, bugMC._y + 190, false))) {
missed = false;
i = _parent.bugsTotal + 1;
}
i++;
}
if (missed) {
_parent.mcHUD.mcBad.gotoAndPlay("minus1");
_parent.score = _parent.score + -1;
}
}
yVel = (-yVel) / 2;
this._y--;
xVel = xVel / 1.1;
if (Math.abs(yVel) < 0.2) {
yVel = 0;
}
if (xVel > 0) {
makeDust(this._x + 20, this._y);
} else if (xVel < 0) {
makeDust(this._x - 20, this._y);
} else {
makeDust(this._x, this._y);
}
} else if (!_parent.mcGround.hitTest(this._x + 275, this._y + 201, true)) {
yVel = yVel + _parent.gravity;
if (Key.isDown(38)) {
if (_parent.mcGround.hitTest(this._x + 275, this._y + 250, true)) {
if ((_parent.counter % 1) == 0) {
makeDust((this._x + (Math.random() * 10)) + 20, (this._y + (Math.random() * 10)) + 40);
makeDust((this._x + (Math.random() * 10)) - 20, (this._y + (Math.random() * 10)) + 40);
}
}
}
}
while (_parent.mcGround.hitTest(this._x + 275, this._y + 200, true)) {
makeDust(this._x, this._y);
this._y--;
}
}
}
Instance of Symbol 13 MovieClip "firePartBackLeft" in Symbol 213 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._name != "firePartBackLeft") {
name1 = this._name.substring(16, this._name.length);
name1 = _parent["firePartLeft" + name1];
this._x = name1._x + name1.xVel;
this._y = name1._y + name1.yVel;
this._alpha = name1._alpha;
if (this._alpha < 33) {
this.removeMovieClip();
}
} else {
_alpha = 0;
}
}
Instance of Symbol 15 MovieClip "firePartLeft" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
xVel = (-(Math.random() / 2)) - 0.4;
if (Math.random() > 0.5) {
yVel = Math.random() * 0.3;
yAccel = Math.random() * -0.01;
} else {
yVel = (-Math.random()) * 0.2;
yAccel = Math.random() * 0.01;
}
life = Math.random() + 1;
}
onClipEvent (enterFrame) {
if (life > 0) {
yVel = yVel + yAccel;
}
if (Key.isDown(17)) {
_x = (_x + (xVel * 4));
_y = (_y + (yVel * 4));
} else {
_x = (_x + xVel);
_y = (_y + yVel);
}
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 15 MovieClip "firePartWhiteLeft" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
xVel = (-(Math.random() / 3)) - 0.3;
if (Math.random() > 0.5) {
yVel = Math.random() / 4;
yAccel = Math.random() * -0.04;
} else {
yVel = (-Math.random()) / 4;
yAccel = Math.random() * 0.04;
}
life = (Math.random() / 2) + 1;
}
onClipEvent (enterFrame) {
if (life > 0) {
yVel = yVel + yAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 51 MovieClip "dustFront" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
if (this._name == "dustFront") {
this._alpha = 0;
} else {
_alpha = 100;
yVel = (Math.random() / 2) + 0.4;
if (Math.random() > 0.5) {
xVel = Math.random() * 0.3;
xAccel = Math.random() * -0.01;
} else {
xVel = (-Math.random()) * 0.2;
xAccel = Math.random() * 0.01;
}
life = Math.random() + 1;
}
}
onClipEvent (enterFrame) {
if (this._name != "dustFront") {
if (life > 0) {
xVel = xVel + xAccel;
}
if (Key.isDown(17)) {
_x = (_x + (xVel * 4));
_y = (_y + (yVel * 4));
} else {
_x = (_x + xVel);
_y = (_y + yVel);
}
life = life - 0.1;
if (life < 0.5) {
if (life < 0) {
this.removeMovieClip();
}
this._xscale = life * 200;
this._yscale = this._xscale;
}
}
}
Instance of Symbol 135 MovieClip "mcBug1" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
function reset() {
state = "scrambling";
this.gotoAndStop("hit");
_x = ((Math.random() * 400) - 200);
_y = ((Math.random() * 200) - 100);
xVel = 0;
xMax = 7;
xAccel = 0.6;
yVel = 0;
yMax = 12;
hitTime = 0;
life = 100;
onFire = false;
burnTime = 0;
}
function makeFire(x, y) {
if ((_parent.counter % 2) == 0) {
_parent.fireNum++;
if (_parent.fireNum > 100) {
_parent.fireNum = 1;
}
if (Key.isDown(16)) {
fireColor.setRGB(10079487);
} else {
fireColor.setRGB(16776960);
}
tempName1 = "firePart" + direction;
tempName2 = "firePartBack" + direction;
tempName3 = "firePartWhite" + direction;
_parent[tempName1].duplicateMovieClip(tempName1 + _parent.fireNum, _parent.fireNum + 100);
_parent[tempName2].duplicateMovieClip(tempName2 + _parent.fireNum, _parent.fireNum);
_parent[tempName3].duplicateMovieClip(tempName3 + _parent.fireNum, _parent.fireNum + 200);
var fireName = _parent[tempName1 + _parent.fireNum];
var fireBackName = _parent[tempName2 + _parent.fireNum];
var fireWhiteName = _parent[tempName3 + _parent.fireNum];
fireName._x = x;
fireName._y = y;
rand = Math.random();
fireName._width = (rand * 5) + 7;
fireName._height = (rand * 5) + 7;
fireBackName._width = fireName._width + 4;
fireBackName._height = fireName._height + 4;
if (Key.isDown(16)) {
fireBackColor.setRGB(3368703);
} else {
fireBackColor.setRGB(16750848);
}
fireWhiteName._x = x;
fireWhiteName._y = y;
rand = Math.random();
fireWhiteName._width = (rand * 3) + 4;
fireWhiteName._height = (rand * 3) + 4;
}
}
function makeDust(x, y) {
_parent.dustNum++;
if (_parent.dustNum > 450) {
_parent.dustNum = 401;
}
tempName1 = "dustFront";
tempName2 = "dustBack";
_parent[tempName1].duplicateMovieClip(tempName1 + _parent.dustNum, _parent.dustNum + 100);
_parent[tempName2].duplicateMovieClip(tempName2 + _parent.dustNum, _parent.dustNum);
var dustName = _parent[tempName1 + _parent.dustNum];
var dustBackName = _parent[tempName2 + _parent.dustNum];
dustName._x = (x - 7) + (Math.random() * 14);
dustName._y = y;
rand = Math.random();
dustName._width = (rand * 8) + 8;
dustName._height = (rand * 8) + 8;
dustBackName._width = dustName._width + 6;
dustBackName._height = dustName._height + 6;
}
function land(dustOn) {
var landed = false;
if (_parent.mcGround.hitTest(this._x + 275, this._y + 200, true)) {
landed = true;
yVel = (-yVel) / 3;
this._y--;
xVel = xVel / 1.1;
if (Math.abs(yVel) < 0.8) {
yVel = 0;
}
if (dustOn) {
if (xVel > 0) {
makeDust(this._x + 20, this._y);
} else if (xVel < 0) {
makeDust(this._x - 20, this._y);
} else {
makeDust(this._x, this._y);
}
}
} else if (!_parent.mcGround.hitTest(this._x + 275, this._y + 201, true)) {
yVel = yVel + (_parent.gravity * 2);
}
while (_parent.mcGround.hitTest(this._x + 275, this._y + 200, true)) {
if (dustOn) {
makeDust(this._x, this._y);
}
this._y--;
}
return(landed);
}
function getBonus(deathType) {
switch (deathtype) {
case "crushed" :
if (_parent.crushCount > 3) {
_parent.score = _parent.score + (750 * _parent.crushCount);
if (!onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay("crushed4");
} else {
_parent.score = _parent.score + 1000;
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed4");
}
} else if (_parent.crushCount > 1) {
_parent.score = _parent.score + (500 * _parent.crushCount);
var label = ("crushed" + _parent.crushCount);
if (!onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay(label);
} else {
_parent.score = _parent.score + (1000 * _parent.crushCount);
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed2");
}
} else if (onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed");
}
return;
default :
_parent.mcHUD.mcBonus.gotoAndPlay(deathType);
}
}
state = "scrambling";
this.gotoAndStop("hit");
xVel = 0;
xMax = 7;
xAccel = 0.6;
yVel = 0;
yMax = 12;
hitTime = 0;
life = 100;
onFire = false;
burnTime = 0;
time = new Date(0);
shipMC = _parent.mcShip;
plantMC = this;
this.swapDepths(360);
fireColor = new Color(_parent.firePart);
fireBackColor = new Color(_parent.firePartBack);
dustColor = new Color(_parent.dustFront);
dustBackColor = new Color(_parent.dustBack);
}
onClipEvent (enterFrame) {
if ((!_parent.gameover) && (life > -1)) {
switch (state) {
case "idle" :
if (this._xscale < 0) {
xVel = (-xMax) / 4;
} else {
xVel = xMax / 4;
}
if (Math.abs(this._y - shipMC._y) < 160) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 100)) {
this._xscale = -100;
state = "running";
this.gotoAndStop("run");
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 100)) {
this._xscale = 100;
state = "running";
this.gotoAndStop("run");
}
}
if ((Math.abs(this._y - shipMC._y) >= 160) || (Math.abs(shipMC._x - this._x) >= 100)) {
var i = 1;
while (i <= _parent.plants) {
plantMC = _parent["mcPlant" + i];
if (plantMC.active && (Math.abs(this._x - plantMC._x) < 8)) {
state = "eating";
this.gotoAndStop("eat");
this._x = this._x + ((-10) + (Math.random() * 20));
i = _parent.plants;
}
i++;
}
}
if (yVel > yMax) {
yVel = yMax;
} else if (yVel < (-yMax)) {
yVel = -yMax;
}
this._x = this._x + xVel;
this._y = this._y + yVel;
land(false);
break;
case "eating" :
plantMC.life--;
plantMC.mcPlant._y++;
plantMC.mcRubble.gotoAndPlay("hit");
if (plantMC.active <= 0) {
state = "idle";
this.gotoAndStop("idle");
}
if (Math.abs(this._y - shipMC._y) < 100) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 120)) {
this._xscale = -100;
state = "running";
this.gotoAndStop("run");
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 120)) {
this._xscale = 100;
state = "running";
this.gotoAndStop("run");
}
}
break;
case "running" :
if (!onFire) {
if (Math.abs(this._y - shipMC._y) < 160) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 100)) {
xVel = xVel + (-xAccel);
this._xscale = -100;
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 100)) {
xVel = xVel + xAccel;
this._xscale = 100;
}
}
} else if (xVel < 0) {
xVel = xVel + (-xAccel);
this._xscale = -100;
} else {
xVel = xVel + xAccel;
this._xscale = 100;
}
if (xVel > xMax) {
xVel = xMax;
} else if (xVel < (-xMax)) {
xVel = -xMax;
}
if (yVel > yMax) {
yVel = yMax;
} else if (yVel < (-yMax)) {
yVel = -yMax;
}
if (xVel > 0) {
xVel = xVel + (-0.04);
} else if (xVel < 0) {
xVel = xVel + 0.04;
}
if (Math.abs(xVel) < 0.1) {
xVel = 0;
if ((yVel == 0) && (!onFire)) {
state = "idle";
this.gotoAndStop("idle");
}
}
this._x = this._x + xVel;
this._y = this._y + yVel;
land(true);
if (shipMC.hitTest(this._x + 275, this._y + 190, false)) {
if (_parent.mcGround.hitTest(this._x + 275, this._y + 205, true)) {
if (shipMC.yVel < 12) {
state = "scrambling";
yVel = -6;
hitTime = _parent.counter;
this.gotoAndStop("hit");
} else {
_parent.crushCount++;
hitTime = _parent.counter;
life = 0;
state = "crushed";
if (Math.random() > 0.5) {
this._xscale = 100;
} else {
this._xscale = -100;
}
this.gotoAndStop("crushed");
getBonus("crushed");
_parent.bugs--;
_parent.score = _parent.score + 500;
this._y = this._y + 12;
xVel = 0;
yVel = 0;
}
} else {
yVel = yVel + 4;
if (shipMC.yVel > 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + Math.abs(shipMC.yVel * 2);
}
} else if (((!onFire) && (Key.isDown(38))) && (shipMC.hitTest(this._x + 275, this._y + 160, false))) {
if (time.getTime() > (burnTime + 1000)) {
burnCount = 0;
} else if (burnCount >= 6) {
onFire = true;
burnCount = 0;
state = "scrambling";
yVel = -9;
hitTime = _parent.counter;
this.gotoAndStop("hit");
} else {
burnCount++;
burnTime = time.getTime();
}
}
break;
case "scrambling" :
if (xVel > 0) {
xVel = xVel + (-0.02);
} else if (xVel < 0) {
xVel = xVel + 0.02;
}
if (Math.abs(xVel) < (xAccel - 0.1)) {
xVel = 0;
}
this._x = this._x + xVel;
this._y = this._y + yVel;
if (land(true)) {
state = "running";
this.gotoAndStop("run");
}
if (_parent.counter > (hitTime + 4)) {
if (shipMC.hitTest(this._x + 275, this._y + 185, false)) {
if (this._y <= (shipMC._y - 10)) {
yVel = (-Math.abs(yVel / 4)) - 4;
if (shipMC.yVel < 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + shipMC.yVel;
} else {
yVel = yVel + 4;
if (shipMC.yVel > 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + Math.abs(shipMC.yVel * 2);
}
bounceVel = 6;
if (Math.abs(this._x - shipMC._x) > 22) {
xVel = -xVel;
} else if ((this._x - shipMC._x) < -15) {
xVel = -bounceVel;
} else if ((this._x - shipMC._x) < -5) {
xVel = (-bounceVel) / 2;
} else if ((this._x - shipMC._x) < 0) {
xVel = (-bounceVel) / 4;
} else if ((this._x - shipMC._x) > 0) {
xVel = bounceVel / 4;
} else if ((this._x - shipMC._x) > 5) {
xVel = bounceVel / 2;
} else if ((this._x - shipMC._x) > 15) {
xVel = bounceVel;
}
this._x = this._x + xVel;
}
}
break;
case "crushed" :
if (_parent.counter <= (hitTime + 2)) {
break;
}
_parent.crushCount--;
onFire = false;
life = -1;
}
if (this._x < (_parent.mcLeft._x + 10)) {
this._x = _parent.mcLeft._x + 10;
xVel = -xVel;
this._xscale = 100;
} else if (this._x > (_parent.mcRight._x - 10)) {
this._x = _parent.mcRight._x - 10;
xVel = -xVel;
this._xscale = -100;
}
if (onFire) {
makeFire(this._x, this._y - 16);
life = life + -0.5;
}
if ((state != "crushed") && (life <= 0)) {
if (onFire) {
life = -1;
state = "burned";
this.gotoAndStop("burned");
getBonus("burned");
_parent.bugs--;
_parent.score = _parent.score + 1000;
xVel = 0;
yVel = 0;
}
}
}
}
Instance of Symbol 13 MovieClip "firePartBack" in Symbol 213 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._name != "firePartBack") {
name1 = this._name.substring(12, this._name.length);
name1 = _parent["firePart" + name1];
this._x = name1._x + name1.xVel;
this._y = name1._y + name1.yVel;
this._alpha = name1._alpha;
if (this._alpha < 33) {
this.removeMovieClip();
}
} else {
_alpha = 0;
}
}
Instance of Symbol 15 MovieClip "firePart" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
yVel = (-Math.random()) - 0.6;
if (Math.random() > 0.5) {
xVel = Math.random() * 0.3;
xAccel = Math.random() * -0.01;
} else {
xVel = (-Math.random()) * 0.2;
xAccel = Math.random() * 0.01;
}
life = Math.random() + 1;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
if (Key.isDown(17)) {
_x = (_x + (xVel * 4));
_y = (_y + (yVel * 4));
} else {
_x = (_x + xVel);
_y = (_y + yVel);
}
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 15 MovieClip "firePartWhite" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
yVel = (-(Math.random() / 3)) - 0.3;
if (Math.random() > 0.5) {
xVel = Math.random() / 4;
xAccel = Math.random() * -0.04;
} else {
xVel = (-Math.random()) / 4;
xAccel = Math.random() * 0.04;
}
life = (Math.random() / 2) + 1;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 135 MovieClip "mcBug2" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
function reset() {
state = "scrambling";
this.gotoAndStop("hit");
_x = ((Math.random() * 400) - 200);
_y = ((Math.random() * 200) - 100);
xVel = 0;
xMax = 7;
xAccel = 0.6;
yVel = 0;
yMax = 12;
hitTime = 0;
life = 100;
onFire = false;
burnTime = 0;
}
function makeFire(x, y) {
if ((_parent.counter % 2) == 0) {
_parent.fireNum++;
if (_parent.fireNum > 100) {
_parent.fireNum = 1;
}
if (Key.isDown(16)) {
fireColor.setRGB(10079487);
} else {
fireColor.setRGB(16776960);
}
tempName1 = "firePart" + direction;
tempName2 = "firePartBack" + direction;
tempName3 = "firePartWhite" + direction;
_parent[tempName1].duplicateMovieClip(tempName1 + _parent.fireNum, _parent.fireNum + 100);
_parent[tempName2].duplicateMovieClip(tempName2 + _parent.fireNum, _parent.fireNum);
_parent[tempName3].duplicateMovieClip(tempName3 + _parent.fireNum, _parent.fireNum + 200);
var fireName = _parent[tempName1 + _parent.fireNum];
var fireBackName = _parent[tempName2 + _parent.fireNum];
var fireWhiteName = _parent[tempName3 + _parent.fireNum];
fireName._x = x;
fireName._y = y;
rand = Math.random();
fireName._width = (rand * 5) + 7;
fireName._height = (rand * 5) + 7;
fireBackName._width = fireName._width + 4;
fireBackName._height = fireName._height + 4;
if (Key.isDown(16)) {
fireBackColor.setRGB(3368703);
} else {
fireBackColor.setRGB(16750848);
}
fireWhiteName._x = x;
fireWhiteName._y = y;
rand = Math.random();
fireWhiteName._width = (rand * 3) + 4;
fireWhiteName._height = (rand * 3) + 4;
}
}
function makeDust(x, y) {
_parent.dustNum++;
if (_parent.dustNum > 450) {
_parent.dustNum = 401;
}
tempName1 = "dustFront";
tempName2 = "dustBack";
_parent[tempName1].duplicateMovieClip(tempName1 + _parent.dustNum, _parent.dustNum + 100);
_parent[tempName2].duplicateMovieClip(tempName2 + _parent.dustNum, _parent.dustNum);
var dustName = _parent[tempName1 + _parent.dustNum];
var dustBackName = _parent[tempName2 + _parent.dustNum];
dustName._x = (x - 7) + (Math.random() * 14);
dustName._y = y;
rand = Math.random();
dustName._width = (rand * 8) + 8;
dustName._height = (rand * 8) + 8;
dustBackName._width = dustName._width + 6;
dustBackName._height = dustName._height + 6;
}
function land(dustOn) {
var landed = false;
if (_parent.mcGround.hitTest(this._x + 275, this._y + 200, true)) {
landed = true;
yVel = (-yVel) / 3;
this._y--;
xVel = xVel / 1.1;
if (Math.abs(yVel) < 0.8) {
yVel = 0;
}
if (dustOn) {
if (xVel > 0) {
makeDust(this._x + 20, this._y);
} else if (xVel < 0) {
makeDust(this._x - 20, this._y);
} else {
makeDust(this._x, this._y);
}
}
} else if (!_parent.mcGround.hitTest(this._x + 275, this._y + 201, true)) {
yVel = yVel + (_parent.gravity * 2);
}
while (_parent.mcGround.hitTest(this._x + 275, this._y + 200, true)) {
if (dustOn) {
makeDust(this._x, this._y);
}
this._y--;
}
return(landed);
}
function getBonus(deathType) {
switch (deathtype) {
case "crushed" :
if (_parent.crushCount > 3) {
_parent.score = _parent.score + (750 * _parent.crushCount);
if (!onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay("crushed4");
} else {
_parent.score = _parent.score + 1000;
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed4");
}
} else if (_parent.crushCount > 1) {
_parent.score = _parent.score + (500 * _parent.crushCount);
var label = ("crushed" + _parent.crushCount);
if (!onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay(label);
} else {
_parent.score = _parent.score + (1000 * _parent.crushCount);
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed2");
}
} else if (onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed");
}
return;
default :
_parent.mcHUD.mcBonus.gotoAndPlay(deathType);
}
}
state = "scrambling";
this.gotoAndStop("hit");
xVel = 0;
xMax = 7;
xAccel = 0.6;
yVel = 0;
yMax = 12;
hitTime = 0;
life = 100;
onFire = false;
burnTime = 0;
time = new Date(0);
shipMC = _parent.mcShip;
plantMC = this;
this.swapDepths(361);
fireColor = new Color(_parent.firePart);
fireBackColor = new Color(_parent.firePartBack);
dustColor = new Color(_parent.dustFront);
dustBackColor = new Color(_parent.dustBack);
}
onClipEvent (enterFrame) {
if ((!_parent.gameover) && (life > -1)) {
switch (state) {
case "idle" :
if (this._xscale < 0) {
xVel = (-xMax) / 4;
} else {
xVel = xMax / 4;
}
if (Math.abs(this._y - shipMC._y) < 160) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 100)) {
this._xscale = -100;
state = "running";
this.gotoAndStop("run");
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 100)) {
this._xscale = 100;
state = "running";
this.gotoAndStop("run");
}
}
if ((Math.abs(this._y - shipMC._y) >= 160) || (Math.abs(shipMC._x - this._x) >= 100)) {
var i = 1;
while (i <= _parent.plants) {
plantMC = _parent["mcPlant" + i];
if (plantMC.active && (Math.abs(this._x - plantMC._x) < 8)) {
state = "eating";
this.gotoAndStop("eat");
this._x = this._x + ((-10) + (Math.random() * 20));
i = _parent.plants;
}
i++;
}
}
if (yVel > yMax) {
yVel = yMax;
} else if (yVel < (-yMax)) {
yVel = -yMax;
}
this._x = this._x + xVel;
this._y = this._y + yVel;
land(false);
break;
case "eating" :
plantMC.life--;
plantMC.mcPlant._y++;
plantMC.mcRubble.gotoAndPlay("hit");
if (plantMC.active <= 0) {
state = "idle";
this.gotoAndStop("idle");
}
if (Math.abs(this._y - shipMC._y) < 100) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 120)) {
this._xscale = -100;
state = "running";
this.gotoAndStop("run");
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 120)) {
this._xscale = 100;
state = "running";
this.gotoAndStop("run");
}
}
break;
case "running" :
if (!onFire) {
if (Math.abs(this._y - shipMC._y) < 160) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 100)) {
xVel = xVel + (-xAccel);
this._xscale = -100;
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 100)) {
xVel = xVel + xAccel;
this._xscale = 100;
}
}
} else if (xVel < 0) {
xVel = xVel + (-xAccel);
this._xscale = -100;
} else {
xVel = xVel + xAccel;
this._xscale = 100;
}
if (xVel > xMax) {
xVel = xMax;
} else if (xVel < (-xMax)) {
xVel = -xMax;
}
if (yVel > yMax) {
yVel = yMax;
} else if (yVel < (-yMax)) {
yVel = -yMax;
}
if (xVel > 0) {
xVel = xVel + (-0.04);
} else if (xVel < 0) {
xVel = xVel + 0.04;
}
if (Math.abs(xVel) < 0.1) {
xVel = 0;
if ((yVel == 0) && (!onFire)) {
state = "idle";
this.gotoAndStop("idle");
}
}
this._x = this._x + xVel;
this._y = this._y + yVel;
land(true);
if (shipMC.hitTest(this._x + 275, this._y + 190, false)) {
if (_parent.mcGround.hitTest(this._x + 275, this._y + 205, true)) {
if (shipMC.yVel < 12) {
state = "scrambling";
yVel = -6;
hitTime = _parent.counter;
this.gotoAndStop("hit");
} else {
_parent.crushCount++;
hitTime = _parent.counter;
life = 0;
state = "crushed";
if (Math.random() > 0.5) {
this._xscale = 100;
} else {
this._xscale = -100;
}
this.gotoAndStop("crushed");
getBonus("crushed");
_parent.bugs--;
_parent.score = _parent.score + 500;
this._y = this._y + 12;
xVel = 0;
yVel = 0;
}
} else {
yVel = yVel + 4;
if (shipMC.yVel > 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + Math.abs(shipMC.yVel * 2);
}
} else if (((!onFire) && (Key.isDown(38))) && (shipMC.hitTest(this._x + 275, this._y + 160, false))) {
if (time.getTime() > (burnTime + 1000)) {
burnCount = 0;
} else if (burnCount >= 6) {
onFire = true;
burnCount = 0;
state = "scrambling";
yVel = -9;
hitTime = _parent.counter;
this.gotoAndStop("hit");
} else {
burnCount++;
burnTime = time.getTime();
}
}
break;
case "scrambling" :
if (xVel > 0) {
xVel = xVel + (-0.02);
} else if (xVel < 0) {
xVel = xVel + 0.02;
}
if (Math.abs(xVel) < (xAccel - 0.1)) {
xVel = 0;
}
this._x = this._x + xVel;
this._y = this._y + yVel;
if (land(true)) {
state = "running";
this.gotoAndStop("run");
}
if (_parent.counter > (hitTime + 4)) {
if (shipMC.hitTest(this._x + 275, this._y + 185, false)) {
if (this._y <= (shipMC._y - 10)) {
yVel = (-Math.abs(yVel / 4)) - 4;
if (shipMC.yVel < 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + shipMC.yVel;
} else {
yVel = yVel + 4;
if (shipMC.yVel > 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + Math.abs(shipMC.yVel * 2);
}
bounceVel = 6;
if (Math.abs(this._x - shipMC._x) > 22) {
xVel = -xVel;
} else if ((this._x - shipMC._x) < -15) {
xVel = -bounceVel;
} else if ((this._x - shipMC._x) < -5) {
xVel = (-bounceVel) / 2;
} else if ((this._x - shipMC._x) < 0) {
xVel = (-bounceVel) / 4;
} else if ((this._x - shipMC._x) > 0) {
xVel = bounceVel / 4;
} else if ((this._x - shipMC._x) > 5) {
xVel = bounceVel / 2;
} else if ((this._x - shipMC._x) > 15) {
xVel = bounceVel;
}
this._x = this._x + xVel;
}
}
break;
case "crushed" :
if (_parent.counter <= (hitTime + 2)) {
break;
}
_parent.crushCount--;
onFire = false;
life = -1;
}
if (this._x < (_parent.mcLeft._x + 10)) {
this._x = _parent.mcLeft._x + 10;
xVel = -xVel;
this._xscale = 100;
} else if (this._x > (_parent.mcRight._x - 10)) {
this._x = _parent.mcRight._x - 10;
xVel = -xVel;
this._xscale = -100;
}
if (onFire) {
makeFire(this._x, this._y - 16);
life = life + -0.5;
}
if ((state != "crushed") && (life <= 0)) {
if (onFire) {
life = -1;
state = "burned";
this.gotoAndStop("burned");
getBonus("burned");
_parent.bugs--;
_parent.score = _parent.score + 1000;
xVel = 0;
yVel = 0;
}
}
}
}
Instance of Symbol 135 MovieClip "mcBug3" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
function reset() {
state = "scrambling";
this.gotoAndStop("hit");
_x = ((Math.random() * 400) - 200);
_y = ((Math.random() * 200) - 100);
xVel = 0;
xMax = 7;
xAccel = 0.6;
yVel = 0;
yMax = 12;
hitTime = 0;
life = 100;
onFire = false;
burnTime = 0;
}
function makeFire(x, y) {
if ((_parent.counter % 2) == 0) {
_parent.fireNum++;
if (_parent.fireNum > 100) {
_parent.fireNum = 1;
}
if (Key.isDown(16)) {
fireColor.setRGB(10079487);
} else {
fireColor.setRGB(16776960);
}
tempName1 = "firePart" + direction;
tempName2 = "firePartBack" + direction;
tempName3 = "firePartWhite" + direction;
_parent[tempName1].duplicateMovieClip(tempName1 + _parent.fireNum, _parent.fireNum + 100);
_parent[tempName2].duplicateMovieClip(tempName2 + _parent.fireNum, _parent.fireNum);
_parent[tempName3].duplicateMovieClip(tempName3 + _parent.fireNum, _parent.fireNum + 200);
var fireName = _parent[tempName1 + _parent.fireNum];
var fireBackName = _parent[tempName2 + _parent.fireNum];
var fireWhiteName = _parent[tempName3 + _parent.fireNum];
fireName._x = x;
fireName._y = y;
rand = Math.random();
fireName._width = (rand * 5) + 7;
fireName._height = (rand * 5) + 7;
fireBackName._width = fireName._width + 4;
fireBackName._height = fireName._height + 4;
if (Key.isDown(16)) {
fireBackColor.setRGB(3368703);
} else {
fireBackColor.setRGB(16750848);
}
fireWhiteName._x = x;
fireWhiteName._y = y;
rand = Math.random();
fireWhiteName._width = (rand * 3) + 4;
fireWhiteName._height = (rand * 3) + 4;
}
}
function makeDust(x, y) {
_parent.dustNum++;
if (_parent.dustNum > 450) {
_parent.dustNum = 401;
}
tempName1 = "dustFront";
tempName2 = "dustBack";
_parent[tempName1].duplicateMovieClip(tempName1 + _parent.dustNum, _parent.dustNum + 100);
_parent[tempName2].duplicateMovieClip(tempName2 + _parent.dustNum, _parent.dustNum);
var dustName = _parent[tempName1 + _parent.dustNum];
var dustBackName = _parent[tempName2 + _parent.dustNum];
dustName._x = (x - 7) + (Math.random() * 14);
dustName._y = y;
rand = Math.random();
dustName._width = (rand * 8) + 8;
dustName._height = (rand * 8) + 8;
dustBackName._width = dustName._width + 6;
dustBackName._height = dustName._height + 6;
}
function land(dustOn) {
var landed = false;
if (_parent.mcGround.hitTest(this._x + 275, this._y + 200, true)) {
landed = true;
yVel = (-yVel) / 3;
this._y--;
xVel = xVel / 1.1;
if (Math.abs(yVel) < 0.8) {
yVel = 0;
}
if (dustOn) {
if (xVel > 0) {
makeDust(this._x + 20, this._y);
} else if (xVel < 0) {
makeDust(this._x - 20, this._y);
} else {
makeDust(this._x, this._y);
}
}
} else if (!_parent.mcGround.hitTest(this._x + 275, this._y + 201, true)) {
yVel = yVel + (_parent.gravity * 2);
}
while (_parent.mcGround.hitTest(this._x + 275, this._y + 200, true)) {
if (dustOn) {
makeDust(this._x, this._y);
}
this._y--;
}
return(landed);
}
function getBonus(deathType) {
switch (deathtype) {
case "crushed" :
if (_parent.crushCount > 3) {
_parent.score = _parent.score + (750 * _parent.crushCount);
if (!onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay("crushed4");
} else {
_parent.score = _parent.score + 1000;
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed4");
}
} else if (_parent.crushCount > 1) {
_parent.score = _parent.score + (500 * _parent.crushCount);
var label = ("crushed" + _parent.crushCount);
if (!onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay(label);
} else {
_parent.score = _parent.score + (1000 * _parent.crushCount);
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed2");
}
} else if (onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed");
}
return;
default :
_parent.mcHUD.mcBonus.gotoAndPlay(deathType);
}
}
state = "scrambling";
this.gotoAndStop("hit");
xVel = 0;
xMax = 7;
xAccel = 0.6;
yVel = 0;
yMax = 12;
hitTime = 0;
life = 100;
onFire = false;
burnTime = 0;
time = new Date(0);
shipMC = _parent.mcShip;
plantMC = this;
this.swapDepths(362);
fireColor = new Color(_parent.firePart);
fireBackColor = new Color(_parent.firePartBack);
dustColor = new Color(_parent.dustFront);
dustBackColor = new Color(_parent.dustBack);
}
onClipEvent (enterFrame) {
if ((!_parent.gameover) && (life > -1)) {
switch (state) {
case "idle" :
if (this._xscale < 0) {
xVel = (-xMax) / 4;
} else {
xVel = xMax / 4;
}
if (Math.abs(this._y - shipMC._y) < 160) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 100)) {
this._xscale = -100;
state = "running";
this.gotoAndStop("run");
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 100)) {
this._xscale = 100;
state = "running";
this.gotoAndStop("run");
}
}
if ((Math.abs(this._y - shipMC._y) >= 160) || (Math.abs(shipMC._x - this._x) >= 100)) {
var i = 1;
while (i <= _parent.plants) {
plantMC = _parent["mcPlant" + i];
if (plantMC.active && (Math.abs(this._x - plantMC._x) < 8)) {
state = "eating";
this.gotoAndStop("eat");
this._x = this._x + ((-10) + (Math.random() * 20));
i = _parent.plants;
}
i++;
}
}
if (yVel > yMax) {
yVel = yMax;
} else if (yVel < (-yMax)) {
yVel = -yMax;
}
this._x = this._x + xVel;
this._y = this._y + yVel;
land(false);
break;
case "eating" :
plantMC.life--;
plantMC.mcPlant._y++;
plantMC.mcRubble.gotoAndPlay("hit");
if (plantMC.active <= 0) {
state = "idle";
this.gotoAndStop("idle");
}
if (Math.abs(this._y - shipMC._y) < 100) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 120)) {
this._xscale = -100;
state = "running";
this.gotoAndStop("run");
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 120)) {
this._xscale = 100;
state = "running";
this.gotoAndStop("run");
}
}
break;
case "running" :
if (!onFire) {
if (Math.abs(this._y - shipMC._y) < 160) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 100)) {
xVel = xVel + (-xAccel);
this._xscale = -100;
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 100)) {
xVel = xVel + xAccel;
this._xscale = 100;
}
}
} else if (xVel < 0) {
xVel = xVel + (-xAccel);
this._xscale = -100;
} else {
xVel = xVel + xAccel;
this._xscale = 100;
}
if (xVel > xMax) {
xVel = xMax;
} else if (xVel < (-xMax)) {
xVel = -xMax;
}
if (yVel > yMax) {
yVel = yMax;
} else if (yVel < (-yMax)) {
yVel = -yMax;
}
if (xVel > 0) {
xVel = xVel + (-0.04);
} else if (xVel < 0) {
xVel = xVel + 0.04;
}
if (Math.abs(xVel) < 0.1) {
xVel = 0;
if ((yVel == 0) && (!onFire)) {
state = "idle";
this.gotoAndStop("idle");
}
}
this._x = this._x + xVel;
this._y = this._y + yVel;
land(true);
if (shipMC.hitTest(this._x + 275, this._y + 190, false)) {
if (_parent.mcGround.hitTest(this._x + 275, this._y + 205, true)) {
if (shipMC.yVel < 12) {
state = "scrambling";
yVel = -6;
hitTime = _parent.counter;
this.gotoAndStop("hit");
} else {
_parent.crushCount++;
hitTime = _parent.counter;
life = 0;
state = "crushed";
if (Math.random() > 0.5) {
this._xscale = 100;
} else {
this._xscale = -100;
}
this.gotoAndStop("crushed");
getBonus("crushed");
_parent.bugs--;
_parent.score = _parent.score + 500;
this._y = this._y + 12;
xVel = 0;
yVel = 0;
}
} else {
yVel = yVel + 4;
if (shipMC.yVel > 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + Math.abs(shipMC.yVel * 2);
}
} else if (((!onFire) && (Key.isDown(38))) && (shipMC.hitTest(this._x + 275, this._y + 160, false))) {
if (time.getTime() > (burnTime + 1000)) {
burnCount = 0;
} else if (burnCount >= 6) {
onFire = true;
burnCount = 0;
state = "scrambling";
yVel = -9;
hitTime = _parent.counter;
this.gotoAndStop("hit");
} else {
burnCount++;
burnTime = time.getTime();
}
}
break;
case "scrambling" :
if (xVel > 0) {
xVel = xVel + (-0.02);
} else if (xVel < 0) {
xVel = xVel + 0.02;
}
if (Math.abs(xVel) < (xAccel - 0.1)) {
xVel = 0;
}
this._x = this._x + xVel;
this._y = this._y + yVel;
if (land(true)) {
state = "running";
this.gotoAndStop("run");
}
if (_parent.counter > (hitTime + 4)) {
if (shipMC.hitTest(this._x + 275, this._y + 185, false)) {
if (this._y <= (shipMC._y - 10)) {
yVel = (-Math.abs(yVel / 4)) - 4;
if (shipMC.yVel < 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + shipMC.yVel;
} else {
yVel = yVel + 4;
if (shipMC.yVel > 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + Math.abs(shipMC.yVel * 2);
}
bounceVel = 6;
if (Math.abs(this._x - shipMC._x) > 22) {
xVel = -xVel;
} else if ((this._x - shipMC._x) < -15) {
xVel = -bounceVel;
} else if ((this._x - shipMC._x) < -5) {
xVel = (-bounceVel) / 2;
} else if ((this._x - shipMC._x) < 0) {
xVel = (-bounceVel) / 4;
} else if ((this._x - shipMC._x) > 0) {
xVel = bounceVel / 4;
} else if ((this._x - shipMC._x) > 5) {
xVel = bounceVel / 2;
} else if ((this._x - shipMC._x) > 15) {
xVel = bounceVel;
}
this._x = this._x + xVel;
}
}
break;
case "crushed" :
if (_parent.counter <= (hitTime + 2)) {
break;
}
_parent.crushCount--;
onFire = false;
life = -1;
}
if (this._x < (_parent.mcLeft._x + 10)) {
this._x = _parent.mcLeft._x + 10;
xVel = -xVel;
this._xscale = 100;
} else if (this._x > (_parent.mcRight._x - 10)) {
this._x = _parent.mcRight._x - 10;
xVel = -xVel;
this._xscale = -100;
}
if (onFire) {
makeFire(this._x, this._y - 16);
life = life + -0.5;
}
if ((state != "crushed") && (life <= 0)) {
if (onFire) {
life = -1;
state = "burned";
this.gotoAndStop("burned");
getBonus("burned");
_parent.bugs--;
_parent.score = _parent.score + 1000;
xVel = 0;
yVel = 0;
}
}
}
}
Instance of Symbol 135 MovieClip "mcBug4" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
function reset() {
state = "scrambling";
this.gotoAndStop("hit");
_x = ((Math.random() * 400) - 200);
_y = ((Math.random() * 200) - 100);
xVel = 0;
xMax = 7;
xAccel = 0.6;
yVel = 0;
yMax = 12;
hitTime = 0;
life = 100;
onFire = false;
burnTime = 0;
}
function makeFire(x, y) {
if ((_parent.counter % 2) == 0) {
_parent.fireNum++;
if (_parent.fireNum > 100) {
_parent.fireNum = 1;
}
if (Key.isDown(16)) {
fireColor.setRGB(10079487);
} else {
fireColor.setRGB(16776960);
}
tempName1 = "firePart" + direction;
tempName2 = "firePartBack" + direction;
tempName3 = "firePartWhite" + direction;
_parent[tempName1].duplicateMovieClip(tempName1 + _parent.fireNum, _parent.fireNum + 100);
_parent[tempName2].duplicateMovieClip(tempName2 + _parent.fireNum, _parent.fireNum);
_parent[tempName3].duplicateMovieClip(tempName3 + _parent.fireNum, _parent.fireNum + 200);
var fireName = _parent[tempName1 + _parent.fireNum];
var fireBackName = _parent[tempName2 + _parent.fireNum];
var fireWhiteName = _parent[tempName3 + _parent.fireNum];
fireName._x = x;
fireName._y = y;
rand = Math.random();
fireName._width = (rand * 5) + 7;
fireName._height = (rand * 5) + 7;
fireBackName._width = fireName._width + 4;
fireBackName._height = fireName._height + 4;
if (Key.isDown(16)) {
fireBackColor.setRGB(3368703);
} else {
fireBackColor.setRGB(16750848);
}
fireWhiteName._x = x;
fireWhiteName._y = y;
rand = Math.random();
fireWhiteName._width = (rand * 3) + 4;
fireWhiteName._height = (rand * 3) + 4;
}
}
function makeDust(x, y) {
_parent.dustNum++;
if (_parent.dustNum > 450) {
_parent.dustNum = 401;
}
tempName1 = "dustFront";
tempName2 = "dustBack";
_parent[tempName1].duplicateMovieClip(tempName1 + _parent.dustNum, _parent.dustNum + 100);
_parent[tempName2].duplicateMovieClip(tempName2 + _parent.dustNum, _parent.dustNum);
var dustName = _parent[tempName1 + _parent.dustNum];
var dustBackName = _parent[tempName2 + _parent.dustNum];
dustName._x = (x - 7) + (Math.random() * 14);
dustName._y = y;
rand = Math.random();
dustName._width = (rand * 8) + 8;
dustName._height = (rand * 8) + 8;
dustBackName._width = dustName._width + 6;
dustBackName._height = dustName._height + 6;
}
function land(dustOn) {
var landed = false;
if (_parent.mcGround.hitTest(this._x + 275, this._y + 200, true)) {
landed = true;
yVel = (-yVel) / 3;
this._y--;
xVel = xVel / 1.1;
if (Math.abs(yVel) < 0.8) {
yVel = 0;
}
if (dustOn) {
if (xVel > 0) {
makeDust(this._x + 20, this._y);
} else if (xVel < 0) {
makeDust(this._x - 20, this._y);
} else {
makeDust(this._x, this._y);
}
}
} else if (!_parent.mcGround.hitTest(this._x + 275, this._y + 201, true)) {
yVel = yVel + (_parent.gravity * 2);
}
while (_parent.mcGround.hitTest(this._x + 275, this._y + 200, true)) {
if (dustOn) {
makeDust(this._x, this._y);
}
this._y--;
}
return(landed);
}
function getBonus(deathType) {
switch (deathtype) {
case "crushed" :
if (_parent.crushCount > 3) {
_parent.score = _parent.score + (750 * _parent.crushCount);
if (!onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay("crushed4");
} else {
_parent.score = _parent.score + 1000;
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed4");
}
} else if (_parent.crushCount > 1) {
_parent.score = _parent.score + (500 * _parent.crushCount);
var label = ("crushed" + _parent.crushCount);
if (!onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay(label);
} else {
_parent.score = _parent.score + (1000 * _parent.crushCount);
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed2");
}
} else if (onFire) {
_parent.mcHUD.mcBonus.gotoAndPlay("fireCrushed");
}
return;
default :
_parent.mcHUD.mcBonus.gotoAndPlay(deathType);
}
}
state = "scrambling";
this.gotoAndStop("hit");
xVel = 0;
xMax = 7;
xAccel = 0.6;
yVel = 0;
yMax = 12;
hitTime = 0;
life = 100;
onFire = false;
burnTime = 0;
time = new Date(0);
shipMC = _parent.mcShip;
plantMC = this;
this.swapDepths(363);
fireColor = new Color(_parent.firePart);
fireBackColor = new Color(_parent.firePartBack);
dustColor = new Color(_parent.dustFront);
dustBackColor = new Color(_parent.dustBack);
}
onClipEvent (enterFrame) {
if ((!_parent.gameover) && (life > -1)) {
switch (state) {
case "idle" :
if (this._xscale < 0) {
xVel = (-xMax) / 4;
} else {
xVel = xMax / 4;
}
if (Math.abs(this._y - shipMC._y) < 160) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 100)) {
this._xscale = -100;
state = "running";
this.gotoAndStop("run");
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 100)) {
this._xscale = 100;
state = "running";
this.gotoAndStop("run");
}
}
if ((Math.abs(this._y - shipMC._y) >= 160) || (Math.abs(shipMC._x - this._x) >= 100)) {
var i = 1;
while (i <= _parent.plants) {
plantMC = _parent["mcPlant" + i];
if (plantMC.active && (Math.abs(this._x - plantMC._x) < 8)) {
state = "eating";
this.gotoAndStop("eat");
this._x = this._x + ((-10) + (Math.random() * 20));
i = _parent.plants;
}
i++;
}
}
if (yVel > yMax) {
yVel = yMax;
} else if (yVel < (-yMax)) {
yVel = -yMax;
}
this._x = this._x + xVel;
this._y = this._y + yVel;
land(false);
break;
case "eating" :
plantMC.life--;
plantMC.mcPlant._y++;
plantMC.mcRubble.gotoAndPlay("hit");
if (plantMC.active <= 0) {
state = "idle";
this.gotoAndStop("idle");
}
if (Math.abs(this._y - shipMC._y) < 100) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 120)) {
this._xscale = -100;
state = "running";
this.gotoAndStop("run");
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 120)) {
this._xscale = 100;
state = "running";
this.gotoAndStop("run");
}
}
break;
case "running" :
if (!onFire) {
if (Math.abs(this._y - shipMC._y) < 160) {
if ((this._x < shipMC._x) && ((shipMC._x - this._x) < 100)) {
xVel = xVel + (-xAccel);
this._xscale = -100;
} else if ((this._x > shipMC._x) && ((this._x - shipMC._x) < 100)) {
xVel = xVel + xAccel;
this._xscale = 100;
}
}
} else if (xVel < 0) {
xVel = xVel + (-xAccel);
this._xscale = -100;
} else {
xVel = xVel + xAccel;
this._xscale = 100;
}
if (xVel > xMax) {
xVel = xMax;
} else if (xVel < (-xMax)) {
xVel = -xMax;
}
if (yVel > yMax) {
yVel = yMax;
} else if (yVel < (-yMax)) {
yVel = -yMax;
}
if (xVel > 0) {
xVel = xVel + (-0.04);
} else if (xVel < 0) {
xVel = xVel + 0.04;
}
if (Math.abs(xVel) < 0.1) {
xVel = 0;
if ((yVel == 0) && (!onFire)) {
state = "idle";
this.gotoAndStop("idle");
}
}
this._x = this._x + xVel;
this._y = this._y + yVel;
land(true);
if (shipMC.hitTest(this._x + 275, this._y + 190, false)) {
if (_parent.mcGround.hitTest(this._x + 275, this._y + 205, true)) {
if (shipMC.yVel < 12) {
state = "scrambling";
yVel = -6;
hitTime = _parent.counter;
this.gotoAndStop("hit");
} else {
_parent.crushCount++;
hitTime = _parent.counter;
life = 0;
state = "crushed";
if (Math.random() > 0.5) {
this._xscale = 100;
} else {
this._xscale = -100;
}
this.gotoAndStop("crushed");
getBonus("crushed");
_parent.bugs--;
_parent.score = _parent.score + 500;
this._y = this._y + 12;
xVel = 0;
yVel = 0;
}
} else {
yVel = yVel + 4;
if (shipMC.yVel > 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + Math.abs(shipMC.yVel * 2);
}
} else if (((!onFire) && (Key.isDown(38))) && (shipMC.hitTest(this._x + 275, this._y + 160, false))) {
if (time.getTime() > (burnTime + 1000)) {
burnCount = 0;
} else if (burnCount >= 6) {
onFire = true;
burnCount = 0;
state = "scrambling";
yVel = -9;
hitTime = _parent.counter;
this.gotoAndStop("hit");
} else {
burnCount++;
burnTime = time.getTime();
}
}
break;
case "scrambling" :
if (xVel > 0) {
xVel = xVel + (-0.02);
} else if (xVel < 0) {
xVel = xVel + 0.02;
}
if (Math.abs(xVel) < (xAccel - 0.1)) {
xVel = 0;
}
this._x = this._x + xVel;
this._y = this._y + yVel;
if (land(true)) {
state = "running";
this.gotoAndStop("run");
}
if (_parent.counter > (hitTime + 4)) {
if (shipMC.hitTest(this._x + 275, this._y + 185, false)) {
if (this._y <= (shipMC._y - 10)) {
yVel = (-Math.abs(yVel / 4)) - 4;
if (shipMC.yVel < 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + shipMC.yVel;
} else {
yVel = yVel + 4;
if (shipMC.yVel > 0) {
yVel = yVel + shipMC.yVel;
}
this._y = this._y + Math.abs(shipMC.yVel * 2);
}
bounceVel = 6;
if (Math.abs(this._x - shipMC._x) > 22) {
xVel = -xVel;
} else if ((this._x - shipMC._x) < -15) {
xVel = -bounceVel;
} else if ((this._x - shipMC._x) < -5) {
xVel = (-bounceVel) / 2;
} else if ((this._x - shipMC._x) < 0) {
xVel = (-bounceVel) / 4;
} else if ((this._x - shipMC._x) > 0) {
xVel = bounceVel / 4;
} else if ((this._x - shipMC._x) > 5) {
xVel = bounceVel / 2;
} else if ((this._x - shipMC._x) > 15) {
xVel = bounceVel;
}
this._x = this._x + xVel;
}
}
break;
case "crushed" :
if (_parent.counter <= (hitTime + 2)) {
break;
}
_parent.crushCount--;
onFire = false;
life = -1;
}
if (this._x < (_parent.mcLeft._x + 10)) {
this._x = _parent.mcLeft._x + 10;
xVel = -xVel;
this._xscale = 100;
} else if (this._x > (_parent.mcRight._x - 10)) {
this._x = _parent.mcRight._x - 10;
xVel = -xVel;
this._xscale = -100;
}
if (onFire) {
makeFire(this._x, this._y - 16);
life = life + -0.5;
}
if ((state != "crushed") && (life <= 0)) {
if (onFire) {
life = -1;
state = "burned";
this.gotoAndStop("burned");
getBonus("burned");
_parent.bugs--;
_parent.score = _parent.score + 1000;
xVel = 0;
yVel = 0;
}
}
}
}
Instance of Symbol 140 MovieClip "mcPlant2" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
yStart = mcPlant._y;
this.swapDepths(1001);
lifeStart = 166;
life = lifeStart;
active = true;
this.gotoAndStop("idle");
}
onClipEvent (enterFrame) {
if (life <= 0) {
this.gotoAndStop("dead");
active = false;
}
}
Instance of Symbol 145 MovieClip "mcPlant1" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
yStart = mcPlant._y;
this.swapDepths(1000);
lifeStart = 166;
life = lifeStart;
active = true;
this.gotoAndStop("idle");
}
onClipEvent (enterFrame) {
if (life <= 0) {
this.gotoAndStop("dead");
active = false;
}
}
Instance of Symbol 185 MovieClip "mcHUD" in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(5000);
}
Instance of Symbol 210 MovieClip in Symbol 213 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(6000);
}
Symbol 221 MovieClip Frame 9
if (Math.random() < 0.5) {
gotoAndPlay (1);
}
Symbol 230 MovieClip Frame 9
if (Math.random() < 0.4) {
gotoAndPlay (1);
}
Symbol 244 MovieClip Frame 9
stop();
Symbol 244 MovieClip Frame 19
stop();
Instance of Symbol 238 MovieClip "mcHandle" in Symbol 245 MovieClip Frame 1
onClipEvent (load) {
barWidth = _parent.mcBoundR._x - _parent.mcBoundL._x;
pressed = false;
}
onClipEvent (enterFrame) {
if (!pressed) {
this._x = _parent.mcBoundL._x + (((_root._currentframe - _parent._parent.firstframe) / (_parent._parent.lastframe - _parent._parent.firstframe)) * barWidth);
} else {
total = _parent._parent.lastframe - _parent._parent.firstframe;
dest = Math.ceil((((this._x - _parent.mcBoundL._x) / barWidth) * total) + _parent._parent.firstframe);
_root.gotoAndStop(dest);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
startDrag (this, false, _parent.mcBoundL._x, this._y, _parent.mcBoundR._x, this._y);
_root.stop();
pressed = true;
} else if (_parent.mcBar.hitTest(_root._xmouse, _root._ymouse, true)) {
pressed = true;
startDrag (this, true, _parent.mcBoundL._x, this._y, _parent.mcBoundR._x, this._y);
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
stopDrag();
if (_parent.mcPlay.playing) {
_root.play();
}
pressed = false;
}
}
Instance of Symbol 244 MovieClip "mcPlay" in Symbol 245 MovieClip Frame 1
onClipEvent (load) {
playing = true;
}
on (release) {
if (playing) {
_root.stop();
playing = false;
this.gotoAndPlay("paused");
} else {
_root.play();
playing = true;
this.gotoAndPlay("play");
}
}
Symbol 246 MovieClip Frame 9
stop();
Symbol 246 MovieClip Frame 19
stop();
Symbol 280 MovieClip Frame 3
if (Math.random() > 0.8) {
gotoAndPlay (10);
} else {
gotoAndPlay (1);
}
Symbol 308 MovieClip Frame 9
if (Math.random() < 0.2) {
gotoAndPlay (1);
}
Symbol 359 MovieClip Frame 10
stop();
Symbol 401 MovieClip Frame 8
stop();
Instance of Symbol 13 MovieClip "firePartBack" in Symbol 419 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._name != "firePartBack") {
name1 = this._name.substring(12, this._name.length);
name1 = _parent["firePart" + name1];
this._x = name1._x + name1.xVel;
this._y = name1._y + name1.yVel;
this._alpha = name1._alpha;
if (this._alpha < 33) {
this.removeMovieClip();
}
} else {
_alpha = 0;
}
}
Instance of Symbol 15 MovieClip "firePart" in Symbol 419 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
yVel = (-Math.random()) - 0.8;
if (Math.random() > 0.5) {
xVel = Math.random() * 0.7;
xAccel = Math.random() * -0.01;
} else {
xVel = (-Math.random()) * 0.3;
xAccel = Math.random() * 0.01;
}
life = Math.random() + 2;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
if (Key.isDown(17)) {
_x = (_x + (xVel * 4));
_y = (_y + (yVel * 4));
} else {
_x = (_x + xVel);
_y = (_y + yVel);
}
life = life - 0.1;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 15 MovieClip "firePartWhite" in Symbol 419 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
yVel = (-(Math.random() / 2)) - 0.4;
if (Math.random() > 0.5) {
xVel = Math.random() / 3;
xAccel = Math.random() * -0.05;
} else {
xVel = (-Math.random()) / 4;
xAccel = Math.random() * 0.05;
}
life = Math.random() + 2;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 418 MovieClip "mcTorch05" in Symbol 419 MovieClip Frame 1
onClipEvent (load) {
function makeFire() {
fireNum++;
if (fireNum > 100) {
fireNum = 1;
}
if ((counter % 1) == 0) {
if (Key.isDown(16)) {
fireColor.setRGB(10079487);
} else {
fireColor.setRGB(16776960);
}
_parent.firePart.duplicateMovieClip("firePart" + fireNum, fireNum + 100);
_parent.firePartBack.duplicateMovieClip("firePartBack" + fireNum, fireNum);
_parent.firePartWhite.duplicateMovieClip("firePartWhite" + fireNum, fireNum + 200);
var fireName = _parent["firePart" + fireNum];
var fireBackName = _parent["firePartBack" + fireNum];
var fireWhiteName = _parent["firePartWhite" + fireNum];
fireName._x = this._x + 24;
fireName._y = this._y - 33;
rand = Math.random();
fireName._width = (rand * 7) + 6;
fireName._height = (rand * 7) + 6;
fireBackName._width = fireName._width + 4;
fireBackName._height = fireName._height + 4;
if (Key.isDown(16)) {
fireBackColor.setRGB(3368703);
} else {
fireBackColor.setRGB(16750848);
}
fireWhiteName._x = this._x + 24;
fireWhiteName._y = this._y - 33;
rand = Math.random();
fireWhiteName._width = (rand * 4) + 4;
fireWhiteName._height = (rand * 4) + 4;
}
}
counter = 0;
fireNum = 0;
if (_name == "mcTorch05") {
this.swapDepths(315);
}
fireColor = new Color(_parent.firePart);
fireBackColor = new Color(_parent.firePartBack);
}
onClipEvent (enterFrame) {
counter++;
makeFire();
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
startDrag (this);
}
}
onClipEvent (mouseUp) {
stopDrag();
}
Symbol 438 MovieClip Frame 9
stop();
Symbol 466 MovieClip Frame 9
stop();
Symbol 495 MovieClip Frame 9
stop();
Symbol 495 MovieClip Frame 19
stop();
Instance of Symbol 499 MovieClip "mcSmoke1" in Symbol 506 MovieClip Frame 1
onClipEvent (load) {
yVel = (-Math.random()) - 1;
if (Math.random() > 0.5) {
xVel = Math.random();
xAccel = Math.random() * -0.1;
} else {
xVel = -Math.random();
xAccel = Math.random() * 0.1;
}
life = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 499 MovieClip "mcSmoke2" in Symbol 506 MovieClip Frame 1
onClipEvent (load) {
yVel = (-Math.random()) - 1;
if (Math.random() > 0.5) {
xVel = Math.random();
xAccel = Math.random() * -0.1;
} else {
xVel = -Math.random();
xAccel = Math.random() * 0.1;
}
life = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 499 MovieClip "mcSmoke3" in Symbol 506 MovieClip Frame 1
onClipEvent (load) {
yVel = (-Math.random()) - 1;
if (Math.random() > 0.5) {
xVel = Math.random();
xAccel = Math.random() * -0.1;
} else {
xVel = -Math.random();
xAccel = Math.random() * 0.1;
}
life = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 499 MovieClip "mcSmoke4" in Symbol 506 MovieClip Frame 1
onClipEvent (load) {
yVel = (-Math.random()) - 1;
if (Math.random() > 0.5) {
xVel = Math.random();
xAccel = Math.random() * -0.1;
} else {
xVel = -Math.random();
xAccel = Math.random() * 0.1;
}
life = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 499 MovieClip "mcSmoke5" in Symbol 506 MovieClip Frame 1
onClipEvent (load) {
yVel = (-Math.random()) - 1;
if (Math.random() > 0.5) {
xVel = Math.random();
xAccel = Math.random() * -0.1;
} else {
xVel = -Math.random();
xAccel = Math.random() * 0.1;
}
life = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 499 MovieClip "mcSmoke6" in Symbol 506 MovieClip Frame 1
onClipEvent (load) {
yVel = (-Math.random()) - 1;
if (Math.random() > 0.5) {
xVel = Math.random();
xAccel = Math.random() * -0.1;
} else {
xVel = -Math.random();
xAccel = Math.random() * 0.1;
}
life = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 499 MovieClip "mcSmoke7" in Symbol 506 MovieClip Frame 1
onClipEvent (load) {
yVel = (-Math.random()) - 1;
if (Math.random() > 0.5) {
xVel = Math.random();
xAccel = Math.random() * -0.1;
} else {
xVel = -Math.random();
xAccel = Math.random() * 0.1;
}
life = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Symbol 506 MovieClip Frame 9
if (_parent.yMove == 0) {
gotoAndPlay (1);
}
Symbol 506 MovieClip Frame 19
if (_parent.yMove != 0) {
gotoAndPlay (10);
} else {
gotoAndPlay (1);
}
Symbol 506 MovieClip Frame 20
i = 1;
while (i <= 7) {
this["mcSmoke" + i].life = Math.random() + 2;
this["mcSmoke" + i]._y = mcSmoke0._y + (i * 10);
this["mcSmoke" + i]._x = (mcSmoke0._x - 20) + (Math.random() * 40);
this["mcSmoke" + i]._alpha = 100;
i++;
}
Symbol 506 MovieClip Frame 29
if (_parent.yMove != 0) {
gotoAndPlay (10);
} else {
gotoAndPlay (1);
}
Symbol 520 MovieClip Frame 9
if (Math.random() < 0.7) {
gotoAndPlay (1);
}
Symbol 536 MovieClip Frame 9
if (!_parent._parent.monsterShooting) {
gotoAndPlay (1);
}
Symbol 536 MovieClip Frame 18
if (_parent._parent.monsterShooting) {
gotoAndPlay (10);
}
Symbol 537 MovieClip Frame 9
if (!_parent.monsterWalking) {
gotoAndPlay (1);
}
Symbol 537 MovieClip Frame 20
if (_parent.monsterWalking) {
gotoAndPlay (10);
}
Symbol 555 MovieClip Frame 23
stop();
Symbol 561 MovieClip Frame 35
stop();
Instance of Symbol 565 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 567 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 571 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 567 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 567 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Instance of Symbol 569 MovieClip in Symbol 578 MovieClip Frame 1
onClipEvent (enterFrame) {
this._y = this._y + 5;
}
Symbol 586 MovieClip Frame 6
stop();
Symbol 594 MovieClip Frame 9
if (state == 1) {
gotoAndPlay (1);
}
Symbol 594 MovieClip Frame 68
state = 0;
Instance of Symbol 596 MovieClip "mcBullet" in Symbol 597 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._name != "mcBullet") {
this._y = this._y + -21;
}
}
Instance of Symbol 13 MovieClip "firePartBack" in Symbol 608 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._name != "firePartBack") {
name1 = this._name.substring(12, this._name.length);
name1 = _parent["firePart" + name1];
this._x = name1._x + name1.xVel;
this._y = name1._y + name1.yVel;
this._alpha = name1._alpha;
if (this._alpha < 33) {
this.removeMovieClip();
}
} else {
_alpha = 0;
}
}
Instance of Symbol 15 MovieClip "firePart" in Symbol 608 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
yVel = (-Math.random()) - 0.8;
if (Math.random() > 0.5) {
xVel = Math.random() * 0.7;
xAccel = Math.random() * -0.01;
} else {
xVel = (-Math.random()) * 0.3;
xAccel = Math.random() * 0.01;
}
life = Math.random() + 2;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
if (Key.isDown(17)) {
_x = (_x + (xVel * 4));
_y = (_y + (yVel * 4));
} else {
_x = (_x + xVel);
_y = (_y + yVel);
}
life = life - 0.1;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 15 MovieClip "firePartWhite" in Symbol 608 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
yVel = (-(Math.random() / 2)) - 0.4;
if (Math.random() > 0.5) {
xVel = Math.random() / 3;
xAccel = Math.random() * -0.05;
} else {
xVel = (-Math.random()) / 4;
xAccel = Math.random() * 0.05;
}
life = Math.random() + 2;
}
onClipEvent (enterFrame) {
if (life > 0) {
xVel = xVel + xAccel;
}
_x = (_x + xVel);
_y = (_y + yVel);
life = life - 0.2;
if (life < 0) {
_alpha = 0;
this.removeMovieClip();
} else if (life < 0.2) {
_alpha = 33;
} else if (life < 0.4) {
_alpha = 66;
}
}
Instance of Symbol 418 MovieClip "mcTorch05" in Symbol 608 MovieClip Frame 1
onClipEvent (load) {
function makeFire() {
fireNum++;
if (fireNum > 100) {
fireNum = 1;
}
if ((counter % 1) == 0) {
if (Key.isDown(16)) {
fireColor.setRGB(10092492);
} else {
fireColor.setRGB(16776960);
}
_parent.firePart.duplicateMovieClip("firePart" + fireNum, fireNum + 100);
_parent.firePartBack.duplicateMovieClip("firePartBack" + fireNum, fireNum);
_parent.firePartWhite.duplicateMovieClip("firePartWhite" + fireNum, fireNum + 200);
var fireName = _parent["firePart" + fireNum];
var fireBackName = _parent["firePartBack" + fireNum];
var fireWhiteName = _parent["firePartWhite" + fireNum];
fireName._x = this._x + 24;
fireName._y = this._y - 33;
rand = Math.random();
fireName._width = (rand * 7) + 6;
fireName._height = (rand * 7) + 6;
fireBackName._width = fireName._width + 4;
fireBackName._height = fireName._height + 4;
if (Key.isDown(16)) {
fireBackColor.setRGB(3368703);
} else {
fireBackColor.setRGB(16750848);
}
fireWhiteName._x = this._x + 24;
fireWhiteName._y = this._y - 33;
rand = Math.random();
fireWhiteName._width = (rand * 4) + 4;
fireWhiteName._height = (rand * 4) + 4;
}
}
counter = 0;
fireNum = 0;
if (_name == "mcTorch05") {
this.swapDepths(315);
}
fireColor = new Color(_parent.firePart);
fireBackColor = new Color(_parent.firePartBack);
}
onClipEvent (enterFrame) {
counter++;
makeFire();
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
startDrag (this);
}
}
onClipEvent (mouseUp) {
stopDrag();
}
Symbol 620 MovieClip Frame 185
stop();
Symbol 622 MovieClip Frame 185
stop();
Symbol 690 MovieClip Frame 7
stop();
Symbol 694 MovieClip Frame 6
stop();
Symbol 699 MovieClip Frame 7
stop();
Symbol 705 MovieClip Frame 6
stop();
Symbol 722 MovieClip Frame 9
stop();
Symbol 776 MovieClip Frame 8
stop();
Symbol 847 MovieClip Frame 30
stop();
Symbol 855 MovieClip Frame 1
stop();
Symbol 860 Button
on (release) {
gotoAndPlay (4);
}
Symbol 861 Button
on (release) {
play();
}
Symbol 865 MovieClip Frame 9
gotoAndPlay (1);
Symbol 865 MovieClip Frame 14
gotoAndPlay (10);
Symbol 874 MovieClip Frame 9
gotoAndPlay (1);
Symbol 874 MovieClip Frame 22
_root.mcTank.state = 2.5;
Symbol 876 MovieClip Frame 9
gotoAndPlay (1);
Symbol 876 MovieClip Frame 14
gotoAndPlay (10);
Symbol 877 MovieClip Frame 4
if (_root.mcTank.state != 1) {
gotoAndPlay (1);
}
Instance of Symbol 865 MovieClip in Symbol 877 MovieClip Frame 10
onClipEvent (load) {
gotoAndPlay (10);
}
Instance of Symbol 876 MovieClip in Symbol 877 MovieClip Frame 10
onClipEvent (load) {
gotoAndPlay (10);
}
Symbol 877 MovieClip Frame 19
if (_root.mcTank.state == 1) {
gotoAndPlay (10);
}
Symbol 879 Button
on (release) {
getURL ("http://www.girlshavecooties.com", "_blank");
}
Symbol 883 MovieClip Frame 11
stop();