Frame 1
stop();
_quality = "MEDIUM";
stop();
Frame 2
gotoAndStop (2);
Symbol 46 MovieClip [shadow] Frame 1
stop();
Symbol 49 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 1
play();
Symbol 97 MovieClip Frame 3
_root.game.f_PunchHit(_parent);
Symbol 97 MovieClip Frame 7
_parent.punching = false;
Symbol 97 MovieClip Frame 10
_parent.gotoAndStop("stand");
Symbol 107 MovieClip Frame 1
play();
_root.game.f_PunchHit(_parent);
Symbol 107 MovieClip Frame 8
_parent.punching = false;
Symbol 107 MovieClip Frame 12
_parent.gotoAndStop("stand");
Symbol 116 MovieClip Frame 1
play();
Symbol 116 MovieClip Frame 3
_root.game.f_PunchHit(_parent);
Symbol 116 MovieClip Frame 7
_parent.punching = false;
Symbol 116 MovieClip Frame 11
_parent.gotoAndStop("stand");
Symbol 130 MovieClip Frame 1
play();
Symbol 130 MovieClip Frame 4
speed = 12;
if (_parent._xscale < 0) {
speed = speed * -1;
}
Symbol 130 MovieClip Frame 5
if (_parent._xscale > 0) {
dust_x = _parent._x + 35;
} else {
dust_x = _parent._x - 35;
}
_root.game.f_FX(dust_x, _parent._y + 5, int(_parent._y) + 5, "dust1", _parent._xscale);
Instance of Symbol 62 MovieClip in Symbol 130 MovieClip Frame 5
onClipEvent (enterFrame) {
_root.game.f_PunchHit(_parent._parent);
_root.game.f_MoveChar(_parent._parent, false, _parent.speed);
if (_parent.speed > 0) {
_parent.speed = _parent.speed - 2;
if (_parent.speed < 1) {
_parent.speed = 1;
}
} else {
_parent.speed = _parent.speed + 2;
if (_parent.speed > -1) {
_parent.speed = -1;
}
}
}
Symbol 130 MovieClip Frame 12
_parent.punching = false;
Symbol 130 MovieClip Frame 19
_parent.gotoAndStop("stand");
Symbol 137 MovieClip Frame 1
play();
Symbol 137 MovieClip Frame 7
_root.game.f_SoundSwing(2);
Symbol 137 MovieClip Frame 9
_root.game.f_PunchHit(_parent);
Symbol 137 MovieClip Frame 13
_parent.punching = false;
Symbol 137 MovieClip Frame 18
_parent.gotoAndStop("stand");
Symbol 146 MovieClip Frame 1
play();
Symbol 146 MovieClip Frame 7
_root.game.f_SoundSwing(2);
Symbol 146 MovieClip Frame 9
_root.game.f_PunchHit(_parent);
Symbol 146 MovieClip Frame 13
_parent.punching = false;
Symbol 146 MovieClip Frame 18
_parent.gotoAndStop("stand");
Symbol 160 MovieClip Frame 1
play();
Symbol 160 MovieClip Frame 10
_root.game.s_Swing1.start(0, 0);
Symbol 160 MovieClip Frame 12
_root.game.f_PunchHit(_parent);
Symbol 160 MovieClip Frame 20
_parent.punching = false;
Symbol 160 MovieClip Frame 22
_parent.gotoAndStop("stand");
Symbol 169 MovieClip Frame 1
play();
Symbol 169 MovieClip Frame 6
_root.game.s_Swing5.start(0, 0);
Symbol 169 MovieClip Frame 7
_root.game.f_PunchHit(_parent);
Symbol 169 MovieClip Frame 13
_parent.punching = false;
Symbol 169 MovieClip Frame 18
_parent.gotoAndStop("stand");
Symbol 176 MovieClip Frame 1
play();
Symbol 176 MovieClip Frame 4
_root.game.s_SwishTriple.start(0, 0);
Symbol 176 MovieClip Frame 12
_root.game.s_Stab.start(0, 0);
_root.game.f_PunchHit(_parent);
Symbol 176 MovieClip Frame 18
_parent.punching = false;
Symbol 176 MovieClip Frame 22
_parent.gotoAndStop("stand");
Symbol 185 MovieClip Frame 1
play();
Symbol 185 MovieClip Frame 3
if (_parent._xscale > 0) {
speed = 6;
} else {
speed = -6;
}
Symbol 185 MovieClip Frame 4
_root.game.f_MoveChar(_parent, false, speed);
Symbol 185 MovieClip Frame 5
_root.game.f_MoveChar(_parent, false, speed);
_parent.hitnohit = true;
Symbol 185 MovieClip Frame 6
_root.game.f_MoveChar(_parent, false, speed);
_root.game.f_PunchHit(_parent);
Symbol 185 MovieClip Frame 7
_root.game.f_PunchHit(_parent);
Symbol 185 MovieClip Frame 8
_parent.hitnohit = false;
Symbol 185 MovieClip Frame 15
_parent.punching = false;
Symbol 185 MovieClip Frame 19
_parent.gotoAndStop("stand");
Symbol 190 MovieClip Frame 1
play();
Symbol 190 MovieClip Frame 2
_parent.hitnohit = true;
Symbol 190 MovieClip Frame 3
_root.game.f_PunchHit(_parent);
Symbol 190 MovieClip Frame 4
_parent.hitnohit = false;
Symbol 190 MovieClip Frame 7
_parent.punching = false;
Symbol 190 MovieClip Frame 11
_parent.gotoAndStop("stand");
Symbol 200 MovieClip Frame 1
play();
Symbol 200 MovieClip Frame 5
_parent.hitnohit = true;
Symbol 200 MovieClip Frame 6
_root.game.f_PunchHit(_parent);
Symbol 200 MovieClip Frame 7
_parent.hitnohit = false;
Symbol 200 MovieClip Frame 18
_parent.punching = false;
Symbol 200 MovieClip Frame 22
_parent.gotoAndStop("stand");
Symbol 208 MovieClip Frame 1
play();
Symbol 208 MovieClip Frame 3
_root.game.f_PunchHit(_parent);
Symbol 208 MovieClip Frame 4
_root.game.f_PunchHit(_parent);
Symbol 208 MovieClip Frame 12
_parent.punching = false;
Symbol 208 MovieClip Frame 16
_parent.gotoAndStop("stand");
Symbol 216 MovieClip Frame 1
play();
Symbol 216 MovieClip Frame 8
_parent.stomping = true;
_root.game.f_PunchHit(_parent);
_parent.stomping = false;
Symbol 216 MovieClip Frame 12
_parent.punching = false;
Symbol 216 MovieClip Frame 15
_parent.gotoAndStop("stand");
Symbol 227 MovieClip Frame 1
play();
Instance of Symbol 62 MovieClip in Symbol 227 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.game.f_PunchHit(_parent._parent);
_root.game.f_MoveChar(_parent._parent, false, _parent._parent.speed_slam);
}
Symbol 227 MovieClip Frame 13
_root.game.s_ground2.start(0, 0);
_parent.stomping = true;
_root.game.f_PunchHit(_parent);
_parent.stomping = false;
Symbol 227 MovieClip Frame 22
_parent.punching = false;
Symbol 227 MovieClip Frame 23
_parent.gotoAndStop("stand");
Symbol 228 MovieClip Frame 1
play();
Instance of Symbol 62 MovieClip in Symbol 228 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.game.f_PunchHit(_parent._parent);
_root.game.f_MoveChar(_parent._parent, false, _parent._parent.speed_slam);
if ((_parent._parent.speed_slam % 4) == 0) {
_root.game.f_FX(_parent._parent._x, _parent._parent._y + 10, int(_parent._parent._y) + 4, "dust1", _parent._parent._xscale);
}
if (_parent._parent.speed_slam > 0) {
_parent._parent.speed_slam = _parent._parent.speed_slam - 1;
if (_parent._parent.speed_slam < 1) {
_parent._parent.speed_slam = 1;
}
} else {
_parent._parent.speed_slam = _parent._parent.speed_slam + 1;
if (_parent._parent.speed_slam > -1) {
_parent._parent.speed_slam = -1;
}
}
}
Symbol 228 MovieClip Frame 4
_root.game.f_SoundSwing(2);
Symbol 228 MovieClip Frame 7
_parent.punching = false;
Symbol 228 MovieClip Frame 15
_parent.gotoAndStop("stand");
Symbol 235 MovieClip Frame 1
play();
Symbol 235 MovieClip Frame 3
speed_y = -16;
if (_parent._xscale > 0) {
speed_x = 10;
} else {
speed_x = -10;
}
Symbol 235 MovieClip Frame 4
_root.game.f_SoundSwing(2);
play();
_root.game.f_PunchHit(_parent);
Instance of Symbol 62 MovieClip in Symbol 235 MovieClip Frame 4
onClipEvent (enterFrame) {
_parent._y = _parent._y + _parent.speed_y;
_root.game.f_MoveChar(_parent._parent, false, _parent.speed_x);
if (_parent._y > 0) {
_parent._parent.punching = false;
_parent._parent.gotoAndStop("stand");
} else {
_parent.speed_y = _parent.speed_y + _root.game.gravity;
}
}
Symbol 235 MovieClip Frame 6
_root.game.f_PunchHit(_parent);
Symbol 235 MovieClip Frame 8
_root.game.f_PunchHit(_parent);
Symbol 235 MovieClip Frame 10
_root.game.f_PunchHit(_parent);
Symbol 235 MovieClip Frame 11
_parent.punching = false;
Symbol 235 MovieClip Frame 14
if (_y < 0) {
gotoAndPlay (4);
} else {
_parent.gotoAndStop("stand");
}
Symbol 242 MovieClip Frame 1
_parent._parent.upperbody._y = _parent._parent.body_y;
_parent._parent.grab_pointer.body._y = _parent._parent.kid_y + 2;
Symbol 242 MovieClip Frame 2
_parent._parent.grab_pointer.body._y = _parent._parent.kid_y;
Symbol 242 MovieClip Frame 3
_parent._parent.upperbody._y = _parent._parent.body_y - 2;
_parent._parent.grab_pointer.body._y = _parent._parent.kid_y - 1;
Symbol 242 MovieClip Frame 4
_parent._parent.upperbody._y = _parent._parent.body_y - 3;
_parent._parent.grab_pointer.body._y = _parent._parent.kid_y - 2;
Symbol 242 MovieClip Frame 7
_parent._parent.upperbody._y = _parent._parent.body_y - 2;
_parent._parent.grab_pointer.body._y = _parent._parent.kid_y - 2;
Symbol 242 MovieClip Frame 8
_parent._parent.upperbody._y = _parent._parent.body_y;
_parent._parent.grab_pointer.body._y = _parent._parent.kid_y + 1;
Symbol 242 MovieClip Frame 9
_parent._parent.upperbody._y = _parent._parent.body_y + 2;
_parent._parent.grab_pointer.body._y = _parent._parent.kid_y + 4;
Symbol 243 MovieClip Frame 1
stop();
Symbol 246 MovieClip Frame 10
stop();
Symbol 254 MovieClip Frame 7
_root.game.f_KidThrown(_parent);
Symbol 254 MovieClip Frame 13
_parent.gotoAndStop("stand");
Symbol 259 MovieClip Frame 1
play();
Symbol 259 MovieClip Frame 6
_root.game.f_KidThrownFierce(_parent);
Symbol 259 MovieClip Frame 16
_parent.gotoAndStop("stand");
Symbol 264 MovieClip Frame 6
_root.game.f_GrabSpark(_parent);
_root.game.f_KidHeadbutted(_parent);
Symbol 264 MovieClip Frame 16
_parent.gotoAndStop("grab");
Symbol 272 MovieClip Frame 7
_root.game.f_GrabSpark(_parent);
_root.game.f_KidHeadbutted(_parent);
Symbol 272 MovieClip Frame 17
if (_parent.grab_counter > 3) {
_parent.gotoAndStop("stand");
} else {
_parent.gotoAndStop("grab");
}
Symbol 284 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Instance of Symbol 62 MovieClip in Symbol 284 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._parent.onfire > 1) {
gotoAndStop(_parent._parent.onfire);
}
}
Symbol 287 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Symbol 290 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Symbol 295 MovieClip Frame 19
_root.game.f_CheckDead(_parent);
Symbol 295 MovieClip Frame 21
_parent.gotoAndStop("stand");
Symbol 298 MovieClip Frame 8
_parent.gotoAndStop("carry");
Symbol 301 MovieClip Frame 5
_parent.gotoAndStop("stand");
Symbol 304 MovieClip Frame 10
_parent.gotoAndStop("stand");
Symbol 316 MovieClip Frame 14
_root.game.s_Punch3.start(0, 0);
Symbol 316 MovieClip Frame 60
_parent.gotoAndStop("stand");
Symbol 317 MovieClip Frame 39
_root.game.f_SunChipsFrenzied(_parent);
Symbol 328 MovieClip Frame 1
_root.game.s_Thunder.start(0, 0);
Symbol 328 MovieClip Frame 18
_parent.gotoAndStop("stand");
Symbol 369 MovieClip Frame 24
stopAllSounds();
Symbol 369 MovieClip Frame 25
_root.game.f_Explosion(_parent);
_root.game.s_explosion5.start(0, 0);
Symbol 369 MovieClip Frame 27
_root.game.f_RemoveChar(_parent.shadow_pt);
Symbol 369 MovieClip Frame 97
stopAllSounds();
_root.game.f_GameOver();
stop();
Symbol 370 MovieClip [dude] Frame 1
_root.game.f_StandSettings(this);
Instance of Symbol 62 MovieClip in Symbol 370 MovieClip [dude] Frame 1
onClipEvent (enterFrame) {
_root.game.f_Character(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 370 MovieClip [dude] Frame 4
onClipEvent (enterFrame) {
_root.game.f_Turn(_parent);
_root.game.f_Punch(_parent);
}
Symbol 370 MovieClip [dude] Frame 21
hold_delay = 8;
body_y = upperbody._y;
kid_y = grab_pointer.body._y;
Instance of Symbol 62 MovieClip in Symbol 370 MovieClip [dude] Frame 21
onClipEvent (enterFrame) {
_root.game.f_CarryKid(_parent);
}
Symbol 370 MovieClip [dude] Frame 22
hold_delay = 2;
body_y = upperbody._y;
kid_y = grab_pointer.body._y;
Instance of Symbol 62 MovieClip in Symbol 370 MovieClip [dude] Frame 22
onClipEvent (enterFrame) {
_root.game.f_CarryStuff(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 370 MovieClip [dude] Frame 28
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 370 MovieClip [dude] Frame 31
onground = true;
Symbol 400 MovieClip Frame 1
play();
Symbol 400 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 403 MovieClip Frame 1
play();
Symbol 403 MovieClip Frame 16
_parent.gotoAndStop("walk");
Symbol 406 MovieClip Frame 1
play();
Symbol 406 MovieClip Frame 17
_parent.gotoAndStop("walk");
Symbol 426 MovieClip Frame 6
stop();
Symbol 427 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else if (_parent._parent._parent.onfire > 1) {
gotoAndStop(_parent._parent._parent.onfire);
} else {
stop();
}
Instance of Symbol 62 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._parent.onfire > 1) {
gotoAndStop(_parent._parent.onfire);
} else if (_parent._parent._parent._parent.onfire > 1) {
gotoAndStop(_parent._parent._parent._parent.onfire);
}
}
Symbol 432 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Symbol 439 MovieClip Frame 9
if (_parent.health <= 0) {
_parent.alive = false;
gotoAndPlay (16);
}
Instance of Symbol 249 MovieClip in Symbol 439 MovieClip Frame 10
onClipEvent (enterFrame) {
_root.game.f_SunChipsUp(_parent._parent);
}
Symbol 439 MovieClip Frame 15
_parent.gotoAndStop("walk");
Symbol 439 MovieClip Frame 16
_root.game.s_SunChipsDie.start(0, 0);
_root.game.f_KillKids();
play();
Symbol 439 MovieClip Frame 41
_root.ending_fader.gotoAndPlay(2);
_root.game.f_KidDie(_parent);
stop();
Symbol 441 MovieClip Frame 1
_root.game.f_Skin(this);
Symbol 501 MovieClip Frame 1
_root.game.f_Shirt(this);
stop();
Symbol 529 MovieClip Frame 1
_root.game.f_Hat(this);
stop();
Symbol 531 MovieClip Frame 3
stop();
Symbol 533 MovieClip Frame 1
_root.game.f_Skin(this);
Symbol 536 MovieClip Frame 1
play();
Symbol 536 MovieClip Frame 16
_parent.gotoAndStop("grabbed");
Symbol 539 MovieClip Frame 1
_root.game.f_Skin(this);
Symbol 542 MovieClip Frame 1
play();
Symbol 542 MovieClip Frame 17
_parent.gotoAndStop("grabbed");
Symbol 552 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
_root.game.f_Skin(skin);
stop();
}
Symbol 553 MovieClip Frame 4
stop();
Symbol 557 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
_root.game.f_Skin(skin);
stop();
}
Symbol 558 MovieClip Frame 3
stop();
Symbol 571 MovieClip Frame 3
_root.game.s_SunChipsGrunt.start(0, 0);
Symbol 571 MovieClip Frame 10
_root.game.s_Swing1.start(0, 0);
_root.game.f_Boss1UppercutHit(_parent);
Symbol 571 MovieClip Frame 13
_root.game.s_Swing2.start(0, 0);
Symbol 571 MovieClip Frame 15
_root.game.s_Swing3.start(0, 0);
Symbol 571 MovieClip Frame 18
_root.game.s_Swing4.start(0, 0);
Symbol 571 MovieClip Frame 22
_root.game.s_Swing5.start(0, 0);
Symbol 571 MovieClip Frame 33
_parent.gotoAndStop("stand");
Instance of Symbol 249 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.game.f_SunChipsSlide(_parent._parent);
}
Symbol 579 MovieClip Frame 2
_root.game.s_SunChipsGrunt.start(0, 0);
Symbol 579 MovieClip Frame 5
_parent.nohit = true;
_root.game.s_Swing4.start(0, 0);
Symbol 579 MovieClip Frame 6
_root.game.f_Boss1UppercutHit(_parent);
Symbol 579 MovieClip Frame 15
_parent.nohit = false;
Symbol 579 MovieClip Frame 17
_parent.gotoAndStop("stand");
Symbol 589 MovieClip Frame 11
_root.game.s_GunShot.start(0, 0);
_root.game.f_GunShot(_parent);
Symbol 589 MovieClip Frame 24
_parent.ammo--;
if (_parent.ammo > 0) {
_parent.gotoAndStop("stand");
} else {
_parent.ammo = 2;
_parent.gotoAndStop("reload");
}
Symbol 603 MovieClip Frame 1
_root.game.s_Swing4.start(0, 0);
Symbol 603 MovieClip Frame 4
_root.game.s_Swing5.start(0, 0);
Symbol 603 MovieClip Frame 6
_root.game.s_Swing6.start(0, 0);
Symbol 612 MovieClip Frame 1
_root.game.s_HardPunch2.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 5);
Symbol 612 MovieClip Frame 10
_root.game.s_HardPunch1.start(0, 0);
Symbol 612 MovieClip Frame 14
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 1);
Symbol 612 MovieClip Frame 18
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 1);
Symbol 612 MovieClip Frame 22
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 1);
Symbol 612 MovieClip Frame 26
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 1);
Symbol 612 MovieClip Frame 30
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 1);
Symbol 612 MovieClip Frame 34
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 1);
Symbol 612 MovieClip Frame 38
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 1);
Symbol 612 MovieClip Frame 40
_root.game.s_HardPunch3.start(0, 0);
Symbol 612 MovieClip Frame 49
_root.game.f_SunChipsStopCrazy(_parent);
Symbol 619 MovieClip Frame 1
_root.game.s_Swing6.start(0, 0);
Symbol 619 MovieClip Frame 11
_root.game.s_Reload.start(0, 0);
Symbol 619 MovieClip Frame 20
_parent.gotoAndStop("walk");
Symbol 620 MovieClip Frame 1
if ((_parent._x + _parent._parent._x) < 770) {
_root.game.pause = true;
_root.game.f_SunchipsMusic();
gotoAndPlay (3);
}
Symbol 620 MovieClip Frame 2
gotoAndPlay (1);
Symbol 620 MovieClip Frame 3
play();
Instance of Symbol 249 MovieClip in Symbol 620 MovieClip Frame 3
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll(_parent._parent);
}
Symbol 620 MovieClip Frame 47
_root.game.f_KidGroup10();
Symbol 620 MovieClip Frame 57
_root.game.s_Reload.start(0, 0);
Instance of Symbol 249 MovieClip in Symbol 620 MovieClip Frame 65
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll2(_root.game.dude1);
}
Symbol 620 MovieClip Frame 85
_root.game.pause = false;
_parent.gotoAndStop("walk");
Symbol 689 MovieClip [boss1] Frame 1
stop();
Instance of Symbol 62 MovieClip in Symbol 689 MovieClip [boss1] Frame 1
onClipEvent (enterFrame) {
_root.game.f_Boss1PunchClock(_parent);
}
Symbol 689 MovieClip [boss1] Frame 2
gotoAndStop (3);
Symbol 689 MovieClip [boss1] Frame 3
_root.game.f_KidSettings(this);
stop();
Instance of Symbol 62 MovieClip in Symbol 689 MovieClip [boss1] Frame 3
onClipEvent (enterFrame) {
if (!_root.game.f_SunChipsAttack(_parent)) {
_root.game.f_JamesRun(_parent);
}
}
Instance of Symbol 62 MovieClip in Symbol 689 MovieClip [boss1] Frame 8
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 689 MovieClip [boss1] Frame 11
onground = true;
Instance of Symbol 62 MovieClip in Symbol 689 MovieClip [boss1] Frame 24
onClipEvent (enterFrame) {
_root.game.f_SunChipsCrazy(_parent);
}
Symbol 689 MovieClip [boss1] Frame 28
_root.game.f_KidReset(this);
Symbol 710 MovieClip Frame 1
Symbol 711 MovieClip Frame 1
_root.game.f_Skin(kid);
Symbol 712 MovieClip Frame 1
play();
Symbol 712 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 718 MovieClip Frame 1
_root.game.f_Skin(skin);
_root.game.f_Skin(arm);
Symbol 719 MovieClip Frame 1
play();
Symbol 719 MovieClip Frame 18
_parent.gotoAndStop("walk");
Symbol 723 MovieClip Frame 1
_root.game.f_Skin(skin);
Symbol 724 MovieClip Frame 1
play();
Symbol 724 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 732 MovieClip Frame 1
_root.game.f_Skin(this);
Symbol 736 MovieClip Frame 1
play();
Symbol 736 MovieClip Frame 33
_parent.gotoAndStop("walk");
Symbol 742 MovieClip Frame 1
_root.game.f_Skin(skin);
_root.game.f_Skin(arm);
if (_parent._parent.onfire > 1) {
gotoAndStop(_parent._parent.onfire);
} else {
stop();
}
Instance of Symbol 62 MovieClip in Symbol 742 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._parent._parent.onfire > 1) {
_parent.gotoAndStop(_parent._parent._parent.onfire);
}
}
Symbol 745 MovieClip Frame 1
_root.game.f_Skin(this);
Symbol 747 MovieClip Frame 1
_root.game.f_Skin(this);
Symbol 748 MovieClip Frame 5
if (_parent.health <= 0) {
_parent.alive = false;
gotoAndPlay (35);
}
Symbol 748 MovieClip Frame 34
_parent.gotoAndStop("walk");
Symbol 748 MovieClip Frame 35
play();
Symbol 748 MovieClip Frame 62
_root.game.f_KidDie(_parent);
stop();
Symbol 751 MovieClip Frame 1
play();
Symbol 751 MovieClip Frame 7
_parent.gotoAndStop("walk");
Symbol 754 MovieClip Frame 1
speed = 7;
play();
Instance of Symbol 62 MovieClip in Symbol 754 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_PushKid(_parent._parent, _parent.speed);
_parent.speed--;
}
Symbol 754 MovieClip Frame 20
_parent.gotoAndStop("walk");
Symbol 777 MovieClip Frame 16
_root.game.f_JamesShoot(_parent);
Symbol 777 MovieClip Frame 24
_parent.gotoAndStop("walk");
Symbol 783 MovieClip Frame 23
gotoAndPlay (1);
Symbol 815 MovieClip [kid] Frame 1
_root.game.f_Skin(kid.kid);
Symbol 815 MovieClip [kid] Frame 2
_root.game.f_KidSettings(this);
if (health >= 0) {
if (kid_type == 1) {
_root.game.f_Skin(kid.kid);
} else if (kid_type == 2) {
gotoAndStop (3);
} else if (kid_type == 3) {
gotoAndStop (4);
} else if (kid_type == 4) {
gotoAndStop (5);
} else if (kid_type == 5) {
gotoAndStop (6);
}
}
stop();
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 2
onClipEvent (enterFrame) {
_root.game.f_KidRun(_parent);
}
Symbol 815 MovieClip [kid] Frame 3
_root.game.f_Skin(kid.kid);
stop();
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 3
onClipEvent (enterFrame) {
_root.game.f_JamesRun(_parent);
}
Symbol 815 MovieClip [kid] Frame 4
_root.game.f_KidSettings(this);
_root.game.f_Skin(kid.kid);
stop();
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 4
onClipEvent (enterFrame) {
_root.game.f_SoccerRun(_parent);
}
Symbol 815 MovieClip [kid] Frame 5
_root.game.f_Skin(kid.kid);
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 5
onClipEvent (enterFrame) {
if (!_root.game.f_NinjaAttack(_parent)) {
_root.game.f_KidRun(_parent);
}
}
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 6
onClipEvent (enterFrame) {
if (!_root.game.f_HelmetAttack(_parent)) {
_root.game.f_KidRun(_parent);
}
}
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 11
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 815 MovieClip [kid] Frame 14
onground = true;
Symbol 815 MovieClip [kid] Frame 23
_root.game.f_KidSettings(this);
_root.game.f_Skin(kid.kid);
Symbol 815 MovieClip [kid] Frame 24
_root.game.f_KidSettings(this);
_root.game.f_Skin(kid.kid);
stop();
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 24
onClipEvent (enterFrame) {
_root.game.f_SoccerRun(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 26
onClipEvent (enterFrame) {
_root.game.f_CheckSandbox(_parent);
}
Symbol 815 MovieClip [kid] Frame 29
_root.game.f_Skin(kid.kid);
_root.game.f_Skin(kid.kidarm);
s_atvengine = new Sound(this);
s_atvengine.attachSound("sound_atv_engine3.wav");
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 29
onClipEvent (enterFrame) {
_root.game.f_ATV(_parent);
}
Symbol 815 MovieClip [kid] Frame 30
_root.game.f_Skin(kid.body.kid);
_root.game.f_Skin(kid.body.foot);
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 30
onClipEvent (enterFrame) {
_root.game.f_SoccerSlide(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 31
onClipEvent (enterFrame) {
_root.game.f_NinjaKick(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 32
onClipEvent (enterFrame) {
_root.game.f_NinjaJump(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 815 MovieClip [kid] Frame 34
onClipEvent (enterFrame) {
_root.game.f_SoccerSlide(_parent);
}
Symbol 815 MovieClip [kid] Frame 36
_root.game.f_KidReset(this);
Symbol 816 MovieClip Frame 1
play();
Symbol 816 MovieClip Frame 5
_parent.gotoAndStop("remove");
Symbol 821 MovieClip Frame 1
play();
Symbol 821 MovieClip Frame 5
_parent.gotoAndStop("remove");
Symbol 822 MovieClip Frame 1
play();
Symbol 822 MovieClip Frame 5
_parent.gotoAndStop("remove");
Symbol 830 MovieClip Frame 1
play();
Symbol 830 MovieClip Frame 19
_parent.gotoAndStop("remove");
Symbol 840 MovieClip Frame 1
play();
Symbol 840 MovieClip Frame 24
_parent.gotoAndStop("remove");
Symbol 841 MovieClip Frame 1
play();
Symbol 841 MovieClip Frame 14
_parent.gotoAndStop("remove");
Symbol 849 MovieClip Frame 1
play();
Symbol 849 MovieClip Frame 12
_parent.gotoAndStop("remove");
Symbol 850 MovieClip Frame 25
_parent.gotoAndStop("remove");
Symbol 866 MovieClip Frame 35
_parent.gotoAndStop("remove");
Symbol 897 MovieClip Frame 84
_parent.gotoAndStop("remove");
stop();
Symbol 902 MovieClip Frame 84
_parent.gotoAndStop("remove");
stop();
Symbol 911 MovieClip Frame 1
play();
Symbol 911 MovieClip Frame 15
_parent.gotoAndStop("remove");
Symbol 912 MovieClip Frame 1
play();
Symbol 912 MovieClip Frame 5
_parent.gotoAndStop("remove");
Symbol 915 MovieClip Frame 1
body.gotoAndStop(_root.game.SunChipsFrame);
Symbol 915 MovieClip Frame 45
_parent.gotoAndStop("remove");
Symbol 923 MovieClip Frame 8
_parent.gotoAndStop("remove");
Symbol 924 MovieClip [fx] Frame 1
stop();
Symbol 924 MovieClip [fx] Frame 15
if (_xscale > 0) {
speed_x = 16;
} else {
speed_x = -16;
}
speed_y = -3;
Instance of Symbol 62 MovieClip in Symbol 924 MovieClip [fx] Frame 15
onClipEvent (enterFrame) {
_root.game.f_DartAction(_parent);
}
Symbol 924 MovieClip [fx] Frame 19
Symbol 1017 MovieClip Frame 1
stop();
Symbol 1017 MovieClip Frame 10
stop();
Symbol 1017 MovieClip Frame 18
gotoAndStop (1);
Symbol 1018 Button
on (rollOver) {
tellTarget ("visit") {
gotoAndPlay ("over");
};
}
on (rollOut) {
tellTarget ("visit") {
gotoAndPlay ("off");
};
}
on (press) {
getURL ("http://www.alienhominid.com", (target = "_blank"));
}
Symbol 1037 Button
on (rollOver) {
tellTarget ("pb_ng") {
gotoAndPlay ("over");
};
}
on (rollOut) {
tellTarget ("pb_ng") {
gotoAndPlay ("off");
};
}
on (press) {
getURL ("http://www.newgrounds.com", (target = "_blank"));
}
Symbol 1043 MovieClip Frame 8
stop();
Symbol 1053 MovieClip Frame 15
stop();
Symbol 1058 MovieClip Frame 1
stop();
Symbol 1058 MovieClip Frame 8
stop();
Symbol 1058 MovieClip Frame 13
gotoAndStop (1);
Symbol 1059 Button
on (rollOver) {
tellTarget ("play") {
gotoAndPlay ("over");
};
}
on (rollOut) {
tellTarget ("play") {
gotoAndPlay ("off");
};
}
on (press) {
play();
}
on (keyPress "a") {
play();
}
on (keyPress "A") {
play();
}
Instance of Symbol 249 MovieClip in Symbol 1061 MovieClip Frame 1
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
timer++;
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else if (timer < 2) {
_parent.gotoAndPlay("go2");
} else {
_parent.gotoAndPlay("go");
}
}
Symbol 1061 MovieClip Frame 140
stop();
Symbol 1061 MovieClip Frame 190
tellTarget (_root) {
nextFrame();
};
Symbol 1071 Button
on (press) {
gotoAndPlay (740);
}
on (keyPress "a") {
gotoAndPlay (740);
}
on (keyPress "A") {
gotoAndPlay (740);
}
Symbol 1103 MovieClip Frame 5
stop();
Symbol 1142 MovieClip Frame 14
stop();
Symbol 1173 MovieClip Frame 22
stop();
gotoAndPlay (17);
Symbol 1184 MovieClip Frame 1
stop();
Symbol 1185 MovieClip Frame 50
stop();
Symbol 1187 MovieClip Frame 50
stop();
Symbol 1189 MovieClip Frame 35
stop();
Symbol 1196 MovieClip Frame 17
stop();
Symbol 1212 MovieClip Frame 1
stop();
Symbol 1212 MovieClip Frame 10
stop();
Symbol 1212 MovieClip Frame 20
gotoAndStop (1);
Symbol 1215 MovieClip Frame 1
stop();
Symbol 1215 MovieClip Frame 8
stop();
Symbol 1215 MovieClip Frame 14
gotoAndStop (1);
Symbol 1216 Button
on (rollOver) {
tellTarget ("start") {
gotoAndPlay ("over");
};
}
on (rollOut) {
tellTarget ("start") {
gotoAndPlay ("off");
};
}
on (press) {
tellTarget ("game_on") {
play();
};
}
on (keyPress "a") {
tellTarget ("game_on") {
play();
};
}
on (keyPress "A") {
tellTarget ("game_on") {
play();
};
}
Symbol 1217 Button
on (rollOver) {
tellTarget ("instructions") {
gotoAndPlay ("over");
};
}
on (rollOut) {
tellTarget ("instructions") {
gotoAndPlay ("off");
};
}
on (press) {
tellTarget ("demo") {
play();
};
}
on (keyPress "s") {
tellTarget ("demo") {
play();
};
}
on (keyPress "S") {
tellTarget ("demo") {
play();
};
}
Symbol 1265 MovieClip Frame 14
stop();
Symbol 1301 MovieClip Frame 100
stop();
Symbol 1302 MovieClip Frame 100
stop();
Symbol 1322 MovieClip Frame 75
stop();
Symbol 1331 MovieClip Frame 26
stop();
Symbol 1346 MovieClip Frame 29
stop();
Symbol 1378 MovieClip Frame 1
stop();
Symbol 1386 MovieClip Frame 1
stop();
Instance of Symbol 1353 MovieClip "bar" in Symbol 1386 MovieClip Frame 752
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Instance of Symbol 1353 MovieClip "ragebar" in Symbol 1386 MovieClip Frame 752
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Symbol 1387 MovieClip Frame 1
stop();
Symbol 1387 MovieClip Frame 2
stopAllSounds();
Symbol 1387 MovieClip Frame 47
_root.gotoAndStop("level1");
Symbol 1390 MovieClip Frame 810
stop();
Symbol 1394 MovieClip Frame 1
stop();
Symbol 1394 MovieClip Frame 60
stop();
Symbol 1406 MovieClip Frame 1
stop();
Symbol 1409 MovieClip Frame 1
stop();
Symbol 1409 MovieClip Frame 2
_root.game.car_distance = 10;
_root.game.s_Engine.start(0, 5000);
_root.game.f_EngineVolume();
body.body.body.gotoAndStop(_root.game.current_vehicle);
play();
Instance of Symbol 249 MovieClip in Symbol 1409 MovieClip Frame 3
onClipEvent (enterFrame) {
_root.game.car_distance = _root.game.car_distance + 0.5;
_root.game.f_EngineVolume();
}
Symbol 1409 MovieClip Frame 21
_parent.car2.gotoAndPlay(2);
stop();
Symbol 1419 MovieClip Frame 1
if (!init) {
default_y = _y;
init = true;
}
stop();
Symbol 1419 MovieClip Frame 2
body.body.body.gotoAndStop(_root.game.current_vehicle);
play();
Instance of Symbol 249 MovieClip in Symbol 1419 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.car_distance = _root.game.car_distance + 0.5;
_root.game.f_EngineVolume();
}
Symbol 1419 MovieClip Frame 51
_root.game.ups1.gotoAndPlay(2);
_root.game.ups1.body.body.body.gotoAndStop(_root.game.current_vehicle);
stop();
Symbol 1451 MovieClip Frame 1
stop();
Symbol 1451 MovieClip Frame 2
body.body.body.gotoAndStop(_root.game.current_vehicle);
play();
Instance of Symbol 249 MovieClip in Symbol 1451 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.car_distance = _root.game.car_distance + 3;
_root.game.f_EngineVolume();
}
Symbol 1451 MovieClip Frame 21
_root.game.ups2._y = _root.game.ups2.default_y;
_root.game.ups2._xscale = 100;
_root.game.ups2._yscale = 100;
_root.game.ups2.speed_y = 10;
_root.game.ups2.gotoAndStop(2);
_root.game.ups2.body.body.body.gotoAndStop(_root.game.current_vehicle);
stop();
Symbol 1552 MovieClip Frame 1
if (_parent.ball == 2) {
gotoAndStop (2);
} else if (_parent._parent.ball == 2) {
gotoAndStop (2);
} else if (_parent._parent._parent.ball == 2) {
gotoAndStop (2);
} else {
stop();
}
Symbol 1553 MovieClip Frame 13
gotoAndPlay (1);
Symbol 1555 MovieClip Frame 1
stop();
Symbol 1555 MovieClip Frame 2
play();
Symbol 1555 MovieClip Frame 4
_root.game.s_Bounce.start(0, 0);
Symbol 1555 MovieClip Frame 11
_root.game.s_Swoosh.start(0, 0);
Symbol 1555 MovieClip Frame 16
_root.game.bball.body_y = _root.game.bballhoop.goal._y + 145;
new_x = _root.game.bballhoop.x + _root.game.bballhoop.goal._x;
new_y = _root.game.bballhoop.y - 2;
_root.game.f_SetXY(_root.game.bball, new_x, new_y);
Symbol 1555 MovieClip Frame 17
_root.game.bball.speed_toss_x = 0;
_root.game.bball.speed_toss_y = 15;
_root.game.bball.gotoAndStop("release");
_root.game.bball.body._y = _root.game.bball.body_y;
Symbol 1556 MovieClip Frame 1
stop();
Symbol 1557 MovieClip Frame 1
stop();
Instance of Symbol 249 MovieClip in Symbol 1557 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_CheckHoop(_parent);
}
Symbol 1569 MovieClip Frame 1
stop();
Symbol 1569 MovieClip Frame 2
play();
Symbol 1569 MovieClip Frame 28
stop();
Symbol 1584 MovieClip Frame 1
stop();
Symbol 1584 MovieClip Frame 2
play();
Symbol 1584 MovieClip Frame 4
_root.game.s_HardPunch1.start(0, 0);
Symbol 1584 MovieClip Frame 5
dad.gotoAndPlay(2);
Symbol 1584 MovieClip Frame 8
_root.game.s_Ground3.start(0, 0);
Symbol 1584 MovieClip Frame 23
_root.game.s_HardPunch2.start(0, 0);
Symbol 1584 MovieClip Frame 34
_root.game.f_SpawnPlayer(70, 385);
_root.game.dude1.gotoAndStop("knuckles");
stop();
Symbol 1589 MovieClip Frame 1
speed = 19;
s_CarIdle = new Sound(this);
s_CarIdle.attachSound("sound_trucks_idle");
s_CarDrive = new Sound(this);
s_CarDrive.attachSound("sound_trucks_moving");
s_CarDrive.start(0, 1000);
Instance of Symbol 62 MovieClip in Symbol 1589 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_Scroll(_parent.speed, false);
_parent.car.car.tire1._rotation = _parent.car.car.tire1._rotation + _parent.speed;
_parent.car.car.tire2._rotation = _parent.car.car.tire2._rotation + _parent.speed;
_parent.speed = _parent.speed - 0.1;
}
Symbol 1589 MovieClip Frame 45
_root.game.s_Smack1.start(0, 0);
Symbol 1589 MovieClip Frame 100
s_CarDrive.stop();
s_CarIdle.start(0, 1000);
Symbol 1589 MovieClip Frame 115
car.car.car.gotoAndPlay("door");
_root.game.limit_topleft.x = -_root.game._x;
_root.game.limit_topleft._x = _root.game.limit_topleft.x;
Symbol 1589 MovieClip Frame 146
speed = 2;
volume = 100;
pan = 0;
Symbol 1589 MovieClip Frame 147
s_CarIdle.stop();
s_CarDrive.start(0, 1000);
Instance of Symbol 62 MovieClip in Symbol 1589 MovieClip Frame 147
onClipEvent (enterFrame) {
_parent.car.car.tire1._rotation = _parent.car.car.tire1._rotation + _parent.speed;
_parent.car.car.tire2._rotation = _parent.car.car.tire2._rotation + _parent.speed;
_parent.speed = _parent.speed + 0.1;
}
Instance of Symbol 62 MovieClip in Symbol 1589 MovieClip Frame 160
onClipEvent (enterFrame) {
_parent.pan = _parent.pan + 2;
if (_parent.pan > 100) {
_parent.pan = 100;
}
_parent.s_CarDrive.setPan(_parent.pan);
}
Symbol 1589 MovieClip Frame 201
_root.game.f_KidGroup1();
_root.go_arrow.gotoAndPlay(2);
Instance of Symbol 62 MovieClip in Symbol 1589 MovieClip Frame 202
onClipEvent (enterFrame) {
_parent.volume = _parent.volume - 2;
if (_parent.volume < 0) {
_parent.volume = 0;
}
_parent.s_CarDrive.setVolume(_parent.volume);
}
Symbol 1589 MovieClip Frame 251
s_CarDrive.stop();
stop();
Symbol 1605 MovieClip Frame 1
stop();
Instance of Symbol 249 MovieClip in Symbol 1605 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_StartSoccer(_parent);
}
Instance of Symbol 249 MovieClip in Symbol 1605 MovieClip Frame 3
onClipEvent (enterFrame) {
_root.game.f_SoccerGame(_parent);
}
Symbol 1627 MovieClip Frame 1
stop();
Symbol 1627 MovieClip Frame 2
play();
Symbol 1627 MovieClip Frame 12
gotoAndStop (1);
Symbol 1628 MovieClip Frame 1
stop();
Symbol 1635 MovieClip Frame 1
gotoAndStop(_parent._parent.animal);
Symbol 1637 MovieClip Frame 1
play();
Symbol 1637 MovieClip Frame 60
stop();
Symbol 1638 MovieClip Frame 1
if (!init) {
init = true;
animal = random(7) + 1;
}
stop();
Symbol 1648 MovieClip Frame 1
if (_parent.object_type > 0) {
gotoAndStop(_parent.object_type);
} else if (_parent._parent.object_type > 0) {
gotoAndStop(_parent._parent.object_type);
} else if (_parent._parent._parent.object_type > 0) {
gotoAndStop(_parent._parent._parent.object_type);
} else {
stop();
}
Symbol 1649 MovieClip Frame 1
play();
Symbol 1649 MovieClip Frame 7
_parent.gotoAndStop("stand");
Symbol 1650 MovieClip Frame 8
stop();
Symbol 1656 MovieClip Frame 1
stop();
Instance of Symbol 62 MovieClip in Symbol 1656 MovieClip Frame 4
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 1656 MovieClip Frame 7
_root.game.f_ObjectSettings(this);
Symbol 1663 MovieClip Frame 1
stop();
Instance of Symbol 62 MovieClip in Symbol 1663 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_SwingCheck(_parent);
}
Symbol 1663 MovieClip Frame 3
play();
Instance of Symbol 62 MovieClip in Symbol 1663 MovieClip Frame 26
onClipEvent (enterFrame) {
_root.game.f_SwingCheck(_parent);
}
Symbol 1663 MovieClip Frame 48
gotoAndStop (2);
Symbol 1696 MovieClip Frame 15
stop();
Symbol 1697 MovieClip Frame 1
stop();
Instance of Symbol 249 MovieClip in Symbol 1697 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.game.f_Sandbox(_parent);
}
Symbol 1707 MovieClip Frame 13
gotoAndPlay (1);
Symbol 1708 MovieClip Frame 27
gotoAndPlay (11);
Symbol 1709 MovieClip Frame 1
stop();
Symbol 1710 MovieClip Frame 1
stop();
Instance of Symbol 249 MovieClip in Symbol 1710 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.game.f_SeekOwner(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 1710 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 1710 MovieClip Frame 5
_root.game.f_ObjectSettings(this);
speed_toss_x = speed_toss_x / 2;
speed_toss_y = (-speed_toss_x) / 2;
Instance of Symbol 249 MovieClip in Symbol 1710 MovieClip Frame 5
onClipEvent (enterFrame) {
_root.game.f_Roll(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 1710 MovieClip Frame 9
onClipEvent (enterFrame) {
_root.game.f_SoccerBall(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 1710 MovieClip Frame 10
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 1710 MovieClip Frame 11
onClipEvent (enterFrame) {
_root.game.f_SeakHoop(_parent);
}
Symbol 1723 MovieClip Frame 7
stop();
Instance of Symbol 249 MovieClip in Symbol 1724 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_MedPickup(_parent);
}
Symbol 1725 MovieClip Frame 1
if (!init) {
default_y = _y;
init = true;
}
stop();
Instance of Symbol 62 MovieClip in Symbol 1725 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_CarDrive(_parent);
}
Symbol 1738 MovieClip Frame 1
function f_SetXY(zone, new_x, new_y) {
zone.x = new_x;
zone.y = new_y;
zone._x = zone.x;
zone._y = zone.y;
f_Depth(zone, zone.y);
if (zone.item) {
f_MoveItem(zone, zone.item, speed);
}
zone.shadow_pt._x = zone.x;
zone.shadow_pt._y = zone.y;
f_Mask(zone);
}
function f_rad2deg(radian) {
return(57.2957795130823 * radian);
}
function f_FlipChar(u_flipchar) {
u_flipchar._xscale = u_flipchar._xscale * -1;
f_Mask(u_flipchar);
}
function f_FlipSame(u_flipchar, u_flipsource) {
if ((u_flipchar._xscale > 0) and (u_flipsource._xscale < 0)) {
f_FlipChar(u_flipchar);
} else if ((u_flipchar._xscale < 0) and (u_flipsource._xscale > 0)) {
f_FlipChar(u_flipchar);
}
}
function f_FlipInverse(u_flipchar, u_flipsource) {
if ((u_flipchar._xscale > 0) and (u_flipsource._xscale > 0)) {
f_FlipChar(u_flipchar);
} else if ((u_flipchar._xscale < 0) and (u_flipsource._xscale < 0)) {
f_FlipChar(u_flipchar);
}
}
function f_ClearGrabPointer(u_ClearPointer) {
u_ClearPointer.grab_pointer = undefined;
}
function f_SwingsOn() {
swing2.gotoAndStop("on");
swing3.gotoAndStop("on");
}
function f_SwingsOff() {
swing2.gotoAndStop("off");
swing3.gotoAndStop("off");
}
function f_KidDie(zone) {
zone.alive = false;
zone.shadow_pt.gotoAndStop("off");
kills++;
if (kills >= kills_goal) {
kills_goal = 0;
checkpoint++;
if (checkpoint == 1) {
limit_bottomright.x = limit_bottomright.x + 1370;
new_limit_topleft = limit_bottomright.x - 1400;
f_KidGroup2();
} else if (checkpoint == 2) {
limit_bottomright.x = limit_bottomright.x + 550;
new_limit_topleft = limit_bottomright.x - 640;
f_SwingsOn();
f_KidSwing();
} else if (checkpoint == 3) {
limit_bottomright.x = limit_bottomright.x + 1150;
new_limit_topleft = limit_bottomright.x - 1250;
f_KidGroupSoccer();
soccerfield.gotoAndStop("startsoccer");
} else if (checkpoint == 4) {
f_CarScene1();
f_KidGroup5();
limit_bottomright.x = limit_bottomright.x + 1100;
new_limit_topleft = limit_bottomright.x - 1200;
} else if (checkpoint == 5) {
limit_bottomright.x = limit_bottomright.x + 700;
new_limit_topleft = limit_bottomright.x - 1900;
} else if (checkpoint == 6) {
limit_bottomright.x = limit_bottomright.x + 1200;
new_limit_topleft = limit_bottomright.x - 1200;
f_KidGroup6();
bballhoop.gotoAndStop("on");
} else if (checkpoint == 7) {
limit_bottomright.x = limit_bottomright.x + 1000;
new_limit_topleft = limit_bottomright.x - 1000;
} else if (checkpoint == 8) {
limit_bottomright.x = limit_bottomright.x + 2000;
new_limit_topleft = limit_bottomright.x - 1300;
f_KidGroup8();
} else if (checkpoint == 9) {
limit_bottomright.x = limit_bottomright.x + 2000;
new_limit_topleft = limit_bottomright.x - 1500;
} else if (checkpoint == 10) {
limit_bottomright.x = limit_bottomright.x + 1600;
new_limit_topleft = limit_bottomright.x - 1800;
med1.gotoAndStop("on");
f_SpawnSunchips();
kills_goal = kills_goal + 3;
}
limit_bottomright._x = limit_bottomright.x;
if (limit_topleft.x < new_limit_topleft) {
limit_topleft.x = -game_x;
limit_topleft._x = limit_topleft.x;
}
f_StaticRange();
kills = 0;
if (checkpoint < 11) {
s_Advance.start(0, 0);
_root.go_arrow.gotoAndPlay(2);
_root.center.gotoAndPlay(2);
}
}
f_RemoveChar(zone);
}
function f_CheckHold(u_kid) {
if (u_kid == dude1.grab_pointer) {
f_ClearGrabPointer(dude1);
dude1.gotoAndStop("stand");
}
}
function f_CarCheckHit(zone, u_hit) {
var return_val = false;
if (u_hit.y < zone.y) {
if (u_hit.y > (zone.y - 100)) {
if (Math.abs(zone.x - u_hit.x) < (zone._width / 2)) {
if (u_hit.health > 0) {
return_val = true;
f_Damage(u_hit, 3);
if (((u_hit.x < zone.x) and (u_hit._xscale < 0)) or ((u_hit.x >= zone.x) and (u_hit._xscale > 0))) {
f_FlipChar(u_hit);
}
u_hit.speed_toss_y = -(random(10) + 10);
u_hit.speed_toss_x = random(8) + 12;
f_FX(u_hit.x, u_hit.body._y + u_hit.y, int(u_hit.y) + 7, "impact1");
f_CheckHold(u_hit);
f_CallJuggle1(u_hit);
}
}
}
}
return(return_val);
}
function f_DropItem(u_drop) {
if (u_drop.grab_pointer != undefined) {
f_FlipSame(u_drop.grab_pointer, u_drop);
u_drop.grab_pointer.speed_toss_y = -(random(10) + 10);
u_drop.grab_pointer.speed_toss_x = random(8) + 12;
f_CallJuggle1(u_drop.grab_pointer);
f_ClearGrabPointer(u_drop);
}
if (u_drop.item != null) {
u_drop.item.gotoAndStop("stand");
u_drop.item.owner = null;
u_drop.item = null;
}
}
function f_CarScene1() {
bg2.car1.gotoAndPlay(2);
}
function f_StopCarScene1() {
bg2.car1.gotoAndStop(1);
bg2.car2.gotoAndStop(1);
ups1.gotoAndStop(1);
ups2.gotoAndStop(1);
}
function f_CarDrive(zone) {
zone._y = zone._y + zone.speed_y;
zone.y = zone._y;
zone.x = zone._x;
zone.speed_y++;
zone._xscale = zone._xscale + (zone.speed_y / 12);
zone._yscale = zone._yscale + (zone.speed_y / 12);
zone.depth_mod = 990;
f_Depth(zone, zone.y);
f_EngineVolume();
if (zone.y > (limit_bottomright.y + zone._height)) {
current_vehicle++;
if (current_vehicle > total_vehicles) {
current_vehicle = 1;
}
s_Engine.stop();
bg2.car1.gotoAndPlay(2);
zone.gotoAndStop(1);
} else {
if (zone.y > ((limit_bottomright.y + zone._height) - 300)) {
car_distance = car_distance - 15;
} else {
car_distance = car_distance + 4;
}
var u_impact = false;
i = 1;
while (i <= total_kids) {
var u_hit = this["kid" + i];
if (u_hit.alive) {
if (f_CarCheckHit(zone, u_hit)) {
u_impact = true;
}
}
i++;
}
i = 1;
while (i <= total_objects) {
var u_hit = this["object_pt" + i];
if (f_CarCheckHit(zone, u_hit)) {
u_impact = true;
}
i++;
}
u_hit = dude1;
if (u_hit.y < zone.y) {
if (u_hit.y > (zone.y - 100)) {
if (Math.abs(zone.x - u_hit.x) < (zone._width / 2)) {
if (!u_hit.nohit) {
u_impact = true;
f_Damage(u_hit, 10);
if (((u_hit.x < zone.x) and (u_hit._xscale < 0)) or ((u_hit.x >= zone.x) and (u_hit._xscale > 0))) {
f_FlipChar(u_hit);
}
f_DropItem(u_hit);
u_hit.speed_toss_y = -(random(10) + 10);
u_hit.speed_toss_x = random(8) + 12;
f_FX(u_hit.x, u_hit.body._y + u_hit.y, int(u_hit.y) + 7, "impact1");
f_CallJuggle1(u_hit);
}
}
}
}
if (u_impact) {
f_HardPunchSound();
}
}
}
function f_KillKids() {
i = 1;
while (i <= total_kids) {
var u_kid = this["kid" + i];
if (u_kid.alive) {
u_kid.health = 0;
u_kid.gotoAndStop("hitground1");
}
i++;
}
}
function f_ExplosionCheckHit(zone, u_hit) {
var return_val = false;
if (!u_hit.invincible) {
if (Math.abs(u_hit.y - zone.y) < 30) {
if (Math.abs(zone.x - u_hit.x) < 150) {
return_val = true;
u_hit.onfire = 2;
f_Damage(u_hit, 6);
if (u_hit.grab) {
if (((u_hit.x < zone.x) and (u_hit._xscale < 0)) or ((u_hit.x >= zone.x) and (u_hit._xscale > 0))) {
f_FlipChar(u_hit);
}
} else {
u_hit.explosion = true;
u_hit.punch_function(u_hit);
}
u_hit.speed_toss_y = -(random(15) + 25);
u_hit.speed_toss_x = random(16) + 1;
f_FX(u_hit.x, u_hit.body._y + u_hit.y, int(u_hit.y) + 7, "impact1");
f_CheckHold(u_hit);
f_CallJuggle1(u_hit);
}
}
}
return(return_val);
}
function f_Explosion(zone) {
var u_impact = false;
i = 1;
while (i <= total_kids) {
var u_hit = this["kid" + i];
if (u_hit.alive) {
if (f_ExplosionCheckHit(zone, u_hit)) {
u_impact = true;
}
}
i++;
}
i = 1;
while (i <= total_objects) {
var u_hit = this["object_pt" + i];
if (u_hit.active) {
if (f_ExplosionCheckHit(zone, u_hit)) {
u_impact = true;
}
}
i++;
}
u_hit = dude1;
if (Math.abs(u_hit.y - zone.y) < 30) {
if (Math.abs(zone.x - u_hit.x) < 150) {
if (u_hit.health > 0) {
u_impact = true;
u_hit.onfire = 2;
f_Damage(u_hit, 4);
if (((u_hit.x < zone.x) and (u_hit._xscale < 0)) or ((u_hit.x >= zone.x) and (u_hit._xscale > 0))) {
f_FlipChar(u_hit);
}
f_DropItem(u_hit);
u_hit.speed_toss_y = -(random(10) + 30);
u_hit.speed_toss_x = random(8) + 8;
f_FX(u_hit.x, u_hit.body._y + u_hit.y, int(u_hit.y) + 7, "impact1");
f_CallJuggle1(u_hit);
}
}
}
}
function f_ObjectSettings(zone) {
zone.onfire = 1;
}
function f_KidSettings(zone) {
zone.nohit = false;
zone.falling = false;
zone.onground = false;
zone.onfire = 1;
zone.bounces = 0;
zone.toss_clock = 0;
zone.root = true;
if (zone.health <= 0) {
s_Ground3.start(0, 0);
zone.gotoAndStop("hitground1");
}
}
function f_Juggle1Setup(u_kid) {
if (u_kid.item != null) {
u_kid.item.gotoAndStop("stand");
u_kid.item.owner = null;
u_kid.item = null;
}
u_kid.nohit = true;
u_kid.bounces = 0;
}
function f_CallJuggle1(u_kid) {
f_Juggle1Setup(u_kid);
u_kid.gotoAndStop("juggle1");
}
function f_Collide(zone) {
if (zone.collide.body._y >= -10) {
if (zone.collide.grab) {
f_FlipSame(zone.collide, zone);
zone.collide.speed_toss_y = -6;
zone.collide.speed_toss_x = (-random(6)) + 10;
f_CallJuggle1(zone.collide);
f_PunchSound();
f_FX(zone.x, zone.body._y + zone.y, int(zone.y) + 15, "impact1");
} else if (zone.collide.punch) {
zone.collide.punch_function(zone.collide);
} else {
f_PunchSound();
f_FX(zone.x, zone.body._y + zone.y, int(zone.y) + 15, "impact1");
}
}
}
function f_KidToss(zone) {
if (zone == dude1) {
zone.collide = null;
if (zone._xscale > 0) {
f_MoveChar(zone, false, -zone.speed_toss_x);
} else {
f_MoveChar(zone, false, zone.speed_toss_x);
}
if (zone.bounds) {
f_FlipChar(zone);
}
} else {
if (zone._xscale > 0) {
f_MoveKid(zone, false, -zone.speed_toss_x);
} else {
f_MoveKid(zone, false, zone.speed_toss_x);
}
if (zone.bounds) {
f_FlipChar(zone);
}
}
if (zone.hitwall) {
f_Collide(zone);
zone.hitwall = false;
f_FlipChar(zone);
f_Damage(zone, 5);
zone.speed_toss_x = zone.speed_toss_x * 0.5;
}
zone.body._y = zone.body._y + zone.speed_toss_y;
zone.toss_clock++;
if (zone.onfire == 2) {
if ((zone.toss_clock % 2) == 0) {
var u_scale = (random(20) + 80);
f_FX((zone.x + random(20)) - 10, ((zone.body._y + zone.y) + random(20)) - 40, zone.y - 1, "fire1", u_scale, u_scale);
}
} else if (zone.onfire == 3) {
if ((zone.toss_clock % 2) == 0) {
var u_scale = (random(20) + 120);
f_FX((zone.x + random(20)) - 10, ((zone.body._y + zone.y) + random(20)) - 40, zone.y - 1, "ragesmoke", u_scale, u_scale);
}
}
if (zone.weight > 0) {
zone.body.body._rotation = zone.body.body._rotation - Math.abs(zone.speed_toss_y);
} else {
zone.body.body._rotation = zone.body.body._rotation + Math.abs(zone.speed_toss_y);
}
f_KidHitKids(zone);
zone.speed_toss_y = zone.speed_toss_y + (gravity + zone.gravity);
if (zone.speed_toss_y > 0) {
zone.falling = true;
} else {
zone.falling = false;
}
if (zone.body._y > 0) {
zone.body._y = 0;
zone.shadow_pt._xscale = 100;
zone.shadow_pt._yscale = 100;
if (zone.explode) {
f_RemoveChar(zone.shadow_pt);
s_explosion6.start(0, 0);
f_Explosion(zone);
zone.active = false;
zone.grab = false;
zone.punch = false;
f_StaticRange();
f_SpawnMask(zone);
zone.gotoAndStop("explode");
} else {
zone.bounces++;
if (zone.bounces == 1) {
f_FX(zone.x, zone.y + 10, int(zone.y) + 1, "dust1", zone._xscale);
if (zone != dude1) {
if (zone.speed_toss_y > 40) {
f_Damage(zone, 7);
} else if (zone.speed_toss_x > 15) {
f_Damage(zone, 7);
}
}
}
if (zone.speed_toss_y > 10) {
if (zone.speed_toss_y > 40) {
s_Ground3.start(0, 0);
f_FX(zone.x, zone.y, 1, "shockwave", u_temp._xscale);
} else if (zone.speed_toss_y > 20) {
s_Ground4.start(0, 0);
} else {
s_Ground5.start(0, 0);
}
zone.speed_toss_y = int(zone.speed_toss_y * -0.35);
if ((zone.bounces % 2) == 0) {
var current_rotation = zone.body.body._rotation;
zone.gotoAndStop("bounce2");
zone.body.body._rotation = current_rotation;
} else {
var current_rotation = zone.body.body._rotation;
zone.gotoAndStop("bounce1");
zone.body.body._rotation = current_rotation;
}
} else {
s_Ground6.start(0, 0);
zone.nohit = true;
zone.bounces = 0;
f_FX(zone.x, zone.y + 10, int(zone.y) + 1, "dust1", zone._xscale);
zone.gotoAndStop("hitground1");
}
}
} else {
var shadow_size = (100 + (zone.body._y * 0.25));
if (shadow_size < 10) {
shadow_size = 10;
}
zone.shadow_pt._xscale = shadow_size;
zone.shadow_pt._yscale = shadow_size;
}
}
function f_KidHitKids(zone) {
if ((zone.speed_toss_y > 40) or (zone.speed_toss_x > 14)) {
if (zone.body._y > -150) {
var u_impact = false;
i = 1;
while (i <= total_kids) {
var u_temp = this["kid" + i];
if (((!u_temp.nohit) and (u_temp != zone)) and u_temp.alive) {
if ((zone == dude1) and u_temp.atv) {
} else if (Math.abs(u_temp.y - zone.y) < 15) {
if (Math.abs(u_temp.x - zone.x) < 40) {
f_Damage(zone, 1);
f_Damage(u_temp, 3);
u_impact = true;
f_FlipSame(u_temp, zone);
u_temp.speed_toss_y = -(random(10) + 10);
u_temp.speed_toss_x = zone.speed_toss_x * 0.75;
f_CheckHold(u_temp);
f_CallJuggle1(u_temp);
u_temp.body._y = -50;
}
}
}
i++;
}
if (zone.weight > 0) {
var u_temp = dude1;
if ((!u_temp.nohit) and (u_temp != zone)) {
if (Math.abs(u_temp.y - zone.y) < 15) {
if (Math.abs(u_temp.x - zone.x) < 40) {
u_impact = true;
f_FlipSame(u_temp, zone);
u_temp.speed_toss_y = -(random(10) + 10);
u_temp.speed_toss_x = zone.speed_toss_x * 0.75;
f_DropItem(u_temp);
f_CallJuggle1(u_temp);
u_temp.body._y = -50;
}
}
}
}
if (u_impact) {
f_PunchSound();
f_FX(zone.x, zone.body._y + zone.y, int(zone.y) + 15, "impact1");
}
}
}
}
function f_CreateFX() {
i = 1;
while (i <= total_fx) {
var u_FXName = ("fx" + i);
fx_dm_current = fx_dm_current + 1;
var fx_depth_mod = (fx_dm_current + fx_dm_default);
var fx_current_depth = f_DepthVal(fx_depth_mod, 0);
attachMovie("fx", u_FXName, fx_current_depth);
var u_FX = this["fx" + i];
u_FX.depth_mod = fx_depth_mod;
i++;
}
}
function f_FX(fx_x, fx_y, fx_depth, fx_type, fx_xscale, fx_yscale) {
var u_FX = this["fx" + current_fx];
u_FX._x = fx_x;
u_FX._y = fx_y;
if (fx_xscale != undefined) {
u_FX._xscale = fx_xscale;
} else {
u_FX._xscale = 100;
}
if (fx_yscale != undefined) {
u_FX._yscale = fx_yscale;
} else {
u_FX._yscale = 100;
}
f_Depth(u_FX, fx_depth);
u_FX.gotoAndStop(fx_type);
u_FX.x = fx_x;
u_FX.y = fx_depth;
f_SpawnMask(u_FX);
current_fx++;
if (current_fx > total_fx) {
current_fx = 1;
}
return(u_FX);
}
function f_KidThrownFierce(zone) {
u_temp = zone.grab_pointer;
f_FlipInverse(u_temp, zone);
if (zone._xscale > 0) {
f_MoveKid(u_temp, false, 50);
} else {
f_MoveKid(u_temp, false, -50);
}
u_temp.y = zone.y + 1;
u_temp._y = u_temp.y;
if (Key.isDown(38)) {
u_temp.speed_toss_y = -40;
u_temp.speed_toss_x = 2;
} else {
u_temp.speed_toss_y = -16;
u_temp.speed_toss_x = 20;
}
f_CallJuggle1(u_temp);
u_temp.body._y = (zone.y - 50) - u_temp.y;
f_ClearGrabPointer(zone);
}
function f_KidThrown(zone) {
u_temp = zone.grab_pointer;
f_FlipInverse(u_temp, zone);
if (zone._xscale > 0) {
f_MoveKid(u_temp, false, 70);
var u_dust = (zone.x + 100);
} else {
f_MoveKid(u_temp, false, -70);
var u_dust = (zone.x - 100);
}
u_temp._x = u_temp.x;
u_temp.y = zone.y + 1;
u_temp._y = u_temp.y;
u_temp.speed_toss_y = 60;
u_temp.speed_toss_x = 10;
f_CallJuggle1(u_temp);
u_temp.body._y = (zone.y - 25) - u_temp.y;
f_FX(u_temp.x, zone.y + 15, int(zone.y) + 15, "impact3", -u_temp._xscale);
f_FX(u_dust, zone.y + 15, int(zone.y) + 14, "blood1", -u_temp._xscale);
f_ClearGrabPointer(zone);
}
function f_KidHeadbutted(zone) {
f_Damage(zone.grab_pointer, zone.punch_pow_low);
if (zone.grab_counter > 3) {
u_temp = zone.grab_pointer;
f_FlipInverse(u_temp, zone);
if (zone._xscale > 0) {
u_temp.x = zone.x + 50;
} else {
u_temp.x = zone.x - 50;
}
u_temp._x = u_temp.x;
u_temp.y = zone.y + 1;
u_temp._y = u_temp.y;
u_temp.speed_toss_y = -2;
u_temp.speed_toss_x = 20;
f_CallJuggle1(u_temp);
u_temp.body._y = (zone.y - 50) - u_temp.y;
f_ClearGrabPointer(zone);
}
}
function f_GrabSpark(zone) {
if (zone._xscale > 0) {
var x = (zone.x + 50);
} else {
var x = (zone.x - 50);
}
if ((zone.grab_counter == 1) or (zone.grab_counter == 3)) {
f_PunchSound();
if (zone.rage >= zone.rage_goal) {
var impact_anim = "rageimpact";
} else {
var impact_anim = "impact2";
}
f_FX(x, zone.y - 80, int(zone.y) + 10, impact_anim);
} else if (zone.grab_counter == 2) {
f_PunchSound();
if (zone.rage >= zone.rage_goal) {
var impact_anim = "rageimpact";
} else {
var impact_anim = "impact1";
}
f_FX(x, zone.y - 80, int(zone.y) + 10, impact_anim);
f_FX(x, zone.y - 80, int(zone.y) + 9, "blood1");
} else {
f_HardPunchSound();
if (zone.rage >= zone.rage_goal) {
var impact_anim = "rageimpact";
} else {
var impact_anim = "impact3";
}
f_FX(x, zone.y - 80, int(zone.y) + 10, impact_anim);
f_FX(x, zone.y - 80, int(zone.y) + 9, "blood2");
}
}
function f_ThrowItem(zone) {
var u_thrown = false;
if (Key.isDown(zone.button_punch1)) {
if (!zone.punched) {
zone.punched = true;
u_thrown = true;
u_temp = zone.grab_pointer;
u_temp.speed_toss_y = -4;
u_temp.speed_toss_x = 15;
f_CallJuggle1(u_temp);
u_temp.body._y = (zone.y - 150) - u_temp.y;
f_ClearGrabPointer(zone);
f_ClearGrabPointer(zone);
f_DashReset(zone);
zone.gotoAndStop("throw_item");
}
} else {
zone.punched = false;
}
if (Key.isDown(zone.button_punch2)) {
if ((!zone.punched2) and (!u_thrown)) {
zone.punched2 = true;
u_temp = zone.grab_pointer;
if (Key.isDown(zone.button_up)) {
u_temp.speed_toss_y = -(26 + random(5));
u_temp.speed_toss_x = 2 + random(3);
} else {
u_temp.speed_toss_y = -9;
u_temp.speed_toss_x = 17;
}
f_CallJuggle1(u_temp);
u_temp.body._y = (zone.y - 150) - u_temp.y;
f_ClearGrabPointer(zone);
f_ClearGrabPointer(zone);
f_DashReset(zone);
s_swing1.start(0, 0);
zone.gotoAndStop("throw_item");
}
} else {
zone.punched2 = false;
}
}
function f_Throw(zone) {
if (Key.isDown(zone.button_punch1)) {
if (!zone.punched) {
if (Key.isDown(zone.button_left) or Key.isDown(zone.button_right)) {
f_SoundSwing(2);
zone.grab_pointer.gotoAndStop("thrown");
f_SetXY(zone.grab_pointer, zone.x, zone.grab_pointer.y);
zone.gotoAndStop("throw");
return(undefined);
}
zone.grab_counter++;
if ((zone.grab_counter == 1) or (zone.grab_counter == 3)) {
zone.grab_pointer.gotoAndStop("grabhit1");
zone.gotoAndStop("grabhit1");
} else {
zone.grab_pointer.gotoAndStop("grabhit2");
zone.gotoAndStop("grabhit2");
}
}
} else {
zone.punched = false;
}
if (Key.isDown(zone.button_punch2)) {
if (!zone.punched2) {
if ((Key.isDown(zone.button_left) or Key.isDown(zone.button_right)) or Key.isDown(zone.button_up)) {
f_SoundSwing(4);
zone.grab_pointer.gotoAndStop("thrown2");
f_SetXY(zone.grab_pointer, zone.x, zone.grab_pointer.y);
zone.gotoAndStop("throw2");
} else {
zone.grab_counter++;
if ((zone.grab_counter == 1) or (zone.grab_counter == 3)) {
zone.grab_pointer.gotoAndStop("grabhit1");
zone.gotoAndStop("grabhit1");
} else {
zone.grab_pointer.gotoAndStop("grabhit2");
zone.gotoAndStop("grabhit2");
}
}
}
} else {
zone.punched2 = false;
}
}
function f_SkeletonRip(zone) {
f_KidDie(zone.grab_pointer);
f_ClearGrabPointer(zone);
}
function f_KidReset(zone) {
f_MoveKid(zone, false, 10000);
}
function f_KidGrabbed(u_dude) {
if (u_dude.grab_pointer != undefined) {
f_FlipInverse(u_dude.grab_pointer, u_dude);
if (u_dude._xscale > 0) {
u_dude.grab_pointer.x = u_dude.x + u_dude.grab_pointer.distance;
} else {
u_dude.grab_pointer.x = u_dude.x - u_dude.grab_pointer.distance;
}
u_dude.grab_pointer.y = u_dude.y + 3;
f_SetXY(u_dude.grab_pointer, u_dude.grab_pointer.x, u_dude.grab_pointer.y);
f_ShareMask(u_dude, u_dude.grab_pointer);
}
}
function f_Grab(zone) {
var u_impact = false;
var return_val = false;
if (zone.item == null) {
i = 1;
while (i <= total_kids) {
var u_temp = this["kid" + i];
if (((!u_temp.nohit) and u_temp.alive) and u_temp.grab) {
if (Math.abs(u_temp.y - zone.y) < 10) {
if (Math.abs(u_temp.x - zone.x) < 30) {
if (!u_temp.atv) {
if (zone.dashing) {
u_impact = true;
f_FlipInverse(u_temp, zone);
u_temp.speed_toss_y = -12;
u_temp.speed_toss_x = 8;
f_Damage(u_temp, zone.punch_pow_low);
f_CallJuggle1(u_temp);
u_temp.body._y = (zone.y - 50) - u_temp.y;
} else {
zone.grab_pointer = u_temp;
zone.grab_pointer.distance = 55;
zone.grab_counter = 0;
f_KidGrabbed(zone);
if (u_temp.item != null) {
u_temp.item.gotoAndStop("stand");
u_temp.item.owner = null;
u_temp.item = null;
}
u_temp.gotoAndStop("grabbed");
i = total_kids + 1;
return_val = true;
zone.gotoAndStop("grab");
}
}
}
}
}
i++;
}
if (u_impact) {
f_PunchSound();
if (zone.rage >= zone.rage_goal) {
var impact_anim = "rageimpact";
} else {
var impact_anim = "impact3";
}
f_FX(zone.x, zone.y - 50, int(zone.y) + 30, impact_anim);
}
}
return(return_val);
}
function f_SoundSwing(power) {
this["s_Swing" + ((random(3) + power) - 1)].start(0, 0);
}
function f_PunchSound() {
this["s_Punch" + (random(3) + 1)].start(0, 0);
}
function f_HardPunchSound() {
this["s_HardPunch" + (random(3) + 1)].start(0, 0);
}
function f_UppercutHit(u_kid, u_y) {
u_kid.speed_toss_y = -(random(10) + 20);
u_kid.speed_toss_x = 0;
f_CallJuggle1(u_kid);
u_kid.body._y = u_y - u_kid.y;
}
function f_PunchHit(zone) {
var x1 = zone.x;
var y1 = zone.y;
u_point.x = 0;
u_point.y = 0;
zone.body.punch_pt.localToGlobal(u_point);
var x2 = (u_point.x - game_x);
var y2 = (u_point.y - game_y);
var hit_impact = false;
var hit_x;
var hit_y = 0;
i = 1;
while (i <= total_kids) {
var u_temp = this["kid" + i];
if (u_temp.alive) {
if (Math.abs(u_temp.y - y1) < 20) {
if ((((u_temp.x > x1) and (u_temp.x < x2)) or ((u_temp.x > x2) and (u_temp.x < x1))) or (zone.stomping and (Math.abs(u_temp.x - zone.x) < 40))) {
if (((!u_temp.nohit) or zone.hitnohit) or (zone.stomping and u_temp.onground)) {
hit_impact = true;
if (zone.rage >= zone.rage_goal) {
u_temp.onfire = 3;
}
if (u_temp.y > hit_y) {
hit_x = u_temp.x;
hit_y = u_temp.y;
}
if ((x2 > x1) and (u_temp._xscale > 0)) {
f_FlipChar(u_temp);
} else if ((x2 < x1) and (u_temp._xscale < 0)) {
f_FlipChar(u_temp);
}
if (zone.stomping and u_temp.onground) {
u_temp.speed_toss_y = 20;
u_temp.speed_toss_x = random(6) + 7;
f_CallJuggle1(u_temp);
f_Damage(u_temp, zone.punch_pow_low);
} else if (zone.punch_group == 1) {
if (zone.punch_num == 1) {
u_temp.gotoAndStop("hit1");
u_temp.body.gotoAndPlay(1);
f_Damage(u_temp, zone.punch_pow_low);
} else if (zone.punch_num == 2) {
u_temp.gotoAndStop("hit2");
u_temp.body.gotoAndPlay(1);
f_Damage(u_temp, zone.punch_pow_low);
} else if (zone.punch_num == 3) {
u_temp.gotoAndStop("hit3");
u_temp.body.gotoAndPlay(1);
f_Damage(u_temp, zone.punch_pow_low);
} else if (zone.punch_num == 4) {
u_temp.speed_toss_y = -9;
u_temp.speed_toss_x = 4;
f_CallJuggle1(u_temp);
u_temp.body._y = y2 - u_temp.y;
f_Damage(u_temp, zone.punch_pow_medium);
}
} else if (zone.punch_group == 2) {
if (zone.punch_num == 1) {
u_temp.gotoAndStop("hit1");
u_temp.body.gotoAndPlay(1);
f_Damage(u_temp, zone.punch_pow_medium);
} else if (zone.punch_num == 2) {
u_temp.gotoAndStop("hit2");
u_temp.body.gotoAndPlay(1);
f_Damage(u_temp, zone.punch_pow_medium);
} else if (zone.punch_num == 3) {
u_temp.speed_toss_y = 70;
u_temp.speed_toss_x = 1;
f_CallJuggle1(u_temp);
f_Damage(u_temp, zone.punch_pow_high);
} else if (zone.punch_num == 20) {
u_temp.speed_toss_y = -16;
u_temp.speed_toss_x = 0;
f_CallJuggle1(u_temp);
u_temp.body._y = y2 - u_temp.y;
f_Damage(u_temp, zone.punch_pow_medium);
} else if (zone.punch_num == 21) {
u_temp.speed_toss_y = -14;
u_temp.speed_toss_x = 0;
f_CallJuggle1(u_temp);
u_temp.body._y = y2 - u_temp.y;
f_Damage(u_temp, zone.punch_pow_high);
} else if (zone.punch_num == 22) {
u_temp.speed_toss_y = -26;
u_temp.speed_toss_x = -8;
f_CallJuggle1(u_temp);
u_temp.body._y = y2 - u_temp.y;
f_Damage(u_temp, zone.punch_pow_high);
}
} else if (zone.punch_group == 3) {
f_UppercutHit(u_temp, y2);
f_Damage(u_temp, zone.punch_pow_low);
} else if (zone.punch_group == 4) {
if (zone.punch_num == 1) {
u_temp.speed_toss_y = -8;
u_temp.speed_toss_x = random(6) + 10;
f_CallJuggle1(u_temp);
f_Damage(u_temp, zone.punch_pow_low);
} else if (zone.punch_num == 2) {
u_temp.speed_toss_y = -26;
u_temp.speed_toss_x = 10;
f_CallJuggle1(u_temp);
f_Damage(u_temp, zone.punch_pow_low);
} else if (zone.punch_num == 3) {
u_temp.speed_toss_y = -16;
u_temp.speed_toss_x = 10;
f_CallJuggle1(u_temp);
f_Damage(u_temp, zone.punch_pow_low);
}
} else if (zone.punch_group == 5) {
u_temp.gotoAndStop("hit1");
u_temp.body.gotoAndPlay(1);
f_Damage(u_temp, zone.punch_pow_low);
} else {
zone.punch_group = 1;
zone.punch_num = 1;
u_temp.gotoAndStop("hit1");
u_temp.body.gotoAndPlay(1);
f_Damage(u_temp, zone.punch_pow_low);
}
} else if (((u_temp.body._y + u_temp.y) > y2) and (u_temp.body._y < 0)) {
if ((zone.punch_num < 3) or (zone.punch_group == 4)) {
hit_impact = true;
if (zone.rage >= zone.rage_goal) {
u_temp.onfire = 3;
}
if ((zone.punch_group < 4) or ((zone.punch_group == 4) and (zone.punch_num == 3))) {
f_Damage(u_temp, zone.punch_pow_low);
}
if (u_temp.y > hit_y) {
hit_x = u_temp.x;
hit_y = u_temp.y;
}
if ((x2 > x1) and (u_temp._xscale > 0)) {
f_FlipChar(u_temp);
} else if ((x2 < x1) and (u_temp._xscale < 0)) {
f_FlipChar(u_temp);
}
if ((zone.punch_group == 3) and (zone.punch_num == 1)) {
f_UppercutHit(u_temp, y2);
} else if (zone.punch_group == 4) {
if (zone.punch_num == 2) {
f_Damage(u_temp, int(zone.punch_pow_low / 2));
u_temp.speed_toss_y = -(random(10) + 20);
u_temp.speed_toss_x = random(6) + 7;
f_CallJuggle1(u_temp);
} else if (zone.punch_num == 3) {
u_temp.speed_toss_y = -16;
u_temp.speed_toss_x = 10;
f_CallJuggle1(u_temp);
}
} else {
u_temp.speed_toss_y = -9;
u_temp.speed_toss_x = 12;
f_CallJuggle1(u_temp);
}
}
}
}
}
}
i++;
}
i = 1;
while (i <= total_objects) {
u_temp = this["object_pt" + i];
if (u_temp.punch) {
if (Math.abs(u_temp.y - y1) < 20) {
if (((u_temp.x > x1) and (u_temp.x < x2)) or ((u_temp.x > x2) and (u_temp.x < x1))) {
if (u_temp.body._y > -150) {
if (zone.rage >= zone.rage_goal) {
u_temp.onfire = 3;
}
if (u_temp.grab) {
f_FlipInverse(u_temp, dude1);
if (zone.punch_group == 3) {
u_temp.speed_toss_y = -(random(10) + 30);
u_temp.speed_toss_x = 0;
f_CallJuggle1(u_temp);
u_temp.body._y = y2 - u_temp.y;
} else {
u_temp.speed_toss_y = -6;
u_temp.speed_toss_x = (-random(6)) + 10;
f_CallJuggle1(u_temp);
}
hit_impact = true;
if (u_temp.y > hit_y) {
hit_x = u_temp.x;
hit_y = u_temp.y;
}
} else {
u_temp.punch_function(u_temp);
}
}
}
}
}
i++;
}
if (hit_impact) {
if (zone.punch_group == 1) {
if (zone.punch_num == 1) {
f_PunchSound();
} else if (zone.punch_num == 2) {
f_PunchSound();
} else if (zone.punch_num == 3) {
f_PunchSound();
} else if (zone.punch_num == 4) {
f_HardPunchSound();
}
f_RageUp(zone, int(zone.rage_goal / 10));
} else if (zone.punch_group == 2) {
if (((zone.punch_num == 1) or (zone.punch_num == 2)) or (zone.punch_num == 3)) {
f_HardPunchSound();
} else if (((zone.punch_num == 20) or (zone.punch_num == 21)) or (zone.punch_num == 22)) {
s_Smack1.start(0, 0);
}
f_RageUp(zone, int(zone.rage_goal / 10));
} else if (zone.punch_group == 3) {
f_HardPunchSound();
f_RageUp(zone, int(zone.rage_goal / 10));
} else {
f_PunchSound();
f_RageUp(zone, int(zone.rage_goal / 60));
}
if (y1 > hit_y) {
hit_y = y1;
}
var u_depth = (hit_y + 2);
if ((zone.punch_group == 1) and (zone.punch_num == 3)) {
if (zone.rage >= zone.rage_goal) {
var impact_anim = "rageimpact";
} else {
var impact_anim = "impact2";
}
f_FX(hit_x, y2, u_depth, impact_anim);
} else if (((zone.punch_group == 1) and (zone.punch_num == 4)) or ((zone.punch_group == 2) and (zone.punch_num == 22))) {
if (zone.rage >= zone.rage_goal) {
var impact_anim = "rageimpact";
} else {
var impact_anim = "impact3";
}
f_FX(hit_x, y2, u_depth, impact_anim);
} else {
if (zone.rage >= zone.rage_goal) {
var impact_anim = "rageimpact";
} else {
var impact_anim = "impact1";
}
f_FX(hit_x, y2, u_depth, impact_anim);
}
if ((zone.punch_group == 2) and (zone.punch_num >= 20)) {
f_FX(hit_x, y2, u_depth - 1, "blood1");
}
} else if ((zone.punch_num == 2) and (zone.punch_group < 3)) {
zone.punch_num = 0;
}
return(hit_impact);
}
function f_RageUp(zone, u_rageup) {
zone.rage = zone.rage + u_rageup;
if (zone.rage >= zone.rage_goal) {
if ((zone.rage - u_rageup) < zone.rage_goal) {
i = 1;
while (i <= total_kids) {
var u_kid = this["kid" + i];
if (u_kid.alive) {
u_kid.speed_toss_y = -(random(10) + 40);
u_kid.speed_toss_x = random(2) + 6;
f_CheckHold(u_kid);
f_CallJuggle1(u_kid);
u_kid.nohit = true;
}
i++;
}
zone.rage = zone.rage + (zone.rage_goal / 2);
f_CheckHold(zone);
f_DropItem(zone);
f_PunchReset(zone);
zone.gotoAndStop("powerup");
}
if (zone.rage > (zone.rage_goal * 2)) {
zone.rage = zone.rage_goal * 2;
}
}
}
function f_PushKid(zone, speed) {
if (!zone.nohit) {
if (zone._xscale > 0) {
f_MoveKid(zone, false, -speed);
} else {
f_MoveKid(zone, false, speed);
}
}
}
function f_Turn(zone) {
if (!zone.punching) {
if (Key.isDown(zone.button_left) and (zone._xscale > 0)) {
f_FlipChar(zone);
}
if (Key.isDown(zone.button_right) and (zone._xscale < 0)) {
f_FlipChar(zone);
}
f_KidGrabbed(zone);
}
}
function f_Walk(zone) {
zone.walking = false;
zone.dashing = false;
if (Key.isDown(zone.button_left)) {
if (zone.left_timer <= 0) {
zone.left_last2 = zone.left_timer;
zone.left_timer = 1;
} else {
zone.left_timer++;
}
} else if (zone.left_timer > 0) {
zone.left_last = zone.left_timer;
zone.left_timer = 0;
} else {
zone.left_timer--;
}
if (Key.isDown(zone.button_right)) {
if (zone.right_timer <= 0) {
zone.right_last2 = zone.right_timer;
zone.right_timer = 1;
} else {
zone.right_timer++;
}
} else if (zone.right_timer > 0) {
zone.right_last = zone.right_timer;
zone.right_timer = 0;
} else {
zone.right_timer--;
}
if ((zone.left_timer > 0) and (zone.left_timer > zone.right_timer)) {
if (zone._xscale > 0) {
f_FlipChar(zone);
}
if (zone.holding) {
var u_speed = (zone.speed_x / 2);
} else if ((zone.left_last < g_dash_timer) and (zone.left_last2 < g_dash_timer)) {
var u_speed = (zone.speed_x * 2);
zone.dashing = true;
} else {
var u_speed = zone.speed_x;
}
if (zone.rage >= zone.rage_goal) {
u_speed = u_speed * 1.5;
}
f_MoveChar(zone, false, -u_speed);
if (zone.diagonalhit) {
f_MoveChar(zone, true, -u_speed);
}
zone.walking = true;
}
if ((zone.right_timer > 0) and (zone.right_timer > zone.left_timer)) {
if (zone._xscale < 0) {
f_FlipChar(zone);
}
if (zone.holding) {
var u_speed = (zone.speed_x / 2);
} else if ((zone.right_last < g_dash_timer) and (zone.right_last2 < g_dash_timer)) {
var u_speed = (zone.speed_x * 2);
zone.dashing = true;
} else {
var u_speed = zone.speed_x;
}
if (zone.rage >= zone.rage_goal) {
u_speed = u_speed * 1.5;
}
f_MoveChar(zone, false, u_speed);
if (zone.diagonalhit) {
f_MoveChar(zone, true, u_speed);
}
zone.walking = true;
}
if (Key.isDown(zone.button_up)) {
zone.up_timer++;
} else {
zone.up_timer = 0;
}
if (Key.isDown(zone.button_down)) {
zone.down_timer++;
} else {
zone.down_timer = 0;
}
if (zone.holding) {
var u_speed = (zone.speed_y / 2);
} else {
var u_speed = zone.speed_y;
}
if ((zone.up_timer > 0) and (zone.up_timer > zone.down_timer)) {
if (zone.rage >= zone.rage_goal) {
u_speed = u_speed * 1.5;
}
f_MoveChar(zone, true, -u_speed);
if (zone.diagonalhit) {
f_MoveChar(zone, false, -u_speed);
}
zone.walking = true;
}
if ((zone.down_timer > 0) and (zone.down_timer > zone.up_timer)) {
if (zone.rage >= zone.rage_goal) {
u_speed = u_speed * 1.5;
}
f_MoveChar(zone, true, u_speed);
if (zone.diagonalhit) {
f_MoveChar(zone, false, u_speed);
}
zone.walking = true;
}
if (zone.insand) {
if (zone.walking) {
if (sandbox.sand_timer <= 0) {
sandbox.sand_timer = 5;
f_FX(zone.x, zone.y + 10, int(zone.y) + 1, "sand", zone._xscale);
}
}
}
}
function f_HoldWalk(zone) {
if (zone.hold_delay > 0) {
zone.hold_delay--;
f_Turn(zone);
} else {
zone.holding = true;
f_Walk(zone);
zone.holding = false;
f_KidGrabbed(zone);
if (zone.walking) {
zone.legs.gotoAndStop("walk");
} else {
zone.legs.gotoAndStop("stand");
}
}
}
function f_CarryStuff(zone) {
if (!pause) {
f_HoldWalk(zone);
f_ThrowItem(zone);
} else {
zone.legs.gotoAndStop("stand");
}
}
function f_CarryKid(zone) {
if (!pause) {
f_HoldWalk(zone);
f_Throw(zone);
} else {
zone.legs.gotoAndStop("stand");
}
}
function f_ToggleQuality() {
if (key.isDown(81)) {
if (pressed_q == false) {
pressed_q = true;
if (quality_low) {
quality_low = false;
_quality = "medium";
} else {
quality_low = true;
_quality = "low";
}
}
} else {
pressed_q = false;
}
}
function f_Character(zone) {
f_ToggleQuality();
if (!pause) {
if (!f_Grab(zone)) {
f_Walk(zone);
if (zone.dashing) {
zone.dashing_timer++;
if ((zone.dashing_timer == 1) or ((zone.dashing_timer % 10) == 0)) {
if (zone.insand) {
f_FX(zone.x, zone.y + 10, int(zone.y) + 1, "sand", zone._xscale);
} else {
f_FX(zone.x, zone.y + 10, int(zone.y) + 1, "dust1", zone._xscale);
}
}
zone.gotoAndStop("dash");
} else {
zone.dashing_timer = 0;
if (zone.walking) {
zone.gotoAndStop("walk");
} else {
zone.gotoAndStop("stand");
}
}
f_Punch(zone);
}
} else {
zone.gotoAndStop("stand");
}
}
function f_OnScreen(u_char) {
var u_char_x = (u_char.x + game_x);
var u_char_w = u_char._width;
if (((u_char_x + u_char_w) > 0) and ((u_char_x - u_char_w) < screen_width)) {
return(true);
}
return(false);
}
function f_AutoTake(zone, u_object, vert, speed) {
var u_take = false;
if (u_object.autotake) {
u_take = true;
u_get = false;
if (zone.grab_pointer == undefined) {
if (zone.item == null) {
if (!zone.nohit) {
if (zone.health > 0) {
if (zone.body._y >= 0) {
u_object.owner = zone;
zone.item = u_object;
u_object.autoaction(u_object);
u_get = true;
}
}
}
}
}
if (u_get == false) {
if (!vert) {
if ((speed > 0) and (u_object._xscale > 0)) {
f_FlipChar(u_object);
} else if ((speed < 0) and (u_object._xscale < 0)) {
f_FlipChar(u_object);
}
}
if (!f_MoveKid(u_object, vert, speed)) {
f_MoveKid(u_object, vert, -speed);
}
if (u_object._xscale > 0) {
u_object.body.body._rotation = u_object.body.body._rotation + speed;
} else {
u_object.body.body._rotation = u_object.body.body._rotation - speed;
}
if (!vert) {
u_object.speed_toss_x = Math.abs(speed);
u_object.gotoAndStop("hitground1");
}
}
}
return(u_take);
}
function f_Mask(zone) {
var mask_h = zone.mask_pt.range._height;
var mask_w = zone.mask_pt.range._width;
var u_expand_x = (100 / Math.abs(zone._xscale));
var u_expand_y = (100 / zone._yscale);
u_expand_x = 1;
u_expand_y = 1;
zone.mask._yscale = 100 * u_expand_y;
if (zone._xscale < 0) {
zone.mask._xscale = -(100 * u_expand_x);
zone.mask._x = (zone.x - zone.mask_pt.x) * u_expand_x;
zone.mask._y = (zone.mask_pt.y - zone._y) * u_expand_y;
} else if (zone._xscale > 0) {
zone.mask._xscale = 100 * u_expand_x;
zone.mask._x = (zone.mask_pt.x - zone.x) * u_expand_x;
zone.mask._y = (zone.mask_pt.y - zone._y) * u_expand_y;
}
}
function f_CheckMask(zone, u_compare) {
if (zone.mask_pt == u_compare) {
zone.mask_pt = undefined;
zone.mask.gotoAndStop(1);
}
}
function f_SpawnMask(zone) {
var z = statics_min;
while (z <= total_statics) {
var u_object = this["static" + z];
if (u_object.mask > 0) {
var x = (u_object.x + u_object.zone._x);
var y = (u_object.y + u_object.zone._y);
var h = (u_object.zone._height * (u_object._yscale / 100));
var w = ((u_object.zone._width / 2) * (Math.abs(u_object._xscale) / 100));
if (Math.abs(zone._x - x) < w) {
if ((zone._y > (y - h)) and (zone._y < y)) {
var x1 = (x + u_object.left._x);
var x2 = (x + u_object.right._x);
var w = Math.abs(x1 - x2);
h = Math.abs(u_object.left._y - u_object.right._y);
var percent = (1 - ((y - zone.y) / h));
var temp_x = (x1 + (w * percent));
if (zone.x > temp_x) {
zone.mask_pt = u_object;
zone.mask.gotoAndStop(u_object.mask);
f_Mask(zone);
}
}
}
}
z++;
}
}
function f_HitWallGroup(zone, vert, speed, group_total, group_min, group_name) {
var return_val = false;
i = group_min;
while (i <= group_total) {
var u_object = this[group_name + i];
var xscale_val = (Math.abs(u_object._xscale) / 100);
var yscale_val = (Math.abs(u_object._yscale) / 100);
var x = (u_object.x + u_object.zone._x);
var y = ((u_object.y + u_object.zone._y) + 2);
var h = (u_object.zone._height * yscale_val);
var w = ((u_object.zone._width / 2) * xscale_val);
if (vert) {
if (Math.abs(zone.x - x) < w) {
if (u_object.diagonal) {
if (((zone.y + speed) >= (y - h)) and ((zone.y + speed) <= (y + 150))) {
var percent = ((u_object.x2 - zone.x) / u_object.w);
var temp_y = (y - (u_object.h * percent));
if (u_object.mask > 0) {
if (zone.y < temp_y) {
zone.mask_pt = u_object;
zone.mask.gotoAndStop(u_object.mask);
} else {
f_CheckMask(zone, u_object);
}
}
if (Math.abs(zone.x - x) < (u_object.w / 2)) {
if ((((speed > 0) and (zone.y <= temp_y)) and ((zone.y + speed) >= (temp_y - u_object.h2))) or (((speed < 0) and (zone.y >= temp_y)) and ((zone.y + speed) <= (temp_y + u_object.h2)))) {
if (speed > 0) {
zone.diagonal_speed = (temp_y - u_object.h2) - zone.y;
} else {
zone.diagonal_speed = (temp_y + u_object.h2) - zone.y;
}
zone.collide = u_object;
zone.diagonalhit = true;
return_val = true;
}
}
} else {
f_CheckMask(zone, u_object);
}
} else if ((zone.y < (y - h)) and ((zone.y + speed) >= (y - h))) {
if (f_AutoTake(zone, u_object, vert, speed) == false) {
return_val = true;
}
} else if ((zone.y > y) and ((zone.y + speed) <= y)) {
if (f_AutoTake(zone, u_object, vert, speed) == false) {
return_val = true;
}
}
} else {
f_CheckMask(zone, u_object);
}
} else if ((zone.y > (y - h)) and (zone.y < y)) {
if (u_object.diagonal) {
if (((zone.x + speed) > (x - w)) and ((zone.x + speed) < (x + w))) {
var percent = (1 - ((y - zone.y) / u_object.h));
var temp_x = (u_object.x1 + (u_object.w * percent));
if (u_object.mask > 0) {
if (zone.x > temp_x) {
zone.mask_pt = u_object;
zone.mask.gotoAndStop(u_object.mask);
} else {
f_CheckMask(zone, u_object);
}
}
if ((zone.y > (y - u_object.h)) and (zone.y < y)) {
if ((((speed > 0) and (zone.x <= temp_x)) and ((zone.x + speed) >= (temp_x - u_object.w2))) or (((speed < 0) and (zone.x >= temp_x)) and ((zone.x + speed) <= (temp_x + u_object.w2)))) {
if (zone.body._y > (u_object.zone._y - u_object.zone._height)) {
if (speed > 0) {
zone.diagonal_speed = (temp_x - u_object.w2) - zone.x;
} else {
zone.diagonal_speed = (temp_x + u_object.w2) - zone.x;
}
zone.collide = u_object;
zone.diagonalhit = true;
return_val = true;
}
}
}
} else {
f_CheckMask(zone, u_object);
}
} else if (((zone.x < (x - w)) and ((zone.x + speed) >= (x - w))) or ((zone.x > (x + w)) and ((zone.x + speed) <= (x + w)))) {
if ((zone.body._y + zone.y) > (y - (u_object._height + 20))) {
if (f_AutoTake(zone, u_object, vert, speed) == false) {
zone.collide = u_object;
return_val = true;
}
}
}
} else {
f_CheckMask(zone, u_object);
}
i++;
}
return(return_val);
}
function f_HitWall(zone, vert, speed) {
var return_val = false;
if (f_HitWallGroup(zone, vert, speed, total_objects, 1, "object_pt")) {
return_val = true;
} else if (f_HitWallGroup(zone, vert, speed, total_statics, statics_min, "static")) {
return_val = true;
}
zone.hitwall = return_val;
return(return_val);
}
function f_CheckSpawnObject(zone, u_object) {
var x = (u_object.x + u_object.zone._x);
var y = (u_object.y + u_object.zone._y);
var h = (u_object.zone._height * (u_object._yscale / 100));
var w = ((u_object.zone._width / 2) * (u_object._xscale / 100));
if (Math.abs(zone.x - x) < w) {
if (zone.y < y) {
if (zone.y > (y - h)) {
f_SetXY(zone, zone.x, y + 2);
}
}
}
}
function f_CheckSpawn(zone) {
i = 1;
while (i <= total_objects) {
var u_object = this["object_pt" + i];
f_CheckSpawnObject(zone, u_object);
i++;
}
i = statics_min;
while (i <= total_statics) {
var u_object = this["static" + i];
f_CheckSpawnObject(zone, u_object);
i++;
}
}
function f_SoccerBall(zone) {
if (zone.moving) {
zone.moving = false;
zone.body.gotoAndStop("roll");
} else {
zone.body.gotoAndStop("idle");
}
}
function f_ShareMask(u_source, u_slave) {
u_slave.mask_pt = u_source.mask_pt;
if (u_slave.mask_pt == undefined) {
u_slave.mask.gotoAndStop(1);
} else {
u_slave.mask.gotoAndStop(u_slave.mask_pt.mask);
}
f_Mask(u_slave);
}
function f_MoveItem(u_owner, u_item, u_speed) {
if (u_owner._xscale > 0) {
u_item.x = u_owner.x + 25;
} else {
u_item.x = u_owner.x - 25;
}
f_FlipSame(u_item, u_owner);
u_item.y = u_owner.y + 1;
u_item._x = u_item.x;
u_item._y = u_item.y;
u_item.shadow_pt._x = u_item.x;
u_item.shadow_pt._y = u_item.y;
u_item.moving = true;
f_Depth(u_item, u_item.y);
f_ShareMask(u_owner, u_item);
}
function f_MoveChar(zone, vert, speed) {
zone.bounds = false;
zone.diagonalhit = false;
if (vert) {
if ((zone.y + speed) > limit_bottomright.y) {
speed = (limit_bottomright.y - zone.y) + speed;
} else if ((zone.y + speed) < limit_topleft.y) {
speed = (limit_topleft.y - zone.y) + speed;
}
if (f_HitWall(zone, vert, speed)) {
if (zone.diagonalhit) {
speed = zone.diagonal_speed;
} else {
speed = 0;
}
}
zone.y = zone.y + speed;
f_Depth(zone, zone.y);
} else {
if (f_HitWall(zone, vert, speed)) {
if (zone.diagonalhit) {
speed = zone.diagonal_speed;
} else {
speed = 0;
}
}
if (((zone.x + speed) < limit_bottomright.x) and ((zone.x + speed) > limit_topleft.x)) {
zone.x = zone.x + speed;
} else {
zone.bounds = true;
speed = 0;
}
}
zone._x = zone.x;
zone._y = zone.y;
if (zone.mask_pt != undefined) {
f_Mask(zone);
}
if (zone.item) {
f_MoveItem(zone, zone.item, speed);
}
if (zone.scroller) {
if (vert) {
if (((speed > 0) and ((zone.y + game_y) < (screen_height / 2))) or ((speed < 0) and ((zone.y + game_y) > (screen_height / 2)))) {
speed = speed * (((screen_height / 2) - Math.abs((zone.y + game_y) - (screen_height / 2))) / (screen_height / 2));
}
} else if (((speed > 0) and ((zone.x + game_x) < (screen_width / 2))) or ((speed < 0) and ((zone.x + game_x) > (screen_width / 2)))) {
speed = speed * (((screen_width / 2) - Math.abs((zone.x + game_x) - (screen_width / 2))) / (screen_width / 2));
}
f_Scroll(speed, vert);
}
zone.shadow_pt._x = zone.x;
zone.shadow_pt._y = zone.y;
}
function f_DepthVal(u_depth_mod, u_depth) {
return((u_depth * 1000) + u_depth_mod);
}
function f_Depth(u_char, u_depth) {
if (u_char.depth_mod == undefined) {
trace("NO DEPTH: " + u_char);
}
u_char.current_depth = (u_depth * 1000) + u_char.depth_mod;
u_char.swapDepths(u_char.current_depth);
}
function f_CompareDepths_Set(u_char, u_compare) {
if (u_char != u_compare) {
if (u_char.current_depth == u_compare.current_depth) {
trace((u_char + " has overwritten ") + u_compare);
}
}
}
function f_SetDepths() {
if (dude1 != null) {
f_Depth(dude1, dude1.y);
}
i = 1;
while (i <= total_kids) {
var u_kid = this["kid" + i];
if (u_kid != null) {
f_Depth(u_kid, u_kid.y);
}
i++;
}
i = 1;
while (i <= object_index) {
var u_object = this["object" + i];
u_object.x = u_object._x;
u_object.y = u_object._y;
u_object.depth_y = u_object.y;
f_Depth(u_object, u_object.y);
i++;
}
i = 1;
while (i <= static_index) {
var static_new = this["static" + i];
static_dm_current = static_dm_current + 2;
static_new.depth_mod = static_dm_current + static_dm_default;
static_new.depth_y = static_new.y;
f_Depth(static_new, static_new.y);
i++;
}
}
function f_SpawnKids() {
i = 1;
while (i <= total_kids) {
u_temp = this["kid" + i];
if (u_temp.alive == false) {
u_temp.x = ((screen_width - _x) + 100) + random(150);
u_temp._x = u_temp.x;
u_temp.y = limit_topleft.y + random(screen_height);
u_temp._y = u_temp.y;
f_KidInit(u_temp);
u_temp.shadow_pt._x = u_temp.x;
u_temp.shadow_pt._y = u_temp.y;
u_temp.shadow_pt.gotoAndStop("on");
u_temp.gotoAndStop("walk");
}
i++;
}
}
function f_Scroll(speed, vert) {
if (vert) {
if (((limit_topleft.y - speed) + game_y) < (screen_height - 100)) {
if (((limit_bottomright.y - speed) + game_y) > screen_height) {
game_y = game_y - speed;
_y = game_y;
bg0._y = bg0._y - (speed * 0.25);
bg1._y = bg1._y + (speed / 2);
bg2._y = bg2._y + (speed * 0.65);
}
}
} else if (((limit_topleft.x - speed) + game_x) < 0) {
if (((limit_bottomright.x - speed) + game_x) > screen_width) {
game_x = game_x - speed;
_x = game_x;
bg0._x = bg0._x - (speed * 0.25);
bg1._x = bg1._x + (speed / 2);
bg2._x = bg2._x + (speed * 0.65);
} else if (checkpoint_x != limit_bottomright.x) {
checkpoint_x = limit_bottomright.x;
f_StaticRange();
if (checkpoint == 1) {
} else if (checkpoint == 2) {
f_KidGroup3();
} else if (checkpoint == 3) {
} else if (checkpoint == 5) {
f_KidGroup4();
} else if (checkpoint == 6) {
f_StopCarScene1();
} else if (checkpoint == 7) {
f_KidGroup7();
bballhoop.gotoAndStop("off");
} else if (checkpoint == 8) {
f_KidGroup11();
} else if (checkpoint == 9) {
f_KidGroup9();
} else if (checkpoint == 10) {
}
}
if ((limit_topleft.x + game_x) < 0) {
if (limit_topleft.x < new_limit_topleft) {
limit_topleft.x = -game_x;
limit_topleft._x = limit_topleft.x;
}
}
}
}
function f_ComboTimer() {
combo_timer--;
if (combo_timer <= 0) {
combo_count = 0;
}
}
function f_UpdateHUD(u_hud, u_zone) {
u_hud.root = true;
u_hud.shirt_type = u_zone.shirt_type;
u_hud.hat_type = u_zone.hat_type;
u_hud.skin_type = u_zone.skin_type;
u_hud.gotoAndPlay(2);
u_hud.name.gotoAndStop(u_zone.name);
f_Skin(u_hud.name.kid.kid);
}
function f_Damage(damage_zone, damage_pow) {
damage_zone.health = damage_zone.health - damage_pow;
f_DropItem(damage_zone);
combo_count++;
combo_timer = 30;
if (combo_count >= 3) {
_root.combo_counter.gotoAndPlay(2);
}
if (damage_zone.lifebar) {
if (damage_zone.atv) {
damage_zone.s_atvengine.stop();
s_explosion6.start(0, 0);
f_FX(damage_zone.x, damage_zone.y, int(damage_zone.y) + 2, "atv_explode", damage_zone._xscale, damage_zone._yscale);
damage_zone.atv = false;
f_KidSettings(damage_zone);
damage_zone.onfire = 2;
damage_zone.shadow_pt._xscale = 100;
damage_zone.speed_toss_y = -(random(10) + 20);
damage_zone.speed_toss_x = random(2) + 1;
f_CheckHold(damage_zone);
f_CallJuggle1(damage_zone);
}
var u_found = false;
j = 1;
while (j <= total_huds) {
var u_hud = _root["hud" + j];
if ((u_hud.kid_pointer == damage_zone) and (!u_hud.ready)) {
f_UpdateHUD(u_hud, damage_zone);
u_found = true;
j = total_huds + 1;
}
j++;
}
if (!u_found) {
j = 1;
while (j <= total_huds) {
var u_hud = _root["hud" + j];
if (u_hud.ready) {
u_hud.ready = false;
u_hud.kid_pointer = damage_zone;
f_UpdateHUD(u_hud, damage_zone);
j = total_huds + 1;
}
j++;
}
}
} else if (damage_zone == dude1) {
f_RageDown(int(dude1.rage_goal / 2));
_root.hud.f_HealthBar();
}
}
function f_KidInit(zone) {
zone.lifebar = true;
zone.health_max = 60;
zone.health = zone.health_max;
zone.alive = true;
zone.speed_x = random(5) + 5;
zone.speed_y = random(3) + 3;
zone.weight = 0;
if (zone._xscale < 0) {
zone.speed_x = zone.speed_x * -1;
}
if (random(2) == 1) {
zone.speed_y = zone.speed_y * -1;
}
zone.speed_x = zone.speed_x * 0.5;
zone.speed_y = zone.speed_y * 0.5;
zone.grab = true;
}
function f_MoveKid(zone, vert, speed) {
return_val = true;
zone.bounds = false;
if (f_HitWall(zone, vert, speed)) {
speed = 0;
return_val = false;
}
if (vert) {
zone.y = zone.y + speed;
f_Depth(zone, zone.y);
zone._y = zone.y;
} else {
zone.x = zone.x + speed;
zone._x = zone.x;
if (zone.x > limit_bottomright.x) {
if (speed > 0) {
zone.bounds = true;
}
} else if (zone.x < limit_topleft.x) {
if (speed < 0) {
zone.bounds = true;
}
}
}
if (zone.mask_pt != undefined) {
f_Mask(zone);
}
zone.shadow_pt._x = zone.x;
zone.shadow_pt._y = zone.y;
if (zone.item) {
f_MoveItem(zone, zone.item, speed);
}
return(return_val);
}
function f_KidRun(zone) {
if ((zone.speed_x > 0) and (zone._xscale < 0)) {
f_FlipChar(zone);
} else if ((zone.speed_x < 0) and (zone._xscale > 0)) {
f_FlipChar(zone);
}
if (!f_MoveKid(zone, false, zone.speed_x)) {
zone.speed_x = zone.speed_x * -1;
}
if (!f_MoveKid(zone, true, zone.speed_y)) {
zone.speed_y = zone.speed_y * -1;
}
if ((zone.y > limit_bottomright.y) and (zone.speed_y > 0)) {
zone.speed_y = zone.speed_y * -1;
} else if ((zone.y < limit_topleft.y) and (zone.speed_y < 0)) {
zone.speed_y = zone.speed_y * -1;
}
if ((zone.x > limit_bottomright.x) and (zone.speed_x > 0)) {
zone.speed_x = zone.speed_x * -1;
} else if ((zone.x < limit_topleft.x) and (zone.speed_x < 0)) {
zone.speed_x = zone.speed_x * -1;
}
}
function f_DashReset(zone) {
zone.right_last = 100;
zone.right_last2 = 0;
zone.left_last = 100;
zone.left_last2 = 0;
}
function f_PunchReset(zone) {
zone.punch_group = 0;
zone.punch_num = 0;
zone.punching = false;
}
function f_GrabReset(zone) {
u_ClearPointer.grab_pointer = undefined;
}
function f_StandSettings(zone) {
f_PunchReset(zone);
f_GrabReset(zone);
zone.nohit = false;
zone.onfire = 1;
zone.onground = false;
f_CheckDead(zone);
}
function f_StompRange(zone) {
var close_punch = false;
var close_stomp = false;
i = 1;
while (i <= total_kids) {
var u_temp = this["kid" + i];
if (u_temp.alive) {
if (Math.abs(u_temp.x - zone.x) < 40) {
if (Math.abs(u_temp.y - zone.y) < 20) {
if (u_temp.onground) {
close_stomp = true;
} else {
close_punch = true;
i = total_kids + 1;
}
}
}
}
i++;
}
if ((close_punch == false) and close_stomp) {
return(true);
}
return(false);
}
function f_PickupRange(zone) {
var pickup = false;
i = 1;
while (i <= total_objects) {
u_temp = this["object_pt" + i];
if (u_temp.grab) {
if (Math.abs(u_temp.y - zone.y) < 20) {
if (Math.abs(u_temp.x - zone.x) < ((u_temp._width / 2) + 20)) {
if ((((zone.x < u_temp.x) and (zone._xscale > 0)) or ((zone.x > u_temp.x) and (zone._xscale < 0))) or (Math.abs(u_temp.x - zone.x) < ((u_temp._width / 2) - 10))) {
if (u_temp.body._y >= -10) {
pickup = true;
zone.punched = true;
i = total_objects + 1;
zone.grab_pointer = u_temp;
zone.grab_pointer.distance = 0;
zone.grab_counter = 0;
f_KidGrabbed(zone);
u_temp.gotoAndStop("pickup_item");
zone.gotoAndStop("pickup_item");
}
}
}
}
}
i++;
}
return(pickup);
}
function f_Punch(zone) {
if (zone.item != null) {
var u_release = false;
if (Key.isDown(zone.button_punch1)) {
zone.punched = true;
u_release = true;
} else if (Key.isDown(zone.button_punch2)) {
zone.punched2 = true;
u_release = true;
}
if (u_release) {
f_SoundSwing(4);
if (zone.item == soccerball) {
zone.punch_group = 1;
zone.punch_num = 4;
var u_action = 1;
} else if (Key.isDown(zone.button_up)) {
zone.punch_group = 3;
zone.punch_num = 1;
var u_action = 3;
} else {
zone.punch_group = 1;
zone.punch_num = 3;
var u_action = 2;
}
f_FlipInverse(zone.item, zone);
f_SetXY(zone.item, zone.x, zone.item.y);
if (u_action == 3) {
f_HoopShot(zone.item);
} else {
zone.item.speed_toss_y = -3;
zone.item.speed_toss_x = 30;
zone.item.gotoAndStop("release");
}
zone.item.owner = null;
zone.item = null;
if (u_action == 1) {
f_PunchSound();
zone.gotoAndStop("punch1_4");
zone.body.gotoAndPlay(4);
} else if (u_action == 2) {
zone.gotoAndStop("punch1_3");
} else if (u_action == 3) {
zone.gotoAndStop("uppercut");
}
}
} else if ((((Key.isDown(zone.button_punch1) and Key.isDown(zone.button_punch2)) and (!zone.punching)) and (!zone.punched)) and (!zone.punched2)) {
zone.punched = true;
zone.punched2 = true;
zone.punching = true;
f_SoundSwing(3);
zone.punch_group = 3;
zone.punch_num = 1;
zone.gotoAndStop("uppercut");
} else {
if (Key.isDown(zone.button_punch1)) {
if ((!zone.punched) and (!zone.punching)) {
zone.punched = true;
zone.punching = true;
if (f_PickupRange(zone)) {
return(undefined);
}
if (zone.dashing) {
if (zone._xscale > 0) {
zone.speed_slam = 15;
} else {
zone.speed_slam = -15;
}
zone.punch_group = 4;
zone.punch_num = 1;
f_DashReset(zone);
zone.dashing = false;
zone.gotoAndStop("dashslam");
} else if (f_StompRange(zone) and (zone.body._y > -3)) {
zone.gotoAndStop("stomp");
} else if ((zone.punch_group == 5) and (zone.punch_num == 1)) {
zone.punch_num = 2;
zone.gotoAndStop("knife2");
} else if (zone.punch_group == 1) {
if (zone.punch_num == 1) {
f_SoundSwing(4);
zone.punch_num = 2;
zone.gotoAndStop("punch1_2");
} else if (zone.punch_num == 2) {
f_SoundSwing(4);
zone.punch_num = 3;
zone.gotoAndStop("punch1_3");
} else if (zone.punch_num == 3) {
f_SoundSwing(2);
zone.punch_num = 4;
zone.gotoAndStop("punch1_4");
} else {
f_SoundSwing(5);
zone.punch_num = 1;
zone.gotoAndStop("punch1_1");
}
} else {
f_SoundSwing(5);
zone.punch_group = 1;
zone.punch_num = 1;
zone.gotoAndStop("punch1_1");
}
}
} else {
zone.punched = false;
}
if (Key.isDown(zone.button_punch2)) {
if ((!zone.punched2) and (!zone.punching)) {
zone.punched2 = true;
zone.punching = true;
if (zone.dashing) {
if (zone._xscale > 0) {
zone.speed_slam = 18;
} else {
zone.speed_slam = -18;
}
zone.punch_group = 4;
zone.punch_num = 2;
f_DashReset(zone);
zone.dashing = false;
zone.gotoAndStop("dashpunch");
} else if (f_StompRange(zone)) {
zone.gotoAndStop("stomp");
} else if ((zone.punch_group == 1) and (zone.punch_num == 1)) {
zone.punch_group = 5;
zone.punch_num = 1;
zone.gotoAndStop("knife1");
} else if ((zone.punch_group == 1) and (zone.punch_num == 4)) {
zone.punch_group = 2;
zone.punch_num = 20;
zone.gotoAndStop("jugglehit1");
} else if ((zone.punch_group == 4) and (zone.punch_num == 2)) {
zone.punch_num = 3;
zone.gotoAndStop("crazy");
zone.body.gotoAndPlay(1);
} else if ((zone.punch_group == 4) and (zone.punch_num == 3)) {
zone.gotoAndStop("crazy");
zone.body.speed_y = zone.body.speed_y - 20;
zone.body.gotoAndPlay("hitloop");
} else {
zone.punch_group = 2;
if (zone.punch_num == 1) {
zone.punch_num = 2;
zone.gotoAndStop("punch2_2");
} else if (zone.punch_num == 2) {
zone.punch_num = 3;
zone.gotoAndStop("punch2_3");
} else if (zone.punch_num == 20) {
zone.punch_num = 21;
zone.gotoAndStop("jugglehit2");
} else if (zone.punch_num == 21) {
zone.punch_num = 22;
zone.gotoAndStop("jugglehit3");
} else {
zone.punch_num = 1;
zone.gotoAndStop("punch2_1");
}
}
}
} else {
zone.punched2 = false;
}
}
}
function f_Boss1Scroll(zone) {
var u_distance = ((zone.x + _x) - 440);
if (u_distance > 10) {
var u_speed = (1 + (u_distance * 0.05));
f_Scroll(u_speed, false);
}
}
function f_Boss1Scroll2(zone) {
var u_distance = ((zone.x + _x) - 220);
if (u_distance < -10) {
var u_speed = (1 + (u_distance * 0.05));
f_Scroll(u_speed, false);
}
}
function f_Boss1ElboHit(zone) {
if (Math.abs(zone.x - dude1.x) < 101) {
if (Math.abs(zone.y - dude1.y) <= 10) {
if (dude1.health > 0) {
u_impact = true;
f_Damage(dude1, 10);
if (((dude1.x < zone.x) and (dude1._xscale < 0)) or ((dude1.x >= zone.x) and (dude1._xscale > 0))) {
f_FlipChar(dude1);
}
f_DropItem(dude1);
dude1.speed_toss_x = 25;
dude1.speed_toss_y = -40;
f_FX(dude1.x, dude1.body._y + dude1.y, int(dude1.y) + 7, "impact1");
f_CallJuggle1(dude1);
s_Punch3.start(0, 0);
}
}
}
}
function f_Boss1PunchHit(zone) {
if (Math.abs(zone.x - dude1.x) < 101) {
if (Math.abs(zone.y - dude1.y) <= 10) {
if (dude1.health > 0) {
u_impact = true;
f_Damage(dude1, 10);
if (((dude1.x < zone.x) and (dude1._xscale < 0)) or ((dude1.x >= zone.x) and (dude1._xscale > 0))) {
f_FlipChar(dude1);
}
f_DropItem(dude1);
dude1.speed_toss_y = -(random(10) + 10);
dude1.speed_toss_x = random(8) + 12;
f_FX(dude1.x, dude1.body._y + dude1.y, int(dude1.y) + 7, "impact1");
f_CallJuggle1(dude1);
s_Punch3.start(0, 0);
}
}
}
}
function f_Boss1UppercutHit(zone) {
if (Math.abs(zone.x - dude1.x) <= 61) {
if (Math.abs(zone.y - dude1.y) <= 10) {
if (dude1.health > 0) {
u_impact = true;
f_Damage(dude1, 10);
if (((dude1.x < zone.x) and (dude1._xscale < 0)) or ((dude1.x >= zone.x) and (dude1._xscale > 0))) {
f_FlipChar(dude1);
}
f_DropItem(dude1);
dude1.speed_toss_y = -(random(10) + 30);
dude1.speed_toss_x = random(2) + 0;
f_FX(dude1.x, dude1.body._y + dude1.y, int(dude1.y) + 7, "impact1");
f_CallJuggle1(dude1);
s_Punch3.start(0, 0);
}
}
}
}
function f_Boss1Run(zone) {
if (zone.success_y) {
if ((zone.x < dude1.x) and (zone._xscale < 0)) {
f_FlipChar(zone);
} else if ((zone.x > dude1.x) and (zone._xscale > 0)) {
f_FlipChar(zone);
}
}
if ((zone.y >= dude1.y) and (zone.y < (dude1.y + 5))) {
if (Math.abs(zone.x - dude1.x) < 91) {
zone.standing = true;
zone.walking = false;
if (dude1.body._y > -50) {
if (!dude1.nohit) {
var took_punch = false;
if (zone.punch_clock < 60) {
zone.punch_count++;
if (zone.punch_count > 3) {
zone.punch_count = 0;
took_punch = true;
zone.standing = false;
zone.gotoAndStop("punch4");
}
} else {
zone.punch_count = 0;
}
zone.punch_clock = 0;
if (took_punch == false) {
if (Math.abs(zone.x - dude1.x) < 61) {
zone.standing = false;
zone.gotoAndStop("punch2");
} else if (zone.lastpunch == 1) {
zone.lastpunch = 3;
zone.standing = false;
zone.gotoAndStop("punch3");
} else {
zone.lastpunch = 1;
zone.standing = false;
zone.gotoAndStop("punch1");
}
}
}
}
} else {
zone.standing = false;
zone.walking = true;
}
} else {
zone.standing = false;
zone.walking = true;
}
if (zone.standing and (!zone.nohit)) {
if (Math.abs(zone.x - dude1.x) < 41) {
zone.walking = true;
} else {
zone.gotoAndStop("stand");
}
}
if (zone.walking and (!zone.nohit)) {
if (zone.success_x) {
if ((zone.y < dude1.y) and zone.north) {
zone.north = false;
} else if ((zone.y > dude1.y) and (!zone.north)) {
zone.north = true;
}
}
if (zone.success_y == false) {
if (zone._xscale > 0) {
var target_x = (dude1.x + 300);
} else {
var target_x = (dude1.x - 300);
}
} else if (zone.x < dude1.x) {
var target_x = (dude1.x - 90);
} else {
var target_x = (dude1.x + 90);
}
if (zone.success_x == false) {
if (zone.north) {
var target_y = (dude1.y - 300);
} else {
var target_y = (dude1.y + 300);
}
} else {
var target_y = (dude1.y + 2);
}
var dir = f_rad2deg(Math.atan2(zone.y - target_y, zone.x - target_x));
var temp_speed_x = (-4 * Math.cos(PI * dir));
var temp_speed_y = (-4 * Math.sin(PI * dir));
zone.last_x = temp_speed_x;
zone.last_y = temp_speed_y;
zone.success_x = f_MoveKid(zone, false, temp_speed_x);
zone.success_y = f_MoveKid(zone, true, temp_speed_y);
if (!zone.success_x) {
zone.success_x = f_MoveKid(zone, false, temp_speed_x);
if (!zone.success_y) {
zone.success_y = f_MoveKid(zone, true, temp_speed_y);
}
}
zone.gotoAndStop("walk");
}
}
function f_Boss1PunchClock(zone) {
zone.punch_clock++;
}
function f_SpawnBoss1() {
total_kids++;
var kid_name = ("kid" + total_kids);
var shadow_name = ("shadow" + current_shadow);
var kid_y = (dude1.y + (total_kids * 5));
kid_dm_current = kid_dm_current + 2;
var kid_depth_mod = (kid_dm_current + kid_dm_default);
attachMovie("boss1", kid_name, f_DepthVal(kid_depth_mod, kid_y));
attachMovie("shadow", shadow_name, total_kids - 200);
var kid_new = this["kid" + total_kids];
kid_new.depth_mod = kid_depth_mod;
kid_new.x = limit_bottomright.x - 250;
kid_new.y = limit_topleft.y + 100;
kid_new._x = kid_new.x;
kid_new._y = kid_new.y;
kid_new.shadow_pt = this["shadow" + current_shadow];
current_shadow++;
kid_new.shadow_pt._x = kid_new.x;
kid_new.shadow_pt._y = kid_new.y;
f_Depth(kid_new, kid_new.y);
kid_new.health_max = 20000;
kid_new.health = kid_new.health_max;
kid_new.alive = true;
kid_new.speed_x = 3;
kid_new.speed_y = 2;
kid_new.name = 100;
kid_new.weight = 10;
kid_new.grab = false;
kid_new.lifebar = true;
kid_new.punch_clock = 0;
kid_new.punch_count = 0;
f_FlipChar(kid_new);
f_KidSettings(kid_new);
kid_new.gotoAndStop("intro");
kid_new.nohit = true;
f_SetXY(boss1fodder, kid_new.x - 100, kid_new.y);
f_FlipChar(boss1fodder);
boss1fodder.nohit = true;
}
function f_Boss1Intro(zone) {
if ((zone._x + _x) < 770) {
pause = true;
f_MusicHeavy();
zone.body.gotoAndPlay("intro");
}
}
function f_MusicHeavy() {
s_Music1.setVolume(0);
s_Music2.setVolume(master_volume);
}
function f_MusicLight() {
s_Music1.setVolume(master_volume);
s_Music2.setVolume(0);
}
function f_SunchipsMusic() {
s_Music1.stop();
s_SunchipsMusic.start(0, 2000);
}
function f_SpawnSunChips() {
total_kids++;
var kid_name = ("kid" + total_kids);
var shadow_name = ("shadow" + current_shadow);
var kid_y = (dude1.y + (total_kids * 5));
kid_dm_current = kid_dm_current + 2;
var kid_depth_mod = (kid_dm_current + kid_dm_default);
attachMovie("sunchips", kid_name, f_DepthVal(kid_depth_mod, kid_y));
attachMovie("shadow", shadow_name, total_kids - 200);
var kid_new = this["kid" + total_kids];
kid_new.depth_mod = kid_depth_mod;
kid_new.x = limit_bottomright.x - 300;
kid_new.y = limit_topleft.y + 200;
kid_new._x = kid_new.x;
kid_new._y = kid_new.y;
kid_new.shadow_pt = this["shadow" + current_shadow];
current_shadow++;
kid_new.shadow_pt._x = kid_new.x;
kid_new.shadow_pt._y = kid_new.y;
f_Depth(kid_new, kid_new.y);
kid_new.health_max = 800;
kid_new.health = kid_new.health_max;
kid_new.alive = true;
kid_new.speed_x = 3;
kid_new.speed_y = 2;
kid_new.name = 101;
kid_new.weight = 10;
kid_new.grab = false;
kid_new.lifebar = true;
kid_new.punch_clock = 0;
kid_new.punch_count = 0;
kid_new.ammo = 2;
f_FlipChar(kid_new);
f_KidSettings(kid_new);
kid_new.gotoAndStop("intro");
}
function f_DartAction(zone) {
if (zone.hit) {
zone._x = zone._x + zone.speed_x;
zone.shadow_pt._x = zone._x;
zone.dart._y = zone.dart._y + zone.speed_y;
zone.speed_y = zone.speed_y + 1;
zone.dart._rotation = zone.dart._rotation + zone.rotation_speed;
var shadow_size = (90 + (zone.dart._y / 2));
if (shadow_size < 10) {
shadow_size = 10;
}
zone.shadow_pt._xscale = shadow_size;
zone.shadow_pt._yscale = shadow_size;
if (zone.dart._y > 0) {
if (zone.bounces > 1) {
zone.bounces--;
zone.dart._y = 0;
zone.speed_y = -4 * zone.bounces;
} else {
f_RemoveChar(zone.shadow_pt);
zone.gotoAndStop("remove");
}
}
} else {
zone._x = zone._x + zone.speed_x;
zone.shadow_pt._x = zone._x;
zone.dart._y = zone.dart._y + zone.speed_y;
zone.speed_y = zone.speed_y + 0.2;
zone.dart._rotation = zone.dart._rotation + 0.2;
var shadow_size = (90 + (zone.dart._y / 2));
if (shadow_size < 10) {
shadow_size = 10;
}
zone.shadow_pt._xscale = shadow_size;
zone.shadow_pt._yscale = shadow_size;
if (zone.dart._y > 0) {
zone.hit = true;
zone.bounces = 3;
zone.speed_y = -6;
zone.rotation_speed = 10;
} else if (Math.abs(zone._y - dude1._y) < 5) {
if (Math.abs(zone._x - dude1._x) < 40) {
f_Damage(dude1, 5);
f_DropItem(dude1);
if (dude1.health <= 0) {
dude1.speed_toss_y = -(random(6) + 6);
dude1.speed_toss_x = random(8) + 6;
f_CallJuggle1(dude1);
} else {
dude1.gotoAndStop("flinch1");
}
f_FX(zone._x, zone.dart._y + zone._y, int(dude1.y) + 1, "impact1");
s_Smack1.start(0, 0);
zone.hit = true;
zone.bounces = 3;
zone.speed_x = zone.speed_x * -0.25;
zone.speed_y = -9;
zone.rotation_speed = -10;
}
}
}
}
function f_JamesShoot(zone) {
if (zone._xscale > 0) {
var u_x = (zone.x + 50);
} else {
var u_x = (zone.x - 50);
}
var dart = f_FX(u_x, zone.y, zone.y - 1, "dart", zone._xscale, zone._yscale);
var shadow_name = ("shadow" + current_shadow);
attachMovie("shadow", shadow_name, -1000 - current_shadow);
dart.shadow_pt = this["shadow" + current_shadow];
dart.shadow_pt._x = dart._x;
dart.shadow_pt._y = dart._y;
current_shadow++;
s_DartShoot.start(0, 0);
}
function f_JamesRun(zone) {
if (zone.success_y) {
if ((zone.x < dude1.x) and (zone._xscale < 0)) {
f_FlipChar(zone);
} else if ((zone.x > dude1.x) and (zone._xscale > 0)) {
f_FlipChar(zone);
}
}
if (zone.success_x) {
if ((zone.y < dude1.y) and zone.north) {
zone.north = false;
} else if ((zone.y > dude1.y) and (!zone.north)) {
zone.north = true;
}
}
if (zone.success_y == false) {
if (zone._xscale > 0) {
var target_x = (dude1.x + 600);
} else {
var target_x = (dude1.x - 600);
}
} else if (((zone.x <= dude1.x) and ((dude1.x + game_x) > 310)) or ((zone.x > dude1.x) and ((dude1.x + game_x) > (screen_width - 310)))) {
var target_x = (dude1.x - 300);
} else {
var target_x = (dude1.x + 300);
}
if (zone.success_x == false) {
if (zone.north) {
var target_y = (dude1.y - 600);
} else {
var target_y = (dude1.y + 600);
}
} else {
var target_y = (dude1.y + 2);
}
var dir = f_rad2deg(Math.atan2(zone.y - target_y, zone.x - target_x));
var temp_speed_x = (-4 * Math.cos(PI * dir));
var temp_speed_y = (-4 * Math.sin(PI * dir));
zone.last_x = temp_speed_x;
zone.last_y = temp_speed_y;
zone.success_x = f_MoveKid(zone, false, temp_speed_x);
zone.success_y = f_MoveKid(zone, true, temp_speed_y);
if (!zone.success_x) {
zone.success_x = f_MoveKid(zone, false, temp_speed_x);
if (!zone.success_y) {
zone.success_y = f_MoveKid(zone, true, temp_speed_y);
}
}
if (Math.abs(zone.y - dude1.y) < 5) {
if (dude1.body._y > -50) {
if (Math.abs(zone.x - dude1.x) > 180) {
if (((zone.x + game_x) > 0) and ((zone.x + game_x) < (screen_width - 0))) {
s_Swing6.start(0, 0);
zone.gotoAndStop("jamesshoot");
}
}
}
}
}
function f_CheckGunHit(zone, u_char) {
if (u_char.health > 0) {
if (Math.abs(zone.y - u_char.y) < 10) {
if (((zone._xscale > 0) and (zone.x < u_char.x)) or ((zone._xscale < 0) and (zone.x > u_char.x))) {
if (u_char.health > 0) {
f_Damage(u_char, 3);
if (((u_char.x < zone.x) and (u_char._xscale < 0)) or ((u_char.x >= zone.x) and (u_char._xscale > 0))) {
f_FlipChar(u_char);
}
u_char.speed_toss_y = -(random(6) + 5);
u_char.speed_toss_x = random(8) + 12;
u_blood = "blood" + (random(2) + 1);
f_FX(u_char.x, u_char.body._y + u_char.y, int(u_char.y) + 7, u_blood);
f_CheckHold(u_char);
f_DropItem(u_char);
f_CallJuggle1(u_char);
}
}
}
}
}
function f_GunShot(zone) {
f_CheckGunHit(zone, dude1);
var j = 1;
while (j <= total_kids) {
u_char = this["kid" + j];
f_CheckGunHit(zone, u_char);
j++;
}
}
function f_SunChipsFrenzied(zone) {
zone.speed_toss_y = -(random(10) + 30);
zone.speed_toss_x = random(2) + 0;
f_CallJuggle1(zone);
zone.body._y = zone.body._y - 150;
}
function f_SunChipsSlide(zone) {
if (zone._xscale > 0) {
f_MoveKid(zone, false, zone.slide_speed);
} else {
f_MoveKid(zone, false, -zone.slide_speed);
}
if (((zone.slide_speed % 4) == 0) and (zone.slide_speed > 3)) {
f_FX(zone.x, zone.y + 10, int(zone.y) + 1, "dust1", zone._xscale);
}
zone.slide_speed--;
if (zone.slide_speed < 0) {
zone.slide_speed = 0;
}
}
function f_SunChipsAttack(zone) {
var return_val = false;
zone.uppercut_timer--;
zone.crazy_timer--;
zone.shot_timer--;
if ((zone.crazy_timer <= 0) and (zone.health < (zone.health_max * 0.4))) {
zone.nohit = true;
f_SunChipsGoCrazy(zone);
} else if (zone.uppercut_timer <= 0) {
if (Math.abs(zone.y - dude1.y) < 10) {
if (dude1.body._y > -50) {
var u_distance = Math.abs(zone.x - dude1.x);
if (u_distance < 200) {
return_val = true;
zone.uppercut_timer = 60;
zone.slide_speed = int(u_distance / 8);
zone.gotoAndStop("punch2");
}
}
}
}
return(return_val);
}
function f_SunChipsCrazy(zone) {
if ((zone.crazy_speed_x > 0) and (zone._xscale < 0)) {
f_FlipChar(zone);
} else if ((zone.crazy_speed_x < 0) and (zone._xscale > 0)) {
f_FlipChar(zone);
}
if (!f_MoveKid(zone, false, zone.crazy_speed_x)) {
zone.crazy_speed_x = zone.crazy_speed_x * -1;
}
if (!f_MoveKid(zone, true, zone.crazy_speed_y)) {
zone.crazy_speed_y = zone.crazy_speed_y * -1;
}
if (((zone.y + _y) > 480) and (zone.crazy_speed_y > 0)) {
zone.crazy_speed_y = zone.crazy_speed_y * -1;
} else if ((((zone.y + _y) < 0) or (zone.y < limit_topleft.y)) and (zone.crazy_speed_y < 0)) {
zone.crazy_speed_y = zone.crazy_speed_y * -1;
}
if (((zone.x + _x) > 640) and (zone.crazy_speed_x > 0)) {
zone.crazy_speed_x = zone.crazy_speed_x * -1;
} else if (((zone.x + _x) < 0) and (zone.crazy_speed_x < 0)) {
zone.crazy_speed_x = zone.crazy_speed_x * -1;
}
zone.crazy_timer--;
if ((zone.crazy_timer % 6) == 0) {
SunChipsFrame++;
if (SunChipsFrame > 12) {
SunChipsFrame = 1;
}
f_FX(zone.x, zone.y, int(zone.y) - 1, "sunchips");
}
if (zone.crazy_timer <= 0) {
f_SunChipsStopCrazy(zone);
} else if (Math.abs(zone.y - dude1.y) < 16) {
if (dude1.body._y > -50) {
if (Math.abs(zone.x - dude1.x) < 120) {
f_DropItem(dude1);
f_MoveChar(dude1, false, zone.x - dude1.x);
f_MoveChar(dude1, true, (zone.y - dude1.y) + 1);
dude1.gotoAndStop("frenzied");
zone.gotoAndStop("frenzy");
}
}
}
}
function f_SunChipsStopCrazy(zone) {
zone.nohit = false;
zone.crazy_timer = 200;
zone.gotoAndStop("walk");
}
function f_SunChipsGoCrazy(zone) {
zone.SunChipsFrame = 0;
zone.crazy_speed_x = 10;
zone.crazy_speed_y = 6;
zone.crazy_timer = 120;
zone.gotoAndStop("crazy");
}
function f_SunChipsUp(zone) {
var return_val = false;
if (Math.abs(zone.y - dude1.y) < 20) {
if (dude1.body._y > -50) {
if (Math.abs(zone.x - dude1.x) < 71) {
if (dude1.health > 0) {
s_HardPunch1.start(0, 0);
f_Damage(dude1, 5);
dude1.speed_toss_y = -(random(10) + 30);
dude1.speed_toss_x = random(2) + 2;
f_FX(dude1.x, dude1.body._y + dude1.y, int(dude1.y) + 7, "impact1");
f_CheckHold(dude1);
f_CallJuggle1(dude1);
zone.gotoAndStop("punch1");
}
}
}
}
return(return_val);
}
function f_GameOver() {
var j = 1;
while (j <= total_kids) {
u_char = this["kid" + j];
f_RemoveChar(u_char);
j++;
}
f_RemoveChar(dude1);
_root.gotoAndStop("gameover");
}
function f_Ending() {
var j = 1;
while (j <= total_kids) {
u_char = this["kid" + j];
f_RemoveChar(u_char);
j++;
}
f_RemoveChar(dude1);
_root.gotoAndStop("ending");
}
function f_CheckDead(zone) {
if (zone.health <= 0) {
var j = 1;
while (j <= total_kids) {
u_char = this["kid" + j];
if (!u_char.atv) {
if (!u_char.nohit) {
u_char.gotoAndStop("wait");
}
}
j++;
}
zone.alive = false;
zone.nohit = true;
zone.gotoAndStop("die");
}
}
function f_RemoveChar(u_char) {
u_char.swapDepths(1);
removeMovieClip(u_char);
}
function f_SetPropaine(zone) {
zone.punch = true;
zone.grab = true;
zone.has_shadow = true;
zone.bounces = 0;
zone.weight = 3;
zone.explode = true;
zone.object_type = 5;
zone.body.gotoAndStop(5);
zone.active = true;
}
function f_SetMower(zone) {
zone.punch = true;
zone.grab = true;
zone.has_shadow = true;
zone.bounces = 0;
zone.weight = 3;
zone.explode = true;
zone.object_type = 6;
zone.body.gotoAndStop(6);
zone.active = true;
}
function f_HorseKid_OLD(u_horse) {
total_kids++;
var kid_name = ("kid" + total_kids);
var shadow_name = ("shadow" + current_shadow);
var kid_y = (u_horse.y + 1);
kid_dm_current = kid_dm_current + 2;
var kid_depth_mod = (kid_dm_current + kid_dm_default);
attachMovie("kid", kid_name, f_DepthVal(kid_depth_mod, kid_y));
attachMovie("shadow", shadow_name, total_kids - 200);
var kid_new = this["kid" + total_kids];
kid_new.depth_mod = kid_depth_mod;
kid_new.x = u_horse.x;
kid_new.y = kid_y;
kid_new._x = kid_new.x;
kid_new._y = kid_new.y;
kid_new.shadow_pt = this["shadow" + current_shadow];
current_shadow++;
kid_new.shadow_pt._x = kid_new.x;
kid_new.shadow_pt._y = kid_new.y;
f_Depth(kid_new, kid_new.y);
if ((kid_new.x > dude1.x) and (kid_new._xscale > 0)) {
f_FlipChar(kid_new);
} else if ((kid_new.x < dude1.x) and (kid_new._xscale < 0)) {
f_FlipChar(kid_new);
}
kid_new.speed_toss_y = -(random(4) + 10);
kid_new.speed_toss_x = random(4) + 20;
if (u_horse.onfire > 1) {
kid_new.onfire = u_horse.onfire;
u_horse.onfire = 1;
}
f_CallJuggle1(kid_new);
}
function f_HorseKid(u_horse) {
var u_kid = f_SpawnKid(u_horse.x, u_horse.y + 1, 10, 1, 9, color_pink);
f_KidSettings(u_kid);
if ((u_kid.x > dude1.x) and (u_kid._xscale > 0)) {
f_FlipChar(u_kid);
} else if ((u_kid.x < dude1.x) and (u_kid._xscale < 0)) {
f_FlipChar(u_kid);
}
u_kid.speed_toss_y = -(random(4) + 10);
u_kid.speed_toss_x = random(4) + 20;
if (u_horse.onfire > 1) {
u_kid.onfire = u_horse.onfire;
u_horse.onfire = 1;
}
f_CallJuggle1(u_kid);
}
function f_PunchHorse(u_horse) {
var horse_sound = (random(4) + 1);
if (horse_sound == 1) {
s_Smack1.start(0, 0);
} else if (horse_sound == 2) {
s_Smack2.start(0, 0);
} else if (horse_sound == 3) {
s_HardPunch1.start(0, 0);
} else {
s_HardPunch2.start(0, 0);
}
var fx_x = ((u_horse.x - 10) + random(20));
var fx_y = (u_horse.y - (50 + random(20)));
if (random(2) == 1) {
var impact_anim = "impact1";
} else {
var impact_anim = "impact3";
}
f_FX(fx_x, fx_y, int(u_horse.y) + 7, impact_anim);
u_horse.gotoAndStop("shake");
u_horse.body.gotoAndPlay(2);
u_horse.rider--;
if (u_horse.explosion) {
u_horse.explosion = false;
if (u_horse.rider > 0) {
u_horse.rider = 0;
u_horse.onfire = 2;
}
}
if (u_horse.rider == 0) {
u_horse.body.body.kid.gotoAndStop("blank");
f_HorseKid(u_horse);
} else if (u_horse.rider > 0) {
u_horse.body.body.kid.eye.gotoAndPlay(2);
}
}
function f_SetHorse(zone) {
zone.punch = true;
zone.grab = false;
zone.has_shadow = true;
zone.bounces = 0;
zone.weight = 2;
zone.explode = false;
zone.active = true;
zone.rider = 3;
zone.punch_function = f_PunchHorse;
}
function f_RageDown(u_down) {
dude1.rage = dude1.rage - u_down;
if (dude1.rage < dude1.rage_goal) {
if ((dude1.rage + u_down) >= dude1.rage_goal) {
dude1.rage = 0;
}
}
if (dude1.rage < 0) {
dude1.rage = 0;
}
var rage_frame = ((dude1.rage / dude1.rage_goal) * 100);
if (rage_frame < 0) {
rage_frame = 0;
} else if (rage_frame > 100) {
rage_frame = 100;
}
_root.hud.ragebar._xscale = rage_frame;
if (rage_frame == 100) {
_root.hud.ragebg.gotoAndStop(2);
if ((dude1.rage % 3) == 0) {
var u_scale = (random(40) + 100);
if (random(3) == 1) {
var u_depth_new = (dude1.y - 1);
} else {
var u_depth_new = (dude1.y + 1);
}
f_FX((dude1.x + random(40)) - 20, (dude1.y + random(80)) - 100, u_depth_new, "ragesmoke", u_scale, u_scale);
}
} else {
_root.hud.ragebg.gotoAndStop(1);
}
}
function f_Rage() {
f_RageDown(1);
}
function f_Shirt(zone) {
if (zone._parent._parent.root) {
zone.gotoAndStop(zone._parent._parent.shirt_type);
} else if (zone._parent._parent._parent.root) {
zone.gotoAndStop(zone._parent._parent._parent.shirt_type);
} else if (zone._parent._parent._parent._parent.root) {
zone.gotoAndStop(zone._parent._parent._parent._parent.shirt_type);
} else if (zone._parent.root) {
zone.gotoAndStop(zone._parent.shirt_type);
}
}
function f_Hat(zone) {
if (zone._parent._parent.root) {
zone.gotoAndStop(zone._parent._parent.hat_type);
} else if (zone._parent._parent._parent.root) {
zone.gotoAndStop(zone._parent._parent._parent.hat_type);
} else if (zone._parent._parent._parent._parent.root) {
zone.gotoAndStop(zone._parent._parent._parent._parent.hat_type);
} else if (zone._parent.root) {
zone.gotoAndStop(zone._parent.hat_type);
}
}
function f_Skin(zone) {
if (zone._parent._parent.root) {
f_ColorSwap(zone, zone._parent._parent.skin_type);
} else if (zone._parent._parent._parent.root) {
f_ColorSwap(zone, zone._parent._parent._parent.skin_type);
} else if (zone._parent._parent._parent._parent.root) {
f_ColorSwap(zone, zone._parent._parent._parent._parent.skin_type);
} else if (zone._parent.root) {
f_ColorSwap(zone, zone._parent.skin_type);
}
}
function f_ColorSwap(character, new_color) {
CharacterColor = new Color(character);
CharacterColor.setTransform(new_color);
}
function f_SpawnPlayer(u_x, u_y) {
var new_x = (u_x - game_x);
var new_y = (u_y - game_y);
attachMovie("dude", "dude1", f_DepthVal(1, new_y));
dude1.depth_mod = 2;
dude1.x = new_x;
dude1.y = new_y;
dude1._x = dude1.x;
dude1._y = dude1.y;
dude1.num = 1;
dude1.speed_x = 8;
dude1.speed_y = 5;
dude1.pusher = true;
dude1.scroller = true;
dude1.button_punch1 = 65;
dude1.button_punch2 = 83;
dude1.button_left = 37;
dude1.button_up = 38;
dude1.button_right = 39;
dude1.button_down = 40;
dude1.punch_pow_low = 10;
dude1.punch_pow_medium = 14;
dude1.punch_pow_high = 16;
dude1.punch_pow_max = 10;
dude1.weight = 5;
dude1.rage = 0;
dude1.rage_goal = 1000;
dude1.health_max = 200;
dude1.health = dude1.health_max;
f_DashReset(dude1);
f_Depth(dude1, dude1.y);
attachMovie("shadow", "shadow0", 0);
dude1.shadow_pt = shadow0;
dude1.shadow_pt._x = dude1.x;
dude1.shadow_pt._y = dude1.y;
_root.hud.kid_pointer = dude1;
_root.hud.gotoAndStop(2);
}
function f_SpawnKid(x, y, shirt, hat, name, skin) {
var kid_name = null;
var j = 1;
while (j <= total_kids) {
if (this["kid" + j] == null) {
kid_name = "kid" + j;
var this_kid = j;
j = total_kids + 1;
}
j++;
}
if (kid_name == null) {
total_kids++;
var this_kid = total_kids;
kid_name = "kid" + total_kids;
}
var shadow_name = ("shadow" + current_shadow);
var kid_y = y;
kid_dm_current = kid_dm_current + 2;
var kid_depth_mod = (kid_dm_current + kid_dm_default);
attachMovie("kid", kid_name, f_DepthVal(kid_depth_mod, kid_y));
attachMovie("shadow", shadow_name, this_kid - 200);
var kid_new = this["kid" + this_kid];
kid_new.depth_mod = kid_depth_mod;
kid_new.x = x;
kid_new.y = kid_y;
kid_new._x = kid_new.x;
kid_new._y = kid_new.y;
kid_new.shadow_pt = this["shadow" + current_shadow];
current_shadow++;
kid_new.shadow_pt._x = kid_new.x;
kid_new.shadow_pt._y = kid_new.y;
kid_new.shirt_type = shirt;
kid_new.hat_type = hat;
kid_new.skin_type = skin;
kid_new.name = name;
kid_new.item = null;
kid_new.kid_type = 1;
if ((kid_new.x > dude1.x) and (kid_new._xscale > 0)) {
f_FlipChar(kid_new);
} else if ((kid_new.x < dude1.x) and (kid_new._xscale < 0)) {
f_FlipChar(kid_new);
}
f_KidInit(kid_new);
f_Depth(kid_new, kid_new.y);
f_CheckSpawn(kid_new);
return(kid_new);
}
function f_KidGroup1() {
var spawn_y = (sandbox._y - 25);
var spawn_x = (sandbox._x - 45);
var u_kid = f_SpawnKid(spawn_x, spawn_y, 34, 14, 4, color_pink);
f_KidSettings(u_kid);
u_kid.gotoAndStop("sandbox");
if (u_kid._xscale > 0) {
f_FlipChar(u_kid);
}
kills_goal = kills_goal + 1;
}
function f_KidGroup2() {
var spawn_y = f_RandomY();
var spawn_x = ((2000 + random(200)) - game_x);
f_SpawnKid(spawn_x, spawn_y, 11, 1, 57, color_pink);
var spawn_y = f_RandomY();
var spawn_x = ((2000 + random(200)) - game_x);
if (random(2) == 1) {
boss1fodder = f_SpawnKid(spawn_x, spawn_y, 54, 1, 69, color_pink);
} else {
boss1fodder = f_SpawnKid(spawn_x, spawn_y, 15, 1, 22, color_pink);
}
boss1fodder.gotoAndStop("wait");
f_SpawnBoss1();
kills_goal = kills_goal + 4;
}
function f_KidSwing() {
var spawn_y = (swing3._y + 1);
var spawn_x = swing3._x;
var u_kid = f_SpawnKid(spawn_x, spawn_y, 19, 1, 58, color_pink);
f_KidSettings(u_kid);
u_kid.gotoAndStop("swing");
swing3.rider = u_kid;
if (u_kid._xscale < 0) {
f_FlipChar(u_kid);
}
kills_goal = kills_goal + 3;
}
function f_KidGroup3() {
var spawn_y = f_RandomY();
var spawn_x = ((700 + random(100)) - game_x);
if (random(2) == 1) {
f_SpawnKid(spawn_x, spawn_y, 3, 1, 10, color_brown);
} else {
f_SpawnKid(spawn_x, spawn_y, 49, 1, 73, color_brown);
}
var spawn_y = f_RandomY();
var spawn_x = ((700 + random(100)) - game_x);
var u_kid = f_SpawnKid(spawn_x, spawn_y, 17, 20, 68, color_pink);
u_kid.kid_type = 5;
}
function f_KidGroup4() {
var spawn_y = f_RandomY();
var spawn_x = ((700 + random(100)) - game_x);
if (random(2) == 1) {
f_SpawnKid(spawn_x, spawn_y, 20, 1, 51, color_pink);
} else {
f_SpawnKid(spawn_x, spawn_y, 24, 1, 29, color_pink);
}
var spawn_y = f_RandomY();
var spawn_x = (-400 - game_x);
f_SpawnKid(spawn_x, spawn_y, 18, 21, 20, color_pink);
var spawn_y = f_RandomY();
var spawn_x = ((700 + random(100)) - game_x);
if (random(2) == 1) {
f_SpawnKid(spawn_x, spawn_y, 16, 1, 48, color_pink);
} else {
f_SpawnKid(spawn_x, spawn_y, 28, 19, 59, color_beige);
}
var spawn_y = f_RandomY();
var spawn_x = (-300 - game_x);
var u_kid = f_SpawnKid(spawn_x, spawn_y, 7, 1, 7, color_pink);
u_kid.kid_type = 2;
u_kid.health_max = u_kid.health_max * 1.5;
u_kid.health = u_kid.health_max;
kills_goal = kills_goal + 4;
}
function f_KidGroup5() {
var u_kid;
var spawn_x = kidline._x;
var spawn_y = kidline._y;
u_kid = f_SpawnKid(spawn_x, spawn_y, 2, 13, 13, color_pink);
u_kid.gotoAndStop("wait");
u_kid._xscale = u_kid._xscale * -1;
var spawn_x = (kidline._x - 50);
var spawn_y = (kidline._y + 25);
u_kid = f_SpawnKid(spawn_x, spawn_y, 2, 13, 14, color_pink);
u_kid.gotoAndStop("wait");
u_kid._xscale = u_kid._xscale * -1;
var spawn_x = (kidline._x - 100);
var spawn_y = (kidline._y + 75);
u_kid = f_SpawnKid(spawn_x, spawn_y, 2, 13, 16, color_brown);
u_kid.gotoAndStop("wait");
u_kid._xscale = u_kid._xscale * -1;
var spawn_x = (kidline._x - 90);
var spawn_y = (kidline._y - 35);
u_kid = f_SpawnKid(spawn_x, spawn_y, 2, 13, 15, color_pink);
u_kid.gotoAndStop("wait");
u_kid._xscale = u_kid._xscale * -1;
kills_goal = kills_goal + 4;
}
function f_KidGroup6() {
var spawn_y = f_RandomY();
var spawn_x = ((1600 + random(100)) - game_x);
f_SpawnKid(spawn_x, spawn_y, 29, 4, 8, color_brown);
var spawn_y = f_RandomY();
var spawn_x = ((1500 + random(100)) - game_x);
if (random(2) == 1) {
f_SpawnKid(spawn_x, spawn_y, 33, 8, 27, color_brown);
} else {
f_SpawnKid(spawn_x, spawn_y, 50, 25, 19, color_pink);
}
var spawn_y = f_RandomY();
var spawn_x = ((1600 + random(100)) - game_x);
u_temp = f_SpawnKid(spawn_x, spawn_y, 31, 3, 60, color_pink);
f_SetXY(bball, limit_bottomright.x - 1, limit_bottomright.y + 100);
f_BallInPlay(bball);
f_StaticRange();
u_temp.item = bball;
bball.owner = u_temp;
kills_goal = kills_goal + 3;
}
function f_KidGroupSoccer() {
var spawn_y = (soccerfield._y - 75);
var spawn_x = (soccerfield._x + 100);
var u_kid1 = f_SpawnKid(spawn_x, spawn_y, 9, 3, 66, color_latin);
u_kid1.kid_type = 3;
u_kid1.gotoAndStop("wait");
u_kid1.target_ball = soccerball;
u_kid1.target_goal = goal_left;
u_kid1.top = true;
u_kid1.default_x = soccerfield._x + 140;
u_kid1.default_y = soccerfield._y - 75;
f_SetXY(soccerball, soccerfield._x, soccerfield._y + 5);
f_StaticRange();
var spawn_y = soccerfield._y;
var spawn_x = (soccerfield._x + 50);
var u_kid2 = f_SpawnKid(spawn_x, spawn_y, 9, 1, 67, color_brown);
u_kid2.kid_type = 3;
u_kid2.gotoAndStop("wait");
u_kid2.target_ball = soccerball;
u_kid2.target_goal = goal_left;
u_kid2.top = false;
u_kid2.default_x = soccerfield._x + 150;
u_kid2.default_y = soccerfield._y + 75;
var spawn_y = (soccerfield._y - 70);
var spawn_x = (soccerfield._x - 100);
var u_kid3 = f_SpawnKid(spawn_x, spawn_y, 45, 17, 36, color_beige);
u_kid3.kid_type = 3;
u_kid3.gotoAndStop("wait");
u_kid3._xscale = u_kid3._xscale * -1;
u_kid3.target_ball = soccerball;
u_kid3.target_goal = goal_right;
u_kid3.top = true;
u_kid3.default_x = soccerfield._x - 130;
u_kid3.default_y = soccerfield._y - 75;
var spawn_y = (soccerfield._y + 75);
var spawn_x = (soccerfield._x - 120);
var u_kid4 = f_SpawnKid(spawn_x, spawn_y, 48, 1, 37, color_beige);
u_kid4.kid_type = 3;
u_kid4.gotoAndStop("wait");
u_kid4._xscale = u_kid4._xscale * -1;
u_kid4.target_ball = soccerball;
u_kid4.target_goal = goal_right;
u_kid4.top = false;
u_kid4.default_x = soccerfield._x - 160;
u_kid4.default_y = soccerfield._y + 75;
u_kid1.partner = u_kid2;
u_kid2.partner = u_kid1;
u_kid3.partner = u_kid4;
u_kid4.partner = u_kid3;
kills_goal = kills_goal + 4;
}
function f_KidGroup7() {
var spawn_y = dude1.y;
var spawn_x = (-150 - game_x);
var u_kid = f_SpawnKid(spawn_x, spawn_y, 37, 6, 61, color_brown);
f_KidSettings(u_kid);
u_kid.atv_speed = 12;
u_kid.atv = true;
u_kid.gotoAndStop("atv");
u_kid.shadow_pt._xscale = 200;
u_kid.atv_delay = 0;
u_kid.atv_type = 1;
if (u_kid._xscale < 0) {
u_kid._xscale = u_kid._xscale * -1;
}
var spawn_y = f_RandomY();
var spawn_x = (1400 - game_x);
var u_kid = f_SpawnKid(spawn_x, spawn_y, 14, 9, 30, color_pink);
f_KidSettings(u_kid);
u_kid.atv_speed = 14;
u_kid.atv = true;
u_kid.gotoAndStop("atv");
u_kid.shadow_pt._xscale = 200;
u_kid.atv_delay = 0;
u_kid.atv_type = 2;
if (u_kid._xscale > 0) {
u_kid._xscale = u_kid._xscale * -1;
}
kills_goal = kills_goal + 2;
}
function f_KidGroup8() {
var spawn_y = f_RandomY();
var spawn_x = ((1400 + random(100)) - game_x);
if (random(2) == 1) {
f_SpawnKid(spawn_x, spawn_y, 21, 1, 28, color_pink);
} else {
f_SpawnKid(spawn_x, spawn_y, 32, 1, 25, color_pink);
}
var spawn_y = f_RandomY();
var spawn_x = ((1700 + random(100)) - game_x);
if (random(2) == 1) {
f_SpawnKid(spawn_x, spawn_y, 40, 3, 47, color_brown);
} else {
f_SpawnKid(spawn_x, spawn_y, 41, 3, 49, color_brown);
}
var spawn_y = f_RandomY();
var spawn_x = ((2000 + random(100)) - game_x);
f_SpawnKid(spawn_x, spawn_y, 44, 10, 50, color_brown);
kills_goal = kills_goal + 6;
}
function f_KidGroup9() {
var spawn_y = dude1.y;
var spawn_x = (-150 - game_x);
var u_kid = f_SpawnKid(spawn_x, spawn_y, 46, 2, 64, color_brown);
f_KidSettings(u_kid);
u_kid.atv_speed = 20;
u_kid.atv = true;
u_kid.gotoAndStop("atv");
u_kid.shadow_pt._xscale = 200;
u_kid.atv_delay = 0;
u_kid.atv_type = 1;
u_kid.kid_type = 4;
u_kid.health_max = u_kid.health_max * 1.5;
u_kid.health = u_kid.health_max;
if (u_kid._xscale < 0) {
u_kid._xscale = u_kid._xscale * -1;
}
var spawn_y = f_RandomY();
var spawn_x = ((700 + random(100)) - game_x);
u_kid = f_SpawnKid(spawn_x, spawn_y, 46, 2, 65, color_brown);
u_kid.kid_type = 4;
u_kid.health_max = u_kid.health_max * 1.5;
u_kid.health = u_kid.health_max;
var spawn_y = f_RandomY();
var spawn_x = ((700 + random(100)) - game_x);
f_SpawnKid(spawn_x, spawn_y, 39, 12, 43, color_pink);
var spawn_y = f_RandomY();
var spawn_x = ((1000 + random(100)) - game_x);
f_SpawnKid(spawn_x, spawn_y, 52, 16, 74, color_latin);
kills_goal = kills_goal + 4;
}
function f_KidGroup10() {
var spawn_y = (limit_topleft.y + 100);
var spawn_x = ((700 + random(100)) - game_x);
f_SpawnKid(spawn_x, spawn_y, 23, 1, 46, color_pink);
var spawn_y = (limit_topleft.y + 300);
var spawn_x = ((700 + random(100)) - game_x);
if (random(2) == 1) {
f_SpawnKid(spawn_x, spawn_y, 45, 18, 62, color_pink);
} else {
f_SpawnKid(spawn_x, spawn_y, 42, 11, 63, color_brown);
}
}
function f_KidGroup11() {
var spawn_y = (limit_topleft.y + 200);
var spawn_x = (700 - game_x);
f_SpawnKid(spawn_x, spawn_y, 56, 23, 71, color_pink);
var spawn_y = (limit_topleft.y + 300);
var spawn_x = (900 - game_x);
f_SpawnKid(spawn_x, spawn_y, 55, 22, 70, color_pink);
var spawn_y = (limit_topleft.y + 370);
var spawn_x = (800 - game_x);
f_SpawnKid(spawn_x, spawn_y, 59, 24, 72, color_beige);
}
function f_KidGroup100() {
f_SpawnSunchips();
kills_goal = kills_goal + 1;
}
function f_RandomY() {
var u_top;
if ((limit_topleft.y + _y) < 0) {
u_top = _y;
} else {
u_top = limit_topleft.y;
}
var u_range = (480 - (u_top + _y));
return(u_top + random(u_range));
}
function f_ShadowSize(zone) {
var shadow_size = (100 + (zone.body._y * 0.25));
if (shadow_size < 10) {
shadow_size = 10;
}
zone.shadow_pt._xscale = shadow_size;
zone.shadow_pt._yscale = shadow_size;
}
function f_HelmetAttack(zone) {
var return_val = false;
if (zone.health > 0) {
if (zone.attack_timer < 0) {
if (Math.abs(zone.y - dude1.y) < 10) {
if (Math.abs(zone.x - dude1.x) < 200) {
if (((zone.x <= dude1.x) and (zone._xscale > 0)) or ((zone.x >= dude1.x) and (zone._xscale < 0))) {
return_val = true;
zone.slide_hit = false;
zone.slide_speed = 20;
s_Ground1.start(0, 0);
zone.nohit = true;
zone.hitdude = false;
zone.attack_timer = 30;
zone.gotoAndStop("helmetattack");
}
}
}
} else {
zone.attack_timer--;
}
}
return(return_val);
}
function f_NinjaAttack(zone) {
var return_val = false;
if (zone.attack_timer < 0) {
if (Math.abs(zone.y - dude1.y) < 10) {
return_val = true;
zone.kick_delay = 6;
if ((zone.x < dude1.x) and (zone._xscale < 0)) {
f_FlipChar(zone);
} else if ((zone.x > dude1.x) and (zone._xscale > 0)) {
f_FlipChar(zone);
}
zone.body_y = 0;
f_FX(zone.x, zone.y, 1, "shockwave", 80, 80);
S_Ground6.start(0, 0);
zone.nohit = true;
zone.hitdude = false;
zone.attack_timer = 30;
zone.gotoAndStop("ninjajump");
}
} else {
zone.attack_timer--;
}
return(return_val);
}
function f_NinjaJump(zone) {
if (zone.body._y > -200) {
zone.body_y = zone.body_y - 20;
zone.body._y = zone.body_y;
f_ShadowSize(zone);
} else if (zone.kick_delay > 0) {
zone.kick_delay--;
if ((zone.x < dude1.x) and (zone._xscale < 0)) {
f_FlipChar(zone);
} else if ((zone.x > dude1.x) and (zone._xscale > 0)) {
f_FlipChar(zone);
}
zone.gotoAndStop("ninjaspin");
zone.body._y = zone.body_y;
f_ShadowSize(zone);
} else {
var dir = f_rad2deg(Math.atan2((zone.y + zone.body_y) - dude1.y, zone.x - dude1.x));
zone.kick_x = -20 * Math.cos(PI * dir);
zone.kick_y = -20 * Math.sin(PI * dir);
zone.kick_timer = 4;
s_Swing1.start(0, 0);
zone.gotoAndStop("ninjakick");
zone.body._y = zone.body_y;
f_ShadowSize(zone);
}
}
function f_NinjaHit(zone, u_hit) {
if (Math.abs(zone.y - u_hit.y) < 10) {
if (Math.abs(zone.x - u_hit.x) < 50) {
if (u_hit.health > 0) {
zone.hitdude = true;
f_Damage(u_hit, 1);
if (((u_hit.x < zone.x) and (u_hit._xscale < 0)) or ((u_hit.x >= zone.x) and (u_hit._xscale > 0))) {
f_FlipChar(u_hit);
}
u_hit.speed_toss_y = -(random(10) + 10);
u_hit.speed_toss_x = random(8) + 12;
f_FX(u_hit.x, u_hit.body._y + u_hit.y, int(u_hit.y) + 7, "impact1");
f_CheckHold(u_hit);
f_CallJuggle1(u_hit);
f_PunchSound();
}
}
}
}
function f_NinjaKick(zone) {
if (zone.body._y < 0) {
f_MoveKid(zone, false, zone.kick_x);
zone.body_y = zone.body_y + zone.kick_y;
zone.body._y = zone.body_y;
if (zone.body._y > 0) {
zone.body._y = 0;
}
if (zone.y < (dude1.y - 10)) {
f_MoveKid(zone, true, 10);
} else if (zone.y > (dude1.y + 10)) {
f_MoveKid(zone, true, -10);
}
f_ShadowSize(zone);
if ((zone.kick_timer % 4) == 0) {
var u_trail = f_FX(zone.x, zone.y, int(zone.y) - 1, "ninja", zone._xscale);
u_trail.body._y = zone.body_y;
}
zone.kicktimer++;
if (zone.body_y > -100) {
if (zone.hitdude == false) {
f_NinjaHit(zone, dude1);
}
}
} else {
zone.gotoAndStop("walk");
}
}
function f_HoopShot(u_ball) {
var hoop_x = (bballhoop.goal._x + bballhoop.x);
var hoop_y = (bballhoop.y - 2);
if (u_ball.x < (hoop_x + 10)) {
var dir = f_rad2deg(Math.atan2(u_ball.y - hoop_y, u_ball.x - hoop_x));
var distance = Math.abs(u_ball.x - hoop_x);
if (Math.abs(u_ball.y - hoop_y) > distance) {
distance = Math.abs(u_ball.y - hoop_y);
}
var temp_speed = (-(distance / 20));
u_ball.shot_speed_x = temp_speed * Math.cos(PI * dir);
u_ball.shot_speed_y = temp_speed * Math.sin(PI * dir);
u_ball.frames = int(Math.abs(u_ball.x - hoop_x) / Math.abs(u_ball.shot_speed_x));
u_ball.current_frame = 1;
var net_y = Math.abs(bballhoop.goal._y);
u_ball.body_speed_y = -(net_y / u_ball.frames);
u_ball.gotoAndStop("hoopshot");
} else {
u_ball.speed_toss_y = -(22 + random(8));
u_ball.speed_toss_x = 2 + random(4);
u_ball.gotoAndStop("release");
}
}
function f_SeakHoop(zone) {
var hoop_x = (bballhoop.goal._x + bballhoop.x);
var hoop_y = (bballhoop.y - 2);
f_MoveKid(zone, false, zone.shot_speed_x);
f_MoveKid(zone, true, zone.shot_speed_y);
zone.body._y = zone.body._y + zone.body_speed_y;
zone.current_frame++;
if (zone.current_frame == zone.frames) {
bballhoop.hoop.hoop.gotoAndPlay("bap");
zone.gotoAndStop("blank");
}
}
function f_CheckHoop(zone) {
}
function f_StartSoccer(zone) {
if ((soccerball.x + _x) < 800) {
score_team1 = 0;
score_team2 = 0;
f_StaticRange();
f_SwingsOff();
goal_left.x = goal_left._x;
goal_left.y = goal_left._y;
goal_right.x = goal_right._x;
goal_right.y = goal_right._y;
soccerfield.x = soccerfield._x;
soccerfield.y = soccerfield._y;
var j = 1;
while (j <= total_kids) {
var u_char = this["kid" + j];
u_char.gotoAndStop("soccerwalk");
j++;
}
zone.gotoAndStop("soccergame");
}
}
function f_SoccerGame(zone) {
if (soccerball.x < soccerfield.x) {
if (score_right) {
score_right = false;
}
} else if (score_left) {
score_left = false;
}
if (Math.abs(soccerball.x - goal_left.x) < 50) {
if (soccerball.y < soccer1.y) {
if (soccerball.y > soccer3.y) {
if (!ball_left) {
if (soccerball.owner == null) {
score_left = true;
ball_left = true;
score_team2++;
}
}
}
}
} else {
ball_left = false;
if (Math.abs(soccerball.x - goal_right.x) < 50) {
if (soccerball.y < soccer4.y) {
if (soccerball.y > soccer6.y) {
if (!ball_right) {
if (soccerball.owner == null) {
score_right = true;
ball_right = true;
score_team1++;
}
}
}
}
} else {
ball_right = false;
}
}
}
function f_SoccerChase(zone) {
if (zone.success_y) {
if ((zone.x < zone.target_x) and (zone._xscale < 0)) {
f_FlipChar(zone);
} else if ((zone.x > zone.target_x) and (zone._xscale > 0)) {
f_FlipChar(zone);
}
}
if (zone.success_x) {
if ((zone.y < zone.target_y) and zone.north) {
zone.north = false;
} else if ((zone.y > zone.target_y) and (!zone.north)) {
zone.north = true;
}
}
if (zone.success_y == false) {
if (zone._xscale > 0) {
var target_x = (zone.target_x + 300);
} else {
var target_x = (zone.target_x - 300);
}
} else {
var target_x = zone.target_x;
}
if (zone.success_x == false) {
if (zone.north) {
var target_y = (zone.target_y - 300);
} else {
var target_y = (zone.target_y + 300);
}
} else {
var target_y = zone.target_y;
}
var dir = f_rad2deg(Math.atan2(zone.y - target_y, zone.x - target_x));
if (zone.item != null) {
var temp_speed = -6;
} else {
var temp_speed = -5;
}
var temp_speed_x = (temp_speed * Math.cos(PI * dir));
var temp_speed_y = (temp_speed * Math.sin(PI * dir));
zone.last_x = temp_speed_x;
zone.last_y = temp_speed_y;
zone.success_x = f_MoveKid(zone, false, temp_speed_x);
zone.success_y = f_MoveKid(zone, true, temp_speed_y);
if (!zone.success_x) {
zone.success_x = f_MoveKid(zone, false, temp_speed_x);
if (!zone.success_y) {
zone.success_y = f_MoveKid(zone, true, temp_speed_y);
}
}
}
function f_SoccerSlide(zone) {
if (zone._xscale > 0) {
f_MoveKid(zone, false, zone.slide_speed);
} else {
f_MoveKid(zone, false, -zone.slide_speed);
}
if (!zone.slide_hit) {
var u_hit = dude1;
if (Math.abs(zone.x - u_hit.x) < 40) {
if (Math.abs(zone.y - u_hit.y) < 10) {
zone.slide_hit = true;
f_PunchSound();
f_Damage(u_hit, 5);
if (((u_hit.x < zone.x) and (u_hit._xscale < 0)) or ((u_hit.x >= zone.x) and (u_hit._xscale > 0))) {
f_FlipChar(u_hit);
}
if (u_hit.item == soccerball) {
zone.item = u_hit.item;
u_hit.item.owner = zone;
zone.item = null;
}
f_DropItem(u_hit);
u_hit.speed_toss_y = -(random(5) + 5);
u_hit.speed_toss_x = random(5) + 8;
f_FX(u_hit.x, u_hit.body._y + u_hit.y, int(u_hit.y) + 7, "impact1");
f_CallJuggle1(u_hit);
}
}
}
if (((zone.slide_speed % 4) == 0) and (zone.slide_speed > 3)) {
f_FX(zone.x, zone.y + 5, int(zone.y) + 5, "dust1", zone._xscale);
}
zone.slide_speed--;
if (zone.slide_speed <= 0) {
zone.gotoAndStop("walk");
}
}
function f_SoccerKick(zone) {
if (zone.target_goal.x < soccerfield.x) {
if (zone._xscale > 0) {
f_FlipChar(zone);
}
} else if (zone._xscale < 0) {
f_FlipChar(zone);
}
f_SoundSwing(4);
f_FlipInverse(zone.item, zone);
if (zone._xscale > 0) {
f_SetXY(zone.item, zone.x + 50, zone.y + 1);
} else {
f_SetXY(zone.item, zone.x - 50, zone.y + 1);
}
zone.item.speed_toss_y = -3;
zone.item.speed_toss_x = 20;
zone.item.gotoAndStop("release");
zone.item.owner = null;
zone.item = null;
if (zone.top) {
zone.top = false;
zone.partner.top = true;
} else {
zone.top = true;
zone.partner.top = false;
}
}
function f_HuntBall(zone) {
var walk = true;
zone.target_pt = zone.target_ball;
zone.target_x = zone.target_ball.x;
if (zone.target_ball.owner == zone.partner) {
if (zone.y < soccerfield.y) {
zone.target_y = zone.target_ball.y - 100;
} else {
zone.target_y = zone.target_ball.y + 100;
}
} else {
zone.target_y = zone.target_ball.y;
}
if (Math.abs(zone.x - zone.target_x) < 50) {
if (Math.abs(zone.y - zone.target_y) < 10) {
if (zone.target_pt.owner == null) {
zone.target_pt.owner = zone;
zone.item = zone.target_pt;
zone.target_pt.autoaction(zone.target_pt);
} else if (zone.target_pt.owner == dude1) {
walk = false;
zone.slide_hit = false;
zone.slide_speed = 16;
s_Ground1.start(0, 0);
zone.gotoAndStop("soccerslide");
} else {
walk = false;
zone.gotoAndStop("soccerwait");
}
}
}
if (walk) {
f_SoccerChase(zone);
zone.gotoAndStop("soccerwalk");
}
}
function f_SoccerFollow(zone) {
var chase = false;
if (Math.abs(zone.x - zone.target_ball.x) > 200) {
chase = true;
zone.target_x = zone.target_ball.x;
} else {
zone.target_x = zone.x;
}
if (Math.abs(zone.y - zone.target_ball.y) > 100) {
chase = true;
zone.target_y = zone.target_ball.y;
} else {
zone.target_y = zone.y;
}
if (chase) {
f_SoccerChase(zone);
zone.gotoAndStop("soccerwalk");
} else {
zone.gotoAndStop("soccerwait");
}
}
function f_SoccerRun(zone) {
if ((score_left and (zone.target_goal == goal_left)) or (score_right and (zone.target_goal == goal_right))) {
zone.target_x = zone.default_x;
zone.target_y = zone.default_y;
if ((Math.abs(zone.target_x - zone.x) < 50) and (Math.abs(zone.target_y - zone.y) < 50)) {
if (zone.x > soccerfield.x) {
if (zone._xscale > 0) {
f_FlipChar(zone);
}
} else if (zone._xscale < 0) {
f_FlipChar(zone);
}
zone.gotoAndStop("soccerwait");
} else {
f_SoccerChase(zone);
zone.gotoAndStop("soccerwalk");
}
} else if (zone.item == null) {
if (zone.target_ball.y < soccerfield.y) {
if ((zone.top or (!zone.partner.alive)) or (dude1.grab_pointer == zone.partner)) {
f_HuntBall(zone);
} else {
f_SoccerFollow(zone);
}
} else if (((zone.top == false) or (!zone.partner.alive)) or (dude1.grab_pointer == zone.partner)) {
f_HuntBall(zone);
} else {
f_SoccerFollow(zone);
}
} else {
if (zone.target_goal.x < soccerfield.x) {
zone.target_x = zone.target_goal.x + 250;
} else {
zone.target_x = zone.target_goal.x - 250;
}
if (zone.y < soccerfield.y) {
zone.target_y = zone.target_goal.y - 10;
} else {
zone.target_y = zone.target_goal.y + 10;
}
zone.target_pt = zone.target_goal;
f_SoccerChase(zone);
if (Math.abs(zone.x - zone.target_x) < 50) {
if (Math.abs(zone.y - zone.target_y) < 100) {
f_SoccerKick(zone);
}
}
}
}
function f_EngineVolume() {
var u_x = (ups2._x + _x);
var u_percent = ((1540 - (u_x + 450)) / 1540);
var u_pan = (int((200 * u_percent) - 100) * -1);
s_Engine.setPan(u_pan);
var u_volume = 100;
if (u_x < -350) {
u_volume = 0;
} else if (u_x < 0) {
u_percent = Math.abs(u_x + 350) / 350;
u_volume = u_volume * u_percent;
} else if (u_x > 1000) {
u_volume = 0;
} else if (u_x > 640) {
u_percent = Math.abs(u_x - 990) / 350;
u_volume = u_volume * u_percent;
}
u_volume = u_volume * (car_distance * 0.01);
s_Engine.setVolume(u_volume);
}
function f_ATVHit(zone, u_hit) {
if (Math.abs(zone.y - u_hit.y) < 10) {
if (Math.abs(zone.x - u_hit.x) < 75) {
if (!u_hit.nohit) {
var u_impact = false;
if (((u_hit.x > zone.x) and (zone._xscale > 35)) or ((u_hit.x < zone.x) and (zone._xscale < -35))) {
f_Damage(u_hit, 10);
if (((u_hit.x < zone.x) and (u_hit._xscale < 0)) or ((u_hit.x >= zone.x) and (u_hit._xscale > 0))) {
f_FlipChar(u_hit);
}
f_DropItem(u_hit);
u_hit.speed_toss_y = -(random(10) + 10);
u_hit.speed_toss_x = random(8) + 12;
f_FX(u_hit.x, u_hit.body._y + u_hit.y, int(u_hit.y) + 7, "impact1");
f_CallJuggle1(u_hit);
f_HardPunchSound();
u_hit.nohit = true;
}
}
}
}
}
function f_ATVPosition(zone) {
if (zone.atv_type == 1) {
f_SetXY(zone, zone.x, dude1.y);
f_CheckSpawn(zone);
} else {
var u_y = f_RandomY();
f_SetXY(zone, zone.x, u_y);
f_CheckSpawn(zone);
}
}
function f_ATV(zone) {
if (zone.atv_delay <= 0) {
if (zone._xscale > 0) {
if (!f_MoveKid(zone, false, zone.atv_speed)) {
f_SetXY(zone, zone.x, zone.y + 6);
}
if ((zone.x + _x) > 900) {
f_ATVPosition(zone);
f_FlipChar(zone);
}
} else {
if (!f_MoveKid(zone, false, -zone.atv_speed)) {
f_SetXY(zone, zone.x, zone.y + 6);
}
if ((zone.x + _x) < -250) {
f_ATVPosition(zone);
f_FlipChar(zone);
}
}
f_ATVHit(zone, dude1);
} else {
zone.atv_delay--;
if (zone.atv_delay == 0) {
f_ATVPosition(zone);
}
}
var u_x = (zone.x + _x);
var u_percent = ((1150 - (u_x + 250)) / 1150);
var u_pan = (int((200 * u_percent) - 100) * -1);
zone.s_atvengine.setPan(u_pan);
var u_volume = 100;
if (u_x < -150) {
u_volume = 0;
} else if (u_x < 0) {
u_percent = Math.abs(u_x + 150) / 150;
u_volume = u_volume * u_percent;
} else if (u_x > 800) {
u_volume = 0;
} else if (u_x > 640) {
u_percent = Math.abs(u_x - 790) / 150;
u_volume = u_volume * u_percent;
}
zone.s_atvengine.setVolume(u_volume);
if (!zone.init) {
zone.init = true;
zone.s_atvengine.start(0, 100000);
}
}
function f_CreateKids() {
i = 1;
while (i <= total_kids) {
var kid_name = ("kid" + i);
var shadow_name = ("shadow" + current_shadow);
var kid_y = (limit_topleft.y + random(200));
kid_dm_current = kid_dm_current + 2;
var kid_depth_mod = (kid_dm_current + kid_dm_default);
attachMovie("kid", kid_name, f_DepthVal(kid_depth_mod, kid_y));
attachMovie("shadow", shadow_name, i - 200);
var kid_new = this["kid" + i];
kid_new.depth_mod = kid_depth_mod;
kid_new.x = 2000 - game_x;
kid_new.y = kid_y;
kid_new._x = kid_new.x;
kid_new._y = kid_new.y;
kid_new.shadow_pt = this["shadow" + current_shadow];
current_shadow++;
kid_new.shadow_pt._x = kid_new.x;
kid_new.shadow_pt._y = kid_new.y;
kid_new.shirt_type = 37 + random(8);
kid_new.hat_type = 3;
kid_new.skin_type = color_brown;
i++;
}
}
function f_Dribble(zone) {
if (zone.owner._xscale > 0) {
zone.x = zone.owner.x + 25;
} else {
zone.x = zone.owner.x - 25;
}
zone.y = zone.owner.y + 1;
zone._x = zone.x;
zone._y = zone.y;
zone.shadow_pt._x = zone.x;
zone.shadow_pt._y = zone.y;
f_Depth(zone, zone.y);
}
function f_SwingCheckChar(zone, u_temp) {
var return_val = false;
if (Math.abs(u_temp.x - zone.x) < 50) {
if (Math.abs(u_temp.y - zone.y) < 10) {
return_val = true;
if (zone.rider != null) {
if (Math.abs(zone.rider.x - zone.x) < 50) {
if (Math.abs(zone.rider.y - zone.y) < 10) {
var u_hit = zone.rider;
f_Damage(u_hit, 1);
if (((u_hit.x < zone.x) and (u_hit._xscale < 0)) or ((u_hit.x >= zone.x) and (u_hit._xscale > 0))) {
f_FlipChar(u_hit);
}
u_hit.speed_toss_y = -(random(2) + 2);
u_hit.speed_toss_x = random(2) + 2;
f_CheckHold(u_hit);
f_CallJuggle1(u_hit);
}
}
zone.rider = null;
}
f_FX(u_temp.x, u_temp.y - 50, int(u_temp.y) + 1, "impact1");
s_Smack1.start(0, 0);
zone.gotoAndPlay("move");
}
}
return(return_val);
}
function f_SwingCheck(zone) {
f_SwingCheckChar(zone, dude1);
}
function f_SetTrash(zone) {
zone.punch = true;
zone.grab = true;
zone.has_shadow = true;
zone.bounces = 0;
zone.weight = 2;
zone.explode = false;
zone.object_type = 1;
zone.body.gotoAndStop(1);
zone.active = true;
}
function f_SetTrash2(zone) {
zone.punch = true;
zone.grab = true;
zone.has_shadow = true;
zone.bounces = 0;
zone.weight = 2;
zone.explode = false;
zone.object_type = 2;
zone.body.gotoAndStop(2);
zone.active = true;
}
function f_BallInPlay(zone) {
if (zone.ball == 1) {
zone.gotoAndStop("dribble_bball");
} else if (zone.ball == 2) {
zone.gotoAndStop("dribble_soccer");
}
}
function f_SetBall(zone, u_type) {
zone.punch = true;
zone.has_shadow = true;
zone.bounces = 2;
zone.weight = 0;
zone.explode = false;
zone.object_type = 1;
zone.active = true;
zone.owner = kid1;
zone.gravity = -2;
zone.autotake = true;
zone.ball = u_type;
if (u_type == 1) {
zone.autoaction = f_TakeBasketball;
} else if (u_type == 2) {
zone.autoaction = f_TakeBasketball;
}
}
function f_TakeBasketball(zone) {
f_BallInPlay(zone);
}
function f_CheckSandbox(zone) {
if (sandcastle.crushed) {
zone.gotoAndStop("sandboxcry");
}
}
function f_Sandbox(zone) {
dude1.insand = false;
sandbox.sand_timer--;
if ((zone._x + _x) < -200) {
zone.gotoAndStop(3);
} else {
if (zone._currentframe == 1) {
if (Math.abs(dude1.y - zone.y) < 10) {
if (Math.abs(dude1.x - zone.x) < 80) {
s_Fart.start(0, 0);
zone.crushed = true;
zone.gotoAndStop(2);
}
}
}
var u_topleft = (zone.topleft._x + zone.x);
var u_bottomleft = (zone.bottomleft._x + zone.x);
var u_top = (zone.topleft._y + zone.y);
var u_bottom = (zone.bottomleft._y + zone.y);
var u_topright = (zone.topright._x + zone.x);
var u_bottomright = (zone.bottomright._x + zone.x);
if ((dude1.y > u_top) and (dude1.y < u_bottom)) {
if ((dude1.x >= u_bottomleft) and (dude1.x <= u_topright)) {
var u_percent = (1 - ((dude1.y - u_top) / 100));
var u_left = (u_bottomleft + ((u_topleft - u_bottomleft) * u_percent));
var u_right = (u_bottomright + ((u_topright - u_bottomright) * u_percent));
if ((dude1.x >= u_left) and (dude1.x <= u_right)) {
dude1.insand = true;
}
}
}
}
}
function f_Roll(zone) {
if (zone.speed_toss_X > 0) {
if (zone._xscale > 0) {
f_MoveKid(zone, false, -zone.speed_toss_x);
} else {
f_MoveKid(zone, false, zone.speed_toss_x);
}
zone.body.body._rotation = zone.body.body._rotation - zone.speed_toss_x;
if (zone.bounds) {
f_FlipChar(zone);
}
zone.body._y = zone.body._y + zone.speed_toss_y;
if (zone.body._y > 0) {
zone.body._y = 0;
zone.shadow_pt._xscale = 100;
zone.shadow_pt._yscale = 100;
if (zone.speed_toss_y > 3) {
zone.speed_toss_y = int(zone.speed_toss_y * -0.35);
}
} else {
var shadow_size = (100 + (zone.body._y * 0.25));
if (shadow_size < 10) {
shadow_size = 10;
}
zone.shadow_pt._xscale = shadow_size;
zone.shadow_pt._yscale = shadow_size;
}
zone.speed_toss_x = zone.speed_toss_x - 0.5;
zone.speed_toss_y++;
} else {
zone.nextFrame();
}
}
function f_MedPickup(zone) {
if (Math.abs(dude1.x - zone._x) < 30) {
if (Math.abs(dude1.y - zone._y) < 10) {
s_DartShoot.start(0, 0);
dude1.health = dude1.health_max;
zone.gotoAndStop("blank");
}
}
}
function f_AddStatic(zone) {
static_index++;
this["static" + static_index] = zone;
zone.x = zone._x;
zone.y = zone._y;
}
function f_AddNeutral(zone) {
static_dm_current = static_dm_current + 2;
zone.depth_mod = static_dm_current + static_dm_default;
zone.x = zone._x;
zone.y = zone._y;
zone.depth_y = zone.y;
f_Depth(zone, zone.y);
}
function f_SetDiagonal(zone) {
var xscale_val = (Math.abs(zone._xscale) / 100);
var yscale_val = (Math.abs(zone._yscale) / 100);
var x = (zone._x + zone.zone._x);
var y = (zone._y + zone.zone._y);
var h = (zone.zone._height * yscale_val);
var w = ((zone.zone._width / 2) * xscale_val);
zone.diagonal = true;
zone.left_x = zone.left._x * xscale_val;
zone.right_x = zone.right._x * xscale_val;
zone.left_y = zone.left._y * yscale_val;
zone.right_y = zone.right._y * yscale_val;
zone.h = Math.abs(zone.left_y - zone.right_y);
zone.h2 = zone.zone2._height;
zone.w2 = zone.zone2._width;
zone.x1 = x + zone.left_x;
zone.x2 = x + zone.right_x;
zone.w = Math.abs(zone.x1 - zone.x2);
}
function f_StaticRange() {
var u_min = static_index;
var u_max = 1;
i = 1;
while (i <= static_index) {
var u_static = this["static" + i];
if (u_static.x > limit_topleft.x) {
if (u_static.x < limit_bottomright.x) {
if (i < u_min) {
u_min = i;
}
if (i > u_max) {
u_max = i;
}
}
}
i++;
}
statics_min = u_min;
total_statics = u_max;
var u_min = object_index;
total_objects = 0;
i = 1;
while (i <= object_index) {
var u_object = this["object" + i];
if (u_object._x > limit_topleft.x) {
if (u_object._x < limit_bottomright.x) {
if (u_object.active) {
total_objects++;
this["object_pt" + total_objects] = u_object;
}
}
}
i++;
}
}
function f_GameInit() {
_x = 2600;
_y = 150;
game_x = _x;
game_y = _y;
fx_dm_current = 0;
fx_dm_default = 600;
kid_dm_current = 0;
kid_dm_default = 4;
object_dm_current = 0;
object_dm_default = 200;
static_dm_current = 0;
static_dm_default = 400;
screen_width = 640;
screen_height = 480;
limit_bottomright.x = (screen_width - game_x) + 1800;
limit_topleft.x = -game_x;
limit_bottomright._x = limit_bottomright.x;
limit_topleft._x = limit_topleft.x;
limit_bottomright.y = limit_bottomright._y;
limit_topleft.y = limit_topleft._y;
new_limit_topleft = -game_x;
checkpoint = 0;
checkpoint_x = 0;
current_vehicle = 1;
total_vehicles = 4;
total_kids = 3;
total_huds = 6;
combo_count = 0;
combo_timer = 0;
current_shadow = 1;
current_fx = 1;
total_fx = 100;
f_CreateFX();
f_SetTrash(object1);
f_SetPropaine(object2);
f_SetPropaine(object3);
f_SetPropaine(object4);
f_SetHorse(object5);
object6 = bball;
f_SetBall(bball, 1);
object7 = drugmart_trash;
f_SetTrash2(object7);
object8 = soccerball;
f_SetBall(soccerball, 2);
object9 = mower;
f_SetMower(mower);
object10 = propaine4;
f_SetPropaine(object10);
object11 = propaine5;
f_SetPropaine(object11);
object12 = propaine6;
f_SetPropaine(object12);
object_index = 12;
f_SetDiagonal(sign);
sign.mask = 3;
f_SetDiagonal(fence1);
fence1.mask = 2;
f_SetDiagonal(fence2);
fence2.mask = 2;
f_SetDiagonal(wrx_left);
f_SetDiagonal(wrx_right);
f_SetDiagonal(drugmart_left);
f_SetDiagonal(ghetto1_left);
f_SetDiagonal(ghetto2_left);
static_index = 0;
f_AddStatic(sign);
f_AddStatic(sandcastle);
f_AddStatic(pgwall1);
f_AddStatic(pgwall2);
f_AddStatic(swing1);
f_AddStatic(swing2);
f_AddStatic(swing3);
f_AddStatic(swing4);
f_AddStatic(swing5);
f_AddStatic(swing6);
f_AddStatic(soccer1);
f_AddStatic(soccer2);
f_AddStatic(soccer3);
f_AddStatic(soccer4);
f_AddStatic(soccer5);
f_AddStatic(soccer6);
f_AddStatic(bballhoop);
f_AddStatic(fence1);
f_AddStatic(drugmart_left);
f_AddStatic(drugmart);
f_AddStatic(light1);
f_AddStatic(light2);
f_AddStatic(tree1);
f_AddStatic(ghetto1);
f_AddStatic(ghetto1_left);
f_AddStatic(ghetto2);
f_AddStatic(ghetto2_left);
f_AddStatic(ghetto3);
f_AddStatic(stump);
f_AddStatic(light3);
f_AddStatic(wrx_tire);
f_AddStatic(wrx);
f_AddStatic(wrx_right);
f_AddStatic(wrx_left);
f_StaticRange();
f_AddNeutral(drugmart_right);
f_AddNeutral(house2_right1);
f_AddNeutral(house2_right2);
f_AddNeutral(house5_right);
f_AddNeutral(med1);
i = 1;
while (i <= object_index) {
var object_new = this["object" + i];
object_dm_current = object_dm_current + 2;
object_new.depth_mod = object_dm_current + object_dm_default;
object_new.x = object_new._x;
object_new.y = object_new._y;
if (object_new.has_shadow) {
var shadow_name = ("shadow" + current_shadow);
attachMovie("shadow", shadow_name, i - 100);
object_new.shadow_pt = this["shadow" + current_shadow];
current_shadow++;
object_new.shadow_pt._x = object_new.x;
object_new.shadow_pt._y = object_new.y;
}
i++;
}
master_volume = 130;
kills = 0;
kills_goal = 0;
bg0.depth_mod = 999;
f_Depth(bg0, 1000);
_quality = "medium";
f_SetDepths();
}
function main() {
f_Rage();
f_ComboTimer();
}
function startEngine() {
this.onEnterFrame = main;
}
u_point = new Object();
gravity = 3;
g_dash_timer = 6;
var PI = (Math.PI/180);
s_Punch1 = new Sound();
s_Punch1.attachSound("sound_GoodPunch1.wav");
s_Punch2 = new Sound();
s_Punch2.attachSound("sound_GoodPunch2.wav");
s_Punch3 = new Sound();
s_Punch3.attachSound("sound_GoodPunch3.wav");
s_Punch4 = new Sound();
s_Punch4.attachSound("sound_GoodPunch4.wav");
s_Smack1 = new Sound();
s_Smack1.attachSound("sound_GoodSmack1.wav");
s_Smack2 = new Sound();
s_Smack2.attachSound("sound_GoodSmack2.wav");
s_Swing1 = new Sound();
s_Swing1.attachSound("sound_Swing1.wav");
s_Swing2 = new Sound();
s_Swing2.attachSound("sound_Swing2.wav");
s_Swing3 = new Sound();
s_Swing3.attachSound("sound_Swing3.wav");
s_Swing4 = new Sound();
s_Swing4.attachSound("sound_Swing4.wav");
s_Swing5 = new Sound();
s_Swing5.attachSound("sound_Swing5.wav");
s_Swing6 = new Sound();
s_Swing6.attachSound("sound_Swing6.wav");
s_Ground1 = new Sound();
s_Ground1.attachSound("sound_Ground1.wav");
s_Ground2 = new Sound();
s_Ground2.attachSound("sound_Ground2.wav");
s_Ground3 = new Sound();
s_Ground3.attachSound("sound_Ground3.wav");
s_Ground4 = new Sound();
s_Ground4.attachSound("sound_Ground4.wav");
s_Ground5 = new Sound();
s_Ground5.attachSound("sound_Ground5.wav");
s_Ground6 = new Sound();
s_Ground6.attachSound("sound_Ground6.wav");
s_HardPunch1 = new Sound();
s_HardPunch1.attachSound("sound_HardPunch1.wav");
s_HardPunch2 = new Sound();
s_HardPunch2.attachSound("sound_HardPunch2.wav");
s_HardPunch3 = new Sound();
s_HardPunch3.attachSound("sound_HardPunch3.wav");
s_explosion5 = new Sound();
s_explosion5.attachSound("sound_explosion5");
s_explosion6 = new Sound();
s_explosion6.attachSound("sound_explosion6");
s_DartShoot = new Sound();
s_DartShoot.attachSound("sound_corkpop2.wav");
s_GunShot = new Sound();
s_GunShot.attachSound("sound_357mag.wav");
s_Thunder = new Sound();
s_Thunder.attachSound("sound_thunderp.wav");
s_Fart = new Sound();
s_Fart.attachSound("sound_fart_2.wav");
s_Advance = new Sound();
s_Advance.attachSound("sound_RKND16.wav");
s_Reload = new Sound();
s_Reload.attachSound("sound_reload.wav");
s_SunChipsGrunt = new Sound();
s_SunChipsGrunt.attachSound("sound_evilgrunt1.wav");
s_SunChipsDie = new Sound();
s_SunChipsDie.attachSound("sound_evildie.wav");
s_SwishTriple = new Sound();
s_SwishTriple.attachSound("sound_SwishTriple.wav");
s_Stab = new Sound();
s_Stab.attachSound("sound_sword1.wav");
s_Bounce = new Sound();
s_Bounce.attachSound("sound_bball_bounce.wav");
s_Swoosh = new Sound();
s_Swoosh.attachSound("sound_bball_swish.wav");
s_Engine = new Sound(bg2.car1);
s_Engine.attachSound("sound_trucks_moving");
s_Music1 = new Sound(_root.m1);
s_Music1.attachSound("music_Dad n Me.wav");
s_Music2 = new Sound(_root.m2);
s_Music2.attachSound("music_Dad n Me GUITAR.wav");
s_SunchipsMusic = new Sound();
s_SunChipsMusic.attachSound("05 boss.wav");
color_brown = new Object();
color_brown.ra = 100;
color_brown.ga = 100;
color_brown.ba = 100;
color_brown.aa = 100;
color_brown.rb = -61;
color_brown.gb = -56;
color_brown.bb = -121;
color_brown.ab = 0;
color_yellow = new Object();
color_yellow.ra = 100;
color_yellow.ga = 100;
color_yellow.ba = 100;
color_yellow.aa = 100;
color_yellow.rb = -61;
color_yellow.gb = -56;
color_yellow.bb = -121;
color_yellow.ab = 0;
color_pink = new Object();
color_pink.ra = 100;
color_pink.ga = 100;
color_pink.ba = 100;
color_pink.aa = 100;
color_pink.rb = 0;
color_pink.gb = 0;
color_pink.bb = 0;
color_pink.ab = 0;
color_default = new Object();
color_default.ra = 100;
color_default.ga = 100;
color_default.ba = 100;
color_default.aa = 100;
color_default.rb = 0;
color_default.gb = 0;
color_default.bb = 0;
color_default.ab = 0;
color_beige = new Object();
color_beige.ra = 100;
color_beige.ga = 100;
color_beige.ba = 100;
color_beige.aa = 100;
color_beige.rb = -25;
color_beige.gb = 0;
color_beige.bb = -60;
color_beige.ab = 0;
color_latin = new Object();
color_latin.ra = 100;
color_latin.ga = 100;
color_latin.ba = 100;
color_latin.aa = 100;
color_latin.rb = -25;
color_latin.gb = 0;
color_latin.bb = -95;
color_latin.ab = 0;
f_GameInit();
startEngine();
s_Music1.setVolume(master_volume);
s_Music1.start(0, 5000);
s_Music2.setVolume(0);
s_Music2.start(0, 5000);
stop();
stop();
Symbol 1742 MovieClip Frame 4
stop();
Symbol 1745 MovieClip Frame 1
stop();
Symbol 1745 MovieClip Frame 2
play();
Symbol 1833 MovieClip Frame 1
stop();
Symbol 1834 MovieClip Frame 1
ready = true;
stop();
Symbol 1834 MovieClip Frame 2
play();
function f_HealthBar() {
health = (kid_pointer.health / kid_pointer.health_max) * 100;
if (health < 0) {
health = 0;
}
bar._xscale = health;
}
f_HealthBar();
Instance of Symbol 1353 MovieClip "bar" in Symbol 1834 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Symbol 1834 MovieClip Frame 60
gotoAndStop (1);
Symbol 1835 MovieClip Frame 1
stop();
Symbol 1835 MovieClip Frame 2
function f_HealthBar() {
health = (kid_pointer.health / kid_pointer.health_max) * 100;
if (health < 0) {
health = 0;
}
bar._xscale = health;
}
f_HealthBar();
Instance of Symbol 1353 MovieClip "bar" in Symbol 1835 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Instance of Symbol 1353 MovieClip "ragebar" in Symbol 1835 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Symbol 1836 MovieClip Frame 1
stop();
Symbol 1836 MovieClip Frame 2
checked = false;
play();
Symbol 1836 MovieClip Frame 3
distance = (_root.game.dude1.x + _root.game._x) - 220;
if (distance > 10) {
if ((_root.game.dude1._xscale > 0) and (!_root.game.dude1.nohit)) {
speed = 1 + (distance * 0.05);
_root.game.f_Scroll(speed, false);
}
} else {
gotoAndStop (1);
}
Symbol 1836 MovieClip Frame 4
gotoAndPlay (3);
Symbol 1850 MovieClip Frame 1
stop();
Symbol 1850 MovieClip Frame 2
play();
Symbol 1852 MovieClip Frame 11
stop();
Symbol 1855 MovieClip Frame 1
music_volume = 100;
stop();
Instance of Symbol 249 MovieClip in Symbol 1855 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.music_volume--;
_root.game.s_SunChipsMusic.setVolume(_parent.music_volume);
}
Symbol 1855 MovieClip Frame 71
_root.game.s_SunChipsMusic.setVolume(100);
stopAllSounds();
_root.game.f_Ending();
stop();
Symbol 1859 MovieClip Frame 1
stop();
Symbol 1859 MovieClip Frame 91
_root.gotoAndStop("intro");
Symbol 1870 MovieClip Frame 19
stop();
Symbol 1871 MovieClip Frame 1
stop();
Symbol 1890 MovieClip Frame 6
stop();
Symbol 1962 MovieClip Frame 18
stop();
Symbol 1979 Button
on (rollOver) {
tellTarget ("tank") {
gotoAndPlay ("bang");
};
}
on (rollOut) {
tellTarget ("tank") {
gotoAndPlay ("awww");
};
}
on (press) {
getURL ("http://www.newgrounds.com", "_blank");
}
Symbol 1982 MovieClip Frame 351
stopAllSounds();
Symbol 1982 MovieClip Frame 388
stopAllSounds();
Symbol 1982 MovieClip Frame 845
stop();
Symbol 1982 MovieClip Frame 957
stopAllSounds();
_root.gotoAndStop("level1");
Symbol 1994 MovieClip Frame 11
stop();
Symbol 2033 MovieClip Frame 1
stop();
Symbol 2033 MovieClip Frame 6
stop();
Symbol 2033 MovieClip Frame 12
gotoAndStop (1);
Symbol 2034 Button
on (rollOver) {
tellTarget ("again") {
gotoAndPlay ("over");
};
}
on (rollOut) {
tellTarget ("again") {
gotoAndPlay ("off");
};
}
on (press) {
tellTarget (_root.over) {
play();
};
}
on (keyPress "a") {
tellTarget (_root.over) {
play();
};
}
on (keyPress "A") {
tellTarget (_root.over) {
play();
};
}
Symbol 2035 Button
on (press) {
getURL ("http://www.synj.net", _blank);
}
Symbol 2036 Button
on (press) {
getURL ("http://www.newgrounds.com", _blank);
}
Symbol 2037 Button
on (press) {
getURL ("http://www.cookiedoughrecords.com", _blank);
}
Symbol 2046 MovieClip Frame 7
stop();
Symbol 2065 MovieClip Frame 31
stop();
Symbol 2085 MovieClip Frame 5
stop();
Symbol 2096 MovieClip Frame 41
stop();
Symbol 2097 MovieClip Frame 105
stop();
Symbol 2097 MovieClip Frame 127
stopAllSounds();
Symbol 2097 MovieClip Frame 217
stopAllSounds();
_root.gotoAndStop("level1");