Frame 1
stop();
_quality = "MEDIUM";
Frame 3
stop();
Frame 4
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 ("hitloop");
} 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_HoldWalk(_parent);
_root.game.f_Throw(_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_HoldWalk(_parent);
_root.game.f_ThrowItem(_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 409 MovieClip Frame 1
play();
Symbol 409 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 ("die");
}
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 = 6;
_parent.gotoAndStop("reload");
}
Symbol 602 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 602 MovieClip Frame 4
_root.game.s_Swing4.start(0, 0);
Symbol 602 MovieClip Frame 5
_root.game.f_Boss1ElboHit(_parent);
Symbol 602 MovieClip Frame 14
_parent.gotoAndStop("stand");
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, 2);
Symbol 612 MovieClip Frame 18
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 612 MovieClip Frame 22
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 612 MovieClip Frame 26
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 612 MovieClip Frame 30
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 612 MovieClip Frame 34
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 612 MovieClip Frame 38
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
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 ("intro");
}
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 621 MovieClip [sunchips] Frame 1
stop();
Instance of Symbol 62 MovieClip in Symbol 621 MovieClip [sunchips] Frame 1
onClipEvent (enterFrame) {
_root.game.f_Boss1PunchClock(_parent);
}
Symbol 621 MovieClip [sunchips] Frame 2
gotoAndStop ("walk");
Symbol 621 MovieClip [sunchips] Frame 3
_root.game.f_KidSettings(this);
stop();
Instance of Symbol 62 MovieClip in Symbol 621 MovieClip [sunchips] Frame 3
onClipEvent (enterFrame) {
if (!_root.game.f_SunChipsAttack(_parent)) {
_root.game.f_JamesRun(_parent);
}
}
Instance of Symbol 62 MovieClip in Symbol 621 MovieClip [sunchips] Frame 8
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 621 MovieClip [sunchips] Frame 11
onground = true;
Instance of Symbol 62 MovieClip in Symbol 621 MovieClip [sunchips] Frame 24
onClipEvent (enterFrame) {
_root.game.f_SunChipsCrazy(_parent);
}
Symbol 621 MovieClip [sunchips] Frame 28
_root.game.f_KidReset(this);
Symbol 640 MovieClip Frame 1
play();
Symbol 640 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 643 MovieClip Frame 1
play();
Symbol 643 MovieClip Frame 18
_parent.gotoAndStop("walk");
Symbol 646 MovieClip Frame 1
play();
Symbol 646 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 653 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 653 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 658 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Symbol 665 MovieClip Frame 7
if (_parent.health <= 0) {
_parent.alive = false;
gotoAndPlay ("die");
}
Symbol 665 MovieClip Frame 15
_parent.gotoAndStop("walk");
Symbol 665 MovieClip Frame 16
play();
Symbol 665 MovieClip Frame 41
_root.game.f_MusicLight();
_root.game.f_KidDie(_parent);
stop();
Symbol 672 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 672 MovieClip Frame 5
_root.game.s_Swing4.start(0, 0);
Symbol 672 MovieClip Frame 6
_root.game.f_Boss1PunchHit(_parent);
Symbol 672 MovieClip Frame 14
_parent.gotoAndStop("stand");
Symbol 679 MovieClip Frame 5
_root.game.s_Swing4.start(0, 0);
Symbol 679 MovieClip Frame 6
_root.game.f_Boss1UppercutHit(_parent);
Symbol 679 MovieClip Frame 13
_parent.gotoAndStop("stand");
Symbol 687 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 687 MovieClip Frame 6
_root.game.s_Swing4.start(0, 0);
Symbol 687 MovieClip Frame 7
_root.game.f_Boss1PunchHit(_parent);
Symbol 687 MovieClip Frame 14
_parent.gotoAndStop("stand");
Symbol 688 MovieClip Frame 1
_root.game.f_Boss1Intro(_parent);
Symbol 688 MovieClip Frame 2
gotoAndPlay (1);
Symbol 688 MovieClip Frame 3
play();
Instance of Symbol 249 MovieClip in Symbol 688 MovieClip Frame 3
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll(_parent._parent);
}
Symbol 688 MovieClip Frame 14
_root.game.f_HardPunchSound();
_root.game.boss1fodder.gotoAndStop("hit1");
attack_pow = int(_root.game.boss1fodder.health_max * 0.3);
_root.game.f_Damage(_root.game.boss1fodder, attack_pow);
Symbol 688 MovieClip Frame 26
_root.game.f_HardPunchSound();
_root.game.boss1fodder.gotoAndStop("hit2");
_root.game.f_Damage(_root.game.boss1fodder, attack_pow);
Symbol 688 MovieClip Frame 36
_root.game.f_HardPunchSound();
_root.game.boss1fodder.gotoAndStop("hit3");
_root.game.f_Damage(_root.game.boss1fodder, attack_pow);
Symbol 688 MovieClip Frame 48
_root.game.f_HardPunchSound();
_root.game.f_Damage(_root.game.boss1fodder, attack_pow);
_root.game.boss1fodder.speed_toss_y = -(random(5) + 12);
_root.game.boss1fodder.speed_toss_x = random(5) + 15;
_root.game.f_CallJuggle1(_root.game.boss1fodder);
Instance of Symbol 249 MovieClip in Symbol 688 MovieClip Frame 48
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll2(_root.game.dude1);
}
Symbol 688 MovieClip Frame 68
_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 ("walk");
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) {
_root.game.f_Boss1Run(_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;
Symbol 689 MovieClip [boss1] Frame 26
_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 ("die");
}
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 809 MovieClip Frame 1
_root.game.s_Swing6.start(0, 0);
Symbol 809 MovieClip Frame 4
_root.game.s_Swing6.start(0, 0);
Symbol 809 MovieClip Frame 7
_root.game.s_Swing6.start(0, 0);
Symbol 809 MovieClip Frame 9
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 ("JamesWalk");
} else if (kid_type == 3) {
gotoAndStop ("SoccerWalk");
} else if (kid_type == 4) {
gotoAndStop ("NinjaWalk");
} else if (kid_type == 5) {
gotoAndStop ("HelmetWalk");
}
}
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 918 MovieClip Frame 11
_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 1023 Button
on (press) {
getURL ("http://www.alienhominid.com/toys", (target = "_blank"));
}
Symbol 1036 MovieClip Frame 1
stop();
Symbol 1036 MovieClip Frame 6
stop();
Symbol 1036 MovieClip Frame 16
gotoAndStop (1);
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();
}
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 ("impatience");
}
Symbol 1105 MovieClip Frame 5
stop();
Symbol 1146 MovieClip Frame 14
stop();
Symbol 1177 MovieClip Frame 22
stop();
gotoAndPlay ("loop");
Symbol 1189 MovieClip Frame 1
stop();
Symbol 1190 MovieClip Frame 50
stop();
Symbol 1192 MovieClip Frame 50
stop();
Symbol 1194 MovieClip Frame 35
stop();
Symbol 1201 MovieClip Frame 17
stop();
Symbol 1217 MovieClip Frame 1
stop();
Symbol 1217 MovieClip Frame 10
stop();
Symbol 1217 MovieClip Frame 20
gotoAndStop (1);
Symbol 1220 MovieClip Frame 1
stop();
Symbol 1220 MovieClip Frame 8
stop();
Symbol 1220 MovieClip Frame 14
gotoAndStop (1);
Symbol 1221 Button
on (rollOver) {
tellTarget ("start") {
gotoAndPlay ("over");
};
}
on (rollOut) {
tellTarget ("start") {
gotoAndPlay ("off");
};
}
on (press) {
tellTarget ("game_on") {
play();
};
}
Symbol 1222 Button
on (rollOver) {
tellTarget ("instructions") {
gotoAndPlay ("over");
};
}
on (rollOut) {
tellTarget ("instructions") {
gotoAndPlay ("off");
};
}
on (press) {
tellTarget ("demo") {
play();
};
}
Symbol 1271 MovieClip Frame 14
stop();
Symbol 1307 MovieClip Frame 100
stop();
Symbol 1308 MovieClip Frame 100
stop();
Symbol 1328 MovieClip Frame 75
stop();
Symbol 1337 MovieClip Frame 26
stop();
Symbol 1352 MovieClip Frame 29
stop();
Symbol 1384 MovieClip Frame 1
stop();
Symbol 1392 MovieClip Frame 1
stop();
Instance of Symbol 1359 MovieClip "bar" in Symbol 1392 MovieClip Frame 752
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Instance of Symbol 1359 MovieClip "ragebar" in Symbol 1392 MovieClip Frame 752
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Symbol 1393 MovieClip Frame 1
stop();
Symbol 1393 MovieClip Frame 2
stopAllSounds();
Symbol 1393 MovieClip Frame 47
_root.gotoAndStop("level1");
Symbol 1396 MovieClip Frame 810
stop();
Symbol 1400 MovieClip Frame 1
stop();
Symbol 1400 MovieClip Frame 60
stop();
Symbol 1412 MovieClip Frame 1
stop();
Symbol 1415 MovieClip Frame 1
stop();
Symbol 1415 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 1415 MovieClip Frame 3
onClipEvent (enterFrame) {
_root.game.car_distance = _root.game.car_distance + 0.5;
_root.game.f_EngineVolume();
}
Symbol 1415 MovieClip Frame 21
_parent.car2.gotoAndPlay(2);
stop();
Symbol 1425 MovieClip Frame 1
if (!init) {
default_y = _y;
init = true;
}
stop();
Symbol 1425 MovieClip Frame 2
body.body.body.gotoAndStop(_root.game.current_vehicle);
play();
Instance of Symbol 249 MovieClip in Symbol 1425 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.car_distance = _root.game.car_distance + 0.5;
_root.game.f_EngineVolume();
}
Symbol 1425 MovieClip Frame 51
_root.game.ups1.gotoAndPlay(2);
_root.game.ups1.body.body.body.gotoAndStop(_root.game.current_vehicle);
stop();
Symbol 1457 MovieClip Frame 1
stop();
Symbol 1457 MovieClip Frame 2
body.body.body.gotoAndStop(_root.game.current_vehicle);
play();
Instance of Symbol 249 MovieClip in Symbol 1457 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.car_distance = _root.game.car_distance + 3;
_root.game.f_EngineVolume();
}
Symbol 1457 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 1558 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 1559 MovieClip Frame 13
gotoAndPlay (1);
Symbol 1562 MovieClip Frame 1
stop();
Symbol 1562 MovieClip Frame 2
play();
Symbol 1562 MovieClip Frame 4
_root.game.s_Bounce.start(0, 0);
Symbol 1562 MovieClip Frame 11
_root.game.s_Swoosh.start(0, 0);
Symbol 1562 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 1562 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 1563 MovieClip Frame 1
stop();
Symbol 1564 MovieClip Frame 1
stop();
Instance of Symbol 249 MovieClip in Symbol 1564 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_CheckHoop(_parent);
}
Symbol 1576 MovieClip Frame 1
stop();
Symbol 1576 MovieClip Frame 2
play();
Symbol 1576 MovieClip Frame 28
stop();
Symbol 1591 MovieClip Frame 1
stop();
Symbol 1591 MovieClip Frame 2
play();
Symbol 1591 MovieClip Frame 4
_root.game.s_HardPunch1.start(0, 0);
Symbol 1591 MovieClip Frame 5
dad.gotoAndPlay(2);
Symbol 1591 MovieClip Frame 8
_root.game.s_Ground3.start(0, 0);
Symbol 1591 MovieClip Frame 23
_root.game.s_HardPunch2.start(0, 0);
Symbol 1591 MovieClip Frame 34
_root.game.f_SpawnPlayer(70, 385);
_root.game.dude1.gotoAndStop("knuckles");
stop();
Symbol 1596 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 1596 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 1596 MovieClip Frame 45
_root.game.s_Smack1.start(0, 0);
Symbol 1596 MovieClip Frame 100
s_CarDrive.stop();
s_CarIdle.start(0, 1000);
Symbol 1596 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 1596 MovieClip Frame 146
speed = 2;
volume = 100;
pan = 0;
Symbol 1596 MovieClip Frame 147
s_CarIdle.stop();
s_CarDrive.start(0, 1000);
Instance of Symbol 62 MovieClip in Symbol 1596 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 1596 MovieClip Frame 160
onClipEvent (enterFrame) {
_parent.pan = _parent.pan + 2;
if (_parent.pan > 100) {
_parent.pan = 100;
}
_parent.s_CarDrive.setPan(_parent.pan);
}
Symbol 1596 MovieClip Frame 201
_root.game.f_KidGroup1();
_root.go_arrow.gotoAndPlay(2);
Instance of Symbol 62 MovieClip in Symbol 1596 MovieClip Frame 202
onClipEvent (enterFrame) {
_parent.volume = _parent.volume - 2;
if (_parent.volume < 0) {
_parent.volume = 0;
}
_parent.s_CarDrive.setVolume(_parent.volume);
}
Symbol 1596 MovieClip Frame 251
s_CarDrive.stop();
stop();
Symbol 1612 MovieClip Frame 1
stop();
Instance of Symbol 249 MovieClip in Symbol 1612 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_StartSoccer(_parent);
}
Instance of Symbol 249 MovieClip in Symbol 1612 MovieClip Frame 3
onClipEvent (enterFrame) {
_root.game.f_SoccerGame(_parent);
}
Symbol 1634 MovieClip Frame 1
stop();
Symbol 1634 MovieClip Frame 2
play();
Symbol 1634 MovieClip Frame 12
gotoAndStop (1);
Symbol 1635 MovieClip Frame 1
stop();
Symbol 1642 MovieClip Frame 1
gotoAndStop(_parent._parent.animal);
Symbol 1644 MovieClip Frame 1
play();
Symbol 1644 MovieClip Frame 60
stop();
Symbol 1645 MovieClip Frame 1
if (!init) {
init = true;
animal = random(7) + 1;
}
stop();
Symbol 1655 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 1656 MovieClip Frame 1
play();
Symbol 1656 MovieClip Frame 7
_parent.gotoAndStop("stand");
Symbol 1657 MovieClip Frame 8
stop();
Symbol 1663 MovieClip Frame 1
stop();
Instance of Symbol 62 MovieClip in Symbol 1663 MovieClip Frame 4
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 1663 MovieClip Frame 7
_root.game.f_ObjectSettings(this);
Symbol 1670 MovieClip Frame 1
stop();
Instance of Symbol 62 MovieClip in Symbol 1670 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_SwingCheck(_parent);
}
Symbol 1670 MovieClip Frame 3
play();
Instance of Symbol 62 MovieClip in Symbol 1670 MovieClip Frame 26
onClipEvent (enterFrame) {
_root.game.f_SwingCheck(_parent);
}
Symbol 1670 MovieClip Frame 48
gotoAndStop ("on");
Symbol 1703 MovieClip Frame 15
stop();
Symbol 1704 MovieClip Frame 1
stop();
Instance of Symbol 249 MovieClip in Symbol 1704 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.game.f_Sandbox(_parent);
}
Symbol 1714 MovieClip Frame 13
gotoAndPlay (1);
Symbol 1715 MovieClip Frame 27
gotoAndPlay ("loop");
Symbol 1716 MovieClip Frame 1
stop();
Symbol 1717 MovieClip Frame 1
stop();
Instance of Symbol 249 MovieClip in Symbol 1717 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.game.f_SeekOwner(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 1717 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 1717 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 1717 MovieClip Frame 5
onClipEvent (enterFrame) {
_root.game.f_Roll(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 1717 MovieClip Frame 9
onClipEvent (enterFrame) {
_root.game.f_SoccerBall(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 1717 MovieClip Frame 10
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Instance of Symbol 62 MovieClip in Symbol 1717 MovieClip Frame 11
onClipEvent (enterFrame) {
_root.game.f_SeakHoop(_parent);
}
Symbol 1730 MovieClip Frame 7
stop();
Instance of Symbol 249 MovieClip in Symbol 1731 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_MedPickup(_parent);
}
Symbol 1732 MovieClip Frame 1
if (!init) {
default_y = _y;
init = true;
}
stop();
Instance of Symbol 62 MovieClip in Symbol 1732 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_CarDrive(_parent);
}
Symbol 1745 MovieClip Frame 1
function f_SetXY(zone, new_x, new_y) {
var _local1 = zone;
_local1.x = new_x;
_local1.y = new_y;
_local1._x = _local1.x;
_local1._y = _local1.y;
f_Depth(_local1, _local1.y);
if (_local1.item) {
f_MoveItem(_local1, _local1.item, speed);
}
_local1.shadow_pt._x = _local1.x;
_local1.shadow_pt._y = _local1.y;
f_Mask(_local1);
}
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) {
var _local1 = u_flipchar;
if ((_local1._xscale > 0) and (u_flipsource._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1._xscale < 0) and (u_flipsource._xscale > 0)) {
f_FlipChar(_local1);
}
}
function f_FlipInverse(u_flipchar, u_flipsource) {
var _local1 = u_flipchar;
if ((_local1._xscale > 0) and (u_flipsource._xscale > 0)) {
f_FlipChar(_local1);
} else if ((_local1._xscale < 0) and (u_flipsource._xscale < 0)) {
f_FlipChar(_local1);
}
}
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) {
var _local1 = zone;
_local1.alive = false;
_local1.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(_local1);
}
function f_CheckHold(u_kid) {
if (u_kid == dude1.grab_pointer) {
f_ClearGrabPointer(dude1);
dude1.gotoAndStop("stand");
}
}
function f_CarCheckHit(zone, u_hit) {
var _local1 = u_hit;
var _local2 = zone;
var _local3 = false;
if (_local1.y < _local2.y) {
if (_local1.y > (_local2.y - 100)) {
if (Math.abs(_local2.x - _local1.x) < (_local2._width / 2)) {
if (_local1.health > 0) {
_local3 = true;
f_Damage(_local1, 3);
if (((_local1.x < _local2.x) and (_local1._xscale < 0)) or ((_local1.x >= _local2.x) and (_local1._xscale > 0))) {
f_FlipChar(_local1);
}
_local1.speed_toss_y = -(random(10) + 10);
_local1.speed_toss_x = random(8) + 12;
f_FX(_local1.x, _local1.body._y + _local1.y, int(_local1.y) + 7, "impact1");
f_CheckHold(_local1);
f_CallJuggle1(_local1);
}
}
}
}
return(_local3);
}
function f_DropItem(u_drop) {
var _local1 = u_drop;
if (_local1.grab_pointer != undefined) {
f_FlipSame(_local1.grab_pointer, _local1);
_local1.grab_pointer.speed_toss_y = -(random(10) + 10);
_local1.grab_pointer.speed_toss_x = random(8) + 12;
f_CallJuggle1(_local1.grab_pointer);
f_ClearGrabPointer(_local1);
}
if (_local1.item != eval("NULL")) {
_local1.item.gotoAndStop("stand");
_local1.item.owner = eval("NULL");
_local1.item = eval("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) {
var _local2 = zone;
_local2._y = _local2._y + _local2.speed_y;
_local2.y = _local2._y;
_local2.x = _local2._x;
_local2.speed_y++;
_local2._xscale = _local2._xscale + (_local2.speed_y / 12);
_local2._yscale = _local2._yscale + (_local2.speed_y / 12);
_local2.depth_mod = 990;
f_Depth(_local2, _local2.y);
f_EngineVolume();
if (_local2.y > (limit_bottomright.y + _local2._height)) {
current_vehicle++;
if (current_vehicle > total_vehicles) {
current_vehicle = 1;
}
s_Engine.stop();
bg2.car1.gotoAndPlay(2);
_local2.gotoAndStop(1);
} else {
if (_local2.y > ((limit_bottomright.y + _local2._height) - 300)) {
car_distance = car_distance - 15;
} else {
car_distance = car_distance + 4;
}
var _local3 = false;
i = 1;
while (i <= total_kids) {
var _local1 = this["kid" + i];
if (_local1.alive) {
if (f_CarCheckHit(_local2, _local1)) {
_local3 = true;
}
}
i++;
}
i = 1;
while (i <= total_objects) {
var _local1 = this["object_pt" + i];
if (f_CarCheckHit(_local2, _local1)) {
_local3 = true;
}
i++;
}
var _local1 = dude1;
if (_local1.y < _local2.y) {
if (_local1.y > (_local2.y - 100)) {
if (Math.abs(_local2.x - _local1.x) < (_local2._width / 2)) {
if (!_local1.nohit) {
_local3 = true;
f_Damage(_local1, 10);
if (((_local1.x < _local2.x) and (_local1._xscale < 0)) or ((_local1.x >= _local2.x) and (_local1._xscale > 0))) {
f_FlipChar(_local1);
}
f_DropItem(_local1);
_local1.speed_toss_y = -(random(10) + 10);
_local1.speed_toss_x = random(8) + 12;
f_FX(_local1.x, _local1.body._y + _local1.y, int(_local1.y) + 7, "impact1");
f_CallJuggle1(_local1);
}
}
}
}
if (_local3) {
f_HardPunchSound();
}
}
}
function f_KillKids() {
var _local2 = this;
i = 1;
while (i <= total_kids) {
var _local1 = _local2["kid" + i];
if (_local1.alive) {
_local1.health = 0;
_local1.gotoAndStop("hitground1");
}
i++;
}
}
function f_ExplosionCheckHit(zone, u_hit) {
var _local1 = u_hit;
var _local3 = zone;
var _local2 = false;
if (Math.abs(_local1.y - _local3.y) < 30) {
if (Math.abs(_local3.x - _local1.x) < 150) {
_local2 = true;
_local1.onfire = 2;
f_Damage(_local1, 6);
if (_local1.grab) {
if (((_local1.x < _local3.x) and (_local1._xscale < 0)) or ((_local1.x >= _local3.x) and (_local1._xscale > 0))) {
f_FlipChar(_local1);
}
} else {
_local1.explosion = true;
_local1.punch_function(_local1);
}
_local1.speed_toss_y = -(random(15) + 25);
_local1.speed_toss_x = random(16) + 1;
f_FX(_local1.x, _local1.body._y + _local1.y, int(_local1.y) + 7, "impact1");
f_CheckHold(_local1);
f_CallJuggle1(_local1);
}
}
return(_local2);
}
function f_Explosion(zone) {
var _local2 = zone;
var _local3 = false;
i = 1;
while (i <= total_kids) {
var _local1 = this["kid" + i];
if (_local1.alive) {
if (f_ExplosionCheckHit(_local2, _local1)) {
_local3 = true;
}
}
i++;
}
i = 1;
while (i <= total_objects) {
var _local1 = this["object_pt" + i];
if (_local1.active) {
if (f_ExplosionCheckHit(_local2, _local1)) {
_local3 = true;
}
}
i++;
}
var _local1 = dude1;
if (Math.abs(_local1.y - _local2.y) < 30) {
if (Math.abs(_local2.x - _local1.x) < 150) {
if (_local1.health > 0) {
_local3 = true;
_local1.onfire = 2;
f_Damage(_local1, 4);
if (((_local1.x < _local2.x) and (_local1._xscale < 0)) or ((_local1.x >= _local2.x) and (_local1._xscale > 0))) {
f_FlipChar(_local1);
}
f_DropItem(_local1);
_local1.speed_toss_y = -(random(10) + 30);
_local1.speed_toss_x = random(8) + 8;
f_FX(_local1.x, _local1.body._y + _local1.y, int(_local1.y) + 7, "impact1");
f_CallJuggle1(_local1);
}
}
}
}
function f_ObjectSettings(zone) {
zone.onfire = 1;
}
function f_KidSettings(zone) {
var _local1 = zone;
_local1.nohit = false;
_local1.falling = false;
_local1.onground = false;
_local1.onfire = 1;
_local1.bounces = 0;
_local1.toss_clock = 0;
_local1.root = true;
if (_local1.health <= 0) {
s_Ground3.start(0, 0);
_local1.gotoAndStop("hitground1");
}
}
function f_Juggle1Setup(u_kid) {
var _local1 = u_kid;
if (_local1.item != eval("NULL")) {
_local1.item.gotoAndStop("stand");
_local1.item.owner = eval("NULL");
_local1.item = eval("NULL");
}
_local1.nohit = true;
_local1.bounces = 0;
}
function f_CallJuggle1(u_kid) {
f_Juggle1Setup(u_kid);
u_kid.gotoAndStop("juggle1");
}
function f_Collide(zone) {
var _local1 = zone;
if (_local1.collide.body._y >= -10) {
if (_local1.collide.grab) {
f_FlipSame(_local1.collide, _local1);
_local1.collide.speed_toss_y = -6;
_local1.collide.speed_toss_x = (-random(6)) + 10;
f_CallJuggle1(_local1.collide);
f_PunchSound();
f_FX(_local1.x, _local1.body._y + _local1.y, int(_local1.y) + 15, "impact1");
} else if (_local1.collide.punch) {
_local1.collide.punch_function(_local1.collide);
} else {
f_PunchSound();
f_FX(_local1.x, _local1.body._y + _local1.y, int(_local1.y) + 15, "impact1");
}
}
}
function f_KidToss(zone) {
var _local1 = zone;
if (_local1 == dude1) {
_local1.collide = eval("NULL");
if (_local1._xscale > 0) {
f_MoveChar(_local1, false, -_local1.speed_toss_x);
} else {
f_MoveChar(_local1, false, _local1.speed_toss_x);
}
if (_local1.bounds) {
f_FlipChar(_local1);
}
} else {
if (_local1._xscale > 0) {
f_MoveKid(_local1, false, -_local1.speed_toss_x);
} else {
f_MoveKid(_local1, false, _local1.speed_toss_x);
}
if (_local1.bounds) {
f_FlipChar(_local1);
}
}
if (_local1.hitwall) {
f_Collide(_local1);
_local1.hitwall = false;
f_FlipChar(_local1);
f_Damage(_local1, 5);
_local1.speed_toss_x = _local1.speed_toss_x * 0.5;
}
_local1.body._y = _local1.body._y + _local1.speed_toss_y;
_local1.toss_clock++;
if (_local1.onfire == 2) {
if ((_local1.toss_clock % 2) == 0) {
var _local3 = random(20) + 80;
f_FX((_local1.x + random(20)) - 10, ((_local1.body._y + _local1.y) + random(20)) - 40, _local1.y - 1, "fire1", _local3, _local3);
}
} else if (_local1.onfire == 3) {
if ((_local1.toss_clock % 2) == 0) {
var _local3 = random(20) + 120;
f_FX((_local1.x + random(20)) - 10, ((_local1.body._y + _local1.y) + random(20)) - 40, _local1.y - 1, "ragesmoke", _local3, _local3);
}
}
if (_local1.weight > 0) {
_local1.body.body._rotation = _local1.body.body._rotation - Math.abs(_local1.speed_toss_y);
} else {
_local1.body.body._rotation = _local1.body.body._rotation + Math.abs(_local1.speed_toss_y);
}
f_KidHitKids(_local1);
_local1.speed_toss_y = _local1.speed_toss_y + (gravity + _local1.gravity);
if (_local1.speed_toss_y > 0) {
_local1.falling = true;
} else {
_local1.falling = false;
}
if (_local1.body._y > 0) {
_local1.body._y = 0;
_local1.shadow_pt._xscale = 100;
_local1.shadow_pt._yscale = 100;
if (_local1.explode) {
f_RemoveChar(_local1.shadow_pt);
s_explosion6.start(0, 0);
f_Explosion(_local1);
_local1.active = false;
_local1.grab = false;
_local1.punch = false;
f_StaticRange();
f_SpawnMask(_local1);
_local1.gotoAndStop("explode");
} else {
_local1.bounces++;
if (_local1.bounces == 1) {
f_FX(_local1.x, _local1.y + 10, int(_local1.y) + 1, "dust1", _local1._xscale);
if (_local1 != dude1) {
if (_local1.speed_toss_y > 40) {
f_Damage(_local1, 7);
} else if (_local1.speed_toss_x > 15) {
f_Damage(_local1, 7);
}
}
}
if (_local1.speed_toss_y > 10) {
if (_local1.speed_toss_y > 40) {
s_Ground3.start(0, 0);
f_FX(_local1.x, _local1.y, 1, "shockwave", u_temp._xscale);
} else if (_local1.speed_toss_y > 20) {
s_Ground4.start(0, 0);
} else {
s_Ground5.start(0, 0);
}
_local1.speed_toss_y = int(_local1.speed_toss_y * -0.35);
if ((_local1.bounces % 2) == 0) {
var current_rotation = _local1.body.body._rotation;
_local1.gotoAndStop("bounce2");
_local1.body.body._rotation = current_rotation;
} else {
var current_rotation = _local1.body.body._rotation;
_local1.gotoAndStop("bounce1");
_local1.body.body._rotation = current_rotation;
}
} else {
s_Ground6.start(0, 0);
_local1.nohit = true;
_local1.bounces = 0;
f_FX(_local1.x, _local1.y + 10, int(_local1.y) + 1, "dust1", _local1._xscale);
_local1.gotoAndStop("hitground1");
}
}
} else {
var _local2 = 100 + (_local1.body._y * 0.25);
if (_local2 < 10) {
_local2 = 10;
}
_local1.shadow_pt._xscale = _local2;
_local1.shadow_pt._yscale = _local2;
}
}
function f_KidHitKids(zone) {
var _local1 = zone;
if ((_local1.speed_toss_y > 40) or (_local1.speed_toss_x > 14)) {
if (_local1.body._y > -150) {
var _local3 = false;
i = 1;
while (i <= total_kids) {
var _local2 = this["kid" + i];
if (((!_local2.nohit) and (_local2 != _local1)) and _local2.alive) {
if ((_local1 == dude1) and _local2.atv) {
} else if (Math.abs(_local2.y - _local1.y) < 15) {
if (Math.abs(_local2.x - _local1.x) < 40) {
f_Damage(_local1, 1);
f_Damage(_local2, 3);
_local3 = true;
f_FlipSame(_local2, _local1);
_local2.speed_toss_y = -(random(10) + 10);
_local2.speed_toss_x = _local1.speed_toss_x * 0.75;
f_CheckHold(_local2);
f_CallJuggle1(_local2);
_local2.body._y = -50;
}
}
}
i++;
}
if (_local1.weight > 0) {
var _local2 = dude1;
if ((!_local2.nohit) and (_local2 != _local1)) {
if (Math.abs(_local2.y - _local1.y) < 15) {
if (Math.abs(_local2.x - _local1.x) < 40) {
_local3 = true;
f_FlipSame(_local2, _local1);
_local2.speed_toss_y = -(random(10) + 10);
_local2.speed_toss_x = _local1.speed_toss_x * 0.75;
f_DropItem(_local2);
f_CallJuggle1(_local2);
_local2.body._y = -50;
}
}
}
}
if (_local3) {
f_PunchSound();
f_FX(_local1.x, _local1.body._y + _local1.y, int(_local1.y) + 15, "impact1");
}
}
}
}
function f_CreateFX() {
i = 1;
while (i <= total_fx) {
var _local3 = "fx" + i;
fx_dm_current = fx_dm_current + 1;
var _local1 = fx_dm_current + fx_dm_default;
var _local2 = f_DepthVal(_local1, 0);
attachMovie("fx", _local3, _local2);
var u_FX = this["fx" + i];
u_FX.depth_mod = _local1;
i++;
}
}
function f_FX(fx_x, fx_y, fx_depth, fx_type, fx_xscale, fx_yscale) {
var _local1 = this["fx" + current_fx];
_local1._x = fx_x;
_local1._y = fx_y;
if (fx_xscale != undefined) {
_local1._xscale = fx_xscale;
} else {
_local1._xscale = 100;
}
if (fx_yscale != undefined) {
_local1._yscale = fx_yscale;
} else {
_local1._yscale = 100;
}
f_Depth(_local1, fx_depth);
_local1.gotoAndStop(fx_type);
_local1.x = fx_x;
_local1.y = fx_depth;
f_SpawnMask(_local1);
current_fx++;
if (current_fx > total_fx) {
current_fx = 1;
}
return(_local1);
}
function f_KidThrownFierce(zone) {
var _local1 = zone;
u_temp = _local1.grab_pointer;
f_FlipInverse(u_temp, _local1);
if (_local1._xscale > 0) {
f_MoveKid(u_temp, false, 50);
} else {
f_MoveKid(u_temp, false, -50);
}
u_temp.y = _local1.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 = (_local1.y - 50) - u_temp.y;
f_ClearGrabPointer(_local1);
}
function f_KidThrown(zone) {
var _local1 = zone;
u_temp = _local1.grab_pointer;
f_FlipInverse(u_temp, _local1);
if (_local1._xscale > 0) {
f_MoveKid(u_temp, false, 70);
var _local2 = _local1.x + 100;
} else {
f_MoveKid(u_temp, false, -70);
var _local2 = _local1.x - 100;
}
u_temp._x = u_temp.x;
u_temp.y = _local1.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 = (_local1.y - 25) - u_temp.y;
f_FX(u_temp.x, _local1.y + 15, int(_local1.y) + 15, "impact3", -u_temp._xscale);
f_FX(_local2, _local1.y + 15, int(_local1.y) + 14, "blood1", -u_temp._xscale);
f_ClearGrabPointer(_local1);
}
function f_KidHeadbutted(zone) {
var _local1 = zone;
f_Damage(_local1.grab_pointer, _local1.punch_pow_low);
if (_local1.grab_counter > 3) {
u_temp = _local1.grab_pointer;
f_FlipInverse(u_temp, _local1);
if (_local1._xscale > 0) {
u_temp.x = _local1.x + 50;
} else {
u_temp.x = _local1.x - 50;
}
u_temp._x = u_temp.x;
u_temp.y = _local1.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 = (_local1.y - 50) - u_temp.y;
f_ClearGrabPointer(_local1);
}
}
function f_GrabSpark(zone) {
var _local1 = zone;
if (_local1._xscale > 0) {
var _local2 = _local1.x + 50;
} else {
var _local2 = _local1.x - 50;
}
if ((_local1.grab_counter == 1) or (_local1.grab_counter == 3)) {
f_PunchSound();
if (_local1.rage >= _local1.rage_goal) {
var _local3 = "rageimpact";
} else {
var _local3 = "impact2";
}
f_FX(_local2, _local1.y - 80, int(_local1.y) + 10, _local3);
} else if (_local1.grab_counter == 2) {
f_PunchSound();
if (_local1.rage >= _local1.rage_goal) {
var _local3 = "rageimpact";
} else {
var _local3 = "impact1";
}
f_FX(_local2, _local1.y - 80, int(_local1.y) + 10, _local3);
f_FX(_local2, _local1.y - 80, int(_local1.y) + 9, "blood1");
} else {
f_HardPunchSound();
if (_local1.rage >= _local1.rage_goal) {
var _local3 = "rageimpact";
} else {
var _local3 = "impact3";
}
f_FX(_local2, _local1.y - 80, int(_local1.y) + 10, _local3);
f_FX(_local2, _local1.y - 80, int(_local1.y) + 9, "blood2");
}
}
function f_ThrowItem(zone) {
var _local1 = zone;
var _local2 = false;
if (Key.isDown(_local1.button_punch1)) {
if (!_local1.punched) {
_local1.punched = true;
_local2 = true;
u_temp = _local1.grab_pointer;
u_temp.speed_toss_y = -4;
u_temp.speed_toss_x = 15;
f_CallJuggle1(u_temp);
u_temp.body._y = (_local1.y - 150) - u_temp.y;
f_ClearGrabPointer(_local1);
f_ClearGrabPointer(_local1);
f_DashReset(_local1);
_local1.gotoAndStop("throw_item");
}
} else {
_local1.punched = false;
}
if (Key.isDown(_local1.button_punch2)) {
if ((!_local1.punched2) and (!_local2)) {
_local1.punched2 = true;
u_temp = _local1.grab_pointer;
if (Key.isDown(_local1.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 = (_local1.y - 150) - u_temp.y;
f_ClearGrabPointer(_local1);
f_ClearGrabPointer(_local1);
f_DashReset(_local1);
s_swing1.start(0, 0);
_local1.gotoAndStop("throw_item");
}
} else {
_local1.punched2 = false;
}
}
function f_Throw(zone) {
var _local1 = zone;
if (Key.isDown(_local1.button_punch1)) {
if (!_local1.punched) {
if (Key.isDown(_local1.button_left) or Key.isDown(_local1.button_right)) {
f_SoundSwing(2);
_local1.grab_pointer.gotoAndStop("thrown");
f_SetXY(_local1.grab_pointer, _local1.x, _local1.grab_pointer.y);
_local1.gotoAndStop("throw");
return;
}
_local1.grab_counter++;
if ((_local1.grab_counter == 1) or (_local1.grab_counter == 3)) {
_local1.grab_pointer.gotoAndStop("grabhit1");
_local1.gotoAndStop("grabhit1");
} else {
_local1.grab_pointer.gotoAndStop("grabhit2");
_local1.gotoAndStop("grabhit2");
}
}
} else {
_local1.punched = false;
}
if (Key.isDown(_local1.button_punch2)) {
if (!_local1.punched2) {
if ((Key.isDown(_local1.button_left) or Key.isDown(_local1.button_right)) or Key.isDown(_local1.button_up)) {
f_SoundSwing(4);
_local1.grab_pointer.gotoAndStop("thrown2");
f_SetXY(_local1.grab_pointer, _local1.x, _local1.grab_pointer.y);
_local1.gotoAndStop("throw2");
} else {
_local1.grab_counter++;
if ((_local1.grab_counter == 1) or (_local1.grab_counter == 3)) {
_local1.grab_pointer.gotoAndStop("grabhit1");
_local1.gotoAndStop("grabhit1");
} else {
_local1.grab_pointer.gotoAndStop("grabhit2");
_local1.gotoAndStop("grabhit2");
}
}
}
} else {
_local1.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) {
var _local1 = u_dude;
if (_local1.grab_pointer != undefined) {
f_FlipInverse(_local1.grab_pointer, _local1);
if (_local1._xscale > 0) {
_local1.grab_pointer.x = _local1.x + _local1.grab_pointer.distance;
} else {
_local1.grab_pointer.x = _local1.x - _local1.grab_pointer.distance;
}
_local1.grab_pointer.y = _local1.y + 3;
f_SetXY(_local1.grab_pointer, _local1.grab_pointer.x, _local1.grab_pointer.y);
f_ShareMask(_local1, _local1.grab_pointer);
}
}
function f_Grab(zone) {
var _local2 = zone;
var u_impact = false;
var _local3 = false;
if (_local2.item == eval("NULL")) {
i = 1;
while (i <= total_kids) {
var _local1 = this["kid" + i];
if (((!_local1.nohit) and _local1.alive) and _local1.grab) {
if (Math.abs(_local1.y - _local2.y) < 10) {
if (Math.abs(_local1.x - _local2.x) < 30) {
if (!_local1.atv) {
if (_local2.dashing) {
u_impact = true;
f_FlipInverse(_local1, _local2);
_local1.speed_toss_y = -12;
_local1.speed_toss_x = 8;
f_Damage(_local1, _local2.punch_pow_low);
f_CallJuggle1(_local1);
_local1.body._y = (_local2.y - 50) - _local1.y;
} else {
_local2.grab_pointer = _local1;
_local2.grab_pointer.distance = 55;
_local2.grab_counter = 0;
f_KidGrabbed(_local2);
if (_local1.item != eval("NULL")) {
_local1.item.gotoAndStop("stand");
_local1.item.owner = eval("NULL");
_local1.item = eval("NULL");
}
_local1.gotoAndStop("grabbed");
i = total_kids + 1;
_local3 = true;
_local2.gotoAndStop("grab");
}
}
}
}
}
i++;
}
if (u_impact) {
f_PunchSound();
if (_local2.rage >= _local2.rage_goal) {
var impact_anim = "rageimpact";
} else {
var impact_anim = "impact3";
}
f_FX(_local2.x, _local2.y - 50, int(_local2.y) + 30, impact_anim);
}
}
return(_local3);
}
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) {
var _local1 = u_kid;
_local1.speed_toss_y = -(random(10) + 20);
_local1.speed_toss_x = 0;
f_CallJuggle1(_local1);
_local1.body._y = u_y - _local1.y;
}
function f_PunchHit(zone) {
var _local2 = zone;
var x1 = _local2.x;
var y1 = _local2.y;
u_point.x = 0;
u_point.y = 0;
_local2.body.punch_pt.localToGlobal(u_point);
var x2 = (u_point.x - game_x);
var _local3 = u_point.y - game_y;
var hit_impact = false;
var hit_x;
var hit_y = 0;
i = 1;
while (i <= total_kids) {
var _local1 = this["kid" + i];
if (_local1.alive) {
if (Math.abs(_local1.y - y1) < 20) {
if ((((_local1.x > x1) and (_local1.x < x2)) or ((_local1.x > x2) and (_local1.x < x1))) or (_local2.stomping and (Math.abs(_local1.x - _local2.x) < 40))) {
if (((!_local1.nohit) or _local2.hitnohit) or (_local2.stomping and _local1.onground)) {
hit_impact = true;
if (_local2.rage >= _local2.rage_goal) {
_local1.onfire = 3;
}
if (_local1.y > hit_y) {
hit_x = _local1.x;
hit_y = _local1.y;
}
if ((x2 > x1) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
} else if ((x2 < x1) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
}
if (_local2.stomping and _local1.onground) {
_local1.speed_toss_y = 20;
_local1.speed_toss_x = random(6) + 7;
f_CallJuggle1(_local1);
f_Damage(_local1, _local2.punch_pow_low);
} else if (_local2.punch_group == 1) {
if (_local2.punch_num == 1) {
_local1.gotoAndStop("hit1");
_local1.body.gotoAndPlay(1);
f_Damage(_local1, _local2.punch_pow_low);
} else if (_local2.punch_num == 2) {
_local1.gotoAndStop("hit2");
_local1.body.gotoAndPlay(1);
f_Damage(_local1, _local2.punch_pow_low);
} else if (_local2.punch_num == 3) {
_local1.gotoAndStop("hit3");
_local1.body.gotoAndPlay(1);
f_Damage(_local1, _local2.punch_pow_low);
} else if (_local2.punch_num == 4) {
_local1.speed_toss_y = -9;
_local1.speed_toss_x = 4;
f_CallJuggle1(_local1);
_local1.body._y = _local3 - _local1.y;
f_Damage(_local1, _local2.punch_pow_medium);
}
} else if (_local2.punch_group == 2) {
if (_local2.punch_num == 1) {
_local1.gotoAndStop("hit1");
_local1.body.gotoAndPlay(1);
f_Damage(_local1, _local2.punch_pow_medium);
} else if (_local2.punch_num == 2) {
_local1.gotoAndStop("hit2");
_local1.body.gotoAndPlay(1);
f_Damage(_local1, _local2.punch_pow_medium);
} else if (_local2.punch_num == 3) {
_local1.speed_toss_y = 70;
_local1.speed_toss_x = 1;
f_CallJuggle1(_local1);
f_Damage(_local1, _local2.punch_pow_high);
} else if (_local2.punch_num == 20) {
_local1.speed_toss_y = -16;
_local1.speed_toss_x = 0;
f_CallJuggle1(_local1);
_local1.body._y = _local3 - _local1.y;
f_Damage(_local1, _local2.punch_pow_medium);
} else if (_local2.punch_num == 21) {
_local1.speed_toss_y = -14;
_local1.speed_toss_x = 0;
f_CallJuggle1(_local1);
_local1.body._y = _local3 - _local1.y;
f_Damage(_local1, _local2.punch_pow_high);
} else if (_local2.punch_num == 22) {
_local1.speed_toss_y = -26;
_local1.speed_toss_x = -8;
f_CallJuggle1(_local1);
_local1.body._y = _local3 - _local1.y;
f_Damage(_local1, _local2.punch_pow_high);
}
} else if (_local2.punch_group == 3) {
f_UppercutHit(_local1, _local3);
f_Damage(_local1, _local2.punch_pow_low);
} else if (_local2.punch_group == 4) {
if (_local2.punch_num == 1) {
_local1.speed_toss_y = -8;
_local1.speed_toss_x = random(6) + 10;
f_CallJuggle1(_local1);
f_Damage(_local1, _local2.punch_pow_low);
} else if (_local2.punch_num == 2) {
_local1.speed_toss_y = -26;
_local1.speed_toss_x = 10;
f_CallJuggle1(_local1);
f_Damage(_local1, _local2.punch_pow_low);
} else if (_local2.punch_num == 3) {
_local1.speed_toss_y = -16;
_local1.speed_toss_x = 10;
f_CallJuggle1(_local1);
f_Damage(_local1, _local2.punch_pow_low);
}
} else if (_local2.punch_group == 5) {
_local1.gotoAndStop("hit1");
_local1.body.gotoAndPlay(1);
f_Damage(_local1, _local2.punch_pow_low);
} else {
_local2.punch_group = 1;
_local2.punch_num = 1;
_local1.gotoAndStop("hit1");
_local1.body.gotoAndPlay(1);
f_Damage(_local1, _local2.punch_pow_low);
}
} else if (((_local1.body._y + _local1.y) > _local3) and (_local1.body._y < 0)) {
if ((_local2.punch_num < 3) or (_local2.punch_group == 4)) {
hit_impact = true;
if (_local2.rage >= _local2.rage_goal) {
_local1.onfire = 3;
}
if ((_local2.punch_group < 4) or ((_local2.punch_group == 4) and (_local2.punch_num == 3))) {
f_Damage(_local1, _local2.punch_pow_low);
}
if (_local1.y > hit_y) {
hit_x = _local1.x;
hit_y = _local1.y;
}
if ((x2 > x1) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
} else if ((x2 < x1) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
}
if ((_local2.punch_group == 3) and (_local2.punch_num == 1)) {
f_UppercutHit(_local1, _local3);
} else if (_local2.punch_group == 4) {
if (_local2.punch_num == 2) {
f_Damage(_local1, int(_local2.punch_pow_low / 2));
_local1.speed_toss_y = -(random(10) + 20);
_local1.speed_toss_x = random(6) + 7;
f_CallJuggle1(_local1);
} else if (_local2.punch_num == 3) {
_local1.speed_toss_y = -16;
_local1.speed_toss_x = 10;
f_CallJuggle1(_local1);
}
} else {
_local1.speed_toss_y = -9;
_local1.speed_toss_x = 12;
f_CallJuggle1(_local1);
}
}
}
}
}
}
i++;
}
i = 1;
while (i <= total_objects) {
var _local1 = this["object_pt" + i];
if (_local1.punch) {
if (Math.abs(_local1.y - y1) < 20) {
if (((_local1.x > x1) and (_local1.x < x2)) or ((_local1.x > x2) and (_local1.x < x1))) {
if (_local1.body._y > -150) {
if (_local2.rage >= _local2.rage_goal) {
_local1.onfire = 3;
}
if (_local1.grab) {
f_FlipInverse(_local1, dude1);
if (_local2.punch_group == 3) {
_local1.speed_toss_y = -(random(10) + 30);
_local1.speed_toss_x = 0;
f_CallJuggle1(_local1);
_local1.body._y = _local3 - _local1.y;
} else {
_local1.speed_toss_y = -6;
_local1.speed_toss_x = (-random(6)) + 10;
f_CallJuggle1(_local1);
}
hit_impact = true;
if (_local1.y > hit_y) {
hit_x = _local1.x;
hit_y = _local1.y;
}
} else {
_local1.punch_function(_local1);
}
}
}
}
}
i++;
}
if (hit_impact) {
if (_local2.punch_group == 1) {
if (_local2.punch_num == 1) {
f_PunchSound();
} else if (_local2.punch_num == 2) {
f_PunchSound();
} else if (_local2.punch_num == 3) {
f_PunchSound();
} else if (_local2.punch_num == 4) {
f_HardPunchSound();
}
f_RageUp(_local2, int(_local2.rage_goal / 10));
} else if (_local2.punch_group == 2) {
if (((_local2.punch_num == 1) or (_local2.punch_num == 2)) or (_local2.punch_num == 3)) {
f_HardPunchSound();
} else if (((_local2.punch_num == 20) or (_local2.punch_num == 21)) or (_local2.punch_num == 22)) {
s_Smack1.start(0, 0);
}
f_RageUp(_local2, int(_local2.rage_goal / 10));
} else if (_local2.punch_group == 3) {
f_HardPunchSound();
f_RageUp(_local2, int(_local2.rage_goal / 10));
} else {
f_PunchSound();
f_RageUp(_local2, int(_local2.rage_goal / 60));
}
if (y1 > hit_y) {
hit_y = y1;
}
var u_depth = (hit_y + 2);
if ((_local2.punch_group == 1) and (_local2.punch_num == 3)) {
if (_local2.rage >= _local2.rage_goal) {
var impact_anim = "rageimpact";
} else {
var impact_anim = "impact2";
}
f_FX(hit_x, _local3, u_depth, impact_anim);
} else if (((_local2.punch_group == 1) and (_local2.punch_num == 4)) or ((_local2.punch_group == 2) and (_local2.punch_num == 22))) {
if (_local2.rage >= _local2.rage_goal) {
var impact_anim = "rageimpact";
} else {
var impact_anim = "impact3";
}
f_FX(hit_x, _local3, u_depth, impact_anim);
} else {
if (_local2.rage >= _local2.rage_goal) {
var impact_anim = "rageimpact";
} else {
var impact_anim = "impact1";
}
f_FX(hit_x, _local3, u_depth, impact_anim);
}
if ((_local2.punch_group == 2) and (_local2.punch_num >= 20)) {
f_FX(hit_x, _local3, u_depth - 1, "blood1");
}
} else if ((_local2.punch_num == 2) and (_local2.punch_group < 3)) {
_local2.punch_num = 0;
}
return(hit_impact);
}
function f_RageUp(zone, u_rageup) {
var _local2 = zone;
var _local3 = this;
_local2.rage = _local2.rage + u_rageup;
if (_local2.rage >= _local2.rage_goal) {
if ((_local2.rage - u_rageup) < _local2.rage_goal) {
i = 1;
while (i <= total_kids) {
var _local1 = _local3["kid" + i];
if (_local1.alive) {
_local1.speed_toss_y = -(random(10) + 40);
_local1.speed_toss_x = random(2) + 6;
f_CheckHold(_local1);
f_CallJuggle1(_local1);
_local1.nohit = true;
}
i++;
}
_local2.rage = _local2.rage + (_local2.rage_goal / 2);
f_CheckHold(_local2);
f_DropItem(_local2);
f_PunchReset(_local2);
_local2.gotoAndStop("powerup");
}
if (_local2.rage > (_local2.rage_goal * 2)) {
_local2.rage = _local2.rage_goal * 2;
}
}
}
function f_PushKid(zone, speed) {
var _local1 = zone;
if (!_local1.nohit) {
if (_local1._xscale > 0) {
f_MoveKid(_local1, false, -speed);
} else {
f_MoveKid(_local1, false, speed);
}
}
}
function f_Turn(zone) {
var _local1 = zone;
if (!_local1.punching) {
if (Key.isDown(_local1.button_left) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
if (Key.isDown(_local1.button_right) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
}
f_KidGrabbed(_local1);
}
}
function f_Walk(zone) {
var _local1 = zone;
_local1.walking = false;
_local1.dashing = false;
if (Key.isDown(_local1.button_left)) {
if (_local1.left_timer <= 0) {
_local1.left_last2 = _local1.left_timer;
_local1.left_timer = 1;
} else {
_local1.left_timer++;
}
} else if (_local1.left_timer > 0) {
_local1.left_last = _local1.left_timer;
_local1.left_timer = 0;
} else {
_local1.left_timer--;
}
if (Key.isDown(_local1.button_right)) {
if (_local1.right_timer <= 0) {
_local1.right_last2 = _local1.right_timer;
_local1.right_timer = 1;
} else {
_local1.right_timer++;
}
} else if (_local1.right_timer > 0) {
_local1.right_last = _local1.right_timer;
_local1.right_timer = 0;
} else {
_local1.right_timer--;
}
if ((_local1.left_timer > 0) and (_local1.left_timer > _local1.right_timer)) {
if (_local1._xscale > 0) {
f_FlipChar(_local1);
}
if (_local1.holding) {
var _local2 = _local1.speed_x / 2;
} else if ((_local1.left_last < g_dash_timer) and (_local1.left_last2 < g_dash_timer)) {
var _local2 = _local1.speed_x * 2;
_local1.dashing = true;
} else {
var _local2 = _local1.speed_x;
}
if (_local1.rage >= _local1.rage_goal) {
var _local2 = _local2 * 1.5;
}
f_MoveChar(_local1, false, -_local2);
if (_local1.diagonalhit) {
f_MoveChar(_local1, true, -_local2);
}
_local1.walking = true;
}
if ((_local1.right_timer > 0) and (_local1.right_timer > _local1.left_timer)) {
if (_local1._xscale < 0) {
f_FlipChar(_local1);
}
if (_local1.holding) {
var _local2 = _local1.speed_x / 2;
} else if ((_local1.right_last < g_dash_timer) and (_local1.right_last2 < g_dash_timer)) {
var _local2 = _local1.speed_x * 2;
_local1.dashing = true;
} else {
var _local2 = _local1.speed_x;
}
if (_local1.rage >= _local1.rage_goal) {
var _local2 = _local2 * 1.5;
}
f_MoveChar(_local1, false, _local2);
if (_local1.diagonalhit) {
f_MoveChar(_local1, true, _local2);
}
_local1.walking = true;
}
if (Key.isDown(_local1.button_up)) {
_local1.up_timer++;
} else {
_local1.up_timer = 0;
}
if (Key.isDown(_local1.button_down)) {
_local1.down_timer++;
} else {
_local1.down_timer = 0;
}
if (_local1.holding) {
var _local2 = _local1.speed_y / 2;
} else {
var _local2 = _local1.speed_y;
}
if ((_local1.up_timer > 0) and (_local1.up_timer > _local1.down_timer)) {
if (_local1.rage >= _local1.rage_goal) {
var _local2 = _local2 * 1.5;
}
f_MoveChar(_local1, true, -_local2);
if (_local1.diagonalhit) {
f_MoveChar(_local1, false, -_local2);
}
_local1.walking = true;
}
if ((_local1.down_timer > 0) and (_local1.down_timer > _local1.up_timer)) {
if (_local1.rage >= _local1.rage_goal) {
var _local2 = _local2 * 1.5;
}
f_MoveChar(_local1, true, _local2);
if (_local1.diagonalhit) {
f_MoveChar(_local1, false, _local2);
}
_local1.walking = true;
}
if (_local1.insand) {
if (_local1.walking) {
if (sandbox.sand_timer <= 0) {
sandbox.sand_timer = 5;
f_FX(_local1.x, _local1.y + 10, int(_local1.y) + 1, "sand", _local1._xscale);
}
}
}
}
function f_HoldWalk(zone) {
var _local1 = zone;
if (_local1.hold_delay > 0) {
_local1.hold_delay--;
f_Turn(_local1);
} else {
_local1.holding = true;
f_Walk(_local1);
_local1.holding = false;
f_KidGrabbed(_local1);
if (_local1.walking) {
_local1.legs.gotoAndStop("walk");
} else {
_local1.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) {
var _local1 = zone;
f_ToggleQuality();
if (!pause) {
if (!f_Grab(_local1)) {
f_Walk(_local1);
if (_local1.dashing) {
_local1.dashing_timer++;
if ((_local1.dashing_timer == 1) or ((_local1.dashing_timer % 10) == 0)) {
if (_local1.insand) {
f_FX(_local1.x, _local1.y + 10, int(_local1.y) + 1, "sand", _local1._xscale);
} else {
f_FX(_local1.x, _local1.y + 10, int(_local1.y) + 1, "dust1", _local1._xscale);
}
}
_local1.gotoAndStop("dash");
} else {
_local1.dashing_timer = 0;
if (_local1.walking) {
_local1.gotoAndStop("walk");
} else {
_local1.gotoAndStop("stand");
}
}
f_Punch(_local1);
}
} else {
_local1.gotoAndStop("stand");
}
}
function f_OnScreen(u_char) {
var _local2 = u_char.x + game_x;
var _local1 = u_char._width;
if (((_local2 + _local1) > 0) and ((_local2 - _local1) < screen_width)) {
return(true);
}
return(false);
}
function f_AutoTake(zone, u_object, vert, speed) {
var _local1 = u_object;
var _local2 = speed;
var _local3 = zone;
var u_take = false;
if (_local1.autotake) {
u_take = true;
u_get = false;
if (_local3.grab_pointer == undefined) {
if (_local3.item == eval("NULL")) {
if (!_local3.nohit) {
if (_local3.health > 0) {
if (_local3.body._y >= 0) {
_local1.owner = _local3;
_local3.item = _local1;
_local1.autoaction(_local1);
u_get = true;
}
}
}
}
}
if (u_get == false) {
if (!vert) {
if ((_local2 > 0) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
} else if ((_local2 < 0) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
}
}
if (!f_MoveKid(_local1, vert, _local2)) {
f_MoveKid(_local1, vert, -_local2);
}
if (_local1._xscale > 0) {
_local1.body.body._rotation = _local1.body.body._rotation + _local2;
} else {
_local1.body.body._rotation = _local1.body.body._rotation - _local2;
}
if (!vert) {
_local1.speed_toss_x = Math.abs(_local2);
_local1.gotoAndStop("hitground1");
}
}
}
return(u_take);
}
function f_Mask(zone) {
var _local1 = zone;
var mask_h = _local1.mask_pt.range._height;
var mask_w = _local1.mask_pt.range._width;
var _local2 = 100 / Math.abs(_local1._xscale);
var _local3 = 100 / _local1._yscale;
_local2 = 1;
_local3 = 1;
_local1.mask._yscale = 100 * _local3;
if (_local1._xscale < 0) {
_local1.mask._xscale = -(100 * _local2);
_local1.mask._x = (_local1.x - _local1.mask_pt.x) * _local2;
_local1.mask._y = (_local1.mask_pt.y - _local1._y) * _local3;
} else if (_local1._xscale > 0) {
_local1.mask._xscale = 100 * _local2;
_local1.mask._x = (_local1.mask_pt.x - _local1.x) * _local2;
_local1.mask._y = (_local1.mask_pt.y - _local1._y) * _local3;
}
}
function f_CheckMask(zone, u_compare) {
var _local1 = zone;
if (_local1.mask_pt == u_compare) {
_local1.mask_pt = undefined;
_local1.mask.gotoAndStop(1);
}
}
function f_SpawnMask(zone) {
var _local2 = zone;
var _local3 = statics_min;
while (_local3 <= total_statics) {
var _local1 = this["static" + _local3];
if (_local1.mask > 0) {
var x = (_local1.x + _local1.zone._x);
var y = (_local1.y + _local1.zone._y);
var h = (_local1.zone._height * (_local1._yscale / 100));
var w = ((_local1.zone._width / 2) * (Math.abs(_local1._xscale) / 100));
if (Math.abs(_local2._x - x) < w) {
if ((_local2._y > (y - h)) and (_local2._y < y)) {
var x1 = (x + _local1.left._x);
var x2 = (x + _local1.right._x);
var w = Math.abs(x1 - x2);
h = Math.abs(_local1.left._y - _local1.right._y);
var percent = (1 - ((y - _local2.y) / h));
var temp_x = (x1 + (w * percent));
if (_local2.x > temp_x) {
_local2.mask_pt = _local1;
_local2.mask.gotoAndStop(_local1.mask);
f_Mask(_local2);
}
}
}
}
_local3++;
}
}
function f_HitWallGroup(zone, vert, speed, group_total, group_min, group_name) {
var _local1 = zone;
var _local3 = speed;
var return_val = false;
i = group_min;
while (i <= group_total) {
var _local2 = this[group_name + i];
var xscale_val = (Math.abs(_local2._xscale) / 100);
var yscale_val = (Math.abs(_local2._yscale) / 100);
var x = (_local2.x + _local2.zone._x);
var y = ((_local2.y + _local2.zone._y) + 2);
var h = (_local2.zone._height * yscale_val);
var w = ((_local2.zone._width / 2) * xscale_val);
if (vert) {
if (Math.abs(_local1.x - x) < w) {
if (_local2.diagonal) {
if (((_local1.y + _local3) >= (y - h)) and ((_local1.y + _local3) <= (y + 150))) {
var percent = ((_local2.x2 - _local1.x) / _local2.w);
var temp_y = (y - (_local2.h * percent));
if (_local2.mask > 0) {
if (_local1.y < temp_y) {
_local1.mask_pt = _local2;
_local1.mask.gotoAndStop(_local2.mask);
} else {
f_CheckMask(_local1, _local2);
}
}
if (Math.abs(_local1.x - x) < (_local2.w / 2)) {
if ((((_local3 > 0) and (_local1.y <= temp_y)) and ((_local1.y + _local3) >= (temp_y - _local2.h2))) or (((_local3 < 0) and (_local1.y >= temp_y)) and ((_local1.y + _local3) <= (temp_y + _local2.h2)))) {
if (_local3 > 0) {
_local1.diagonal_speed = (temp_y - _local2.h2) - _local1.y;
} else {
_local1.diagonal_speed = (temp_y + _local2.h2) - _local1.y;
}
_local1.collide = _local2;
_local1.diagonalhit = true;
return_val = true;
}
}
} else {
f_CheckMask(_local1, _local2);
}
} else if ((_local1.y < (y - h)) and ((_local1.y + _local3) >= (y - h))) {
if (f_AutoTake(_local1, _local2, vert, _local3) == false) {
return_val = true;
}
} else if ((_local1.y > y) and ((_local1.y + _local3) <= y)) {
if (f_AutoTake(_local1, _local2, vert, _local3) == false) {
return_val = true;
}
}
} else {
f_CheckMask(_local1, _local2);
}
} else if ((_local1.y > (y - h)) and (_local1.y < y)) {
if (_local2.diagonal) {
if (((_local1.x + _local3) > (x - w)) and ((_local1.x + _local3) < (x + w))) {
var percent = (1 - ((y - _local1.y) / _local2.h));
var temp_x = (_local2.x1 + (_local2.w * percent));
if (_local2.mask > 0) {
if (_local1.x > temp_x) {
_local1.mask_pt = _local2;
_local1.mask.gotoAndStop(_local2.mask);
} else {
f_CheckMask(_local1, _local2);
}
}
if ((_local1.y > (y - _local2.h)) and (_local1.y < y)) {
if ((((_local3 > 0) and (_local1.x <= temp_x)) and ((_local1.x + _local3) >= (temp_x - _local2.w2))) or (((_local3 < 0) and (_local1.x >= temp_x)) and ((_local1.x + _local3) <= (temp_x + _local2.w2)))) {
if (_local1.body._y > (_local2.zone._y - _local2.zone._height)) {
if (_local3 > 0) {
_local1.diagonal_speed = (temp_x - _local2.w2) - _local1.x;
} else {
_local1.diagonal_speed = (temp_x + _local2.w2) - _local1.x;
}
_local1.collide = _local2;
_local1.diagonalhit = true;
return_val = true;
}
}
}
} else {
f_CheckMask(_local1, _local2);
}
} else if (((_local1.x < (x - w)) and ((_local1.x + _local3) >= (x - w))) or ((_local1.x > (x + w)) and ((_local1.x + _local3) <= (x + w)))) {
if ((_local1.body._y + _local1.y) > (y - (_local2._height + 20))) {
if (f_AutoTake(_local1, _local2, vert, _local3) == false) {
_local1.collide = _local2;
return_val = true;
}
}
}
} else {
f_CheckMask(_local1, _local2);
}
i++;
}
return(return_val);
}
function f_HitWall(zone, vert, speed) {
var _local2 = zone;
var _local1 = false;
if (f_HitWallGroup(_local2, vert, speed, total_objects, 1, "object_pt")) {
_local1 = true;
} else if (f_HitWallGroup(_local2, vert, speed, total_statics, statics_min, "static")) {
_local1 = true;
}
_local2.hitwall = _local1;
return(_local1);
}
function f_CheckSpawnObject(zone, u_object) {
var _local1 = u_object;
var _local3 = zone;
var x = (_local1.x + _local1.zone._x);
var _local2 = _local1.y + _local1.zone._y;
var h = (_local1.zone._height * (_local1._yscale / 100));
var w = ((_local1.zone._width / 2) * (_local1._xscale / 100));
if (Math.abs(_local3.x - x) < w) {
if (_local3.y < _local2) {
if (_local3.y > (_local2 - h)) {
f_SetXY(_local3, _local3.x, _local2 + 2);
}
}
}
}
function f_CheckSpawn(zone) {
var _local2 = this;
var _local3 = zone;
i = 1;
while (i <= total_objects) {
var _local1 = _local2["object_pt" + i];
f_CheckSpawnObject(_local3, _local1);
i++;
}
i = statics_min;
while (i <= total_statics) {
var _local1 = _local2["static" + i];
f_CheckSpawnObject(_local3, _local1);
i++;
}
}
function f_SoccerBall(zone) {
var _local1 = zone;
if (_local1.moving) {
_local1.moving = false;
_local1.body.gotoAndStop("roll");
} else {
_local1.body.gotoAndStop("idle");
}
}
function f_ShareMask(u_source, u_slave) {
var _local1 = u_slave;
_local1.mask_pt = u_source.mask_pt;
if (_local1.mask_pt == undefined) {
_local1.mask.gotoAndStop(1);
} else {
_local1.mask.gotoAndStop(_local1.mask_pt.mask);
}
f_Mask(_local1);
}
function f_MoveItem(u_owner, u_item, u_speed) {
var _local1 = u_item;
var _local2 = u_owner;
if (_local2._xscale > 0) {
_local1.x = _local2.x + 25;
} else {
_local1.x = _local2.x - 25;
}
f_FlipSame(_local1, _local2);
_local1.y = _local2.y + 1;
_local1._x = _local1.x;
_local1._y = _local1.y;
_local1.shadow_pt._x = _local1.x;
_local1.shadow_pt._y = _local1.y;
_local1.moving = true;
f_Depth(_local1, _local1.y);
f_ShareMask(_local2, _local1);
}
function f_MoveChar(zone, vert, speed) {
var _local1 = zone;
var _local2 = speed;
var _local3 = vert;
_local1.bounds = false;
_local1.diagonalhit = false;
if (_local3) {
if ((_local1.y + _local2) > limit_bottomright.y) {
_local2 = (limit_bottomright.y - _local1.y) + _local2;
} else if ((_local1.y + _local2) < limit_topleft.y) {
_local2 = (limit_topleft.y - _local1.y) + _local2;
}
if (f_HitWall(_local1, _local3, _local2)) {
if (_local1.diagonalhit) {
_local2 = _local1.diagonal_speed;
} else {
_local2 = 0;
}
}
_local1.y = _local1.y + _local2;
f_Depth(_local1, _local1.y);
} else {
if (f_HitWall(_local1, _local3, _local2)) {
if (_local1.diagonalhit) {
_local2 = _local1.diagonal_speed;
} else {
_local2 = 0;
}
}
if (((_local1.x + _local2) < limit_bottomright.x) and ((_local1.x + _local2) > limit_topleft.x)) {
_local1.x = _local1.x + _local2;
} else {
_local1.bounds = true;
_local2 = 0;
}
}
_local1._x = _local1.x;
_local1._y = _local1.y;
if (_local1.mask_pt != undefined) {
f_Mask(_local1);
}
if (_local1.item) {
f_MoveItem(_local1, _local1.item, _local2);
}
if (_local1.scroller) {
if (_local3) {
if (((_local2 > 0) and ((_local1.y + game_y) < (screen_height / 2))) or ((_local2 < 0) and ((_local1.y + game_y) > (screen_height / 2)))) {
_local2 = _local2 * (((screen_height / 2) - Math.abs((_local1.y + game_y) - (screen_height / 2))) / (screen_height / 2));
}
} else if (((_local2 > 0) and ((_local1.x + game_x) < (screen_width / 2))) or ((_local2 < 0) and ((_local1.x + game_x) > (screen_width / 2)))) {
_local2 = _local2 * (((screen_width / 2) - Math.abs((_local1.x + game_x) - (screen_width / 2))) / (screen_width / 2));
}
f_Scroll(_local2, _local3);
}
_local1.shadow_pt._x = _local1.x;
_local1.shadow_pt._y = _local1.y;
}
function f_DepthVal(u_depth_mod, u_depth) {
return((u_depth * 1000) + u_depth_mod);
}
function f_Depth(u_char, u_depth) {
var _local1 = u_char;
if (_local1.depth_mod == undefined) {
trace("NO DEPTH: " + _local1);
}
_local1.current_depth = (u_depth * 1000) + _local1.depth_mod;
_local1.swapDepths(_local1.current_depth);
}
function f_CompareDepths_Set(u_char, u_compare) {
var _local1 = u_compare;
var _local2 = u_char;
if (_local2 != _local1) {
if (_local2.current_depth == _local1.current_depth) {
trace((_local2 + " has overwritten ") + _local1);
}
}
}
function f_SetDepths() {
if (dude1 != eval("NULL")) {
f_Depth(dude1, dude1.y);
}
i = 1;
while (i <= total_kids) {
var _local3 = this["kid" + i];
if (_local3 != eval("NULL")) {
f_Depth(_local3, _local3.y);
}
i++;
}
i = 1;
while (i <= object_index) {
var _local1 = this["object" + i];
_local1.x = _local1._x;
_local1.y = _local1._y;
_local1.depth_y = _local1.y;
f_Depth(_local1, _local1.y);
i++;
}
i = 1;
while (i <= static_index) {
var _local2 = this["static" + i];
static_dm_current = static_dm_current + 2;
_local2.depth_mod = static_dm_current + static_dm_default;
_local2.depth_y = _local2.y;
f_Depth(_local2, _local2.y);
i++;
}
}
function f_SpawnKids() {
var _local1 = this;
i = 1;
while (i <= total_kids) {
u_temp = _local1["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) {
var _local1 = speed;
if (vert) {
if (((limit_topleft.y - _local1) + game_y) < (screen_height - 100)) {
if (((limit_bottomright.y - _local1) + game_y) > screen_height) {
game_y = game_y - _local1;
_y = game_y;
bg0._y = bg0._y - (_local1 * 0.25);
bg1._y = bg1._y + (_local1 / 2);
bg2._y = bg2._y + (_local1 * 0.65);
}
}
} else if (((limit_topleft.x - _local1) + game_x) < 0) {
if (((limit_bottomright.x - _local1) + game_x) > screen_width) {
game_x = game_x - _local1;
_x = game_x;
bg0._x = bg0._x - (_local1 * 0.25);
bg1._x = bg1._x + (_local1 / 2);
bg2._x = bg2._x + (_local1 * 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) {
var _local1 = u_hud;
var _local2 = u_zone;
_local1.root = true;
_local1.shirt_type = _local2.shirt_type;
_local1.hat_type = _local2.hat_type;
_local1.skin_type = _local2.skin_type;
_local1.gotoAndPlay(2);
_local1.name.gotoAndStop(_local2.name);
f_Skin(_local1.name.kid.kid);
}
function f_Damage(damage_zone, damage_pow) {
var _local1 = damage_zone;
var _local3 = _root;
_local1.health = _local1.health - damage_pow;
f_DropItem(_local1);
combo_count++;
combo_timer = 30;
if (combo_count >= 3) {
_local3.combo_counter.gotoAndPlay(2);
}
if (_local1.lifebar) {
if (_local1.atv) {
_local1.s_atvengine.stop();
s_explosion6.start(0, 0);
f_FX(_local1.x, _local1.y, int(_local1.y) + 2, "atv_explode", _local1._xscale, _local1._yscale);
_local1.atv = false;
f_KidSettings(_local1);
_local1.onfire = 2;
_local1.shadow_pt._xscale = 100;
_local1.speed_toss_y = -(random(10) + 20);
_local1.speed_toss_x = random(2) + 1;
f_CheckHold(_local1);
f_CallJuggle1(_local1);
}
var u_found = false;
j = 1;
while (j <= total_huds) {
var _local2 = _local3["hud" + j];
if ((_local2.kid_pointer == _local1) and (!_local2.ready)) {
f_UpdateHUD(_local2, _local1);
u_found = true;
j = total_huds + 1;
}
j++;
}
if (!u_found) {
j = 1;
while (j <= total_huds) {
var _local2 = _local3["hud" + j];
if (_local2.ready) {
_local2.ready = false;
_local2.kid_pointer = _local1;
f_UpdateHUD(_local2, _local1);
j = total_huds + 1;
}
j++;
}
}
} else if (_local1 == dude1) {
f_RageDown(int(dude1.rage_goal / 2));
_local3.hud.f_HealthBar();
}
}
function f_KidInit(zone) {
var _local1 = zone;
_local1.lifebar = true;
_local1.health_max = 60;
_local1.health = _local1.health_max;
_local1.alive = true;
_local1.speed_x = random(5) + 5;
_local1.speed_y = random(3) + 3;
_local1.weight = 0;
if (_local1._xscale < 0) {
_local1.speed_x = _local1.speed_x * -1;
}
if (random(2) == 1) {
_local1.speed_y = _local1.speed_y * -1;
}
_local1.speed_x = _local1.speed_x * 0.5;
_local1.speed_y = _local1.speed_y * 0.5;
_local1.grab = true;
}
function f_MoveKid(zone, vert, speed) {
var _local1 = zone;
var _local2 = speed;
return_val = true;
_local1.bounds = false;
if (f_HitWall(_local1, vert, _local2)) {
_local2 = 0;
return_val = false;
}
if (vert) {
_local1.y = _local1.y + _local2;
f_Depth(_local1, _local1.y);
_local1._y = _local1.y;
} else {
_local1.x = _local1.x + _local2;
_local1._x = _local1.x;
if (_local1.x > limit_bottomright.x) {
if (_local2 > 0) {
_local1.bounds = true;
}
} else if (_local1.x < limit_topleft.x) {
if (_local2 < 0) {
_local1.bounds = true;
}
}
}
if (_local1.mask_pt != undefined) {
f_Mask(_local1);
}
_local1.shadow_pt._x = _local1.x;
_local1.shadow_pt._y = _local1.y;
if (_local1.item) {
f_MoveItem(_local1, _local1.item, _local2);
}
return(return_val);
}
function f_KidRun(zone) {
var _local1 = zone;
if ((_local1.speed_x > 0) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.speed_x < 0) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
if (!f_MoveKid(_local1, false, _local1.speed_x)) {
_local1.speed_x = _local1.speed_x * -1;
}
if (!f_MoveKid(_local1, true, _local1.speed_y)) {
_local1.speed_y = _local1.speed_y * -1;
}
if ((_local1.y > limit_bottomright.y) and (_local1.speed_y > 0)) {
_local1.speed_y = _local1.speed_y * -1;
} else if ((_local1.y < limit_topleft.y) and (_local1.speed_y < 0)) {
_local1.speed_y = _local1.speed_y * -1;
}
if ((_local1.x > limit_bottomright.x) and (_local1.speed_x > 0)) {
_local1.speed_x = _local1.speed_x * -1;
} else if ((_local1.x < limit_topleft.x) and (_local1.speed_x < 0)) {
_local1.speed_x = _local1.speed_x * -1;
}
}
function f_DashReset(zone) {
var _local1 = zone;
_local1.right_last = 100;
_local1.right_last2 = 0;
_local1.left_last = 100;
_local1.left_last2 = 0;
}
function f_PunchReset(zone) {
var _local1 = zone;
_local1.punch_group = 0;
_local1.punch_num = 0;
_local1.punching = false;
}
function f_GrabReset(zone) {
u_ClearPointer.grab_pointer = undefined;
}
function f_StandSettings(zone) {
var _local1 = zone;
f_PunchReset(_local1);
f_GrabReset(_local1);
_local1.nohit = false;
_local1.onfire = 1;
_local1.onground = false;
f_CheckDead(_local1);
}
function f_StompRange(zone) {
var _local2 = zone;
var _local3 = false;
var close_stomp = false;
i = 1;
while (i <= total_kids) {
var _local1 = this["kid" + i];
if (_local1.alive) {
if (Math.abs(_local1.x - _local2.x) < 40) {
if (Math.abs(_local1.y - _local2.y) < 20) {
if (_local1.onground) {
close_stomp = true;
} else {
_local3 = true;
i = total_kids + 1;
}
}
}
}
i++;
}
if ((_local3 == false) and close_stomp) {
return(true);
}
return(false);
}
function f_PickupRange(zone) {
var _local1 = zone;
var _local3 = this;
var _local2 = false;
i = 1;
while (i <= total_objects) {
u_temp = _local3["object_pt" + i];
if (u_temp.grab) {
if (Math.abs(u_temp.y - _local1.y) < 20) {
if (Math.abs(u_temp.x - _local1.x) < ((u_temp._width / 2) + 20)) {
if ((((_local1.x < u_temp.x) and (_local1._xscale > 0)) or ((_local1.x > u_temp.x) and (_local1._xscale < 0))) or (Math.abs(u_temp.x - _local1.x) < ((u_temp._width / 2) - 10))) {
if (u_temp.body._y >= -10) {
_local2 = true;
_local1.punched = true;
i = total_objects + 1;
_local1.grab_pointer = u_temp;
_local1.grab_pointer.distance = 0;
_local1.grab_counter = 0;
f_KidGrabbed(_local1);
u_temp.gotoAndStop("pickup_item");
_local1.gotoAndStop("pickup_item");
}
}
}
}
}
i++;
}
return(_local2);
}
function f_Punch(zone) {
var _local1 = zone;
if (_local1.item != eval("NULL")) {
var _local3 = false;
if (Key.isDown(_local1.button_punch1)) {
_local1.punched = true;
_local3 = true;
} else if (Key.isDown(_local1.button_punch2)) {
_local1.punched2 = true;
_local3 = true;
}
if (_local3) {
f_SoundSwing(4);
if (_local1.item == soccerball) {
_local1.punch_group = 1;
_local1.punch_num = 4;
var _local2 = 1;
} else if (Key.isDown(_local1.button_up)) {
_local1.punch_group = 3;
_local1.punch_num = 1;
var _local2 = 3;
} else {
_local1.punch_group = 1;
_local1.punch_num = 3;
var _local2 = 2;
}
f_FlipInverse(_local1.item, _local1);
f_SetXY(_local1.item, _local1.x, _local1.item.y);
if (_local2 == 3) {
f_HoopShot(_local1.item);
} else {
_local1.item.speed_toss_y = -3;
_local1.item.speed_toss_x = 30;
_local1.item.gotoAndStop("release");
}
_local1.item.owner = eval("NULL");
_local1.item = eval("NULL");
if (_local2 == 1) {
f_PunchSound();
_local1.gotoAndStop("punch1_4");
_local1.body.gotoAndPlay(4);
} else if (_local2 == 2) {
_local1.gotoAndStop("punch1_3");
} else if (_local2 == 3) {
_local1.gotoAndStop("uppercut");
}
}
} else if ((((Key.isDown(_local1.button_punch1) and Key.isDown(_local1.button_punch2)) and (!_local1.punching)) and (!_local1.punched)) and (!_local1.punched2)) {
_local1.punched = true;
_local1.punched2 = true;
_local1.punching = true;
f_SoundSwing(3);
_local1.punch_group = 3;
_local1.punch_num = 1;
_local1.gotoAndStop("uppercut");
} else {
if (Key.isDown(_local1.button_punch1)) {
if ((!_local1.punched) and (!_local1.punching)) {
_local1.punched = true;
_local1.punching = true;
if (f_PickupRange(_local1)) {
return;
}
if (_local1.dashing) {
if (_local1._xscale > 0) {
_local1.speed_slam = 15;
} else {
_local1.speed_slam = -15;
}
_local1.punch_group = 4;
_local1.punch_num = 1;
f_DashReset(_local1);
_local1.dashing = false;
_local1.gotoAndStop("dashslam");
} else if (f_StompRange(_local1) and (_local1.body._y > -3)) {
_local1.gotoAndStop("stomp");
} else if ((_local1.punch_group == 5) and (_local1.punch_num == 1)) {
_local1.punch_num = 2;
_local1.gotoAndStop("knife2");
} else if (_local1.punch_group == 1) {
if (_local1.punch_num == 1) {
f_SoundSwing(4);
_local1.punch_num = 2;
_local1.gotoAndStop("punch1_2");
} else if (_local1.punch_num == 2) {
f_SoundSwing(4);
_local1.punch_num = 3;
_local1.gotoAndStop("punch1_3");
} else if (_local1.punch_num == 3) {
f_SoundSwing(2);
_local1.punch_num = 4;
_local1.gotoAndStop("punch1_4");
} else {
f_SoundSwing(5);
_local1.punch_num = 1;
_local1.gotoAndStop("punch1_1");
}
} else {
f_SoundSwing(5);
_local1.punch_group = 1;
_local1.punch_num = 1;
_local1.gotoAndStop("punch1_1");
}
}
} else {
_local1.punched = false;
}
if (Key.isDown(_local1.button_punch2)) {
if ((!_local1.punched2) and (!_local1.punching)) {
_local1.punched2 = true;
_local1.punching = true;
if (_local1.dashing) {
if (_local1._xscale > 0) {
_local1.speed_slam = 18;
} else {
_local1.speed_slam = -18;
}
_local1.punch_group = 4;
_local1.punch_num = 2;
f_DashReset(_local1);
_local1.dashing = false;
_local1.gotoAndStop("dashpunch");
} else if (f_StompRange(_local1)) {
_local1.gotoAndStop("stomp");
} else if ((_local1.punch_group == 1) and (_local1.punch_num == 1)) {
_local1.punch_group = 5;
_local1.punch_num = 1;
_local1.gotoAndStop("knife1");
} else if ((_local1.punch_group == 1) and (_local1.punch_num == 4)) {
_local1.punch_group = 2;
_local1.punch_num = 20;
_local1.gotoAndStop("jugglehit1");
} else if ((_local1.punch_group == 4) and (_local1.punch_num == 2)) {
_local1.punch_num = 3;
_local1.gotoAndStop("crazy");
_local1.body.gotoAndPlay(1);
} else if ((_local1.punch_group == 4) and (_local1.punch_num == 3)) {
_local1.gotoAndStop("crazy");
_local1.body.speed_y = _local1.body.speed_y - 20;
_local1.body.gotoAndPlay("hitloop");
} else {
_local1.punch_group = 2;
if (_local1.punch_num == 1) {
_local1.punch_num = 2;
_local1.gotoAndStop("punch2_2");
} else if (_local1.punch_num == 2) {
_local1.punch_num = 3;
_local1.gotoAndStop("punch2_3");
} else if (_local1.punch_num == 20) {
_local1.punch_num = 21;
_local1.gotoAndStop("jugglehit2");
} else if (_local1.punch_num == 21) {
_local1.punch_num = 22;
_local1.gotoAndStop("jugglehit3");
} else {
_local1.punch_num = 1;
_local1.gotoAndStop("punch2_1");
}
}
}
} else {
_local1.punched2 = false;
}
}
}
function f_Boss1Scroll(zone) {
var _local1 = (zone.x + _x) - 440;
if (_local1 > 10) {
var _local2 = 1 + (_local1 * 0.05);
f_Scroll(_local2, false);
}
}
function f_Boss1Scroll2(zone) {
var _local1 = (zone.x + _x) - 220;
if (_local1 < -10) {
var _local2 = 1 + (_local1 * 0.05);
f_Scroll(_local2, false);
}
}
function f_Boss1ElboHit(zone) {
var _local1 = zone;
if (Math.abs(_local1.x - dude1.x) < 101) {
if (Math.abs(_local1.y - dude1.y) <= 10) {
if (dude1.health > 0) {
u_impact = true;
f_Damage(dude1, 10);
if (((dude1.x < _local1.x) and (dude1._xscale < 0)) or ((dude1.x >= _local1.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) {
var _local1 = zone;
if (Math.abs(_local1.x - dude1.x) < 101) {
if (Math.abs(_local1.y - dude1.y) <= 10) {
if (dude1.health > 0) {
u_impact = true;
f_Damage(dude1, 10);
if (((dude1.x < _local1.x) and (dude1._xscale < 0)) or ((dude1.x >= _local1.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) {
var _local1 = zone;
if (Math.abs(_local1.x - dude1.x) <= 61) {
if (Math.abs(_local1.y - dude1.y) <= 10) {
if (dude1.health > 0) {
u_impact = true;
f_Damage(dude1, 10);
if (((dude1.x < _local1.x) and (dude1._xscale < 0)) or ((dude1.x >= _local1.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) {
var _local1 = zone;
if (_local1.success_y) {
if ((_local1.x < dude1.x) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > dude1.x) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
}
if (_local1.success_x) {
if ((_local1.y < dude1.y) and _local1.north) {
_local1.north = false;
} else if ((_local1.y > dude1.y) and (!_local1.north)) {
_local1.north = true;
}
}
if (_local1.success_y == false) {
if (_local1._xscale > 0) {
var target_x = (dude1.x + 300);
} else {
var target_x = (dude1.x - 300);
}
} else if (_local1.x < dude1.x) {
var target_x = (dude1.x - 90);
} else {
var target_x = (dude1.x + 90);
}
if (_local1.success_x == false) {
if (_local1.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(_local1.y - target_y, _local1.x - target_x));
var _local3 = -4 * Math.cos(PI * dir);
var _local2 = -4 * Math.sin(PI * dir);
_local1.last_x = _local3;
_local1.last_y = _local2;
_local1.success_x = f_MoveKid(_local1, false, _local3);
_local1.success_y = f_MoveKid(_local1, true, _local2);
if (!_local1.success_x) {
_local1.success_x = f_MoveKid(_local1, false, _local3);
if (!_local1.success_y) {
_local1.success_y = f_MoveKid(_local1, true, _local2);
}
}
if ((_local1.y >= dude1.y) and (_local1.y < (dude1.y + 5))) {
if (dude1.body._y > -50) {
if (!dude1.nohit) {
if (Math.abs(_local1.x - dude1.x) < 91) {
var took_punch = false;
if (_local1.punch_clock < 60) {
_local1.punch_count++;
if (_local1.punch_count > 3) {
_local1.punch_count = 0;
took_punch = true;
_local1.gotoAndStop("punch4");
}
} else {
_local1.punch_count = 0;
}
_local1.punch_clock = 0;
if (took_punch == false) {
if (Math.abs(_local1.x - dude1.x) < 61) {
_local1.gotoAndStop("punch2");
} else if (_local1.lastpunch == 1) {
_local1.lastpunch = 3;
_local1.gotoAndStop("punch3");
} else {
_local1.lastpunch = 1;
_local1.gotoAndStop("punch1");
}
}
}
}
}
}
}
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 _local3 = dude1.y + (total_kids * 5);
kid_dm_current = kid_dm_current + 2;
var _local2 = kid_dm_current + kid_dm_default;
attachMovie("boss1", kid_name, f_DepthVal(_local2, _local3));
attachMovie("shadow", shadow_name, total_kids - 200);
var _local1 = this["kid" + total_kids];
_local1.depth_mod = _local2;
_local1.x = limit_bottomright.x - 250;
_local1.y = limit_topleft.y + 100;
_local1._x = _local1.x;
_local1._y = _local1.y;
_local1.shadow_pt = this["shadow" + current_shadow];
current_shadow++;
_local1.shadow_pt._x = _local1.x;
_local1.shadow_pt._y = _local1.y;
f_Depth(_local1, _local1.y);
_local1.health_max = 200;
_local1.health = _local1.health_max;
_local1.alive = true;
_local1.speed_x = 3;
_local1.speed_y = 2;
_local1.name = 100;
_local1.weight = 10;
_local1.grab = false;
_local1.lifebar = true;
_local1.punch_clock = 0;
_local1.punch_count = 0;
f_FlipChar(_local1);
f_KidSettings(_local1);
_local1.gotoAndStop("intro");
f_SetXY(boss1fodder, _local1.x - 100, _local1.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, 0);
}
function f_SpawnSunChips() {
total_kids++;
var kid_name = ("kid" + total_kids);
var shadow_name = ("shadow" + current_shadow);
var _local3 = dude1.y + (total_kids * 5);
kid_dm_current = kid_dm_current + 2;
var _local2 = kid_dm_current + kid_dm_default;
attachMovie("sunchips", kid_name, f_DepthVal(_local2, _local3));
attachMovie("shadow", shadow_name, total_kids - 200);
var _local1 = this["kid" + total_kids];
_local1.depth_mod = _local2;
_local1.x = limit_bottomright.x - 300;
_local1.y = limit_topleft.y + 200;
_local1._x = _local1.x;
_local1._y = _local1.y;
_local1.shadow_pt = this["shadow" + current_shadow];
current_shadow++;
_local1.shadow_pt._x = _local1.x;
_local1.shadow_pt._y = _local1.y;
f_Depth(_local1, _local1.y);
_local1.health_max = 400;
_local1.health = _local1.health_max;
_local1.alive = true;
_local1.speed_x = 3;
_local1.speed_y = 2;
_local1.name = 101;
_local1.weight = 10;
_local1.grab = false;
_local1.lifebar = true;
_local1.punch_clock = 0;
_local1.punch_count = 0;
_local1.ammo = 2;
f_FlipChar(_local1);
f_KidSettings(_local1);
_local1.gotoAndStop("intro");
}
function f_DartAction(zone) {
var _local1 = zone;
if (_local1.hit) {
_local1._x = _local1._x + _local1.speed_x;
_local1.shadow_pt._x = _local1._x;
_local1.dart._y = _local1.dart._y + _local1.speed_y;
_local1.speed_y = _local1.speed_y + 1;
_local1.dart._rotation = _local1.dart._rotation + _local1.rotation_speed;
var _local2 = 90 + (_local1.dart._y / 2);
if (_local2 < 10) {
_local2 = 10;
}
_local1.shadow_pt._xscale = _local2;
_local1.shadow_pt._yscale = _local2;
if (_local1.dart._y > 0) {
if (_local1.bounces > 1) {
_local1.bounces--;
_local1.dart._y = 0;
_local1.speed_y = -4 * _local1.bounces;
} else {
f_RemoveChar(_local1.shadow_pt);
_local1.gotoAndStop("remove");
}
}
} else {
_local1._x = _local1._x + _local1.speed_x;
_local1.shadow_pt._x = _local1._x;
_local1.dart._y = _local1.dart._y + _local1.speed_y;
_local1.speed_y = _local1.speed_y + 0.2;
_local1.dart._rotation = _local1.dart._rotation + 0.2;
var _local2 = 90 + (_local1.dart._y / 2);
if (_local2 < 10) {
_local2 = 10;
}
_local1.shadow_pt._xscale = _local2;
_local1.shadow_pt._yscale = _local2;
if (_local1.dart._y > 0) {
_local1.hit = true;
_local1.bounces = 3;
_local1.speed_y = -6;
_local1.rotation_speed = 10;
} else if (Math.abs(_local1._y - dude1._y) < 5) {
if (Math.abs(_local1._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(_local1._x, _local1.dart._y + _local1._y, int(dude1.y) + 1, "impact1");
s_Smack1.start(0, 0);
_local1.hit = true;
_local1.bounces = 3;
_local1.speed_x = _local1.speed_x * -0.25;
_local1.speed_y = -9;
_local1.rotation_speed = -10;
}
}
}
}
function f_JamesShoot(zone) {
var _local2 = zone;
if (_local2._xscale > 0) {
var _local3 = _local2.x + 50;
} else {
var _local3 = _local2.x - 50;
}
var _local1 = f_FX(_local3, _local2.y, _local2.y - 1, "dart", _local2._xscale, _local2._yscale);
var shadow_name = ("shadow" + current_shadow);
attachMovie("shadow", shadow_name, -1000 - current_shadow);
_local1.shadow_pt = this["shadow" + current_shadow];
_local1.shadow_pt._x = _local1._x;
_local1.shadow_pt._y = _local1._y;
current_shadow++;
s_DartShoot.start(0, 0);
}
function f_JamesRun(zone) {
var _local1 = zone;
if (_local1.success_y) {
if ((_local1.x < dude1.x) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > dude1.x) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
}
if (_local1.success_x) {
if ((_local1.y < dude1.y) and _local1.north) {
_local1.north = false;
} else if ((_local1.y > dude1.y) and (!_local1.north)) {
_local1.north = true;
}
}
if (_local1.success_y == false) {
if (_local1._xscale > 0) {
var target_x = (dude1.x + 600);
} else {
var target_x = (dude1.x - 600);
}
} else if (((_local1.x <= dude1.x) and ((dude1.x + game_x) > 310)) or ((_local1.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 (_local1.success_x == false) {
if (_local1.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(_local1.y - target_y, _local1.x - target_x));
var _local3 = -4 * Math.cos(PI * dir);
var _local2 = -4 * Math.sin(PI * dir);
_local1.last_x = _local3;
_local1.last_y = _local2;
_local1.success_x = f_MoveKid(_local1, false, _local3);
_local1.success_y = f_MoveKid(_local1, true, _local2);
if (!_local1.success_x) {
_local1.success_x = f_MoveKid(_local1, false, _local3);
if (!_local1.success_y) {
_local1.success_y = f_MoveKid(_local1, true, _local2);
}
}
if (Math.abs(_local1.y - dude1.y) < 5) {
if (dude1.body._y > -50) {
if (Math.abs(_local1.x - dude1.x) > 180) {
if (((_local1.x + game_x) > 0) and ((_local1.x + game_x) < (screen_width - 0))) {
s_Swing6.start(0, 0);
_local1.gotoAndStop("jamesshoot");
}
}
}
}
}
function f_CheckGunHit(zone, u_char) {
var _local1 = u_char;
var _local2 = zone;
if (_local1.health > 0) {
if (Math.abs(_local2.y - _local1.y) < 10) {
if (((_local2._xscale > 0) and (_local2.x < _local1.x)) or ((_local2._xscale < 0) and (_local2.x > _local1.x))) {
if (_local1.health > 0) {
f_Damage(_local1, 10);
if (((_local1.x < _local2.x) and (_local1._xscale < 0)) or ((_local1.x >= _local2.x) and (_local1._xscale > 0))) {
f_FlipChar(_local1);
}
_local1.speed_toss_y = -(random(6) + 5);
_local1.speed_toss_x = random(8) + 12;
u_blood = "blood" + (random(2) + 1);
f_FX(_local1.x, _local1.body._y + _local1.y, int(_local1.y) + 7, u_blood);
f_CheckHold(_local1);
f_DropItem(_local1);
f_CallJuggle1(_local1);
}
}
}
}
}
function f_GunShot(zone) {
var _local2 = zone;
var _local3 = this;
f_CheckGunHit(_local2, dude1);
var _local1 = 1;
while (_local1 <= total_kids) {
u_char = _local3["kid" + _local1];
f_CheckGunHit(_local2, u_char);
_local1++;
}
}
function f_SunChipsFrenzied(zone) {
var _local1 = zone;
_local1.speed_toss_y = -(random(10) + 30);
_local1.speed_toss_x = random(2) + 0;
f_CallJuggle1(_local1);
_local1.body._y = _local1.body._y - 150;
}
function f_SunChipsSlide(zone) {
var _local1 = zone;
if (_local1._xscale > 0) {
f_MoveKid(_local1, false, _local1.slide_speed);
} else {
f_MoveKid(_local1, false, -_local1.slide_speed);
}
if (((_local1.slide_speed % 4) == 0) and (_local1.slide_speed > 3)) {
f_FX(_local1.x, _local1.y + 10, int(_local1.y) + 1, "dust1", _local1._xscale);
}
_local1.slide_speed--;
if (_local1.slide_speed < 0) {
_local1.slide_speed = 0;
}
}
function f_SunChipsAttack(zone) {
var _local1 = zone;
var _local2 = false;
_local1.uppercut_timer--;
_local1.crazy_timer--;
_local1.shot_timer--;
if ((_local1.crazy_timer <= 0) and (_local1.health < (_local1.health_max * 0.4))) {
_local1.nohit = true;
f_SunChipsGoCrazy(_local1);
} else if (_local1.uppercut_timer <= 0) {
if (Math.abs(_local1.y - dude1.y) < 10) {
if (dude1.body._y > -50) {
var _local3 = Math.abs(_local1.x - dude1.x);
if (_local3 < 200) {
_local2 = true;
_local1.uppercut_timer = 60;
_local1.slide_speed = int(_local3 / 8);
_local1.gotoAndStop("punch2");
}
}
}
}
return(_local2);
}
function f_SunChipsCrazy(zone) {
var _local1 = zone;
if ((_local1.crazy_speed_x > 0) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.crazy_speed_x < 0) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
if (!f_MoveKid(_local1, false, _local1.crazy_speed_x)) {
_local1.crazy_speed_x = _local1.crazy_speed_x * -1;
}
if (!f_MoveKid(_local1, true, _local1.crazy_speed_y)) {
_local1.crazy_speed_y = _local1.crazy_speed_y * -1;
}
if (((_local1.y + _y) > 480) and (_local1.crazy_speed_y > 0)) {
_local1.crazy_speed_y = _local1.crazy_speed_y * -1;
} else if ((((_local1.y + _y) < 0) or (_local1.y < limit_topleft.y)) and (_local1.crazy_speed_y < 0)) {
_local1.crazy_speed_y = _local1.crazy_speed_y * -1;
}
if (((_local1.x + _x) > 640) and (_local1.crazy_speed_x > 0)) {
_local1.crazy_speed_x = _local1.crazy_speed_x * -1;
} else if (((_local1.x + _x) < 0) and (_local1.crazy_speed_x < 0)) {
_local1.crazy_speed_x = _local1.crazy_speed_x * -1;
}
_local1.crazy_timer--;
if ((_local1.crazy_timer % 6) == 0) {
SunChipsFrame++;
if (SunChipsFrame > 12) {
SunChipsFrame = 1;
}
f_FX(_local1.x, _local1.y, int(_local1.y) - 1, "sunchips");
}
if (_local1.crazy_timer <= 0) {
f_SunChipsStopCrazy(_local1);
} else if (Math.abs(_local1.y - dude1.y) < 16) {
if (dude1.body._y > -50) {
if (Math.abs(_local1.x - dude1.x) < 120) {
f_DropItem(dude1);
f_MoveChar(dude1, false, _local1.x - dude1.x);
f_MoveChar(dude1, true, (_local1.y - dude1.y) + 1);
dude1.gotoAndStop("frenzied");
_local1.gotoAndStop("frenzy");
}
}
}
}
function f_SunChipsStopCrazy(zone) {
var _local1 = zone;
_local1.nohit = false;
_local1.crazy_timer = 200;
_local1.gotoAndStop("walk");
}
function f_SunChipsGoCrazy(zone) {
var _local1 = zone;
_local1.SunChipsFrame = 0;
_local1.crazy_speed_x = 10;
_local1.crazy_speed_y = 6;
_local1.crazy_timer = 120;
_local1.gotoAndStop("crazy");
}
function f_SunChipsUp(zone) {
var _local2 = zone;
var _local1 = false;
if (Math.abs(_local2.y - dude1.y) < 20) {
if (dude1.body._y > -50) {
if (Math.abs(_local2.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);
_local2.gotoAndStop("punch1");
}
}
}
}
return(_local1);
}
function f_GameOver() {
var _local2 = this;
var _local1 = 1;
while (_local1 <= total_kids) {
u_char = _local2["kid" + _local1];
f_RemoveChar(u_char);
_local1++;
}
f_RemoveChar(dude1);
_root.gotoAndStop("gameover");
}
function f_Ending() {
var _local2 = this;
var _local1 = 1;
while (_local1 <= total_kids) {
u_char = _local2["kid" + _local1];
f_RemoveChar(u_char);
_local1++;
}
f_RemoveChar(dude1);
_root.gotoAndStop("ending");
}
function f_CheckDead(zone) {
var _local2 = this;
var _local3 = zone;
if (_local3.health <= 0) {
var _local1 = 1;
while (_local1 <= total_kids) {
u_char = _local2["kid" + _local1];
if (!u_char.atv) {
if (!u_char.nohit) {
u_char.gotoAndStop("wait");
}
}
_local1++;
}
_local3.alive = false;
_local3.nohit = true;
_local3.gotoAndStop("die");
}
}
function f_RemoveChar(u_char) {
u_char.swapDepths(1);
removeMovieClip(u_char);
}
function f_SetPropaine(zone) {
var _local1 = zone;
_local1.punch = true;
_local1.grab = true;
_local1.has_shadow = true;
_local1.bounces = 0;
_local1.weight = 3;
_local1.explode = true;
_local1.object_type = 5;
_local1.body.gotoAndStop(5);
_local1.active = true;
}
function f_SetMower(zone) {
var _local1 = zone;
_local1.punch = true;
_local1.grab = true;
_local1.has_shadow = true;
_local1.bounces = 0;
_local1.weight = 3;
_local1.explode = true;
_local1.object_type = 6;
_local1.body.gotoAndStop(6);
_local1.active = true;
}
function f_HorseKid_OLD(u_horse) {
var _local2 = u_horse;
total_kids++;
var kid_name = ("kid" + total_kids);
var shadow_name = ("shadow" + current_shadow);
var _local3 = _local2.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, _local3));
attachMovie("shadow", shadow_name, total_kids - 200);
var _local1 = this["kid" + total_kids];
_local1.depth_mod = kid_depth_mod;
_local1.x = _local2.x;
_local1.y = _local3;
_local1._x = _local1.x;
_local1._y = _local1.y;
_local1.shadow_pt = this["shadow" + current_shadow];
current_shadow++;
_local1.shadow_pt._x = _local1.x;
_local1.shadow_pt._y = _local1.y;
f_Depth(_local1, _local1.y);
if ((_local1.x > dude1.x) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
} else if ((_local1.x < dude1.x) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
}
_local1.speed_toss_y = -(random(4) + 10);
_local1.speed_toss_x = random(4) + 20;
if (_local2.onfire > 1) {
_local1.onfire = _local2.onfire;
_local2.onfire = 1;
}
f_CallJuggle1(_local1);
}
function f_HorseKid(u_horse) {
var _local2 = u_horse;
var _local1 = f_SpawnKid(_local2.x, _local2.y + 1, 10, 1, 9, color_pink);
f_KidSettings(_local1);
if ((_local1.x > dude1.x) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
} else if ((_local1.x < dude1.x) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
}
_local1.speed_toss_y = -(random(4) + 10);
_local1.speed_toss_x = random(4) + 20;
if (_local2.onfire > 1) {
_local1.onfire = _local2.onfire;
_local2.onfire = 1;
}
f_CallJuggle1(_local1);
}
function f_PunchHorse(u_horse) {
var _local1 = u_horse;
var _local2 = random(4) + 1;
if (_local2 == 1) {
s_Smack1.start(0, 0);
} else if (_local2 == 2) {
s_Smack2.start(0, 0);
} else if (_local2 == 3) {
s_HardPunch1.start(0, 0);
} else {
s_HardPunch2.start(0, 0);
}
var fx_x = ((_local1.x - 10) + random(20));
var fx_y = (_local1.y - (50 + random(20)));
if (random(2) == 1) {
var _local3 = "impact1";
} else {
var _local3 = "impact3";
}
f_FX(fx_x, fx_y, int(_local1.y) + 7, _local3);
_local1.gotoAndStop("shake");
_local1.body.gotoAndPlay(2);
_local1.rider--;
if (_local1.explosion) {
_local1.explosion = false;
if (_local1.rider > 0) {
_local1.rider = 0;
_local1.onfire = 2;
}
}
if (_local1.rider == 0) {
_local1.body.body.kid.gotoAndStop("blank");
f_HorseKid(_local1);
} else if (_local1.rider > 0) {
_local1.body.body.kid.eye.gotoAndPlay(2);
}
}
function f_SetHorse(zone) {
var _local1 = zone;
_local1.punch = true;
_local1.grab = false;
_local1.has_shadow = true;
_local1.bounces = 0;
_local1.weight = 2;
_local1.explode = false;
_local1.active = true;
_local1.rider = 3;
_local1.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 _local1 = (dude1.rage / dude1.rage_goal) * 100;
if (_local1 < 0) {
_local1 = 0;
} else if (_local1 > 100) {
_local1 = 100;
}
_root.hud.ragebar._xscale = _local1;
if (_local1 == 100) {
_root.hud.ragebg.gotoAndStop(2);
if ((dude1.rage % 3) == 0) {
var _local2 = random(40) + 100;
if (random(3) == 1) {
var _local3 = dude1.y - 1;
} else {
var _local3 = dude1.y + 1;
}
f_FX((dude1.x + random(40)) - 20, (dude1.y + random(80)) - 100, _local3, "ragesmoke", _local2, _local2);
}
} else {
_root.hud.ragebg.gotoAndStop(1);
}
}
function f_Rage() {
f_RageDown(1);
}
function f_Shirt(zone) {
var _local1 = zone;
if (_local1._parent._parent.root) {
_local1.gotoAndStop(_local1._parent._parent.shirt_type);
} else if (_local1._parent._parent._parent.root) {
_local1.gotoAndStop(_local1._parent._parent._parent.shirt_type);
} else if (_local1._parent._parent._parent._parent.root) {
_local1.gotoAndStop(_local1._parent._parent._parent._parent.shirt_type);
} else if (_local1._parent.root) {
_local1.gotoAndStop(_local1._parent.shirt_type);
}
}
function f_Hat(zone) {
var _local1 = zone;
if (_local1._parent._parent.root) {
_local1.gotoAndStop(_local1._parent._parent.hat_type);
} else if (_local1._parent._parent._parent.root) {
_local1.gotoAndStop(_local1._parent._parent._parent.hat_type);
} else if (_local1._parent._parent._parent._parent.root) {
_local1.gotoAndStop(_local1._parent._parent._parent._parent.hat_type);
} else if (_local1._parent.root) {
_local1.gotoAndStop(_local1._parent.hat_type);
}
}
function f_Skin(zone) {
var _local1 = zone;
if (_local1._parent._parent.root) {
f_ColorSwap(_local1, _local1._parent._parent.skin_type);
} else if (_local1._parent._parent._parent.root) {
f_ColorSwap(_local1, _local1._parent._parent._parent.skin_type);
} else if (_local1._parent._parent._parent._parent.root) {
f_ColorSwap(_local1, _local1._parent._parent._parent._parent.skin_type);
} else if (_local1._parent.root) {
f_ColorSwap(_local1, _local1._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 _local2 = u_x - game_x;
var _local1 = u_y - game_y;
attachMovie("dude", "dude1", f_DepthVal(1, _local1));
dude1.depth_mod = 2;
dude1.x = _local2;
dude1.y = _local1;
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 = 5;
dude1.punch_pow_medium = 8;
dude1.punch_pow_high = 11;
dude1.punch_pow_max = 15;
dude1.weight = 5;
dude1.rage = 0;
dude1.rage_goal = 1000;
dude1.health_max = 100;
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 _local3 = eval("NULL");
var _local1 = 1;
while (_local1 <= total_kids) {
if (this["kid" + _local1] == eval("NULL")) {
_local3 = "kid" + _local1;
var this_kid = _local1;
_local1 = total_kids + 1;
}
_local1++;
}
if (_local3 == eval("NULL")) {
total_kids++;
var this_kid = total_kids;
_local3 = "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", _local3, f_DepthVal(kid_depth_mod, kid_y));
attachMovie("shadow", shadow_name, this_kid - 200);
var _local2 = this["kid" + this_kid];
_local2.depth_mod = kid_depth_mod;
_local2.x = x;
_local2.y = kid_y;
_local2._x = _local2.x;
_local2._y = _local2.y;
_local2.shadow_pt = this["shadow" + current_shadow];
current_shadow++;
_local2.shadow_pt._x = _local2.x;
_local2.shadow_pt._y = _local2.y;
_local2.shirt_type = shirt;
_local2.hat_type = hat;
_local2.skin_type = skin;
_local2.name = name;
_local2.item = eval("NULL");
_local2.kid_type = 1;
if ((_local2.x > dude1.x) and (_local2._xscale > 0)) {
f_FlipChar(_local2);
} else if ((_local2.x < dude1.x) and (_local2._xscale < 0)) {
f_FlipChar(_local2);
}
f_KidInit(_local2);
f_Depth(_local2, _local2.y);
f_CheckSpawn(_local2);
return(_local2);
}
function f_KidGroup1() {
var _local2 = sandbox._y - 25;
var _local3 = sandbox._x - 45;
var _local1 = f_SpawnKid(_local3, _local2, 34, 14, 4, color_pink);
f_KidSettings(_local1);
_local1.gotoAndStop("sandbox");
if (_local1._xscale > 0) {
f_FlipChar(_local1);
}
kills_goal = kills_goal + 1;
}
function f_KidGroup2() {
var _local1 = f_RandomY();
var _local2 = (2000 + random(200)) - game_x;
f_SpawnKid(_local2, _local1, 11, 1, 57, color_pink);
_local1 = f_RandomY();
_local2 = (2000 + random(200)) - game_x;
if (random(2) == 1) {
boss1fodder = f_SpawnKid(_local2, _local1, 54, 1, 69, color_pink);
} else {
boss1fodder = f_SpawnKid(_local2, _local1, 15, 1, 22, color_pink);
}
boss1fodder.gotoAndStop("wait");
f_SpawnBoss1();
kills_goal = kills_goal + 4;
}
function f_KidSwing() {
var _local2 = swing3._y + 1;
var _local3 = swing3._x;
var _local1 = f_SpawnKid(_local3, _local2, 19, 1, 58, color_pink);
f_KidSettings(_local1);
_local1.gotoAndStop("swing");
swing3.rider = _local1;
if (_local1._xscale < 0) {
f_FlipChar(_local1);
}
kills_goal = kills_goal + 3;
}
function f_KidGroup3() {
var _local1 = f_RandomY();
var _local2 = (700 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local2, _local1, 3, 1, 10, color_brown);
} else {
f_SpawnKid(_local2, _local1, 49, 1, 73, color_brown);
}
_local1 = f_RandomY();
_local2 = (700 + random(100)) - game_x;
var _local3 = f_SpawnKid(_local2, _local1, 17, 20, 68, color_pink);
_local3.kid_type = 5;
}
function f_KidGroup4() {
var _local2 = f_RandomY();
var _local3 = (700 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local3, _local2, 20, 1, 51, color_pink);
} else {
f_SpawnKid(_local3, _local2, 24, 1, 29, color_pink);
}
_local2 = f_RandomY();
_local3 = -400 - game_x;
f_SpawnKid(_local3, _local2, 18, 21, 20, color_pink);
_local2 = f_RandomY();
_local3 = (700 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local3, _local2, 16, 1, 48, color_pink);
} else {
f_SpawnKid(_local3, _local2, 28, 19, 59, color_beige);
}
_local2 = f_RandomY();
_local3 = -300 - game_x;
var _local1 = f_SpawnKid(_local3, _local2, 7, 1, 7, color_pink);
_local1.kid_type = 2;
_local1.health_max = _local1.health_max * 1.5;
_local1.health = _local1.health_max;
kills_goal = kills_goal + 4;
}
function f_KidGroup5() {
var _local1;
var _local3 = kidline._x;
var _local2 = kidline._y;
_local1 = f_SpawnKid(_local3, _local2, 2, 13, 13, color_pink);
_local1.gotoAndStop("wait");
_local1._xscale = _local1._xscale * -1;
_local3 = kidline._x - 50;
_local2 = kidline._y + 25;
_local1 = f_SpawnKid(_local3, _local2, 2, 13, 14, color_pink);
_local1.gotoAndStop("wait");
_local1._xscale = _local1._xscale * -1;
_local3 = kidline._x - 100;
_local2 = kidline._y + 75;
_local1 = f_SpawnKid(_local3, _local2, 2, 13, 16, color_brown);
_local1.gotoAndStop("wait");
_local1._xscale = _local1._xscale * -1;
_local3 = kidline._x - 90;
_local2 = kidline._y - 35;
_local1 = f_SpawnKid(_local3, _local2, 2, 13, 15, color_pink);
_local1.gotoAndStop("wait");
_local1._xscale = _local1._xscale * -1;
kills_goal = kills_goal + 4;
}
function f_KidGroup6() {
var _local1 = f_RandomY();
var _local2 = (1600 + random(100)) - game_x;
f_SpawnKid(_local2, _local1, 29, 4, 8, color_brown);
_local1 = f_RandomY();
_local2 = (1500 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local2, _local1, 33, 8, 27, color_brown);
} else {
f_SpawnKid(_local2, _local1, 50, 25, 19, color_pink);
}
_local1 = f_RandomY();
_local2 = (1600 + random(100)) - game_x;
u_temp = f_SpawnKid(_local2, _local1, 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 _local3 = f_SpawnKid(spawn_x, spawn_y, 9, 1, 67, color_brown);
_local3.kid_type = 3;
_local3.gotoAndStop("wait");
_local3.target_ball = soccerball;
_local3.target_goal = goal_left;
_local3.top = false;
_local3.default_x = soccerfield._x + 150;
_local3.default_y = soccerfield._y + 75;
var spawn_y = (soccerfield._y - 70);
var spawn_x = (soccerfield._x - 100);
var _local2 = f_SpawnKid(spawn_x, spawn_y, 45, 17, 36, color_beige);
_local2.kid_type = 3;
_local2.gotoAndStop("wait");
_local2._xscale = _local2._xscale * -1;
_local2.target_ball = soccerball;
_local2.target_goal = goal_right;
_local2.top = true;
_local2.default_x = soccerfield._x - 130;
_local2.default_y = soccerfield._y - 75;
var spawn_y = (soccerfield._y + 75);
var spawn_x = (soccerfield._x - 120);
var _local1 = f_SpawnKid(spawn_x, spawn_y, 48, 1, 37, color_beige);
_local1.kid_type = 3;
_local1.gotoAndStop("wait");
_local1._xscale = _local1._xscale * -1;
_local1.target_ball = soccerball;
_local1.target_goal = goal_right;
_local1.top = false;
_local1.default_x = soccerfield._x - 160;
_local1.default_y = soccerfield._y + 75;
u_kid1.partner = _local3;
_local3.partner = u_kid1;
_local2.partner = _local1;
_local1.partner = _local2;
kills_goal = kills_goal + 4;
}
function f_KidGroup7() {
var _local2 = dude1.y;
var _local3 = -150 - game_x;
var _local1 = f_SpawnKid(_local3, _local2, 37, 6, 61, color_brown);
f_KidSettings(_local1);
_local1.atv_speed = 12;
_local1.atv = true;
_local1.gotoAndStop("atv");
_local1.shadow_pt._xscale = 200;
_local1.atv_delay = 0;
_local1.atv_type = 1;
if (_local1._xscale < 0) {
_local1._xscale = _local1._xscale * -1;
}
_local2 = f_RandomY();
_local3 = 1400 - game_x;
_local1 = f_SpawnKid(_local3, _local2, 14, 9, 30, color_pink);
f_KidSettings(_local1);
_local1.atv_speed = 14;
_local1.atv = true;
_local1.gotoAndStop("atv");
_local1.shadow_pt._xscale = 200;
_local1.atv_delay = 0;
_local1.atv_type = 2;
if (_local1._xscale > 0) {
_local1._xscale = _local1._xscale * -1;
}
kills_goal = kills_goal + 2;
}
function f_KidGroup8() {
var _local1 = f_RandomY();
var _local2 = (1400 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local2, _local1, 21, 1, 28, color_pink);
} else {
f_SpawnKid(_local2, _local1, 32, 1, 25, color_pink);
}
_local1 = f_RandomY();
_local2 = (1700 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local2, _local1, 40, 3, 47, color_brown);
} else {
f_SpawnKid(_local2, _local1, 41, 3, 49, color_brown);
}
_local1 = f_RandomY();
_local2 = (2000 + random(100)) - game_x;
f_SpawnKid(_local2, _local1, 44, 10, 50, color_brown);
kills_goal = kills_goal + 6;
}
function f_KidGroup9() {
var _local2 = dude1.y;
var _local3 = -150 - game_x;
var _local1 = f_SpawnKid(_local3, _local2, 46, 2, 64, color_brown);
f_KidSettings(_local1);
_local1.atv_speed = 20;
_local1.atv = true;
_local1.gotoAndStop("atv");
_local1.shadow_pt._xscale = 200;
_local1.atv_delay = 0;
_local1.atv_type = 1;
_local1.kid_type = 4;
_local1.health_max = _local1.health_max * 1.5;
_local1.health = _local1.health_max;
if (_local1._xscale < 0) {
_local1._xscale = _local1._xscale * -1;
}
_local2 = f_RandomY();
_local3 = (700 + random(100)) - game_x;
_local1 = f_SpawnKid(_local3, _local2, 46, 2, 65, color_brown);
_local1.kid_type = 4;
_local1.health_max = _local1.health_max * 1.5;
_local1.health = _local1.health_max;
_local2 = f_RandomY();
_local3 = (700 + random(100)) - game_x;
f_SpawnKid(_local3, _local2, 39, 12, 43, color_pink);
_local2 = f_RandomY();
_local3 = (1000 + random(100)) - game_x;
f_SpawnKid(_local3, _local2, 52, 16, 74, color_latin);
kills_goal = kills_goal + 4;
}
function f_KidGroup10() {
var _local1 = limit_topleft.y + 100;
var _local2 = (700 + random(100)) - game_x;
f_SpawnKid(_local2, _local1, 23, 1, 46, color_pink);
_local1 = limit_topleft.y + 300;
_local2 = (700 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local2, _local1, 45, 18, 62, color_pink);
} else {
f_SpawnKid(_local2, _local1, 42, 11, 63, color_brown);
}
}
function f_KidGroup11() {
var _local1 = limit_topleft.y + 200;
var _local2 = 700 - game_x;
f_SpawnKid(_local2, _local1, 56, 23, 71, color_pink);
_local1 = limit_topleft.y + 300;
_local2 = 900 - game_x;
f_SpawnKid(_local2, _local1, 55, 22, 70, color_pink);
_local1 = limit_topleft.y + 370;
_local2 = 800 - game_x;
f_SpawnKid(_local2, _local1, 59, 24, 72, color_beige);
}
function f_KidGroup100() {
f_SpawnSunchips();
kills_goal = kills_goal + 1;
}
function f_RandomY() {
var _local1;
if ((limit_topleft.y + _y) < 0) {
_local1 = _y;
} else {
_local1 = limit_topleft.y;
}
var _local2 = 480 - (_local1 + _y);
return(_local1 + random(_local2));
}
function f_ShadowSize(zone) {
var _local2 = zone;
var _local1 = 100 + (_local2.body._y * 0.25);
if (_local1 < 10) {
_local1 = 10;
}
_local2.shadow_pt._xscale = _local1;
_local2.shadow_pt._yscale = _local1;
}
function f_HelmetAttack(zone) {
var _local1 = zone;
var _local2 = false;
if (_local1.health > 0) {
if (_local1.attack_timer < 0) {
if (Math.abs(_local1.y - dude1.y) < 10) {
if (Math.abs(_local1.x - dude1.x) < 200) {
if (((_local1.x <= dude1.x) and (_local1._xscale > 0)) or ((_local1.x >= dude1.x) and (_local1._xscale < 0))) {
_local2 = true;
_local1.slide_hit = false;
_local1.slide_speed = 20;
s_Ground1.start(0, 0);
_local1.nohit = true;
_local1.hitdude = false;
_local1.attack_timer = 30;
_local1.gotoAndStop("helmetattack");
}
}
}
} else {
_local1.attack_timer--;
}
}
return(_local2);
}
function f_NinjaAttack(zone) {
var _local1 = zone;
var _local2 = false;
if (_local1.attack_timer < 0) {
if (Math.abs(_local1.y - dude1.y) < 10) {
_local2 = true;
_local1.kick_delay = 6;
if ((_local1.x < dude1.x) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > dude1.x) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
_local1.body_y = 0;
f_FX(_local1.x, _local1.y, 1, "shockwave", 80, 80);
S_Ground6.start(0, 0);
_local1.nohit = true;
_local1.hitdude = false;
_local1.attack_timer = 30;
_local1.gotoAndStop("ninjajump");
}
} else {
_local1.attack_timer--;
}
return(_local2);
}
function f_NinjaJump(zone) {
var _local1 = zone;
if (_local1.body._y > -200) {
_local1.body_y = _local1.body_y - 20;
_local1.body._y = _local1.body_y;
f_ShadowSize(_local1);
} else if (_local1.kick_delay > 0) {
_local1.kick_delay--;
if ((_local1.x < dude1.x) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > dude1.x) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
_local1.gotoAndStop("ninjaspin");
_local1.body._y = _local1.body_y;
f_ShadowSize(_local1);
} else {
var _local2 = f_rad2deg(Math.atan2((_local1.y + _local1.body_y) - dude1.y, _local1.x - dude1.x));
_local1.kick_x = -20 * Math.cos(PI * _local2);
_local1.kick_y = -20 * Math.sin(PI * _local2);
_local1.kick_timer = 4;
s_Swing1.start(0, 0);
_local1.gotoAndStop("ninjakick");
_local1.body._y = _local1.body_y;
f_ShadowSize(_local1);
}
}
function f_NinjaHit(zone, u_hit) {
var _local1 = u_hit;
var _local2 = zone;
if (Math.abs(_local2.y - _local1.y) < 10) {
if (Math.abs(_local2.x - _local1.x) < 50) {
if (_local1.health > 0) {
_local2.hitdude = true;
f_Damage(_local1, 2);
if (((_local1.x < _local2.x) and (_local1._xscale < 0)) or ((_local1.x >= _local2.x) and (_local1._xscale > 0))) {
f_FlipChar(_local1);
}
_local1.speed_toss_y = -(random(10) + 10);
_local1.speed_toss_x = random(8) + 12;
f_FX(_local1.x, _local1.body._y + _local1.y, int(_local1.y) + 7, "impact1");
f_CheckHold(_local1);
f_CallJuggle1(_local1);
f_PunchSound();
}
}
}
}
function f_NinjaKick(zone) {
var _local1 = zone;
if (_local1.body._y < 0) {
f_MoveKid(_local1, false, _local1.kick_x);
_local1.body_y = _local1.body_y + _local1.kick_y;
_local1.body._y = _local1.body_y;
if (_local1.body._y > 0) {
_local1.body._y = 0;
}
if (_local1.y < (dude1.y - 10)) {
f_MoveKid(_local1, true, 10);
} else if (_local1.y > (dude1.y + 10)) {
f_MoveKid(_local1, true, -10);
}
f_ShadowSize(_local1);
if ((_local1.kick_timer % 4) == 0) {
var _local2 = f_FX(_local1.x, _local1.y, int(_local1.y) - 1, "ninja", _local1._xscale);
_local2.body._y = _local1.body_y;
}
_local1.kicktimer++;
if (_local1.body_y > -100) {
if (_local1.hitdude == false) {
f_NinjaHit(_local1, dude1);
}
}
} else {
_local1.gotoAndStop("walk");
}
}
function f_HoopShot(u_ball) {
var _local1 = u_ball;
var _local2 = bballhoop.goal._x + bballhoop.x;
var _local3 = bballhoop.y - 2;
if (_local1.x < (_local2 + 10)) {
var dir = f_rad2deg(Math.atan2(_local1.y - _local3, _local1.x - _local2));
var distance = Math.abs(_local1.x - _local2);
if (Math.abs(_local1.y - _local3) > distance) {
distance = Math.abs(_local1.y - _local3);
}
var temp_speed = (-(distance / 20));
_local1.shot_speed_x = temp_speed * Math.cos(PI * dir);
_local1.shot_speed_y = temp_speed * Math.sin(PI * dir);
_local1.frames = int(Math.abs(_local1.x - _local2) / Math.abs(_local1.shot_speed_x));
_local1.current_frame = 1;
var net_y = Math.abs(bballhoop.goal._y);
_local1.body_speed_y = -(net_y / _local1.frames);
_local1.gotoAndStop("hoopshot");
} else {
_local1.speed_toss_y = -(22 + random(8));
_local1.speed_toss_x = 2 + random(4);
_local1.gotoAndStop("release");
}
}
function f_SeakHoop(zone) {
var _local1 = zone;
var hoop_x = (bballhoop.goal._x + bballhoop.x);
var hoop_y = (bballhoop.y - 2);
f_MoveKid(_local1, false, _local1.shot_speed_x);
f_MoveKid(_local1, true, _local1.shot_speed_y);
_local1.body._y = _local1.body._y + _local1.body_speed_y;
_local1.current_frame++;
if (_local1.current_frame == _local1.frames) {
bballhoop.hoop.hoop.gotoAndPlay("bap");
_local1.gotoAndStop("blank");
}
}
function f_CheckHoop(zone) {
}
function f_StartSoccer(zone) {
var _local3 = this;
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 _local1 = 1;
while (_local1 <= total_kids) {
var _local2 = _local3["kid" + _local1];
_local2.gotoAndStop("soccerwalk");
_local1++;
}
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 == eval("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 == eval("NULL")) {
score_right = true;
ball_right = true;
score_team1++;
}
}
}
}
} else {
ball_right = false;
}
}
}
function f_SoccerChase(zone) {
var _local1 = zone;
if (_local1.success_y) {
if ((_local1.x < _local1.target_x) and (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > _local1.target_x) and (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
}
if (_local1.success_x) {
if ((_local1.y < _local1.target_y) and _local1.north) {
_local1.north = false;
} else if ((_local1.y > _local1.target_y) and (!_local1.north)) {
_local1.north = true;
}
}
if (_local1.success_y == false) {
if (_local1._xscale > 0) {
var target_x = (_local1.target_x + 300);
} else {
var target_x = (_local1.target_x - 300);
}
} else {
var target_x = _local1.target_x;
}
if (_local1.success_x == false) {
if (_local1.north) {
var target_y = (_local1.target_y - 300);
} else {
var target_y = (_local1.target_y + 300);
}
} else {
var target_y = _local1.target_y;
}
var dir = f_rad2deg(Math.atan2(_local1.y - target_y, _local1.x - target_x));
if (_local1.item != eval("NULL")) {
var temp_speed = -6;
} else {
var temp_speed = -5;
}
var _local3 = temp_speed * Math.cos(PI * dir);
var _local2 = temp_speed * Math.sin(PI * dir);
_local1.last_x = _local3;
_local1.last_y = _local2;
_local1.success_x = f_MoveKid(_local1, false, _local3);
_local1.success_y = f_MoveKid(_local1, true, _local2);
if (!_local1.success_x) {
_local1.success_x = f_MoveKid(_local1, false, _local3);
if (!_local1.success_y) {
_local1.success_y = f_MoveKid(_local1, true, _local2);
}
}
}
function f_SoccerSlide(zone) {
var _local1 = zone;
if (_local1._xscale > 0) {
f_MoveKid(_local1, false, _local1.slide_speed);
} else {
f_MoveKid(_local1, false, -_local1.slide_speed);
}
if (!_local1.slide_hit) {
var _local2 = dude1;
if (Math.abs(_local1.x - _local2.x) < 40) {
if (Math.abs(_local1.y - _local2.y) < 10) {
_local1.slide_hit = true;
f_PunchSound();
f_Damage(_local2, 5);
if (((_local2.x < _local1.x) and (_local2._xscale < 0)) or ((_local2.x >= _local1.x) and (_local2._xscale > 0))) {
f_FlipChar(_local2);
}
if (_local2.item == soccerball) {
_local1.item = _local2.item;
_local2.item.owner = _local1;
_local1.item = eval("NULL");
}
f_DropItem(_local2);
_local2.speed_toss_y = -(random(5) + 5);
_local2.speed_toss_x = random(5) + 8;
f_FX(_local2.x, _local2.body._y + _local2.y, int(_local2.y) + 7, "impact1");
f_CallJuggle1(_local2);
}
}
}
if (((_local1.slide_speed % 4) == 0) and (_local1.slide_speed > 3)) {
f_FX(_local1.x, _local1.y + 5, int(_local1.y) + 5, "dust1", _local1._xscale);
}
_local1.slide_speed--;
if (_local1.slide_speed <= 0) {
_local1.gotoAndStop("walk");
}
}
function f_SoccerKick(zone) {
var _local1 = zone;
if (_local1.target_goal.x < soccerfield.x) {
if (_local1._xscale > 0) {
f_FlipChar(_local1);
}
} else if (_local1._xscale < 0) {
f_FlipChar(_local1);
}
f_SoundSwing(4);
f_FlipInverse(_local1.item, _local1);
if (_local1._xscale > 0) {
f_SetXY(_local1.item, _local1.x + 50, _local1.y + 1);
} else {
f_SetXY(_local1.item, _local1.x - 50, _local1.y + 1);
}
_local1.item.speed_toss_y = -3;
_local1.item.speed_toss_x = 20;
_local1.item.gotoAndStop("release");
_local1.item.owner = eval("NULL");
_local1.item = eval("NULL");
if (_local1.top) {
_local1.top = false;
_local1.partner.top = true;
} else {
_local1.top = true;
_local1.partner.top = false;
}
}
function f_HuntBall(zone) {
var _local1 = zone;
var _local2 = true;
_local1.target_pt = _local1.target_ball;
_local1.target_x = _local1.target_ball.x;
if (_local1.target_ball.owner == _local1.partner) {
if (_local1.y < soccerfield.y) {
_local1.target_y = _local1.target_ball.y - 100;
} else {
_local1.target_y = _local1.target_ball.y + 100;
}
} else {
_local1.target_y = _local1.target_ball.y;
}
if (Math.abs(_local1.x - _local1.target_x) < 50) {
if (Math.abs(_local1.y - _local1.target_y) < 10) {
if (_local1.target_pt.owner == eval("NULL")) {
_local1.target_pt.owner = _local1;
_local1.item = _local1.target_pt;
_local1.target_pt.autoaction(_local1.target_pt);
} else if (_local1.target_pt.owner == dude1) {
_local2 = false;
_local1.slide_hit = false;
_local1.slide_speed = 16;
s_Ground1.start(0, 0);
_local1.gotoAndStop("soccerslide");
} else {
_local2 = false;
_local1.gotoAndStop("soccerwait");
}
}
}
if (_local2) {
f_SoccerChase(_local1);
_local1.gotoAndStop("soccerwalk");
}
}
function f_SoccerFollow(zone) {
var _local1 = zone;
var _local2 = false;
if (Math.abs(_local1.x - _local1.target_ball.x) > 200) {
_local2 = true;
_local1.target_x = _local1.target_ball.x;
} else {
_local1.target_x = _local1.x;
}
if (Math.abs(_local1.y - _local1.target_ball.y) > 100) {
_local2 = true;
_local1.target_y = _local1.target_ball.y;
} else {
_local1.target_y = _local1.y;
}
if (_local2) {
f_SoccerChase(_local1);
_local1.gotoAndStop("soccerwalk");
} else {
_local1.gotoAndStop("soccerwait");
}
}
function f_SoccerRun(zone) {
var _local1 = zone;
if ((score_left and (_local1.target_goal == goal_left)) or (score_right and (_local1.target_goal == goal_right))) {
_local1.target_x = _local1.default_x;
_local1.target_y = _local1.default_y;
if ((Math.abs(_local1.target_x - _local1.x) < 50) and (Math.abs(_local1.target_y - _local1.y) < 50)) {
if (_local1.x > soccerfield.x) {
if (_local1._xscale > 0) {
f_FlipChar(_local1);
}
} else if (_local1._xscale < 0) {
f_FlipChar(_local1);
}
_local1.gotoAndStop("soccerwait");
} else {
f_SoccerChase(_local1);
_local1.gotoAndStop("soccerwalk");
}
} else if (_local1.item == eval("NULL")) {
if (_local1.target_ball.y < soccerfield.y) {
if ((_local1.top or (!_local1.partner.alive)) or (dude1.grab_pointer == _local1.partner)) {
f_HuntBall(_local1);
} else {
f_SoccerFollow(_local1);
}
} else if (((_local1.top == false) or (!_local1.partner.alive)) or (dude1.grab_pointer == _local1.partner)) {
f_HuntBall(_local1);
} else {
f_SoccerFollow(_local1);
}
} else {
if (_local1.target_goal.x < soccerfield.x) {
_local1.target_x = _local1.target_goal.x + 250;
} else {
_local1.target_x = _local1.target_goal.x - 250;
}
if (_local1.y < soccerfield.y) {
_local1.target_y = _local1.target_goal.y - 10;
} else {
_local1.target_y = _local1.target_goal.y + 10;
}
_local1.target_pt = _local1.target_goal;
f_SoccerChase(_local1);
if (Math.abs(_local1.x - _local1.target_x) < 50) {
if (Math.abs(_local1.y - _local1.target_y) < 100) {
f_SoccerKick(_local1);
}
}
}
}
function f_EngineVolume() {
var _local1 = ups2._x + _x;
var _local3 = (1540 - (_local1 + 450)) / 1540;
var u_pan = (int((200 * _local3) - 100) * -1);
s_Engine.setPan(u_pan);
var _local2 = 100;
if (_local1 < -350) {
_local2 = 0;
} else if (_local1 < 0) {
_local3 = Math.abs(_local1 + 350) / 350;
_local2 = _local2 * _local3;
} else if (_local1 > 1000) {
_local2 = 0;
} else if (_local1 > 640) {
_local3 = Math.abs(_local1 - 990) / 350;
_local2 = _local2 * _local3;
}
_local2 = _local2 * (car_distance * 0.01);
s_Engine.setVolume(_local2);
}
function f_ATVHit(zone, u_hit) {
var _local1 = u_hit;
var _local2 = zone;
if (Math.abs(_local2.y - _local1.y) < 10) {
if (Math.abs(_local2.x - _local1.x) < 75) {
if (!_local1.nohit) {
var u_impact = false;
if (((_local1.x > _local2.x) and (_local2._xscale > 35)) or ((_local1.x < _local2.x) and (_local2._xscale < -35))) {
f_Damage(_local1, 10);
if (((_local1.x < _local2.x) and (_local1._xscale < 0)) or ((_local1.x >= _local2.x) and (_local1._xscale > 0))) {
f_FlipChar(_local1);
}
f_DropItem(_local1);
_local1.speed_toss_y = -(random(10) + 10);
_local1.speed_toss_x = random(8) + 12;
f_FX(_local1.x, _local1.body._y + _local1.y, int(_local1.y) + 7, "impact1");
f_CallJuggle1(_local1);
f_HardPunchSound();
_local1.nohit = true;
}
}
}
}
}
function f_ATVPosition(zone) {
var _local1 = zone;
if (_local1.atv_type == 1) {
f_SetXY(_local1, _local1.x, dude1.y);
f_CheckSpawn(_local1);
} else {
var _local2 = f_RandomY();
f_SetXY(_local1, _local1.x, _local2);
f_CheckSpawn(_local1);
}
}
function f_ATV(zone) {
var _local1 = zone;
if (_local1.atv_delay <= 0) {
if (_local1._xscale > 0) {
if (!f_MoveKid(_local1, false, _local1.atv_speed)) {
f_SetXY(_local1, _local1.x, _local1.y + 6);
}
if ((_local1.x + _x) > 900) {
f_ATVPosition(_local1);
f_FlipChar(_local1);
}
} else {
if (!f_MoveKid(_local1, false, -_local1.atv_speed)) {
f_SetXY(_local1, _local1.x, _local1.y + 6);
}
if ((_local1.x + _x) < -250) {
f_ATVPosition(_local1);
f_FlipChar(_local1);
}
}
f_ATVHit(_local1, dude1);
} else {
_local1.atv_delay--;
if (_local1.atv_delay == 0) {
f_ATVPosition(_local1);
}
}
var _local2 = _local1.x + _x;
var _local3 = (1150 - (_local2 + 250)) / 1150;
var u_pan = (int((200 * _local3) - 100) * -1);
_local1.s_atvengine.setPan(u_pan);
var u_volume = 100;
if (_local2 < -150) {
u_volume = 0;
} else if (_local2 < 0) {
_local3 = Math.abs(_local2 + 150) / 150;
u_volume = u_volume * _local3;
} else if (_local2 > 800) {
u_volume = 0;
} else if (_local2 > 640) {
_local3 = Math.abs(_local2 - 790) / 150;
u_volume = u_volume * _local3;
}
_local1.s_atvengine.setVolume(u_volume);
if (!_local1.init) {
_local1.init = true;
_local1.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 _local2 = limit_topleft.y + random(200);
kid_dm_current = kid_dm_current + 2;
var _local3 = kid_dm_current + kid_dm_default;
attachMovie("kid", kid_name, f_DepthVal(_local3, _local2));
attachMovie("shadow", shadow_name, i - 200);
var _local1 = this["kid" + i];
_local1.depth_mod = _local3;
_local1.x = 2000 - game_x;
_local1.y = _local2;
_local1._x = _local1.x;
_local1._y = _local1.y;
_local1.shadow_pt = this["shadow" + current_shadow];
current_shadow++;
_local1.shadow_pt._x = _local1.x;
_local1.shadow_pt._y = _local1.y;
_local1.shirt_type = 37 + random(8);
_local1.hat_type = 3;
_local1.skin_type = color_brown;
i++;
}
}
function f_Dribble(zone) {
var _local1 = zone;
if (_local1.owner._xscale > 0) {
_local1.x = _local1.owner.x + 25;
} else {
_local1.x = _local1.owner.x - 25;
}
_local1.y = _local1.owner.y + 1;
_local1._x = _local1.x;
_local1._y = _local1.y;
_local1.shadow_pt._x = _local1.x;
_local1.shadow_pt._y = _local1.y;
f_Depth(_local1, _local1.y);
}
function f_SwingCheckChar(zone, u_temp) {
var _local2 = zone;
var _local3 = u_temp;
var return_val = false;
if (Math.abs(_local3.x - _local2.x) < 50) {
if (Math.abs(_local3.y - _local2.y) < 10) {
return_val = true;
if (_local2.rider != eval("NULL")) {
if (Math.abs(_local2.rider.x - _local2.x) < 50) {
if (Math.abs(_local2.rider.y - _local2.y) < 10) {
var _local1 = _local2.rider;
f_Damage(_local1, 1);
if (((_local1.x < _local2.x) and (_local1._xscale < 0)) or ((_local1.x >= _local2.x) and (_local1._xscale > 0))) {
f_FlipChar(_local1);
}
_local1.speed_toss_y = -(random(2) + 2);
_local1.speed_toss_x = random(2) + 2;
f_CheckHold(_local1);
f_CallJuggle1(_local1);
}
}
_local2.rider = eval("NULL");
}
f_FX(_local3.x, _local3.y - 50, int(_local3.y) + 1, "impact1");
s_Smack1.start(0, 0);
_local2.gotoAndPlay("move");
}
}
return(return_val);
}
function f_SwingCheck(zone) {
f_SwingCheckChar(zone, dude1);
}
function f_SetTrash(zone) {
var _local1 = zone;
_local1.punch = true;
_local1.grab = true;
_local1.has_shadow = true;
_local1.bounces = 0;
_local1.weight = 2;
_local1.explode = false;
_local1.object_type = 1;
_local1.body.gotoAndStop(1);
_local1.active = true;
}
function f_SetTrash2(zone) {
var _local1 = zone;
_local1.punch = true;
_local1.grab = true;
_local1.has_shadow = true;
_local1.bounces = 0;
_local1.weight = 2;
_local1.explode = false;
_local1.object_type = 2;
_local1.body.gotoAndStop(2);
_local1.active = true;
}
function f_BallInPlay(zone) {
var _local1 = zone;
if (_local1.ball == 1) {
_local1.gotoAndStop("dribble_bball");
} else if (_local1.ball == 2) {
_local1.gotoAndStop("dribble_soccer");
}
}
function f_SetBall(zone, u_type) {
var _local1 = zone;
var _local2 = u_type;
_local1.punch = true;
_local1.has_shadow = true;
_local1.bounces = 2;
_local1.weight = 0;
_local1.explode = false;
_local1.object_type = 1;
_local1.active = true;
_local1.owner = kid1;
_local1.gravity = -2;
_local1.autotake = true;
_local1.ball = _local2;
if (_local2 == 1) {
_local1.autoaction = f_TakeBasketball;
} else if (_local2 == 2) {
_local1.autoaction = f_TakeBasketball;
}
}
function f_TakeBasketball(zone) {
f_BallInPlay(zone);
}
function f_CheckSandbox(zone) {
if (sandcastle.crushed) {
zone.gotoAndStop("sandboxcry");
}
}
function f_Sandbox(zone) {
var _local1 = zone;
dude1.insand = false;
sandbox.sand_timer--;
if ((_local1._x + _x) < -200) {
_local1.gotoAndStop(3);
} else {
if (_local1._currentframe == 1) {
if (Math.abs(dude1.y - _local1.y) < 10) {
if (Math.abs(dude1.x - _local1.x) < 80) {
s_Fart.start(0, 0);
_local1.crushed = true;
_local1.gotoAndStop(2);
}
}
}
var u_topleft = (_local1.topleft._x + _local1.x);
var _local2 = _local1.bottomleft._x + _local1.x;
var u_top = (_local1.topleft._y + _local1.y);
var u_bottom = (_local1.bottomleft._y + _local1.y);
var u_topright = (_local1.topright._x + _local1.x);
var _local3 = _local1.bottomright._x + _local1.x;
if ((dude1.y > u_top) and (dude1.y < u_bottom)) {
if ((dude1.x >= _local2) and (dude1.x <= u_topright)) {
var u_percent = (1 - ((dude1.y - u_top) / 100));
var u_left = (_local2 + ((u_topleft - _local2) * u_percent));
var u_right = (_local3 + ((u_topright - _local3) * u_percent));
if ((dude1.x >= u_left) and (dude1.x <= u_right)) {
dude1.insand = true;
}
}
}
}
}
function f_Roll(zone) {
var _local1 = zone;
if (_local1.speed_toss_X > 0) {
if (_local1._xscale > 0) {
f_MoveKid(_local1, false, -_local1.speed_toss_x);
} else {
f_MoveKid(_local1, false, _local1.speed_toss_x);
}
_local1.body.body._rotation = _local1.body.body._rotation - _local1.speed_toss_x;
if (_local1.bounds) {
f_FlipChar(_local1);
}
_local1.body._y = _local1.body._y + _local1.speed_toss_y;
if (_local1.body._y > 0) {
_local1.body._y = 0;
_local1.shadow_pt._xscale = 100;
_local1.shadow_pt._yscale = 100;
if (_local1.speed_toss_y > 3) {
_local1.speed_toss_y = int(_local1.speed_toss_y * -0.35);
}
} else {
var _local2 = 100 + (_local1.body._y * 0.25);
if (_local2 < 10) {
_local2 = 10;
}
_local1.shadow_pt._xscale = _local2;
_local1.shadow_pt._yscale = _local2;
}
_local1.speed_toss_x = _local1.speed_toss_x - 0.5;
_local1.speed_toss_y++;
} else {
_local1.nextFrame();
}
}
function f_MedPickup(zone) {
var _local1 = zone;
if (Math.abs(dude1.x - _local1._x) < 30) {
if (Math.abs(dude1.y - _local1._y) < 10) {
s_DartShoot.start(0, 0);
dude1.health = dude1.health_max;
_local1.gotoAndStop("blank");
}
}
}
function f_AddStatic(zone) {
var _local1 = zone;
static_index++;
this["static" + static_index] = _local1;
_local1.x = _local1._x;
_local1.y = _local1._y;
}
function f_AddNeutral(zone) {
var _local1 = zone;
static_dm_current = static_dm_current + 2;
_local1.depth_mod = static_dm_current + static_dm_default;
_local1.x = _local1._x;
_local1.y = _local1._y;
_local1.depth_y = _local1.y;
f_Depth(_local1, _local1.y);
}
function f_SetDiagonal(zone) {
var _local1 = zone;
var _local3 = Math.abs(_local1._xscale) / 100;
var _local2 = Math.abs(_local1._yscale) / 100;
var x = (_local1._x + _local1.zone._x);
var y = (_local1._y + _local1.zone._y);
var h = (_local1.zone._height * _local2);
var w = ((_local1.zone._width / 2) * _local3);
_local1.diagonal = true;
_local1.left_x = _local1.left._x * _local3;
_local1.right_x = _local1.right._x * _local3;
_local1.left_y = _local1.left._y * _local2;
_local1.right_y = _local1.right._y * _local2;
_local1.h = Math.abs(_local1.left_y - _local1.right_y);
_local1.h2 = _local1.zone2._height;
_local1.w2 = _local1.zone2._width;
_local1.x1 = x + _local1.left_x;
_local1.x2 = x + _local1.right_x;
_local1.w = Math.abs(_local1.x1 - _local1.x2);
}
function f_StaticRange() {
var _local3 = this;
var u_min = static_index;
var u_max = 1;
i = 1;
while (i <= static_index) {
var _local2 = _local3["static" + i];
if (_local2.x > limit_topleft.x) {
if (_local2.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 _local1 = _local3["object" + i];
if (_local1._x > limit_topleft.x) {
if (_local1._x < limit_bottomright.x) {
if (_local1.active) {
total_objects++;
_local3["object_pt" + total_objects] = _local1;
}
}
}
i++;
}
}
function f_GameInit() {
var _local3 = this;
_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 _local1 = _local3["object" + i];
object_dm_current = object_dm_current + 2;
_local1.depth_mod = object_dm_current + object_dm_default;
_local1.x = _local1._x;
_local1.y = _local1._y;
if (_local1.has_shadow) {
var _local2 = "shadow" + current_shadow;
attachMovie("shadow", _local2, i - 100);
_local1.shadow_pt = _local3["shadow" + current_shadow];
current_shadow++;
_local1.shadow_pt._x = _local1.x;
_local1.shadow_pt._y = _local1.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 1749 MovieClip Frame 4
stop();
Symbol 1752 MovieClip Frame 1
stop();
Symbol 1752 MovieClip Frame 2
play();
Symbol 1840 MovieClip Frame 1
stop();
Symbol 1841 MovieClip Frame 1
ready = true;
stop();
Symbol 1841 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 1359 MovieClip "bar" in Symbol 1841 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Symbol 1841 MovieClip Frame 60
gotoAndStop (1);
Symbol 1842 MovieClip Frame 1
stop();
Symbol 1842 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 1359 MovieClip "bar" in Symbol 1842 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Instance of Symbol 1359 MovieClip "ragebar" in Symbol 1842 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Symbol 1843 MovieClip Frame 1
stop();
Symbol 1843 MovieClip Frame 2
checked = false;
play();
Symbol 1843 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 1843 MovieClip Frame 4
gotoAndPlay (3);
Symbol 1857 MovieClip Frame 1
stop();
Symbol 1857 MovieClip Frame 2
play();
Symbol 1859 MovieClip Frame 11
stop();
Symbol 1862 MovieClip Frame 1
music_volume = 100;
stop();
Instance of Symbol 249 MovieClip in Symbol 1862 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.music_volume--;
_root.game.s_SunChipsMusic.setVolume(_parent.music_volume);
}
Symbol 1862 MovieClip Frame 71
_root.game.s_SunChipsMusic.setVolume(100);
stopAllSounds();
_root.game.f_Ending();
stop();
Symbol 1866 MovieClip Frame 1
stop();
Symbol 1866 MovieClip Frame 91
_root.gotoAndStop("intro");
Symbol 1877 MovieClip Frame 19
stop();
Symbol 1878 MovieClip Frame 1
stop();
Symbol 1898 MovieClip Frame 6
stop();
Symbol 1970 MovieClip Frame 18
stop();
Symbol 1977 MovieClip Frame 1
stop();
Symbol 1977 MovieClip Frame 7
stop();
Symbol 1977 MovieClip Frame 15
gotoAndStop (1);
Symbol 1983 Button
on (press) {
stopAllSounds();
tellTarget (_root.end) {
play();
};
}
Symbol 1987 Button
on (rollOver) {
tellTarget ("tank") {
gotoAndPlay ("bang");
};
}
on (rollOut) {
tellTarget ("tank") {
gotoAndPlay ("awww");
};
}
on (press) {
getURL ("http://www.newgrounds.com", _blank);
}
Symbol 1990 MovieClip Frame 351
stopAllSounds();
Symbol 1990 MovieClip Frame 388
stopAllSounds();
Symbol 1990 MovieClip Frame 845
stop();
Symbol 1990 MovieClip Frame 957
stopAllSounds();
_root.gotoAndStop("level1");
Symbol 2002 MovieClip Frame 11
stop();
Symbol 2041 MovieClip Frame 1
stop();
Symbol 2041 MovieClip Frame 6
stop();
Symbol 2041 MovieClip Frame 12
gotoAndStop (1);
Symbol 2042 Button
on (rollOver) {
tellTarget ("again") {
gotoAndPlay ("over");
};
}
on (rollOut) {
tellTarget ("again") {
gotoAndPlay ("off");
};
}
on (press) {
tellTarget (_root.over) {
play();
};
}
Symbol 2043 Button
on (press) {
getURL ("http://www.synj.net", _blank);
}
Symbol 2044 Button
on (press) {
getURL ("http://www.newgrounds.com", _blank);
}
Symbol 2045 Button
on (press) {
getURL ("http://www.cookiedoughrecords.com", _blank);
}
Symbol 2054 MovieClip Frame 7
stop();
Symbol 2074 MovieClip Frame 31
stop();
Symbol 2094 MovieClip Frame 5
stop();
Symbol 2105 MovieClip Frame 41
stop();
Symbol 2106 MovieClip Frame 105
stop();
Symbol 2106 MovieClip Frame 127
stopAllSounds();
Symbol 2106 MovieClip Frame 217
stopAllSounds();
_root.gotoAndStop("level1");