Frame 1
gotoAndStop (1);
stop();
Instance of Symbol 100 MovieClip "Theif" in Frame 1
onClipEvent (load) {
function animation(curFrame) {
if (curFrame == STILL) {
this.gotoAndStop(1);
}
if (curFrame == WAVE) {
if ((this._currentframe < 2) || (this._currentframe > 20)) {
this.gotoAndPlay(2);
}
if (this._currentframe == 20) {
boredTimer = 0;
jackTimer = jackTimer + 1;
}
}
if (curFrame == WALKR) {
if ((this._currentframe < 21) or (this._currentframe >= 26)) {
this.gotoAndPlay(22);
}
}
if (curFrame == WALKL) {
if ((this._currentframe < 27) || (this._currentframe >= 32)) {
this.gotoAndPlay(28);
}
}
if (curFrame == JUMP) {
if ((this._currentframe <= 34) || (this._currentframe >= 46)) {
this.gotoAndPlay(34);
}
}
if (curFrame == STOLEN) {
if ((this._currentframe <= 48) || (this._currentframe >= 52)) {
this.gotoAndPlay(48);
}
}
if (curFrame == JACKH) {
if ((this._currentframe < 54) || (this._currentframe > 64)) {
this.gotoAndPlay(54);
}
if (this._currentframe >= 64) {
this.gotoAndPlay(59);
}
}
if (curFrame == POGO) {
if ((this._currentframe < 66) || (this._currentframe > 74)) {
this.gotoAndPlay(66);
}
if (this._currentframe >= 74) {
this.gotoAndStop(74);
}
}
if (curFrame == GUN1) {
if ((this._currentframe < 76) || (this._currentframe > 81)) {
this.gotoAndPlay(76);
}
if (this._currentframe >= 81) {
AimGun("w_gun");
this.gotoAndStop(81);
}
}
if (curFrame == JETPACK) {
if ((this._currentframe < 82) || (this._currentframe > 92)) {
this.gotoAndPlay(82);
}
if (this._currentframe >= 92) {
this.gotoAndPlay(88);
}
}
if (curFrame == UNIS) {
if ((this._currentframe < 93) || (this._currentframe > 116)) {
noMove = true;
this.gotoAndPlay(93);
}
if (this._currentframe >= 96) {
noMove = false;
}
}
if (curFrame == UNIL) {
if ((this._currentframe < 98) || (this._currentframe >= 106)) {
this.gotoAndPlay(98);
}
}
if (curFrame == UNIR) {
if ((this._currentframe < 108) || (this._currentframe >= 116)) {
this.gotoAndPlay(108);
}
}
if (curFrame == ROLLL) {
if ((this._currentframe < 118) || (this._currentframe > 126)) {
this.gotoAndPlay(118);
tmpx = this._x + 50;
}
if (this._currentframe >= 126) {
anim == STILL;
noAW = false;
}
Bump(tmpx);
}
if (curFrame == ROLLR) {
if ((this._currentframe < 127) || (this._currentframe > 135)) {
this.gotoAndPlay(127);
tmpx = this._x - 50;
}
if (this._currentframe >= 134) {
anim == STILL;
noAW = false;
}
Bump(tmpx);
}
if (curFrame == TELE) {
if ((this._currentframe < 136) || (this._currentframe > 144)) {
this.gotoAndPlay(136);
}
}
}
function Bump(x) {
this._x = this._x + ((x - this._x) / 5);
}
function AimGun(name) {
mc = _root;
x = this._xmouse;
y = this._ymouse * -1;
angle = (Math.atan(y / x) / (Math.PI/180)) - 45;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
if (gCount == 0) {
this[name]._rotation = angle * -1;
}
if (_root.mBox.score > 4) {
if (bulletCount > 0) {
if (bulletDelay < 0) {
bulletCount = bulletCount - 1;
bulletDelay = 3 * Math.random();
idname = "bul" + bulletCount;
mc.attachMovie("Bullet", idname, bulletCount + 1);
mc[idname]._x = this._x;
mc[idname]._y = this._y;
mc[idname]._rotation = angle * -1;
mc[idname]._rot = angle * -1;
mc[idname]._class = "bullet";
mc[idname]._speed = 25;
mc[nm]._speed = -25;
}
bulletDelay = bulletDelay - 1;
}
if (bulletCount == 0) {
noMove = false;
bulletCount = 15;
runTimer = 0;
anim = STILL;
}
} else if (gCount == 0) {
noMove = true;
idname = "bul1";
mc.attachMovie("Graple", idname, 2);
mc[idname]._x = this._x;
mc[idname]._y = this._y;
mc[idname]._rotation = angle * -1;
mc[idname]._rot = angle * -1;
mc[idname].gotoAndStop(1);
mc[idname]._class = "graple";
mc[idname]._speed = 20;
gCount = gCount + 1;
}
}
function BulletMove() {
mc = _root;
i = 0;
while (i < 30) {
idname = "bul" + i;
if (mc[idname]) {
mc[idname]._x = mc[idname]._x + (Math.sin((mc[idname]._rot + 45) * (Math.PI/180)) * mc[idname]._speed);
mc[idname]._y = mc[idname]._y + ((Math.cos((mc[idname]._rot + 45) * (Math.PI/180)) * mc[idname]._speed) * -1);
if ((((mc[idname]._x < -400) || (mc[idname]._x > 550)) || (mc[idname]._y < -400)) || (mc[idname]._y > 400)) {
if (mc[idname]._class == "graple") {
_root.triangle.removeMovieClip();
noMove = false;
anim = STILL;
runTimer = 0;
gCount = 0;
mc[idname].removeMovieClip();
return(undefined);
}
mc[idname].removeMovieClip();
}
if (mc[idname]._class == "graple") {
_root.createEmptyMovieClip("triangle", 1);
_root.triangle._x = this._x;
_root.triangle._y = this._y;
_root.triangle.lineStyle(2, 255, 100);
_root.triangle.lineTo(mc[idname]._x - _root.triangle._x, mc[idname]._y - _root.triangle._y);
if (mc[idname].hitTest(this) && (mc[idname]._speed < 0)) {
mc[idname].removeMovieClip();
noMove = false;
if (_root.mBox.shielfP == false) {
anim = STOLEN;
runTimer = 0;
noMove = false;
gCount = 0;
mc[idname].removeMovieClip();
} else if (_root.mBox.shieldC > 1) {
_root.mBox.shieldC = _root.mBox.shieldC - 1;
anim = STILL;
noMove = false;
gCount = 0;
} else {
anim = STOLEN;
runTimer = 0;
noMove = false;
gCount = 0;
mc[idname].removeMovieClip();
}
runTimer = 0;
}
}
}
i++;
}
}
function Move(x, y) {
BulletMove();
if ((this._y >= 292.2) || (noAW == true)) {
if ((x < (this._x - 10)) || (x > (this._x + 10))) {
if (anim != JACKH) {
if (uniP == false) {
if (noMove == false) {
if (noAW == true) {
if (yspeed > 0) {
this._x = this._x + ((x - this._x) / 5);
}
} else if (yspeed == 0) {
this._x = this._x + ((x - this._x) / 5);
}
}
if ((anim != STOLEN) && (noAW == false)) {
if (yspeed == 0) {
runTimer = runTimer + 1;
if (((x - this._x) / 5) > 0) {
anim = WALKR;
}
if (((x - this._x) / 5) < 0) {
anim = WALKL;
}
}
}
} else if (uniP == true) {
if (noMove == false) {
if (noAW == true) {
if (yspeed > 0) {
this._x = this._x + ((x - this._x) / 3);
}
} else if (yspeed == 0) {
this._x = this._x + ((x - this._x) / 3);
}
}
if ((anim != STOLEN) && (noAW == false)) {
if (yspeed == 0) {
runTimer = runTimer + 1;
if (((x - this._x) / 5) > 0) {
anim = UNIL;
}
if (((x - this._x) / 5) < 0) {
anim = UNIR;
}
}
}
}
} else {
this._y = 292.2;
anim = JUMP;
yspeed = 5;
boredTimer = 0;
jackTimer = 0;
}
if (telDelay > 9) {
anim = STILL;
noMove = false;
runTimer = 0;
this._x = _root._xmouse;
this._y = _root._ymouse - 10;
telDelay = 0;
}
if (runTimer >= 120) {
if (_root.mBox.score < 10) {
anim = GUN1;
noMove = true;
} else if (_root.mBox.score >= 10) {
anim = TELE;
noMove = true;
telDelay = telDelay + 1;
}
}
}
}
if (((x - this._x) > -10) && ((x - this._x) < 10)) {
if ((noMove == false) && (anim != STOLEN)) {
if ((this._y > 292.2) && (yspeed == 0)) {
if (jumpTimer < 5) {
if ((y > 225) && (this._y > y)) {
anim = JUMP;
yspeed = 5;
jumpTimer = jumpTimer + 1;
} else if (y < 225) {
anim = STILL;
}
} else if ((jumpTimer >= 5) && (jumpTimer < 10)) {
if ((y > 200) && (this._y > y)) {
anim = POGO;
if (this._currentframe >= 74) {
yspeed = 8;
jumpTimer = jumpTimer + 1;
}
} else if (y < 200) {
anim = STILL;
}
} else if (jumpTimer >= 10) {
if ((y > 100) && (this._y > y)) {
anim = JETPACK;
if (this._currentframe >= 92) {
yspeed = 20;
noAW = true;
}
} else if (y < 100) {
anim = STILL;
}
}
}
}
}
this._y = this._y - yspeed;
if (this._y <= 292.2) {
yspeed = yspeed - gravity;
} else {
if (yspeed < 0) {
yspeed = 0;
noAW = false;
}
if ((this._y > 293) && (anim != JACKH)) {
this._y = 292.3;
}
}
}
function StealMouse() {
if (_root.bullHolder.mFall == false) {
if (this.hitTest(_root.mBox)) {
if (_root.mBox.shieldP == false) {
anim = STOLEN;
noAW = false;
Mouse.hide();
if (this._y > 292.2) {
this._y = 292.2;
}
} else {
if (this._x >= _root._xmouse) {
noAW = true;
anim = ROLLL;
_root.mBox.shieldC = _root.mBox.shieldC - 1;
}
if (this._x < _root._xmouse) {
noAW = true;
anim = ROLLR;
_root.mBox.shieldC = _root.mBox.shieldC - 1;
}
}
}
} else if (this.hitTest(_root.cursor._x, _root.cursor._y)) {
anim = STOLEN;
noAW = false;
_root.cursor._alpha = 0;
if (this._y > 292.2) {
this._y = 292.2;
}
}
}
function AI() {
StealMouse();
if ((anim != STOLEN) && (noMove == false)) {
if (_root.bullHolder.mFall == false) {
if ((_root._xmouse > (this._x - 10)) && (_root._xmouse < (this._x + 10))) {
if (_root._ymouse > this._y) {
if (boredTimer <= 60) {
anim = STILL;
boredTimer = boredTimer + 1;
}
if (jackTimer >= 2) {
anim = JACKH;
if (this._y < 320) {
this._y = this._y + 0.3;
} else {
boredTimer = 0;
anim = jump;
yspeed = 5;
jackTimer = 0;
}
boredTimer = 0;
}
if (boredTimer >= 60) {
anim = WAVE;
}
}
} else {
boredTimer = 0;
}
Move(_root._xmouse, _root._ymouse);
} else {
Move(_root.cursor._x, _root.cursor._y);
}
} else if (this._x < 550) {
Move(this._x + 50, this._y);
} else {
_root.mBox.tscore = _root.mBox.tscore + 1;
_root.gotoAndPlay(3);
}
animation(anim);
}
Mouse.show();
STILL = 1;
WAVE = 2;
WALKR = 3;
WALKL = 4;
JUMP = 5;
STOLEN = 6;
JACKH = 7;
POGO = 8;
GUN1 = 9;
JETPACK = 10;
UNIL = 11;
UNIR = 12;
ROLLL = 13;
ROLLR = 14;
TELE = 15;
anim = 1;
yspeed = 0;
gravity = 1;
noMove = false;
uniP = false;
noAW = false;
boredTimer = 0;
jumpTimer = 0;
jackTimer = 0;
runTimer = 0;
moonTimer = 0;
telDelay = 0;
bulletCount = 15;
bulletDelay = 2;
gCount = 0;
animation(anim);
}
onClipEvent (enterFrame) {
AI();
}
Instance of Symbol 101 MovieClip "bullHolder" in Frame 1
onClipEvent (load) {
function BulletHit() {
i = 0;
while (i < 13) {
nm = "bul" + i;
if (_root[nm]) {
if (_root[nm].hitTest(_root.mBox)) {
if (!_root.Theif.hitTest(_root._xmouse, _root._ymouse)) {
if (_root[nm]._class == "bullet") {
if (_root.mBox.shieldP == false) {
Mouse.hide();
_root.cursor._x = _root._xmouse;
_root.cursor._y = _root._ymouse;
mFall = true;
} else {
_root.mBox.shieldC = _root.mBox.shieldC - 1;
}
} else if (_root[nm]._class == "graple") {
if (_root.mBox.shieldP == false) {
Mouse.hide();
}
_root[nm]._speed = -20;
_root[nm].gotoAndStop(2);
mTrieve = true;
}
break;
}
}
}
i++;
}
}
function MRetrieve() {
mTTimer = mTTimer + 1;
if (mTTimer >= 2) {
_root.triangle.removeMovieClip();
mTTTimer = 0;
}
}
function MouseFall() {
if (_root.cursor._y < 292) {
_root.cursor._y = _root.cursor._y + 6;
} else if (_root.cursor._y > 292) {
_root.cursor._y = _root.cursor._y - 6;
}
}
mFall = false;
mTrieve = false;
mTTimer = 0;
}
onClipEvent (enterFrame) {
this._x = _root.Theif._x;
this._y = _root.Theif._y;
if (mFall == false) {
BulletHit();
}
if (mFall == true) {
MouseFall();
}
if (mTrieve == true) {
MRetrieve();
}
}
Instance of Symbol 103 MovieClip "Ball" in Frame 1
onClipEvent (load) {
function Move(p) {
this._x = this._x + p;
this._rotation = this._rotation + (p * 5);
if (this._x > 511.9) {
this._x = 40;
_root.mBox.score = _root.mBox.score + 1;
_root.score.text = _root.mBox.score;
}
}
mDown = false;
power = 0;
pwrLvl = 1;
}
onClipEvent (mouseDown) {
if (_root.Theif.anim != _root.Theif.STOLEN) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
mDown = true;
}
}
}
onClipEvent (mouseUp) {
mDown = false;
}
onClipEvent (enterFrame) {
if (_root.Theif.anim == _root.Theif.STOLEN) {
mDown = false;
}
_root.ballPlvltext.text = pwrLvl;
if (mDown == true) {
if (_root.Theif.yspeed == 0) {
power = power + (3 * pwrLvl);
} else {
power = power + (0.8 * pwrLvl);
}
} else if (power >= 0.2) {
power = power * 0.8;
Move(power);
}
if (!this.hitTest(_root._xmouse, _root._ymouse)) {
mDown = false;
}
_root.ballPtext.text = Math.round(power);
}
Instance of Symbol 105 MovieClip in Frame 1
onClipEvent (load) {
function Collide() {
if (this.hitTest(_root.mBox) && (_root.Theif.anim != _root.Theif.STOLEN)) {
this._alpha = 0;
dropTimer = Math.round((Math.random() * 300) + 100);
if ((Math.random() * 10) > 5) {
_root.mBox.shieldP = true;
_root.mBox.shieldC = Math.round(Math.random() * 10);
} else {
_root.Ball.pwrLvl = _root.Ball.pwrLvl + Math.round(Math.random() * 3);
}
}
if (this.hitTest(_root.Theif)) {
_root.Theif.uniP = true;
this._alpha = 0;
dropTimer = Math.round((Math.random() * 300) + 100);
}
}
dropTimer = Math.round((Math.random() * 20) + 50);
this._alpha = 0;
this._x = (Math.random() * 400) + 50;
this._y = -20;
}
onClipEvent (enterFrame) {
if (this._y < 292.2) {
this._y = this._y + (8 + _root.mBox.score);
}
if (this._alpha == 100) {
Collide();
}
if (dropTimer == 0) {
this._alpha = 100;
this._y = -50 * _root.Ball.pwrLvl;
}
dropTimer = dropTimer - 1;
}
Instance of Symbol 125 MovieClip "mBox" in Frame 1
onClipEvent (load) {
score = 0;
tscore = 0;
shieldP = false;
shieldC = 0;
this.gotoAndStop(1);
}
onClipEvent (mouseMove) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
_root.tscore.text = tscore;
if (shieldP == true) {
this.gotoAndStop(2);
this._alpha = 100;
} else {
this.gotoAndStop(1);
this._alpha = 0;
}
this._x = _root._xmouse;
this._y = _root._ymouse;
if (shieldC == 0) {
shieldP = false;
}
_root.shieldPer.text = (shieldC * 10) + "%";
}
Frame 2
gotoAndStop (1);
Frame 55
gotoAndStop (1);
Symbol 125 MovieClip Frame 1
stop();