Frame 1
function zadergka() {
perc2++;
if (perc2 >= 100) {
clearInterval(fSetInterval);
}
}
stop();
stop();
preloader.line._xscale = 0;
preloader.txt.text = "0%";
game._visible = false;
game.loadMovie("gansters.swf", 1);
game._visible = false;
this.onEnterFrame = function () {
game._visible = false;
var _loc2 = this.getBytesLoaded();
var _local3 = this.getBytesTotal();
var _local2 = int((_loc2 / _local3) * 100);
var _local1;
_local1 = ((perc2 > _local2) ? (_local2) : (perc2));
preloader.line._xscale = _local1;
preloader.txt.text = _local1 + "%";
if ((_local3 == _loc2) && (perc2 == 100)) {
this.onEnterFrame = undefined;
preloader._visible = false;
_root.gotoAndStop(2);
}
};
perc2 = 0;
fSetInterval = setInterval(zadergka, 90);
Frame 2
stop();
Frame 3
_highquality = 1;
stop();
Frame 4
_highquality = 1;
gotoAndStop (3);
Symbol 43 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 1
play();
Symbol 48 MovieClip Frame 5
_parent.gotoAndStop("remove");
Symbol 53 MovieClip Frame 1
play();
Symbol 53 MovieClip Frame 5
_parent.gotoAndStop("remove");
Symbol 58 MovieClip Frame 1
play();
Symbol 58 MovieClip Frame 5
_parent.gotoAndStop("remove");
Symbol 66 MovieClip Frame 1
play();
Symbol 66 MovieClip Frame 19
_parent.gotoAndStop("remove");
Symbol 76 MovieClip Frame 1
play();
Symbol 76 MovieClip Frame 24
_parent.gotoAndStop("remove");
Symbol 84 MovieClip Frame 1
play();
Symbol 84 MovieClip Frame 14
_parent.gotoAndStop("remove");
Symbol 92 MovieClip Frame 1
play();
Symbol 92 MovieClip Frame 12
_parent.gotoAndStop("remove");
Symbol 103 MovieClip Frame 25
_parent.gotoAndStop("remove");
Symbol 118 MovieClip Frame 35
_parent.gotoAndStop("remove");
Symbol 149 MovieClip Frame 84
_parent.gotoAndStop("remove");
stop();
Symbol 150 MovieClip Frame 84
_parent.gotoAndStop("remove");
stop();
Symbol 161 MovieClip Frame 1
play();
Symbol 161 MovieClip Frame 15
_parent.gotoAndStop("remove");
Symbol 165 MovieClip Frame 1
play();
Symbol 165 MovieClip Frame 5
_parent.gotoAndStop("remove");
Symbol 170 MovieClip Frame 1
body.gotoAndStop(_root.game.SunChipsFrame);
Symbol 170 MovieClip Frame 45
_parent.gotoAndStop("remove");
Symbol 172 MovieClip Frame 11
_parent.gotoAndStop("remove");
Symbol 177 MovieClip Frame 8
_parent.gotoAndStop("remove");
Symbol 178 MovieClip [fx] Frame 1
stop();
Symbol 178 MovieClip [fx] Frame 15
if (_xscale > 0) {
speed_x = 16;
} else {
speed_x = -16;
}
speed_y = -3;
Instance of Symbol 167 MovieClip in Symbol 178 MovieClip [fx] Frame 15
onClipEvent (enterFrame) {
_root.game.f_DartAction(_parent);
}
Symbol 181 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 1
_root.game.f_Shirt(this);
stop();
Symbol 198 MovieClip Frame 1
_root.game.f_Hat(this);
stop();
Symbol 204 MovieClip Frame 1
_root.game.f_Skin(kid);
Symbol 213 MovieClip Frame 1
play();
Symbol 213 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 214 MovieClip Frame 1
_root.game.f_Skin(skin);
_root.game.f_Skin(arm);
Symbol 215 MovieClip Frame 1
play();
Symbol 215 MovieClip Frame 18
_parent.gotoAndStop("walk");
Symbol 216 MovieClip Frame 1
_root.game.f_Skin(skin);
Symbol 217 MovieClip Frame 1
play();
Symbol 217 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 218 MovieClip Frame 1
_root.game.f_Skin(kid);
Symbol 219 MovieClip Frame 1
play();
Symbol 219 MovieClip Frame 33
_parent.gotoAndStop("walk");
Symbol 230 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
_root.game.f_Skin(skin);
stop();
}
Symbol 232 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
_root.game.f_Skin(skin);
stop();
}
Symbol 233 MovieClip Frame 5
if (_parent.health <= 0) {
_parent.alive = false;
gotoAndPlay ("die");
}
Symbol 233 MovieClip Frame 34
_parent.gotoAndStop("walk");
Symbol 233 MovieClip Frame 35
gotoAndPlay (36);
Symbol 233 MovieClip Frame 62
_root.game.f_KidDie(_parent);
stop();
Symbol 235 MovieClip Frame 3
stop();
Symbol 236 MovieClip Frame 1
play();
Symbol 236 MovieClip Frame 16
_parent.gotoAndStop("grabbed");
Symbol 238 MovieClip Frame 1
play();
Symbol 238 MovieClip Frame 17
_parent.gotoAndStop("grabbed");
Symbol 240 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
_root.game.f_Skin(skin);
stop();
}
Symbol 241 MovieClip Frame 4
stop();
Symbol 242 MovieClip Frame 3
stop();
Symbol 244 MovieClip Frame 1
play();
Symbol 244 MovieClip Frame 7
_parent.gotoAndStop("walk");
Symbol 245 MovieClip Frame 1
speed = 7;
play();
Instance of Symbol 167 MovieClip in Symbol 245 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_PushKid(_parent._parent, _parent.speed);
_parent.speed--;
}
Symbol 245 MovieClip Frame 20
_parent.gotoAndStop("walk");
Symbol 257 MovieClip Frame 16
_root.game.f_JamesShoot(_parent);
Symbol 257 MovieClip Frame 24
_parent.gotoAndStop("walk");
Symbol 261 MovieClip Frame 23
gotoAndPlay (1);
Symbol 280 MovieClip Frame 1
_root.game.s_Swing6.start(0, 0);
Symbol 280 MovieClip Frame 4
_root.game.s_Swing6.start(0, 0);
Symbol 280 MovieClip Frame 7
_root.game.s_Swing6.start(0, 0);
Symbol 280 MovieClip Frame 9
gotoAndPlay (1);
Symbol 284 MovieClip Frame 11
stop();
Symbol 285 MovieClip [kidbosscar] Frame 1
_root.game.f_Skin(kid.kid);
Symbol 285 MovieClip [kidbosscar] 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 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 2
onClipEvent (enterFrame) {
_root.game.f_KidRun(_parent);
}
Symbol 285 MovieClip [kidbosscar] Frame 3
_root.game.f_Skin(kid.kid);
stop();
Instance of Symbol 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 3
onClipEvent (enterFrame) {
_root.game.f_JamesRun(_parent);
}
Symbol 285 MovieClip [kidbosscar] Frame 4
_root.game.f_KidSettings(this);
_root.game.f_Skin(kid.kid);
stop();
Instance of Symbol 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 4
onClipEvent (enterFrame) {
_root.game.f_SoccerRun(_parent);
}
Symbol 285 MovieClip [kidbosscar] Frame 5
_root.game.f_Skin(kid.kid);
Instance of Symbol 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 5
onClipEvent (enterFrame) {
if (!_root.game.f_NinjaAttack(_parent)) {
_root.game.f_KidRun(_parent);
}
}
Instance of Symbol 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 6
onClipEvent (enterFrame) {
if (!_root.game.f_HelmetAttack(_parent)) {
_root.game.f_KidRun(_parent);
}
}
Instance of Symbol 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 11
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 285 MovieClip [kidbosscar] Frame 14
onground = true;
Symbol 285 MovieClip [kidbosscar] Frame 23
_root.game.f_KidSettings(this);
_root.game.f_Skin(kid.kid);
Symbol 285 MovieClip [kidbosscar] Frame 24
_root.game.f_KidSettings(this);
_root.game.f_Skin(kid.kid);
stop();
Instance of Symbol 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 24
onClipEvent (enterFrame) {
_root.game.f_SoccerRun(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 26
onClipEvent (enterFrame) {
_root.game.f_CheckSandbox(_parent);
}
Symbol 285 MovieClip [kidbosscar] 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 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 29
onClipEvent (enterFrame) {
_root.game.f_ATV(_parent);
}
Symbol 285 MovieClip [kidbosscar] Frame 30
_root.game.f_Skin(kid.body.kid);
_root.game.f_Skin(kid.body.foot);
Instance of Symbol 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 30
onClipEvent (enterFrame) {
_root.game.f_SoccerSlide(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 31
onClipEvent (enterFrame) {
_root.game.f_NinjaKick(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 32
onClipEvent (enterFrame) {
_root.game.f_NinjaJump(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 285 MovieClip [kidbosscar] Frame 34
onClipEvent (enterFrame) {
_root.game.f_SoccerSlide(_parent);
}
Symbol 285 MovieClip [kidbosscar] Frame 36
_root.game.f_KidReset(this);
Symbol 287 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 1
_root.game.f_Skin(kid);
Symbol 308 MovieClip Frame 1
play();
Symbol 308 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 310 MovieClip Frame 1
_root.game.f_Skin(skin);
_root.game.f_Skin(arm);
Symbol 311 MovieClip Frame 1
play();
Symbol 311 MovieClip Frame 18
_parent.gotoAndStop("walk");
Symbol 313 MovieClip Frame 1
_root.game.f_Skin(skin);
Symbol 314 MovieClip Frame 1
play();
Symbol 314 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 316 MovieClip Frame 1
play();
Symbol 316 MovieClip Frame 33
_parent.gotoAndStop("walk");
Symbol 321 MovieClip Frame 6
stop();
Symbol 322 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 167 MovieClip in Symbol 322 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._parent._parent.onfire > 1) {
_parent.gotoAndStop(_parent._parent._parent.onfire);
}
}
Symbol 325 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
_root.game.f_Skin(skin);
stop();
}
Symbol 327 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
_root.game.f_Skin(skin);
stop();
}
Symbol 328 MovieClip Frame 1
_root.game.f_Skin(this);
Symbol 329 MovieClip Frame 1
_root.game.f_Skin(this);
Symbol 332 MovieClip Frame 5
if (_parent.health <= 0) {
_parent.alive = false;
gotoAndPlay ("die");
}
Symbol 332 MovieClip Frame 34
_parent.gotoAndStop("walk");
Symbol 332 MovieClip Frame 35
gotoAndPlay (36);
Symbol 332 MovieClip Frame 62
_root.game.f_KidDie(_parent);
stop();
Symbol 333 MovieClip Frame 1
_root.game.f_Skin(this);
Symbol 335 MovieClip Frame 3
stop();
Symbol 336 MovieClip Frame 1
_root.game.f_Skin(this);
Symbol 338 MovieClip Frame 1
play();
Symbol 338 MovieClip Frame 16
_parent.gotoAndStop("grabbed");
Symbol 339 MovieClip Frame 1
_root.game.f_Skin(this);
Symbol 341 MovieClip Frame 1
play();
Symbol 341 MovieClip Frame 17
_parent.gotoAndStop("grabbed");
Symbol 342 MovieClip Frame 4
stop();
Symbol 343 MovieClip Frame 3
stop();
Symbol 345 MovieClip Frame 1
play();
Symbol 345 MovieClip Frame 7
_parent.gotoAndStop("walk");
Symbol 347 MovieClip Frame 1
speed = 7;
play();
Instance of Symbol 167 MovieClip in Symbol 347 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_PushKid(_parent._parent, _parent.speed);
_parent.speed--;
}
Symbol 347 MovieClip Frame 20
_parent.gotoAndStop("walk");
Symbol 350 MovieClip [kid] Frame 1
_root.game.f_Skin(kid.kid);
Symbol 350 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 167 MovieClip in Symbol 350 MovieClip [kid] Frame 2
onClipEvent (enterFrame) {
_root.game.f_KidRun(_parent);
}
Symbol 350 MovieClip [kid] Frame 3
_root.game.f_Skin(kid.kid);
stop();
Instance of Symbol 167 MovieClip in Symbol 350 MovieClip [kid] Frame 3
onClipEvent (enterFrame) {
_root.game.f_JamesRun(_parent);
}
Symbol 350 MovieClip [kid] Frame 4
_root.game.f_KidSettings(this);
_root.game.f_Skin(kid.kid);
stop();
Instance of Symbol 167 MovieClip in Symbol 350 MovieClip [kid] Frame 4
onClipEvent (enterFrame) {
_root.game.f_SoccerRun(_parent);
}
Symbol 350 MovieClip [kid] Frame 5
_root.game.f_Skin(kid.kid);
Instance of Symbol 167 MovieClip in Symbol 350 MovieClip [kid] Frame 5
onClipEvent (enterFrame) {
if (!_root.game.f_NinjaAttack(_parent)) {
_root.game.f_KidRun(_parent);
}
}
Instance of Symbol 167 MovieClip in Symbol 350 MovieClip [kid] Frame 6
onClipEvent (enterFrame) {
if (!_root.game.f_HelmetAttack(_parent)) {
_root.game.f_KidRun(_parent);
}
}
Instance of Symbol 167 MovieClip in Symbol 350 MovieClip [kid] Frame 11
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 350 MovieClip [kid] Frame 14
onground = true;
Symbol 350 MovieClip [kid] Frame 23
_root.game.f_KidSettings(this);
_root.game.f_Skin(kid.kid);
Symbol 350 MovieClip [kid] Frame 24
_root.game.f_KidSettings(this);
_root.game.f_Skin(kid.kid);
stop();
Instance of Symbol 167 MovieClip in Symbol 350 MovieClip [kid] Frame 24
onClipEvent (enterFrame) {
_root.game.f_SoccerRun(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 350 MovieClip [kid] Frame 26
onClipEvent (enterFrame) {
_root.game.f_CheckSandbox(_parent);
}
Symbol 350 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 167 MovieClip in Symbol 350 MovieClip [kid] Frame 29
onClipEvent (enterFrame) {
_root.game.f_ATV(_parent);
}
Symbol 350 MovieClip [kid] Frame 30
_root.game.f_Skin(kid.body.kid);
_root.game.f_Skin(kid.body.foot);
Instance of Symbol 167 MovieClip in Symbol 350 MovieClip [kid] Frame 30
onClipEvent (enterFrame) {
_root.game.f_SoccerSlide(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 350 MovieClip [kid] Frame 31
onClipEvent (enterFrame) {
_root.game.f_NinjaKick(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 350 MovieClip [kid] Frame 32
onClipEvent (enterFrame) {
_root.game.f_NinjaJump(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 350 MovieClip [kid] Frame 34
onClipEvent (enterFrame) {
_root.game.f_SoccerSlide(_parent);
}
Symbol 350 MovieClip [kid] Frame 36
_root.game.f_KidReset(this);
Symbol 352 MovieClip Frame 1
stop();
Symbol 366 MovieClip Frame 1
play();
Symbol 366 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 367 MovieClip Frame 1
play();
Symbol 367 MovieClip Frame 18
_parent.gotoAndStop("walk");
Symbol 368 MovieClip Frame 1
play();
Symbol 368 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 369 MovieClip Frame 1
play();
Symbol 369 MovieClip Frame 17
_parent.gotoAndStop("walk");
Symbol 372 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Instance of Symbol 167 MovieClip in Symbol 373 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 374 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else if (_parent._parent._parent.onfire > 1) {
gotoAndStop(_parent._parent._parent.onfire);
} else {
stop();
}
Symbol 377 MovieClip Frame 7
if (_parent.health <= 0) {
_parent.alive = false;
gotoAndPlay ("die");
}
Symbol 377 MovieClip Frame 15
_parent.gotoAndStop("walk");
Symbol 377 MovieClip Frame 16
_root.game.s_SunChipsDie.start(0, 0);
play();
Symbol 377 MovieClip Frame 41
_root.game.f_MusicLight();
_root.game.f_KidDie(_parent);
stop();
Symbol 380 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 380 MovieClip Frame 5
_root.game.s_Swing4.start(0, 0);
Symbol 380 MovieClip Frame 6
_root.game.f_Boss1PunchHit(_parent);
Symbol 380 MovieClip Frame 14
_parent.gotoAndStop("stand");
Symbol 381 MovieClip Frame 5
_root.game.s_Swing4.start(0, 0);
Symbol 381 MovieClip Frame 6
_root.game.f_Boss1UppercutHit(_parent);
Symbol 381 MovieClip Frame 13
_parent.gotoAndStop("stand");
Symbol 382 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 382 MovieClip Frame 6
_root.game.s_Swing4.start(0, 0);
Symbol 382 MovieClip Frame 7
_root.game.f_Boss1PunchHit(_parent);
Symbol 382 MovieClip Frame 14
_parent.gotoAndStop("stand");
Symbol 384 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 384 MovieClip Frame 4
_root.game.s_Swing4.start(0, 0);
Symbol 384 MovieClip Frame 5
_root.game.f_Boss1ElboHit(_parent);
Symbol 384 MovieClip Frame 14
_parent.gotoAndStop("stand");
Symbol 387 MovieClip Frame 1
_root.game.f_Boss1Intro(_parent);
Symbol 387 MovieClip Frame 2
gotoAndPlay (1);
Symbol 387 MovieClip Frame 3
_root.game.s_Advance.start(0, 0);
play();
Instance of Symbol 386 MovieClip in Symbol 387 MovieClip Frame 3
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll(_parent._parent);
}
Symbol 387 MovieClip Frame 14
_root.game.s_Stab.start(0, 0);
Symbol 387 MovieClip Frame 21
_root.game.pause = false;
_parent.gotoAndStop("walk");
Instance of Symbol 386 MovieClip in Symbol 387 MovieClip Frame 48
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll2(_root.game.dude1);
}
Symbol 388 MovieClip [boss3] Frame 1
stop();
Instance of Symbol 167 MovieClip in Symbol 388 MovieClip [boss3] Frame 1
onClipEvent (enterFrame) {
_root.game.f_Boss1PunchClock(_parent);
}
Symbol 388 MovieClip [boss3] Frame 2
gotoAndStop ("walk");
Symbol 388 MovieClip [boss3] Frame 3
_root.game.f_KidSettings2(this);
stop();
Instance of Symbol 167 MovieClip in Symbol 388 MovieClip [boss3] Frame 3
onClipEvent (enterFrame) {
_root.game.f_Boss3Run(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 388 MovieClip [boss3] Frame 8
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 388 MovieClip [boss3] Frame 11
onground = true;
Symbol 388 MovieClip [boss3] Frame 26
_root.game.f_KidReset2(this);
Symbol 390 MovieClip Frame 1
stop();
Symbol 400 MovieClip Frame 1
stop();
Symbol 405 MovieClip Frame 1
play();
Symbol 405 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 406 MovieClip Frame 1
play();
Symbol 406 MovieClip Frame 18
_parent.gotoAndStop("walk");
Symbol 407 MovieClip Frame 1
play();
Symbol 407 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 408 MovieClip Frame 1
play();
Symbol 408 MovieClip Frame 17
_parent.gotoAndStop("walk");
Symbol 414 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Symbol 416 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 167 MovieClip in Symbol 416 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 420 MovieClip Frame 7
if (_parent.health <= 0) {
_parent.alive = false;
gotoAndPlay ("die");
}
Symbol 420 MovieClip Frame 15
_parent.gotoAndStop("walk");
Symbol 420 MovieClip Frame 16
play();
Symbol 420 MovieClip Frame 41
_root.game.f_MusicLight();
_root.game.f_KidDie(_parent);
stop();
Symbol 422 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 422 MovieClip Frame 5
_root.game.s_Swing4.start(0, 0);
Symbol 422 MovieClip Frame 6
_root.game.f_Boss1PunchHit(_parent);
Symbol 422 MovieClip Frame 14
_parent.gotoAndStop("stand");
Symbol 424 MovieClip Frame 5
_root.game.s_Swing4.start(0, 0);
Symbol 424 MovieClip Frame 6
_root.game.f_Boss1UppercutHit(_parent);
Symbol 424 MovieClip Frame 13
_parent.gotoAndStop("stand");
Symbol 427 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 427 MovieClip Frame 6
_root.game.s_Swing4.start(0, 0);
Symbol 427 MovieClip Frame 7
_root.game.f_Boss1PunchHit(_parent);
Symbol 427 MovieClip Frame 14
_parent.gotoAndStop("stand");
Symbol 428 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 428 MovieClip Frame 4
_root.game.s_Swing4.start(0, 0);
Symbol 428 MovieClip Frame 5
_root.game.f_Boss1ElboHit(_parent);
Symbol 428 MovieClip Frame 14
_parent.gotoAndStop("stand");
Symbol 429 MovieClip Frame 1
_root.game.f_Boss1Intro(_parent);
Symbol 429 MovieClip Frame 2
gotoAndPlay (1);
Symbol 429 MovieClip Frame 3
play();
Instance of Symbol 386 MovieClip in Symbol 429 MovieClip Frame 3
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll(_parent._parent);
}
Symbol 429 MovieClip Frame 14
_root.game.f_HardPunchSound();
_root.game.boss2fodder.gotoAndStop("hit1");
attack_pow = int(_root.game.boss2fodder.health_max * 1.5);
_root.game.f_Damage(_root.game.boss1fodder, attack_pow);
Symbol 429 MovieClip Frame 26
_root.game.f_HardPunchSound();
_root.game.boss2fodder.gotoAndStop("hit2");
_root.game.f_Damage(_root.game.boss2fodder, attack_pow);
Symbol 429 MovieClip Frame 36
_root.game.f_HardPunchSound();
_root.game.boss2fodder.gotoAndStop("hit3");
_root.game.f_Damage(_root.game.boss2fodder, attack_pow);
Symbol 429 MovieClip Frame 48
_root.game.f_HardPunchSound();
_root.game.f_Damage(_root.game.boss1fodder, attack_pow);
_root.game.boss2fodder.speed_toss_y = -(random(5) + 20);
_root.game.boss2fodder.speed_toss_x = random(5) + 20;
_root.game.f_CallJuggle1(_root.game.boss2fodder);
Instance of Symbol 386 MovieClip in Symbol 429 MovieClip Frame 48
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll2(_root.game.dude1);
}
Symbol 429 MovieClip Frame 68
_root.game.pause = false;
_parent.gotoAndStop("walk");
Symbol 430 MovieClip [boss2] Frame 1
stop();
Instance of Symbol 167 MovieClip in Symbol 430 MovieClip [boss2] Frame 1
onClipEvent (enterFrame) {
_root.game.f_Boss1PunchClock(_parent);
}
Symbol 430 MovieClip [boss2] Frame 2
gotoAndStop ("walk");
Symbol 430 MovieClip [boss2] Frame 3
_root.game.f_KidSettings2(this);
stop();
Instance of Symbol 167 MovieClip in Symbol 430 MovieClip [boss2] Frame 3
onClipEvent (enterFrame) {
_root.game.f_Boss2Run(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 430 MovieClip [boss2] Frame 8
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 430 MovieClip [boss2] Frame 11
onground = true;
Symbol 430 MovieClip [boss2] Frame 26
_root.game.f_KidReset2(this);
Symbol 435 MovieClip Frame 1
play();
Symbol 435 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 436 MovieClip Frame 1
play();
Symbol 436 MovieClip Frame 18
_parent.gotoAndStop("walk");
Symbol 439 MovieClip Frame 1
play();
Symbol 439 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 440 MovieClip Frame 1
play();
Symbol 440 MovieClip Frame 17
_parent.gotoAndStop("walk");
Symbol 442 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Symbol 444 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 167 MovieClip in Symbol 444 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 447 MovieClip Frame 7
if (_parent.health <= 0) {
_parent.alive = false;
gotoAndPlay ("die");
}
Symbol 447 MovieClip Frame 15
_parent.gotoAndStop("walk");
Symbol 447 MovieClip Frame 16
play();
Symbol 447 MovieClip Frame 41
_root.game.f_MusicLight();
_root.game.f_KidDie(_parent);
stop();
Symbol 448 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 448 MovieClip Frame 5
_root.game.s_Swing4.start(0, 0);
Symbol 448 MovieClip Frame 6
_root.game.f_Boss1PunchHit(_parent);
Symbol 448 MovieClip Frame 14
_parent.gotoAndStop("stand");
Symbol 449 MovieClip Frame 5
_root.game.s_Swing4.start(0, 0);
Symbol 449 MovieClip Frame 6
_root.game.f_Boss1UppercutHit(_parent);
Symbol 449 MovieClip Frame 13
_parent.gotoAndStop("stand");
Symbol 450 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 450 MovieClip Frame 6
_root.game.s_Swing4.start(0, 0);
Symbol 450 MovieClip Frame 7
_root.game.f_Boss1PunchHit(_parent);
Symbol 450 MovieClip Frame 14
_parent.gotoAndStop("stand");
Symbol 451 MovieClip Frame 2
_root.game.s_Swing2.start(0, 0);
Symbol 451 MovieClip Frame 4
_root.game.s_Swing4.start(0, 0);
Symbol 451 MovieClip Frame 5
_root.game.f_Boss1ElboHit(_parent);
Symbol 451 MovieClip Frame 14
_parent.gotoAndStop("stand");
Symbol 452 MovieClip Frame 1
_root.game.f_Boss1Intro(_parent);
Symbol 452 MovieClip Frame 2
gotoAndPlay (1);
Symbol 452 MovieClip Frame 3
play();
Instance of Symbol 386 MovieClip in Symbol 452 MovieClip Frame 3
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll(_parent._parent);
}
Symbol 452 MovieClip Frame 14
_root.game.f_HardPunchSound();
_root.game.boss1fodder.gotoAndStop("hit1");
attack_pow = int(_root.game.boss1fodder.health_max * 8);
_root.game.f_Damage(_root.game.boss1fodder, attack_pow);
Symbol 452 MovieClip Frame 26
_root.game.f_HardPunchSound();
_root.game.boss2fodder.gotoAndStop("hit2");
_root.game.f_Damage(_root.game.boss2fodder, attack_pow);
Symbol 452 MovieClip Frame 36
_root.game.f_HardPunchSound();
_root.game.boss2fodder.gotoAndStop("hit3");
_root.game.f_Damage(_root.game.boss2fodder, attack_pow);
Symbol 452 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) + 12;
_root.game.f_CallJuggle1(_root.game.boss1fodder);
_root.game.pause = false;
_parent.gotoAndStop("walk");
Instance of Symbol 386 MovieClip in Symbol 452 MovieClip Frame 48
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll2(_root.game.dude1);
}
Symbol 452 MovieClip Frame 68
_parent.gotoAndStop("walk");
Symbol 453 MovieClip [boss1] Frame 1
stop();
Instance of Symbol 167 MovieClip in Symbol 453 MovieClip [boss1] Frame 1
onClipEvent (enterFrame) {
_root.game.f_Boss1PunchClock(_parent);
}
Symbol 453 MovieClip [boss1] Frame 2
gotoAndStop ("walk");
Symbol 453 MovieClip [boss1] Frame 3
_root.game.f_KidSettings(this);
stop();
Instance of Symbol 167 MovieClip in Symbol 453 MovieClip [boss1] Frame 3
onClipEvent (enterFrame) {
_root.game.f_Boss1Run(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 453 MovieClip [boss1] Frame 8
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 453 MovieClip [boss1] Frame 11
onground = true;
Symbol 453 MovieClip [boss1] Frame 26
_root.game.f_KidReset(this);
Symbol 464 MovieClip Frame 1
play();
Symbol 464 MovieClip Frame 14
_parent.gotoAndStop("walk");
Symbol 466 MovieClip Frame 1
play();
Symbol 466 MovieClip Frame 16
_parent.gotoAndStop("walk");
Symbol 468 MovieClip Frame 1
play();
Symbol 468 MovieClip Frame 17
_parent.gotoAndStop("walk");
Symbol 472 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 167 MovieClip in Symbol 472 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 476 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Symbol 479 MovieClip Frame 9
if (_parent.health <= 0) {
_parent.alive = false;
gotoAndPlay ("die");
}
Instance of Symbol 386 MovieClip in Symbol 479 MovieClip Frame 10
onClipEvent (enterFrame) {
_root.game.f_SunChipsUp(_parent._parent);
}
Symbol 479 MovieClip Frame 15
_parent.gotoAndStop("walk");
Symbol 479 MovieClip Frame 16
_root.game.s_SunChipsDie.start(0, 0);
_root.game.f_KillKids();
play();
Symbol 479 MovieClip Frame 41
_root.ending_fader.gotoAndPlay(2);
_root.game.f_KidDie(_parent);
stop();
Symbol 483 MovieClip Frame 3
_root.game.s_SunChipsGrunt.start(0, 0);
Symbol 483 MovieClip Frame 10
_root.game.s_Swing1.start(0, 0);
_root.game.f_Boss1UppercutHit(_parent);
Symbol 483 MovieClip Frame 13
_root.game.s_Swing2.start(0, 0);
Symbol 483 MovieClip Frame 15
_root.game.s_Swing3.start(0, 0);
Symbol 483 MovieClip Frame 18
_root.game.s_Swing4.start(0, 0);
Symbol 483 MovieClip Frame 22
_root.game.s_Swing5.start(0, 0);
Symbol 483 MovieClip Frame 33
_parent.gotoAndStop("stand");
Instance of Symbol 386 MovieClip in Symbol 488 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.game.f_SunChipsSlide(_parent._parent);
}
Symbol 488 MovieClip Frame 2
_root.game.s_SunChipsGrunt.start(0, 0);
Symbol 488 MovieClip Frame 5
_parent.nohit = true;
_root.game.s_Swing4.start(0, 0);
Symbol 488 MovieClip Frame 6
_root.game.f_Boss1UppercutHit(_parent);
Symbol 488 MovieClip Frame 15
_parent.nohit = false;
Symbol 488 MovieClip Frame 17
_parent.gotoAndStop("stand");
Symbol 493 MovieClip Frame 11
_root.game.s_GunShot.start(0, 0);
_root.game.f_GunShot(_parent);
Symbol 493 MovieClip Frame 24
_parent.ammo--;
if (_parent.ammo > 0) {
_parent.gotoAndStop("stand");
} else {
_parent.ammo = 6;
_parent.gotoAndStop("reload");
}
Symbol 494 MovieClip Frame 1
_root.game.s_Swing4.start(0, 0);
Symbol 494 MovieClip Frame 4
_root.game.s_Swing5.start(0, 0);
Symbol 494 MovieClip Frame 6
_root.game.s_Swing6.start(0, 0);
Symbol 498 MovieClip Frame 1
_root.game.s_HardPunch2.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 5);
Symbol 498 MovieClip Frame 10
_root.game.s_HardPunch1.start(0, 0);
Symbol 498 MovieClip Frame 14
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 498 MovieClip Frame 18
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 498 MovieClip Frame 22
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 498 MovieClip Frame 26
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 498 MovieClip Frame 30
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 498 MovieClip Frame 34
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 498 MovieClip Frame 38
_root.game.s_HardPunch1.start(0, 0);
_root.game.f_Damage(_root.game.dude1, 2);
Symbol 498 MovieClip Frame 40
_root.game.s_HardPunch3.start(0, 0);
Symbol 498 MovieClip Frame 49
_root.game.f_SunChipsStopCrazy(_parent);
Symbol 502 MovieClip Frame 1
_root.game.s_Swing6.start(0, 0);
Symbol 502 MovieClip Frame 11
_root.game.s_Reload.start(0, 0);
Symbol 502 MovieClip Frame 20
_parent.gotoAndStop("walk");
Symbol 503 MovieClip Frame 1
if ((_parent._x + _parent._parent._x) < 770) {
_root.game.pause = true;
_root.game.f_SunchipsMusic();
gotoAndPlay ("intro");
}
Symbol 503 MovieClip Frame 2
gotoAndPlay (1);
Symbol 503 MovieClip Frame 3
play();
Instance of Symbol 386 MovieClip in Symbol 503 MovieClip Frame 3
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll(_parent._parent);
}
Symbol 503 MovieClip Frame 47
_root.game.f_KidGroup10();
Symbol 503 MovieClip Frame 57
_root.game.s_Reload.start(0, 0);
Instance of Symbol 386 MovieClip in Symbol 503 MovieClip Frame 65
onClipEvent (enterFrame) {
_root.game.f_Boss1Scroll2(_root.game.dude1);
}
Symbol 503 MovieClip Frame 85
_root.game.pause = false;
_parent.gotoAndStop("walk");
Symbol 504 MovieClip [sunchips] Frame 1
stop();
Instance of Symbol 167 MovieClip in Symbol 504 MovieClip [sunchips] Frame 1
onClipEvent (enterFrame) {
_root.game.f_Boss1PunchClock(_parent);
}
Symbol 504 MovieClip [sunchips] Frame 2
gotoAndStop ("walk");
Symbol 504 MovieClip [sunchips] Frame 3
_root.game.f_KidSettings(this);
stop();
Instance of Symbol 167 MovieClip in Symbol 504 MovieClip [sunchips] Frame 3
onClipEvent (enterFrame) {
if (!_root.game.f_SunChipsAttack(_parent)) {
_root.game.f_JamesRun(_parent);
}
}
Instance of Symbol 167 MovieClip in Symbol 504 MovieClip [sunchips] Frame 8
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 504 MovieClip [sunchips] Frame 11
onground = true;
Instance of Symbol 167 MovieClip in Symbol 504 MovieClip [sunchips] Frame 24
onClipEvent (enterFrame) {
_root.game.f_SunChipsCrazy(_parent);
}
Symbol 504 MovieClip [sunchips] Frame 28
_root.game.f_KidReset(this);
Symbol 508 MovieClip Frame 1
stop();
Symbol 510 MovieClip Frame 1
stop();
Symbol 512 MovieClip Frame 1
stop();
Symbol 519 MovieClip Frame 1
stop();
Symbol 528 MovieClip Frame 1
stop();
Symbol 533 MovieClip Frame 1
play();
Symbol 533 MovieClip Frame 3
_root.game.f_PunchHit(_parent);
Symbol 533 MovieClip Frame 7
_parent.punching = false;
Symbol 533 MovieClip Frame 10
_parent.gotoAndStop("stand");
Symbol 537 MovieClip Frame 1
play();
_root.game.f_PunchHit(_parent);
Symbol 537 MovieClip Frame 8
_parent.punching = false;
Symbol 537 MovieClip Frame 12
_parent.gotoAndStop("stand");
Symbol 543 MovieClip Frame 1
play();
Symbol 543 MovieClip Frame 3
_root.game.f_PunchHit(_parent);
Symbol 543 MovieClip Frame 7
_parent.punching = false;
Symbol 543 MovieClip Frame 11
_parent.gotoAndStop("stand");
Symbol 546 MovieClip Frame 1
stop();
Symbol 547 MovieClip Frame 1
play();
Symbol 547 MovieClip Frame 4
speed = 12;
if (_parent._xscale < 0) {
speed = speed * -1;
}
Symbol 547 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 167 MovieClip in Symbol 547 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 547 MovieClip Frame 12
_parent.punching = false;
Symbol 547 MovieClip Frame 19
_parent.gotoAndStop("stand");
Symbol 551 MovieClip Frame 1
play();
Symbol 551 MovieClip Frame 7
_root.game.f_SoundSwing(2);
Symbol 551 MovieClip Frame 9
_root.game.f_PunchHit(_parent);
Symbol 551 MovieClip Frame 13
_parent.punching = false;
Symbol 551 MovieClip Frame 18
_parent.gotoAndStop("stand");
Symbol 554 MovieClip Frame 1
play();
Symbol 554 MovieClip Frame 7
_root.game.f_SoundSwing(2);
Symbol 554 MovieClip Frame 9
_root.game.f_PunchHit(_parent);
Symbol 554 MovieClip Frame 13
_parent.punching = false;
Symbol 554 MovieClip Frame 18
_parent.gotoAndStop("stand");
Symbol 555 MovieClip Frame 1
play();
Symbol 555 MovieClip Frame 10
_root.game.s_Swing1.start(0, 0);
Symbol 555 MovieClip Frame 12
_root.game.f_PunchHit(_parent);
Symbol 555 MovieClip Frame 20
_parent.punching = false;
Symbol 555 MovieClip Frame 22
_parent.gotoAndStop("stand");
Symbol 562 MovieClip Frame 1
stop();
Symbol 567 MovieClip Frame 1
play();
Symbol 567 MovieClip Frame 6
_root.game.s_Swing5.start(0, 0);
Symbol 567 MovieClip Frame 7
_root.game.f_PunchHit(_parent);
Symbol 567 MovieClip Frame 13
_parent.punching = false;
Symbol 567 MovieClip Frame 18
_parent.gotoAndStop("stand");
Symbol 573 MovieClip Frame 1
play();
Symbol 573 MovieClip Frame 4
_root.game.s_SwishTriple.start(0, 0);
Symbol 573 MovieClip Frame 12
_root.game.s_Stab.start(0, 0);
_root.game.f_PunchHit(_parent);
Symbol 573 MovieClip Frame 18
_parent.punching = false;
Symbol 573 MovieClip Frame 22
_parent.gotoAndStop("stand");
Symbol 576 MovieClip Frame 1
play();
Symbol 576 MovieClip Frame 3
if (_parent._xscale > 0) {
speed = 6;
} else {
speed = -6;
}
Symbol 576 MovieClip Frame 4
_root.game.f_MoveChar(_parent, false, speed);
Symbol 576 MovieClip Frame 5
_root.game.f_MoveChar(_parent, false, speed);
_parent.hitnohit = true;
Symbol 576 MovieClip Frame 6
_root.game.f_MoveChar(_parent, false, speed);
_root.game.f_PunchHit(_parent);
Symbol 576 MovieClip Frame 7
_root.game.f_PunchHit(_parent);
Symbol 576 MovieClip Frame 8
_parent.hitnohit = false;
Symbol 576 MovieClip Frame 15
_parent.punching = false;
Symbol 576 MovieClip Frame 19
_parent.gotoAndStop("stand");
Symbol 577 MovieClip Frame 1
play();
Symbol 577 MovieClip Frame 2
_parent.hitnohit = true;
Symbol 577 MovieClip Frame 3
_root.game.f_PunchHit(_parent);
Symbol 577 MovieClip Frame 4
_parent.hitnohit = false;
Symbol 577 MovieClip Frame 7
_parent.punching = false;
Symbol 577 MovieClip Frame 11
_parent.gotoAndStop("stand");
Symbol 579 MovieClip Frame 1
play();
Symbol 579 MovieClip Frame 5
_parent.hitnohit = true;
Symbol 579 MovieClip Frame 6
_root.game.f_PunchHit(_parent);
Symbol 579 MovieClip Frame 7
_parent.hitnohit = false;
Symbol 579 MovieClip Frame 18
_parent.punching = false;
Symbol 579 MovieClip Frame 22
_parent.gotoAndStop("stand");
Symbol 583 MovieClip Frame 1
play();
Symbol 583 MovieClip Frame 3
_root.game.f_PunchHit(_parent);
Symbol 583 MovieClip Frame 4
_root.game.f_PunchHit(_parent);
Symbol 583 MovieClip Frame 12
_parent.punching = false;
Symbol 583 MovieClip Frame 16
_parent.gotoAndStop("stand");
Symbol 584 MovieClip Frame 1
play();
Symbol 584 MovieClip Frame 8
_parent.stomping = true;
_root.game.f_PunchHit(_parent);
_parent.stomping = false;
Symbol 584 MovieClip Frame 12
_parent.punching = false;
Symbol 584 MovieClip Frame 15
_parent.gotoAndStop("stand");
Symbol 587 MovieClip Frame 1
play();
Instance of Symbol 167 MovieClip in Symbol 587 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.game.f_PunchHit(_parent._parent);
_root.game.f_MoveChar(_parent._parent, false, _parent._parent.speed_slam);
}
Symbol 587 MovieClip Frame 13
_root.game.s_ground2.start(0, 0);
_parent.stomping = true;
_root.game.f_PunchHit(_parent);
_parent.stomping = false;
Symbol 587 MovieClip Frame 22
_parent.punching = false;
Symbol 587 MovieClip Frame 23
_parent.gotoAndStop("stand");
Symbol 589 MovieClip Frame 1
play();
Instance of Symbol 167 MovieClip in Symbol 589 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 589 MovieClip Frame 4
_root.game.f_SoundSwing(2);
Symbol 589 MovieClip Frame 7
_parent.punching = false;
Symbol 589 MovieClip Frame 15
_parent.gotoAndStop("stand");
Symbol 600 MovieClip Frame 1
play();
Symbol 600 MovieClip Frame 3
speed_y = -16;
if (_parent._xscale > 0) {
speed_x = 10;
} else {
speed_x = -10;
}
Symbol 600 MovieClip Frame 4
_root.game.f_SoundSwing(2);
play();
_root.game.f_PunchHit(_parent);
Instance of Symbol 167 MovieClip in Symbol 600 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 600 MovieClip Frame 6
_root.game.f_PunchHit(_parent);
Symbol 600 MovieClip Frame 8
_root.game.f_PunchHit(_parent);
Symbol 600 MovieClip Frame 10
_root.game.f_PunchHit(_parent);
Symbol 600 MovieClip Frame 11
_parent.punching = false;
Symbol 600 MovieClip Frame 14
if (_y < 0) {
gotoAndPlay ("hitloop");
} else {
_parent.gotoAndStop("stand");
}
Symbol 602 MovieClip Frame 1
stop();
Symbol 603 MovieClip Frame 1
stop();
Symbol 605 MovieClip Frame 7
_root.game.f_KidThrown(_parent);
Symbol 605 MovieClip Frame 13
_parent.gotoAndStop("stand");
Symbol 606 MovieClip Frame 1
play();
Symbol 606 MovieClip Frame 6
_root.game.f_KidThrownFierce(_parent);
Symbol 606 MovieClip Frame 16
_parent.gotoAndStop("stand");
Symbol 607 MovieClip Frame 6
_root.game.f_GrabSpark(_parent);
_root.game.f_KidHeadbutted(_parent);
Symbol 607 MovieClip Frame 16
_parent.gotoAndStop("grab");
Symbol 608 MovieClip Frame 7
_root.game.f_GrabSpark(_parent);
_root.game.f_KidHeadbutted(_parent);
Symbol 608 MovieClip Frame 17
if (_parent.grab_counter > 3) {
_parent.gotoAndStop("stand");
} else {
_parent.gotoAndStop("grab");
}
Symbol 612 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Instance of Symbol 167 MovieClip in Symbol 612 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._parent.onfire > 1) {
gotoAndStop(_parent._parent.onfire);
}
}
Symbol 615 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Symbol 616 MovieClip Frame 1
if (_parent.onfire > 1) {
gotoAndStop(_parent.onfire);
} else {
stop();
}
Symbol 620 MovieClip Frame 19
_root.game.f_CheckDead(_parent);
Symbol 620 MovieClip Frame 21
_parent.gotoAndStop("stand");
Symbol 623 MovieClip Frame 8
_parent.gotoAndStop("carry");
Symbol 624 MovieClip Frame 5
_parent.gotoAndStop("stand");
Symbol 628 MovieClip Frame 1
stop();
Symbol 629 MovieClip Frame 10
_parent.gotoAndStop("stand");
Symbol 643 MovieClip Frame 1
stop();
Symbol 646 MovieClip Frame 14
Symbol 646 MovieClip Frame 70
_root.game.s_Thunder.start(0, 0);
Symbol 646 MovieClip Frame 86
_root.game.s_explosion6.start(0, 0);
Symbol 646 MovieClip Frame 189
_parent.gotoAndStop("stand");
Symbol 648 MovieClip Frame 39
_root.game.f_SunChipsFrenzied(_parent);
Symbol 649 MovieClip Frame 8
_root.game.s_explosion6.start(0, 0);
Symbol 649 MovieClip Frame 69
_parent.gotoAndStop("stand");
Symbol 679 MovieClip Frame 24
stopAllSounds();
Symbol 679 MovieClip Frame 25
_root.game.f_Explosion(_parent);
_root.game.s_explosion5.start(0, 0);
Symbol 679 MovieClip Frame 27
_root.game.f_RemoveChar(_parent.shadow_pt);
Symbol 679 MovieClip Frame 97
stopAllSounds();
_root.game.f_GameOver();
stop();
Symbol 680 MovieClip [dude] Frame 1
_root.game.f_StandSettings(this);
Instance of Symbol 167 MovieClip in Symbol 680 MovieClip [dude] Frame 1
onClipEvent (enterFrame) {
_root.game.f_Character(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 680 MovieClip [dude] Frame 4
onClipEvent (enterFrame) {
_root.game.f_Turn(_parent);
_root.game.f_Punch(_parent);
}
Symbol 680 MovieClip [dude] Frame 21
hold_delay = 8;
body_y = upperbody._y;
kid_y = grab_pointer.body._y;
Instance of Symbol 167 MovieClip in Symbol 680 MovieClip [dude] Frame 21
onClipEvent (enterFrame) {
_root.game.f_HoldWalk(_parent);
_root.game.f_Throw(_parent);
}
Symbol 680 MovieClip [dude] Frame 22
hold_delay = 2;
body_y = upperbody._y;
kid_y = grab_pointer.body._y;
Instance of Symbol 167 MovieClip in Symbol 680 MovieClip [dude] Frame 22
onClipEvent (enterFrame) {
_root.game.f_HoldWalk(_parent);
_root.game.f_ThrowItem(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 680 MovieClip [dude] Frame 28
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 680 MovieClip [dude] Frame 31
onground = true;
Symbol 683 MovieClip [shadow] Frame 1
stop();
Symbol 728 MovieClip Frame 1
bull.onRelease = function () {
getURL ("http://sillybull.com");
};
Symbol 781 MovieClip Frame 1
kk.useHandCursor = false;
stop();
Instance of Symbol 766 MovieClip "kk" in Symbol 781 MovieClip Frame 1
on (rollOver) {
_parent.gotoAndStop(2);
}
on (rollOut) {
_parent.gotoAndStop(1);
}
Symbol 784 MovieClip Frame 1
stop();
Instance of Symbol 766 MovieClip in Symbol 784 MovieClip Frame 1
on (rollOver) {
_parent.gotoAndPlay(2);
}
on (rollOut) {
_parent.gotoAndStop(1);
}
on (press) {
_parent._parent.gotoAndStop(2);
}
Symbol 784 MovieClip Frame 6
gotoAndPlay (2);
Symbol 786 MovieClip Frame 1
stop();
Instance of Symbol 766 MovieClip in Symbol 786 MovieClip Frame 1
on (rollOver) {
_parent.gotoAndPlay(2);
}
on (rollOut) {
_parent.gotoAndStop(1);
}
Symbol 786 MovieClip Frame 6
gotoAndPlay (2);
Symbol 788 MovieClip Frame 1
stop();
Instance of Symbol 766 MovieClip in Symbol 788 MovieClip Frame 1
on (rollOver) {
_parent.gotoAndPlay(2);
}
on (rollOut) {
_parent.gotoAndStop(1);
}
on (press) {
_parent._parent.gotoAndStop(3);
}
Symbol 788 MovieClip Frame 6
gotoAndPlay (2);
Symbol 791 MovieClip Frame 1
stop();
Symbol 791 MovieClip Frame 15
_root.gotoAndStop(3);
stop();
Symbol 792 MovieClip Frame 1
stop();
Instance of Symbol 766 MovieClip in Symbol 792 MovieClip Frame 1
on (rollOver) {
_parent.gotoAndPlay(2);
}
on (rollOut) {
_parent.gotoAndStop(1);
}
on (press) {
stopAllSounds();
_parent.go.gotoAndPlay(2);
}
Symbol 792 MovieClip Frame 6
gotoAndPlay (2);
Instance of Symbol 809 MovieClip in Symbol 810 MovieClip Frame 1
on (press) {
_parent._parent.gotoAndPlay(31);
}
Symbol 811 MovieClip Frame 30
stop();
Symbol 811 MovieClip Frame 60
stopAllSounds();
_parent._parent.gotoAndStop(1);
Symbol 815 MovieClip Frame 30
stop();
Symbol 815 MovieClip Frame 60
stopAllSounds();
_parent._parent.gotoAndStop(1);
Symbol 817 MovieClip Frame 1
stop();
Symbol 819 MovieClip Frame 15
_root.gotoAndStop(2);
Symbol 819 MovieClip Frame 30
_parent.gotoAndStop(1);
Symbol 820 MovieClip Frame 1
stop();
Symbol 820 MovieClip Frame 2
_root.gotoAndStop(2);
_root.mena.gotoAndStop(2);
Symbol 824 MovieClip Frame 1
stop();
Symbol 824 MovieClip Frame 60
stop();
Symbol 827 MovieClip Frame 1
stop();
Symbol 830 MovieClip Frame 1
stop();
Symbol 830 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 386 MovieClip in Symbol 830 MovieClip Frame 3
onClipEvent (enterFrame) {
_root.game.car_distance = _root.game.car_distance + 0.5;
_root.game.f_EngineVolume();
}
Symbol 830 MovieClip Frame 21
_parent.car2.gotoAndPlay(2);
stop();
Symbol 834 MovieClip Frame 1
if (!init) {
default_y = _y;
init = true;
}
stop();
Symbol 834 MovieClip Frame 2
body.body.body.gotoAndStop(_root.game.current_vehicle);
play();
Instance of Symbol 386 MovieClip in Symbol 834 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.car_distance = _root.game.car_distance + 0.5;
_root.game.f_EngineVolume();
}
Symbol 834 MovieClip Frame 51
_root.game.ups1.gotoAndPlay(2);
_root.game.ups1.body.body.body.gotoAndStop(_root.game.current_vehicle);
stop();
Symbol 909 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 910 MovieClip Frame 1
play();
Symbol 910 MovieClip Frame 7
_parent.gotoAndStop("stand");
Symbol 911 MovieClip Frame 8
stop();
Symbol 917 MovieClip Frame 1
stop();
Instance of Symbol 167 MovieClip in Symbol 917 MovieClip Frame 4
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 917 MovieClip Frame 7
_root.game.f_ObjectSettings(this);
Symbol 931 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 933 MovieClip Frame 13
gotoAndPlay (1);
Symbol 935 MovieClip Frame 13
gotoAndPlay (1);
Symbol 936 MovieClip Frame 27
gotoAndPlay ("loop");
Symbol 937 MovieClip Frame 1
stop();
Symbol 938 MovieClip Frame 1
stop();
Instance of Symbol 386 MovieClip in Symbol 938 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.game.f_SeekOwner(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 938 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Symbol 938 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 386 MovieClip in Symbol 938 MovieClip Frame 5
onClipEvent (enterFrame) {
_root.game.f_Roll(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 938 MovieClip Frame 9
onClipEvent (enterFrame) {
_root.game.f_SoccerBall(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 938 MovieClip Frame 10
onClipEvent (enterFrame) {
_root.game.f_KidToss(_parent);
}
Instance of Symbol 167 MovieClip in Symbol 938 MovieClip Frame 11
onClipEvent (enterFrame) {
_root.game.f_SeakHoop(_parent);
}
Symbol 939 MovieClip Frame 7
stop();
Instance of Symbol 386 MovieClip in Symbol 940 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.game.f_MedPickup(_parent);
}
Symbol 958 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_SetXY2(zone1, new_x, new_y) {
var _local1 = zone1;
_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.29578 * radian);
}
function f_FlipChar(u_flipchar) {
var _local1 = u_flipchar;
_local1._xscale = _local1._xscale * -1;
f_Mask(_local1);
}
function f_FlipSame(u_flipchar, u_flipsource) {
var _local1 = u_flipchar;
if ((_local1._xscale > 0) && (u_flipsource._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1._xscale < 0) && (u_flipsource._xscale > 0)) {
f_FlipChar(_local1);
}
}
function f_FlipInverse(u_flipchar, u_flipsource) {
var _local1 = u_flipchar;
if ((_local1._xscale > 0) && (u_flipsource._xscale > 0)) {
f_FlipChar(_local1);
} else if ((_local1._xscale < 0) && (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 + 400;
new_limit_topleft = limit_bottomright.x - 1200;
f_KidGroup2();
} else if (checkpoint == 2) {
limit_bottomright.x = limit_bottomright.x + 1370;
new_limit_topleft = limit_bottomright.x - 1440;
f_KidGroup3();
} else if (checkpoint == 3) {
limit_bottomright.x = limit_bottomright.x + 1050;
new_limit_topleft = limit_bottomright.x - 1650;
f_KidSwing();
} else if (checkpoint == 4) {
limit_bottomright.x = limit_bottomright.x + 1000;
new_limit_topleft = limit_bottomright.x - 1500;
f_KidGroup4();
} else if (checkpoint == 5) {
f_KidGroup5();
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) && (_local1._xscale < 0)) || ((_local1.x >= _local2.x) && (_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) && (_local1._xscale < 0)) || ((_local1.x >= _local2.x) && (_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 _local2 = zone;
var _local3 = false;
if (Math.abs(_local1.y - _local2.y) < 30) {
if (Math.abs(_local2.x - _local1.x) < 150) {
_local3 = true;
_local1.onfire = 2;
f_Damage(_local1, 6);
if (_local1.grab) {
if (((_local1.x < _local2.x) && (_local1._xscale < 0)) || ((_local1.x >= _local2.x) && (_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(_local3);
}
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) && (_local1._xscale < 0)) || ((_local1.x >= _local2.x) && (_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_ObjectSettings2(zone1) {
zone1.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_KidSettings2(zone1) {
var _local1 = zone1;
_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 _local2 = random(20) + 80;
f_FX((_local1.x + random(20)) - 10, ((_local1.body._y + _local1.y) + random(20)) - 40, _local1.y - 1, "fire1", _local2, _local2);
}
} else if (_local1.onfire == 3) {
if ((_local1.toss_clock % 2) == 0) {
var _local2 = random(20) + 120;
f_FX((_local1.x + random(20)) - 10, ((_local1.body._y + _local1.y) + random(20)) - 40, _local1.y - 1, "ragesmoke", _local2, _local2);
}
}
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 _local3 = 100 + (_local1.body._y * 0.25);
if (_local3 < 10) {
_local3 = 10;
}
_local1.shadow_pt._xscale = _local3;
_local1.shadow_pt._yscale = _local3;
}
}
function f_KidHitKids(zone) {
var _local2 = zone;
if ((_local2.speed_toss_y > 40) || (_local2.speed_toss_x > 14)) {
if (_local2.body._y > -150) {
var _local3 = false;
i = 1;
while (i <= total_kids) {
var _local1 = this["kid" + i];
if (((!_local1.nohit) && (_local1 != _local2)) && (_local1.alive)) {
if ((_local2 == dude1) && (_local1.atv)) {
} else if (Math.abs(_local1.y - _local2.y) < 15) {
if (Math.abs(_local1.x - _local2.x) < 40) {
f_Damage(_local2, 1);
f_Damage(_local1, 3);
_local3 = true;
f_FlipSame(_local1, _local2);
_local1.speed_toss_y = -(random(10) + 10);
_local1.speed_toss_x = _local2.speed_toss_x * 0.75;
f_CheckHold(_local1);
f_CallJuggle1(_local1);
_local1.body._y = -50;
}
}
}
i++;
}
if (_local2.weight > 0) {
var _local1 = dude1;
if ((!_local1.nohit) && (_local1 != _local2)) {
if (Math.abs(_local1.y - _local2.y) < 15) {
if (Math.abs(_local1.x - _local2.x) < 40) {
_local3 = true;
f_FlipSame(_local1, _local2);
_local1.speed_toss_y = -(random(10) + 10);
_local1.speed_toss_x = _local2.speed_toss_x * 0.75;
f_DropItem(_local1);
f_CallJuggle1(_local1);
_local1.body._y = -50;
}
}
}
}
if (_local3) {
f_PunchSound();
f_FX(_local2.x, _local2.body._y + _local2.y, int(_local2.y) + 15, "impact1");
}
}
}
}
function f_CreateFX() {
i = 1;
while (i <= total_fx) {
var _local2 = "fx" + i;
fx_dm_current = fx_dm_current + 1;
var _local1 = fx_dm_current + fx_dm_default;
var _loc2 = f_DepthVal(_local1, 0);
attachMovie("fx", _local2, _loc2);
var _local3 = this["fx" + i];
_local3.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 _local3 = _local1.x + 50;
} else {
var _local3 = _local1.x - 50;
}
if ((_local1.grab_counter == 1) || (_local1.grab_counter == 3)) {
f_PunchSound();
if (_local1.rage >= _local1.rage_goal) {
var _local2 = "rageimpact";
} else {
var _local2 = "impact2";
}
f_FX(_local3, _local1.y - 80, int(_local1.y) + 10, _local2);
} else if (_local1.grab_counter == 2) {
f_PunchSound();
if (_local1.rage >= _local1.rage_goal) {
var _local2 = "rageimpact";
} else {
var _local2 = "impact1";
}
f_FX(_local3, _local1.y - 80, int(_local1.y) + 10, _local2);
f_FX(_local3, _local1.y - 80, int(_local1.y) + 9, "blood1");
} else {
f_HardPunchSound();
if (_local1.rage >= _local1.rage_goal) {
var _local2 = "rageimpact";
} else {
var _local2 = "impact3";
}
f_FX(_local3, _local1.y - 80, int(_local1.y) + 10, _local2);
f_FX(_local3, _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) && (!_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) || (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) || (_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) || (Key.isDown(_local1.button_right))) || (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) || (_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_KidReset2(zone1) {
f_MoveKid(zone1, 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) && (_local1.alive)) && (_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) && (_local1.x < x2)) || ((_local1.x > x2) && (_local1.x < x1))) || (_local2.stomping && (Math.abs(_local1.x - _local2.x) < 40))) {
if (((!_local1.nohit) || (_local2.hitnohit)) || (_local2.stomping && (_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) && (_local1._xscale > 0)) {
f_FlipChar(_local1);
} else if ((x2 < x1) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
}
if (_local2.stomping && (_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) && (_local1.body._y < 0)) {
if ((_local2.punch_num < 3) || (_local2.punch_group == 4)) {
hit_impact = true;
if (_local2.rage >= _local2.rage_goal) {
_local1.onfire = 3;
}
if ((_local2.punch_group < 4) || ((_local2.punch_group == 4) && (_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) && (_local1._xscale > 0)) {
f_FlipChar(_local1);
} else if ((x2 < x1) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
}
if ((_local2.punch_group == 3) && (_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) && (_local1.x < x2)) || ((_local1.x > x2) && (_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) || (_local2.punch_num == 2)) || (_local2.punch_num == 3)) {
f_HardPunchSound();
} else if (((_local2.punch_num == 20) || (_local2.punch_num == 21)) || (_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) && (_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) && (_local2.punch_num == 4)) || ((_local2.punch_group == 2) && (_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) && (_local2.punch_num >= 20)) {
f_FX(hit_x, _local3, u_depth - 1, "blood1");
}
} else if ((_local2.punch_num == 2) && (_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) && (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
if (Key.isDown(_local1.button_right) && (_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) && (_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) && (_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) && (_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) && (_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) && (_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) && (_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) || ((_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 _local1 = u_char.x + game_x;
var _local2 = u_char._width;
if (((_local1 + _local2) > 0) && ((_local1 - _local2) < screen_width)) {
return(true);
}
return(false);
}
function f_AutoTake(zone, u_object, vert, speed) {
var _local1 = u_object;
var _local3 = speed;
var _local2 = zone;
var u_take = false;
if (_local1.autotake) {
u_take = true;
u_get = false;
if (_local2.grab_pointer == undefined) {
if (_local2.item == eval("NULL")) {
if (!_local2.nohit) {
if (_local2.health > 0) {
if (_local2.body._y >= 0) {
_local1.owner = _local2;
_local2.item = _local1;
_local1.autoaction(_local1);
u_get = true;
}
}
}
}
}
if (u_get == false) {
if (!vert) {
if ((_local3 > 0) && (_local1._xscale > 0)) {
f_FlipChar(_local1);
} else if ((_local3 < 0) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
}
}
if (!f_MoveKid(_local1, vert, _local3)) {
f_MoveKid(_local1, vert, -_local3);
}
if (_local1._xscale > 0) {
_local1.body.body._rotation = _local1.body.body._rotation + _local3;
} else {
_local1.body.body._rotation = _local1.body.body._rotation - _local3;
}
if (!vert) {
_local1.speed_toss_x = Math.abs(_local3);
_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)) && (_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)) && ((_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) && (_local1.y <= temp_y)) && ((_local1.y + _local3) >= (temp_y - _local2.h2))) || (((_local3 < 0) && (_local1.y >= temp_y)) && ((_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)) && ((_local1.y + _local3) >= (y - h))) {
if (f_AutoTake(_local1, _local2, vert, _local3) == false) {
return_val = true;
}
} else if ((_local1.y > y) && ((_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)) && (_local1.y < y)) {
if (_local2.diagonal) {
if (((_local1.x + _local3) > (x - w)) && ((_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)) && (_local1.y < y)) {
if ((((_local3 > 0) && (_local1.x <= temp_x)) && ((_local1.x + _local3) >= (temp_x - _local2.w2))) || (((_local3 < 0) && (_local1.x >= temp_x)) && ((_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)) && ((_local1.x + _local3) >= (x - w))) || ((_local1.x > (x + w)) && ((_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 _local2 = zone;
var x = (_local1.x + _local1.zone._x);
var _local3 = _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(_local2.x - x) < w) {
if (_local2.y < _local3) {
if (_local2.y > (_local3 - h)) {
f_SetXY(_local2, _local2.x, _local3 + 2);
}
}
}
}
function f_CheckSpawn(zone) {
var _local3 = this;
var _local2 = zone;
i = 1;
while (i <= total_objects) {
var _local1 = _local3["object_pt" + i];
f_CheckSpawnObject(_local2, _local1);
i++;
}
i = statics_min;
while (i <= total_statics) {
var _local1 = _local3["static" + i];
f_CheckSpawnObject(_local2, _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) && ((_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) && ((_local1.y + game_y) < (screen_height / 2))) || ((_local2 < 0) && ((_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) && ((_local1.x + game_x) < (screen_width / 2))) || ((_local2 < 0) && ((_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 _local2 = u_compare;
var _local1 = u_char;
if (_local1 != _local2) {
if (_local1.current_depth == _local2.current_depth) {
trace((_local1 + " has overwritten ") + _local2);
}
}
}
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) {
} else if (checkpoint == 3) {
} else if (checkpoint == 5) {
f_KidGroup5();
} 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 _local2 = damage_zone;
var _local3 = _root;
_local2.health = _local2.health - damage_pow;
f_DropItem(_local2);
combo_count++;
combo_timer = 30;
if (combo_count >= 3) {
_local3.combo_counter.gotoAndPlay(2);
}
if (_local2.lifebar) {
if (_local2.atv) {
_local2.s_atvengine.stop();
s_explosion6.start(0, 0);
f_FX(_local2.x, _local2.y, int(_local2.y) + 2, "atv_explode", _local2._xscale, _local2._yscale);
_local2.atv = false;
f_KidSettings(_local2);
_local2.onfire = 2;
_local2.shadow_pt._xscale = 100;
_local2.speed_toss_y = -(random(10) + 20);
_local2.speed_toss_x = random(2) + 1;
f_CheckHold(_local2);
f_CallJuggle1(_local2);
}
var u_found = false;
j = 1;
while (j <= total_huds) {
var _local1 = _local3["hud" + j];
if ((_local1.kid_pointer == _local2) && (!_local1.ready)) {
f_UpdateHUD(_local1, _local2);
u_found = true;
j = total_huds + 1;
}
j++;
}
if (!u_found) {
j = 1;
while (j <= total_huds) {
var _local1 = _local3["hud" + j];
if (_local1.ready) {
_local1.ready = false;
_local1.kid_pointer = _local2;
f_UpdateHUD(_local1, _local2);
j = total_huds + 1;
}
j++;
}
}
} else if (_local2 == 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 = 100;
_local1.health = _local1.health_max;
_local1.alive = true;
_local1.speed_x = random(5) + 4;
_local1.speed_y = random(3) + 3;
_local1.weight = 10;
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_MoveKid2(zone1, vert, speed) {
var _local1 = zone1;
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) {
_loc1.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) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.speed_x < 0) && (_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) && (_local1.speed_y > 0)) {
_local1.speed_y = _local1.speed_y * -1;
} else if ((_local1.y < limit_topleft.y) && (_local1.speed_y < 0)) {
_local1.speed_y = _local1.speed_y * -1;
}
if ((_local1.x > limit_bottomright.x) && (_local1.speed_x > 0)) {
_local1.speed_x = _local1.speed_x * -1;
} else if ((_local1.x < limit_topleft.x) && (_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 _loc3 = false;
var _local3 = 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) {
_local3 = true;
} else {
_loc3 = true;
i = total_kids + 1;
}
}
}
}
i++;
}
if ((_loc3 == false) && (_local3)) {
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) && (_local1._xscale > 0)) || ((_local1.x > u_temp.x) && (_local1._xscale < 0))) || (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) && (Key.isDown(_local1.button_punch2))) && (!_local1.punching)) && (!_local1.punched)) && (!_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) && (!_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) && (_local1.body._y > -3)) {
_local1.gotoAndStop("stomp");
} else if ((_local1.punch_group == 5) && (_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) && (!_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) && (_local1.punch_num == 1)) {
_local1.punch_group = 5;
_local1.punch_num = 1;
_local1.gotoAndStop("knife1");
} else if ((_local1.punch_group == 1) && (_local1.punch_num == 4)) {
_local1.punch_group = 2;
_local1.punch_num = 20;
_local1.gotoAndStop("jugglehit1");
} else if ((_local1.punch_group == 4) && (_local1.punch_num == 2)) {
_local1.punch_num = 3;
_local1.gotoAndStop("crazy");
_local1.body.gotoAndPlay(1);
} else if ((_local1.punch_group == 4) && (_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_Boss2Scroll(zone1) {
var _local1 = (zone1.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_Boss2Scroll2(zone1) {
var _local1 = (zone1.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) && (dude1._xscale < 0)) || ((dude1.x >= _local1.x) && (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_Boss2ElboHit(zone1) {
var _local1 = zone1;
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) && (dude1._xscale < 0)) || ((dude1.x >= _local1.x) && (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) && (dude1._xscale < 0)) || ((dude1.x >= _local1.x) && (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_Boss2PunchHit(zone1) {
var _local1 = zone1;
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) && (dude1._xscale < 0)) || ((dude1.x >= _local1.x) && (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) && (dude1._xscale < 0)) || ((dude1.x >= _local1.x) && (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_Boss2UppercutHit(zone1) {
var _local1 = zone1;
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) && (dude1._xscale < 0)) || ((dude1.x >= _local1.x) && (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) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > dude1.x) && (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
}
if (_local1.success_x) {
if ((_local1.y < dude1.y) && (_local1.north)) {
_local1.north = false;
} else if ((_local1.y > dude1.y) && (!_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 _local2 = -3 * Math.cos(PI * dir);
var _local3 = -2 * Math.sin(PI * dir);
_local1.last_x = _local2;
_local1.last_y = _local3;
_local1.success_x = f_MoveKid(_local1, false, _local2);
_local1.success_y = f_MoveKid(_local1, true, _local3);
if (!_local1.success_x) {
_local1.success_x = f_MoveKid(_local1, false, _local2);
if (!_local1.success_y) {
_local1.success_y = f_MoveKid(_local1, true, _local3);
}
}
if ((_local1.y >= dude1.y) && (_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_Boss2Run(zone1) {
var _local1 = zone1;
if (_local1.success_y) {
if ((_local1.x < dude1.x) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > dude1.x) && (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
}
if (_local1.success_x) {
if ((_local1.y < dude1.y) && (_local1.north)) {
_local1.north = false;
} else if ((_local1.y > dude1.y) && (!_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 _local2 = -4 * Math.cos(PI * dir);
var _local3 = -4 * Math.sin(PI * dir);
_local1.last_x = _local2;
_local1.last_y = _local3;
_local1.success_x = f_MoveKid(_local1, false, _local2);
_local1.success_y = f_MoveKid(_local1, true, _local3);
if (!_local1.success_x) {
_local1.success_x = f_MoveKid(_local1, false, _local2);
if (!_local1.success_y) {
_local1.success_y = f_MoveKid(_local1, true, _local3);
}
}
if ((_local1.y >= dude1.y) && (_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;
}
_loc1.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_Boss3Run(zone1) {
var _local1 = zone1;
if (_local1.success_y) {
if ((_local1.x < dude1.x) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > dude1.x) && (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
}
if (_local1.success_x) {
if ((_local1.y < dude1.y) && (_local1.north)) {
_local1.north = false;
} else if ((_local1.y > dude1.y) && (!_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 _local2 = -5.6 * Math.cos(PI * dir);
var _local3 = -5.6 * Math.sin(PI * dir);
_local1.last_x = _local2;
_local1.last_y = _local3;
_local1.success_x = f_MoveKid(_local1, false, _local2);
_local1.success_y = f_MoveKid(_local1, true, _local3);
if (!_local1.success_x) {
_local1.success_x = f_MoveKid(_local1, false, _local2);
if (!_local1.success_y) {
_local1.success_y = f_MoveKid(_local1, true, _local3);
}
}
if ((_local1.y >= dude1.y) && (_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;
}
_loc1.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_Boss2PunchClock(zone1) {
zone1.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 - 500;
_local1.y = limit_topleft.y + 180;
_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.health_max = 100;
_local1.health = _local1.health_max;
_local1.alive = true;
_local1.speed_x = 77;
_local1.speed_y = 5;
_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 - 50, _local1.y);
f_FlipChar(boss1fodder);
boss1fodder.nohit = true;
}
function f_SpawnBoss2() {
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 + 20;
var _local2 = kid_dm_current + kid_dm_default;
attachMovie("boss2", 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 - 700;
_local1.y = limit_topleft.y + 120;
_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.health_max = 120;
_local1.health = _local1.health_max;
_local1.alive = true;
_local1.speed_x = 10;
_local1.speed_y = 5;
_local1.name = 99;
_local1.weight = 5;
_local1.grab = false;
_local1.lifebar = true;
_local1.punch_clock = 0;
_local1.punch_count = 0;
f_FlipChar(_local1);
f_KidSettings2(_local1);
_local1.gotoAndStop("intro");
f_SetXY2(boss2fodder, _local1.x - 50, _local1.y);
f_FlipChar(boss2fodder);
boss2fodder.nohit = true;
}
function f_SpawnBoss3() {
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 + 20;
var _local2 = kid_dm_current + kid_dm_default;
attachMovie("boss3", 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 - 700;
_local1.y = limit_topleft.y + 80;
_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.health_max = 250;
_local1.health = _local1.health_max;
_local1.alive = true;
_local1.speed_x = 10;
_local1.speed_y = 5;
_local1.name = 98;
_local1.weight = 5;
_local1.grab = false;
_local1.lifebar = true;
_local1.punch_clock = 0;
_local1.punch_count = 0;
f_FlipChar(_local1);
f_KidSettings2(_local1);
_local1.gotoAndStop("intro");
f_SetXY2(boss2fodder, _local1.x - 50, _local1.y);
f_FlipChar(boss2fodder);
boss2fodder.nohit = true;
}
function f_Boss1Intro(zone) {
if ((zone._x + _x) < 670) {
pause = true;
f_MusicHeavy();
zone.body.gotoAndPlay("intro");
}
}
function f_Boss2Intro(zone1) {
if ((zone1._x + _x) < 770) {
pause = true;
f_MusicHeavy();
zone1.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 = 4;
_local1.health = _local1.health_max;
_local1.alive = true;
_local1.speed_x = 100;
_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 _local1 = zone;
if (_local1._xscale > 0) {
var _local3 = _local1.x + 50;
} else {
var _local3 = _local1.x - 50;
}
var _local2 = f_FX(_local3, _local1.y, _local1.y - 1, "dart", _local1._xscale, _local1._yscale);
var shadow_name = ("shadow" + current_shadow);
attachMovie("shadow", shadow_name, -1000 - current_shadow);
_local2.shadow_pt = this["shadow" + current_shadow];
_local2.shadow_pt._x = _local2._x;
_local2.shadow_pt._y = _local2._y;
current_shadow++;
s_DartShoot.start(0, 0);
}
function f_JamesRun(zone) {
var _local1 = zone;
if (_local1.success_y) {
if ((_local1.x < dude1.x) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > dude1.x) && (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
}
if (_local1.success_x) {
if ((_local1.y < dude1.y) && (_local1.north)) {
_local1.north = false;
} else if ((_local1.y > dude1.y) && (!_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) && ((dude1.x + game_x) > 310)) || ((_local1.x > dude1.x) && ((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 _local2 = -4 * Math.cos(PI * dir);
var _local3 = -4 * Math.sin(PI * dir);
_local1.last_x = _local2;
_local1.last_y = _local3;
_local1.success_x = f_MoveKid(_local1, false, _local2);
_local1.success_y = f_MoveKid(_local1, true, _local3);
if (!_local1.success_x) {
_local1.success_x = f_MoveKid(_local1, false, _local2);
if (!_local1.success_y) {
_local1.success_y = f_MoveKid(_local1, true, _local3);
}
}
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) && ((_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) && (_local2.x < _local1.x)) || ((_local2._xscale < 0) && (_local2.x > _local1.x))) {
if (_local1.health > 0) {
f_Damage(_local1, 10);
if (((_local1.x < _local2.x) && (_local1._xscale < 0)) || ((_local1.x >= _local2.x) && (_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) && (_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 _local3 = false;
_local1.uppercut_timer--;
_local1.crazy_timer--;
_local1.shot_timer--;
if ((_local1.crazy_timer <= 0) && (_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 _local2 = Math.abs(_local1.x - dude1.x);
if (_local2 < 200) {
_local3 = true;
_local1.uppercut_timer = 60;
_local1.slide_speed = int(_local2 / 8);
_local1.gotoAndStop("punch2");
}
}
}
}
return(_local3);
}
function f_SunChipsCrazy(zone) {
var _local1 = zone;
if ((_local1.crazy_speed_x > 0) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.crazy_speed_x < 0) && (_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) && (_local1.crazy_speed_y > 0)) {
_local1.crazy_speed_y = _local1.crazy_speed_y * -1;
} else if ((((_local1.y + _y) < 0) || (_local1.y < limit_topleft.y)) && (_local1.crazy_speed_y < 0)) {
_local1.crazy_speed_y = _local1.crazy_speed_y * -1;
}
if (((_local1.x + _x) > 640) && (_local1.crazy_speed_x > 0)) {
_local1.crazy_speed_x = _local1.crazy_speed_x * -1;
} else if (((_local1.x + _x) < 0) && (_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 _local1 = zone;
var _local2 = false;
if (Math.abs(_local1.y - dude1.y) < 20) {
if (dude1.body._y > -50) {
if (Math.abs(_local1.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);
_local1.gotoAndStop("punch1");
}
}
}
}
return(_local2);
}
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 _loc3 = (_local2.y + 1);
kid_dm_current = kid_dm_current + 2;
var _local3 = kid_dm_current + kid_dm_default;
attachMovie("kid", kid_name, f_DepthVal(_local3, _loc3));
attachMovie("shadow", shadow_name, total_kids - 200);
var _local1 = this["kid" + total_kids];
_local1.depth_mod = _local3;
_local1.x = _local2.x;
_local1.y = _loc3;
_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) && (_local1._xscale > 0)) {
f_FlipChar(_local1);
} else if ((_local1.x < dude1.x) && (_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) && (_local1._xscale > 0)) {
f_FlipChar(_local1);
} else if ((_local1.x < dude1.x) && (_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 _local3 = random(40) + 100;
if (random(3) == 1) {
var _local2 = dude1.y - 1;
} else {
var _local2 = dude1.y + 1;
}
f_FX((dude1.x + random(40)) - 20, (dude1.y + random(80)) - 100, _local2, "ragesmoke", _local3, _local3);
}
} 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 = 500;
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) && (_local2._xscale > 0)) {
f_FlipChar(_local2);
} else if ((_local2.x < dude1.x) && (_local2._xscale < 0)) {
f_FlipChar(_local2);
}
f_KidInit(_local2);
f_Depth(_local2, _local2.y);
f_CheckSpawn(_local2);
return(_local2);
}
function f_Spawn2Kid(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("kidbosscar", _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) && (_local2._xscale > 0)) {
f_FlipChar(_local2);
} else if ((_local2.x < dude1.x) && (_local2._xscale < 0)) {
f_FlipChar(_local2);
}
f_KidInit(_local2);
f_Depth(_local2, _local2.y);
f_CheckSpawn(_local2);
return(_local2);
}
function f_KidGroup1() {
var _local1 = sandbox._y - 25;
var _loc3 = (sandbox._x - 45);
kills_goal = kills_goal + 2;
if (random(2) == 1) {
boss2fodder = f_SpawnKid(_local1, _locw, 22, 1, 16, color_pink);
} else {
boss2fodder = f_SpawnKid(_local1, _locw, 17, 1, 23, color_pink);
}
boss2fodder.gotoAndStop("wait");
f_SpawnBoss2();
}
function f_KidGroup2() {
var _local2 = f_RandomY();
var _local1 = (700 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local1, _local2, 3, 1, 18, color_pink);
} else {
f_SpawnKid(_local1, _local2, 50, 1, 17, color_pink);
}
_local2 = f_RandomY();
_local1 = (700 + random(100)) - game_x;
var _local3 = f_Spawn2Kid(_local1, _local2, 17, 20, 97, color_pink);
_local3.kid_type = 5;
kills_goal = kills_goal + 2;
}
function f_KidSwing() {
f_SpawnBoss3();
}
function f_KidGroup3() {
if (random(2) == 1) {
boss1fodder = f_SpawnKid(_loc2, _loc1, 20, 1, 14, color_pink);
} else {
boss1fodder = f_SpawnKid(_loc2, _loc1, 17, 1, 24, color_pink);
}
boss1fodder.gotoAndStop("wait");
f_SpawnBoss1();
kills_goal = kills_goal + 2;
}
function f_KidGroup4() {
if (random(2) == 1) {
boss2fodder = f_SpawnKid(_loc2, _locw, 27, 1, 10, color_pink);
} else {
boss2fodder = f_SpawnKid(_loc2, _locw, 11, 1, 29, color_pink);
}
boss2fodder.gotoAndStop("wait");
if (random(2) == 1) {
boss1fodder = f_SpawnKid(_loc2, _loc1, 10, 1, 13, color_pink);
} else {
boss1fodder = f_SpawnKid(_loc2, _loc1, 19, 1, 28, color_pink);
}
boss1fodder.gotoAndStop("wait");
f_SpawnBoss2();
f_SpawnBoss1();
kills_goal = kills_goal + 4;
}
function f_KidGroup5() {
_root.ending_fader.gotoAndPlay(2);
}
function f_KidGroup6() {
var _local2 = f_RandomY();
var _local1 = (1600 + random(100)) - game_x;
f_SpawnKid(_local1, _local2, 29, 4, 8, color_brown);
_local2 = f_RandomY();
_local1 = (1500 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local1, _local2, 33, 8, 27, color_brown);
} else {
f_SpawnKid(_local1, _local2, 50, 25, 19, color_pink);
}
_local2 = f_RandomY();
_local1 = (1600 + random(100)) - game_x;
u_temp = f_SpawnKid(_local1, _local2, 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() {
}
function f_KidGroup7() {
var _local3 = dude1.y;
var _local2 = -150 - game_x;
var _local1 = f_SpawnKid(_local2, _local3, 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;
}
_local3 = f_RandomY();
_local2 = 1400 - game_x;
_local1 = f_SpawnKid(_local2, _local3, 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 _local2 = f_RandomY();
var _local1 = (1400 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local1, _local2, 21, 1, 28, color_pink);
} else {
f_SpawnKid(_local1, _local2, 32, 1, 25, color_pink);
}
_local2 = f_RandomY();
_local1 = (1700 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local1, _local2, 40, 3, 47, color_brown);
} else {
f_SpawnKid(_local1, _local2, 41, 3, 49, color_brown);
}
_local2 = f_RandomY();
_local1 = (2000 + random(100)) - game_x;
f_SpawnKid(_local1, _local2, 44, 10, 50, color_brown);
kills_goal = kills_goal + 6;
}
function f_KidGroup9() {
var _local3 = dude1.y;
var _local2 = -700 - game_x;
var _local1 = f_SpawnKid(_local2, _local3, 46, 20, 64, color_brown);
f_KidSettings(_local1);
_local1.atv_speed = 10;
_local1.atv = true;
_local1.gotoAndStop("atv");
_local1.shadow_pt._xscale = 200;
_local1.atv_delay = 0;
_local1.atv_type = 2;
_local1.kid_type = 5;
_local1.health_max = _local1.health_max * 1.5;
_local1.health = _local1.health_max;
if (_local1._xscale < 0) {
_local1._xscale = _local1._xscale * -1;
}
kills_goal = kills_goal + 1;
}
function f_KidGroup10() {
var _local2 = limit_topleft.y + 100;
var _local1 = (700 + random(100)) - game_x;
f_SpawnKid(_local1, _local2, 23, 1, 46, color_pink);
_local2 = limit_topleft.y + 300;
_local1 = (700 + random(100)) - game_x;
if (random(2) == 1) {
f_SpawnKid(_local1, _local2, 45, 18, 62, color_pink);
} else {
f_SpawnKid(_local1, _local2, 42, 11, 63, color_brown);
}
}
function f_KidGroup11() {
var _local2 = limit_topleft.y + 200;
var _local1 = 700 - game_x;
f_SpawnKid(_local1, _local2, 56, 23, 71, color_pink);
_local2 = limit_topleft.y + 300;
_local1 = 900 - game_x;
f_SpawnKid(_local1, _local2, 55, 22, 70, color_pink);
_local2 = limit_topleft.y + 370;
_local1 = 800 - game_x;
f_SpawnKid(_local1, _local2, 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) && (_local1._xscale > 0)) || ((_local1.x >= dude1.x) && (_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) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > dude1.x) && (_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) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > dude1.x) && (_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) && (_local1._xscale < 0)) || ((_local1.x >= _local2.x) && (_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 _loc3 = (bballhoop.y - 2);
if (_local1.x < (_local2 + 10)) {
var dir = f_rad2deg(Math.atan2(_local1.y - _loc3, _local1.x - _local2));
var _local3 = Math.abs(_local1.x - _local2);
if (Math.abs(_local1.y - _loc3) > _local3) {
_local3 = Math.abs(_local1.y - _loc3);
}
var temp_speed = ((-_local3) / 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) && (_local1._xscale < 0)) {
f_FlipChar(_local1);
} else if ((_local1.x > _local1.target_x) && (_local1._xscale > 0)) {
f_FlipChar(_local1);
}
}
if (_local1.success_x) {
if ((_local1.y < _local1.target_y) && (_local1.north)) {
_local1.north = false;
} else if ((_local1.y > _local1.target_y) && (!_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 _local2 = temp_speed * Math.cos(PI * dir);
var _local3 = temp_speed * Math.sin(PI * dir);
_local1.last_x = _local2;
_local1.last_y = _local3;
_local1.success_x = f_MoveKid(_local1, false, _local2);
_local1.success_y = f_MoveKid(_local1, true, _local3);
if (!_local1.success_x) {
_local1.success_x = f_MoveKid(_local1, false, _local2);
if (!_local1.success_y) {
_local1.success_y = f_MoveKid(_local1, true, _local3);
}
}
}
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) && (_local2._xscale < 0)) || ((_local2.x >= _local1.x) && (_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) && (_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 && (_local1.target_goal == goal_left)) || (score_right && (_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) && (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 || (!_local1.partner.alive)) || (dude1.grab_pointer == _local1.partner)) {
f_HuntBall(_local1);
} else {
f_SoccerFollow(_local1);
}
} else if (((_local1.top == false) || (!_local1.partner.alive)) || (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 _local2 = ups2._x + _x;
var _local3 = (1540 - (_local2 + 450)) / 1540;
var u_pan = (int((200 * _local3) - 100) * -1);
s_Engine.setPan(u_pan);
var _local1 = 100;
if (_local2 < -350) {
_local1 = 0;
} else if (_local2 < 0) {
_local3 = Math.abs(_local2 + 350) / 350;
_local1 = _local1 * _local3;
} else if (_local2 > 1000) {
_local1 = 0;
} else if (_local2 > 640) {
_local3 = Math.abs(_local2 - 990) / 350;
_local1 = _local1 * _local3;
}
_local1 = _local1 * (car_distance * 0.01);
s_Engine.setVolume(_local1);
}
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) && (_local2._xscale > 35)) || ((_local1.x < _local2.x) && (_local2._xscale < -35))) {
f_Damage(_local1, 10);
if (((_local1.x < _local2.x) && (_local1._xscale < 0)) || ((_local1.x >= _local2.x) && (_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 _loc3 = ((1150 - (_local2 + 250)) / 1150);
var u_pan = (int((200 * _loc3) - 100) * -1);
_local1.s_atvengine.setPan(u_pan);
var _local3 = 100;
if (_local2 < -150) {
_local3 = 0;
} else if (_local2 < 0) {
_loc3 = Math.abs(_local2 + 150) / 150;
_local3 = _local3 * _loc3;
} else if (_local2 > 800) {
_local3 = 0;
} else if (_local2 > 640) {
_loc3 = Math.abs(_local2 - 790) / 150;
_local3 = _local3 * _loc3;
}
_local1.s_atvengine.setVolume(_local3);
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 _local3 = limit_topleft.y + random(200);
kid_dm_current = kid_dm_current + 2;
var _local2 = kid_dm_current + kid_dm_default;
attachMovie("kid", kid_name, f_DepthVal(_local2, _local3));
attachMovie("shadow", shadow_name, i - 200);
var _local1 = this["kid" + i];
_local1.depth_mod = _local2;
_local1.x = 2000 - game_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;
_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 _local1 = zone;
var _local3 = u_temp;
var return_val = false;
if (Math.abs(_local3.x - _local1.x) < 50) {
if (Math.abs(_local3.y - _local1.y) < 10) {
return_val = true;
if (_local1.rider != eval("NULL")) {
if (Math.abs(_local1.rider.x - _local1.x) < 50) {
if (Math.abs(_local1.rider.y - _local1.y) < 10) {
var _local2 = _local1.rider;
f_Damage(_local2, 1);
if (((_local2.x < _local1.x) && (_local2._xscale < 0)) || ((_local2.x >= _local1.x) && (_local2._xscale > 0))) {
f_FlipChar(_local2);
}
_local2.speed_toss_y = -(random(2) + 2);
_local2.speed_toss_x = random(2) + 2;
f_CheckHold(_local2);
f_CallJuggle1(_local2);
}
}
_local1.rider = eval("NULL");
}
f_FX(_local3.x, _local3.y - 50, int(_local3.y) + 1, "impact1");
s_Smack1.start(0, 0);
_local1.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 _local3 = _local1.topleft._y + _local1.y;
var u_bottom = (_local1.bottomleft._y + _local1.y);
var u_topright = (_local1.topright._x + _local1.x);
var _loc3 = (_local1.bottomright._x + _local1.x);
if ((dude1.y > _local3) && (dude1.y < u_bottom)) {
if ((dude1.x >= _local2) && (dude1.x <= u_topright)) {
var u_percent = (1 - ((dude1.y - _local3) / 100));
var u_left = (_local2 + ((u_topleft - _local2) * u_percent));
var u_right = (_loc3 + ((u_topright - _loc3) * u_percent));
if ((dude1.x >= u_left) && (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 _local2 = Math.abs(_local1._xscale) / 100;
var _local3 = Math.abs(_local1._yscale) / 100;
var x = (_local1._x + _local1.zone._x);
var y = (_local1._y + _local1.zone._y);
var h = (_local1.zone._height * _local3);
var w = ((_local1.zone._width / 2) * _local2);
_local1.diagonal = true;
_local1.left_x = _local1.left._x * _local2;
_local1.right_x = _local1.right._x * _local2;
_local1.left_y = _local1.left._y * _local3;
_local1.right_y = _local1.right._y * _local3;
_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(pgwallrock);
f_AddStatic(pgwallrock1);
f_AddStatic(pgwallrock2);
f_AddStatic(pgwallrock3);
f_AddStatic(pgwallrock4);
f_AddStatic(pgwallrock5);
f_AddStatic(pgwallrock6);
f_AddStatic(pgwallrock7);
f_AddStatic(pgwallrock8);
f_AddStatic(pgwall3);
f_AddStatic(pgwall4);
f_AddStatic(pgwall5);
f_AddStatic(pgwall6);
f_AddStatic(pgwall7);
f_AddStatic(pgwall8);
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);
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 = 0.01745329;
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();
_root.game.f_SpawnPlayer(150, 385);
_root.game.dude1.gotoAndStop("knuckles");
_root.game.f_KidGroup1();
_root.go_arrow.gotoAndPlay(2);
stop();
Symbol 962 MovieClip Frame 4
stop();
Symbol 964 MovieClip Frame 1
stop();
Symbol 964 MovieClip Frame 2
play();
Symbol 1040 MovieClip Frame 1
stop();
Symbol 1041 MovieClip Frame 1
ready = true;
stop();
Symbol 1041 MovieClip Frame 2
function f_HealthBar() {
health = (kid_pointer.health / kid_pointer.health_max) * 100;
if (health < 0) {
health = 0;
}
bar._xscale = health;
}
play();
f_HealthBar();
Instance of Symbol 966 MovieClip "bar" in Symbol 1041 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Symbol 1041 MovieClip Frame 60
gotoAndStop (1);
Symbol 1048 MovieClip Frame 1
stop();
Symbol 1053 MovieClip Frame 1
stop();
Symbol 1053 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 966 MovieClip "bar" in Symbol 1053 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Instance of Symbol 1043 MovieClip "ragebar" in Symbol 1053 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.f_HealthBar();
}
Symbol 1054 MovieClip Frame 1
stop();
Symbol 1054 MovieClip Frame 2
checked = false;
play();
Symbol 1054 MovieClip Frame 3
distance = (_root.game.dude1.x + _root.game._x) - 220;
if (distance > 10) {
if ((_root.game.dude1._xscale > 0) && (!_root.game.dude1.nohit)) {
speed = 1 + (distance * 0.05);
_root.game.f_Scroll(speed, false);
}
} else {
gotoAndStop (1);
}
Symbol 1054 MovieClip Frame 4
gotoAndPlay (3);
Symbol 1071 MovieClip Frame 1
stop();
Symbol 1071 MovieClip Frame 2
play();
Symbol 1073 MovieClip Frame 1
stop();
Instance of Symbol 386 MovieClip in Symbol 1073 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.music_volume--;
_root.game.s_SunChipsMusic.setVolume(_parent.music_volume);
}
Symbol 1073 MovieClip Frame 71
_root.loadMovie("level2.swf", "new");
stop();
Symbol 1076 MovieClip Frame 1
stop();
Symbol 1076 MovieClip Frame 91
_root.gotoAndStop("intro");
Symbol 1087 MovieClip Frame 19
stop();
Symbol 1094 MovieClip Frame 1
stop();
Symbol 1094 MovieClip Frame 2
play();
Symbol 1094 MovieClip Frame 28
stop();
Symbol 1098 MovieClip Frame 1
stop();
Symbol 1107 MovieClip Frame 6
stop();
Symbol 1109 MovieClip Frame 8
stop();
Symbol 1130 MovieClip Frame 18
stop();
Symbol 1131 MovieClip Frame 1
stop();
Symbol 1131 MovieClip Frame 7
stop();
Symbol 1131 MovieClip Frame 15
gotoAndStop (1);
Symbol 1134 Button
on (press) {
stopAllSounds();
tellTarget (_root.end) {
play();
};
nextFrame();
}
Symbol 1138 Button
on (rollOver) {
tellTarget ("tank") {
gotoAndPlay ("bang");
};
}
on (rollOut) {
tellTarget ("tank") {
gotoAndPlay ("awww");
};
}
on (press) {
getURL ("http://www.newgrounds.com", _blank);
nextFrame();
}
Symbol 1149 MovieClip Frame 15
stop();
Symbol 1154 MovieClip Frame 351
stopAllSounds();
Symbol 1154 MovieClip Frame 388
stopAllSounds();
Symbol 1154 MovieClip Frame 845
stop();
Symbol 1154 MovieClip Frame 957
stopAllSounds();
_root.gotoAndStop("level1");
Symbol 1162 MovieClip Frame 1
stop();
Instance of Symbol 766 MovieClip in Symbol 1162 MovieClip Frame 1
on (rollOver) {
_parent.gotoAndPlay(2);
}
on (rollOut) {
_parent.gotoAndStop(1);
}
on (press) {
stopAllSounds();
_parent.go.gotoAndPlay(2);
}
Symbol 1162 MovieClip Frame 6
gotoAndPlay (2);
Symbol 1163 MovieClip Frame 1
stop();
Instance of Symbol 766 MovieClip in Symbol 1163 MovieClip Frame 1
on (rollOver) {
_parent.gotoAndPlay(2);
}
on (rollOut) {
_parent.gotoAndStop(1);
}
on (press) {
stopAllSounds();
_root.gog.gotoAndStop(2);
}
Symbol 1163 MovieClip Frame 6
gotoAndPlay (2);
Symbol 1165 MovieClip Frame 1
stop();
Instance of Symbol 766 MovieClip in Symbol 1165 MovieClip Frame 1
on (rollOver) {
_parent.gotoAndPlay(2);
}
on (rollOut) {
_parent.gotoAndStop(1);
}
on (press) {
stopAllSounds();
_root.gog.gotoAndStop(3);
}
Symbol 1165 MovieClip Frame 6
gotoAndPlay (2);