Frame 1 (51 B)
stop();
var mute = false;
var nextStep = "game";
Frame 8 (238 B)
stop();
_global.mainKarate = this;
_focusrect = false;
Stage.showMenu = false;
nextStep = "game";
if (!mcMusicIntro.isPlaying()) {
mcMusicIntro.gotoAndStop("play");
}
if (mcMusic.isPlaying()) {
mcMusic.gotoAndStop("stop");
}
Frame 17 (8 B)
stop();
Frame 25 (311 B)
function _getHighScore(Void) {
return(game.totalScore);
}
function ShowHighScore(Void) {
if (NGameID != undefined) {
loadMovie ((("WBHighScores.swf?GameID=" + NGameID) + "&GameScore=") + _getHighScore(), this.createEmptyMovieClip("mcHSBoard", this.getNextHighestDepth()));
}
}
ShowHighScore();
Frame 33 (311 B)
function _getHighScore(Void) {
return(game.totalScore);
}
function ShowHighScore(Void) {
if (NGameID != undefined) {
loadMovie ((("WBHighScores.swf?GameID=" + NGameID) + "&GameScore=") + _getHighScore(), this.createEmptyMovieClip("mcHSBoard", this.getNextHighestDepth()));
}
}
ShowHighScore();
Frame 41 (472 B)
function _getHighScore(Void) {
return(game.totalScore);
}
function ShowHighScore(Void) {
if (NGameID != undefined) {
loadMovie ((("WBHighScores.swf?GameID=" + NGameID) + "&GameScore=") + _getHighScore(), this.createEmptyMovieClip("mcHSBoard", this.getNextHighestDepth()));
}
}
if (!mcMusic.isPlaying()) {
mcMusic.gotoAndStop("play");
}
if (mcMusicIntro.isPlaying()) {
mcMusicIntro.gotoAndStop("stop");
}
game.ennemyNbr = 1;
game.totalScore = 0;
Symbol 11 MovieClip Frame 1 (8 B)
stop();
Symbol 14 MovieClip Frame 16 (475 B)
stop();
var animEnd = 100;
var animLength = 1;
var animBytesTotal = _parent.getBytesTotal();
var animBytesLoaded;
var animProgress;
onEnterFrame = function () {
animBytesLoaded = _parent.getBytesLoaded();
animProgress = (animBytesLoaded / animBytesTotal) * 100;
txt_percent.text = Math.floor(animProgress) + "%";
if (animProgress >= 100) {
gotoAndPlay ("out");
} else {
loading_bar.gotoAndStop(Number(animLength + Math.floor(animProgress)));
}
};
Symbol 14 MovieClip Frame 30 (21 B)
onEnterFrame = null;
Symbol 14 MovieClip Frame 53 (29 B)
_parent.gotoAndStop("menu");
Symbol 31 Button (36 B)
on (press) {
gotoAndPlay ("out");
}
Symbol 33 Button (47 B)
on (press) {
_parent.gotoAndStop("instruc");
}
Symbol 34 MovieClip Frame 20 (8 B)
stop();
Symbol 34 MovieClip Frame 35 (29 B)
_parent.gotoAndStop("game");
Symbol 37 MovieClip Frame 1 (63 B)
function isPlaying() {
return(bPlay);
}
var bPlay = false;
Symbol 37 MovieClip Frame 2 (15 B)
bPlay = false;
Symbol 37 MovieClip Frame 3 (8 B)
stop();
Symbol 37 MovieClip Frame 8 (14 B)
bPlay = true;
Symbol 37 MovieClip Frame 9 (8 B)
stop();
Symbol 39 MovieClip Frame 1 (63 B)
function isPlaying() {
return(bPlay);
}
var bPlay = false;
Symbol 39 MovieClip Frame 2 (15 B)
bPlay = false;
Symbol 39 MovieClip Frame 3 (8 B)
stop();
Symbol 39 MovieClip Frame 8 (14 B)
bPlay = true;
Symbol 39 MovieClip Frame 9 (8 B)
stop();
Symbol 59 Button (72 B)
on (press) {
_parent.splash.gotoAndPlay("out");
gotoAndPlay ("out");
}
Symbol 62 MovieClip Frame 4 (33 B)
Start_btn.useHandCursor = false;
Symbol 62 MovieClip Frame 14 (8 B)
stop();
Symbol 84 MovieClip Frame 1 (8 B)
stop();
Symbol 84 MovieClip Frame 2 (8 B)
stop();
Symbol 84 MovieClip Frame 3 (8 B)
stop();
Symbol 84 MovieClip Frame 4 (8 B)
stop();
Symbol 84 MovieClip Frame 5 (8 B)
stop();
Symbol 84 MovieClip Frame 6 (8 B)
stop();
Symbol 90 MovieClip Frame 1 (8 B)
stop();
Symbol 90 MovieClip Frame 2 (8 B)
stop();
Symbol 104 Button (106 B)
on (press) {
if (!gameOver) {
gotoAndPlay ("transit");
} else {
mainKarate.gotoAndPlay("menu");
}
}
Symbol 106 Button (106 B)
on (press) {
if (!gameOver) {
gotoAndPlay ("transit");
} else {
mainKarate.gotoAndPlay("menu");
}
}
Symbol 197 MovieClip Frame 1 (8 B)
stop();
Symbol 197 MovieClip Frame 2 (8 B)
stop();
Symbol 197 MovieClip Frame 3 (8 B)
stop();
Symbol 200 Button (36 B)
on (press) {
gotoAndPlay ("out");
}
Symbol 203 MovieClip Frame 1 (8 B)
stop();
Symbol 203 MovieClip Frame 15 (972 B)
var gameOver = false;
mg6.totalScore = mg6.totalScore + mg6.bonusScore;
txt_Points.text = mg6.totalScore - mg6.bonusScore;
if (mg6.bonusScore > 0) {
txt_BonusPoints.text = mg6.bonusScore;
}
txt_TotalPoints.text = mg6.totalScore;
txt_bonus.text = "BONUS POINTS:";
txt_name.text = mg6.hud.enn.txt_name.text;
if (mg6.cVictory >= 2) {
btn_replay._visible = false;
txt_win.text = "You Win!";
if (mg6.ennemyNbr == 2) {
enn.gotoAndStop(4);
} else if (mg6.ennemyNbr == 3) {
enn.gotoAndStop(2);
} else {
gameOver = true;
_parent._parent.ShowHighScore();
enn.gotoAndStop(6);
txt_bonus._visible = false;
}
} else {
btn_continue._visible = false;
gameOver = true;
_parent._parent.ShowHighScore();
bugs.gotoAndStop(2);
txt_win.text = "You Lose!";
if (mg6.ennemyNbr == 2) {
enn.gotoAndStop(3);
} else if (mg6.ennemyNbr == 3) {
enn.gotoAndStop(1);
} else {
enn.gotoAndStop(5);
txt_bonus._visible = false;
}
}
Symbol 203 MovieClip Frame 24 (8 B)
stop();
Symbol 203 MovieClip Frame 40 (159 B)
stop();
if (mg6.ennemyNbr == 2) {
enn.gotoAndStop(1);
txt_name.text = "Daffy Duck";
} else {
enn.gotoAndStop(3);
txt_name.text = "Touche Turtle";
}
Symbol 203 MovieClip Frame 45 (29 B)
_parent.gotoAndStop("menu");
Symbol 230 MovieClip Frame 1 (8 B)
stop();
Symbol 242 MovieClip Frame 1 (8 B)
stop();
Symbol 285 MovieClip Frame 1 (19 B)
_visible = false;
Symbol 289 MovieClip Frame 3 (8 B)
stop();
Symbol 290 MovieClip Frame 7 (8 B)
stop();
Symbol 292 MovieClip Frame 6 (23 B)
mg6.callSnd("swing2");
Symbol 292 MovieClip Frame 13 (34 B)
_parent.gotoAndStop("downStill");
Symbol 293 MovieClip Frame 7 (29 B)
_parent.gotoAndStop("idle");
Symbol 298 MovieClip Frame 4 (22 B)
mg6.initAnim = false;
Symbol 298 MovieClip Frame 8 (26 B)
mg6.jmpAtkAvaible = true;
Symbol 298 MovieClip Frame 16 (61 B)
mg6.jmpAtkAvaible = false;
_parent.gotoAndStop("get_down");
Symbol 301 MovieClip Frame 2 (23 B)
mg6.callSnd("swing2");
Symbol 301 MovieClip Frame 8 (42 B)
stop();
_parent.gotoAndStop("get_down");
Symbol 304 MovieClip Frame 1 (19 B)
trace("get_down");
Symbol 304 MovieClip Frame 7 (21 B)
mg6.initAnim = true;
Symbol 304 MovieClip Frame 17 (29 B)
_parent.gotoAndStop("idle");
Symbol 305 MovieClip Frame 6 (23 B)
mg6.callSnd("swing1");
Symbol 305 MovieClip Frame 9 (29 B)
_parent.gotoAndStop("idle");
Symbol 308 MovieClip Frame 1 (21 B)
trace("Start Kick");
Symbol 308 MovieClip Frame 5 (23 B)
mg6.callSnd("swing1");
Symbol 308 MovieClip Frame 10 (38 B)
stop();
_parent.gotoAndStop("idle");
Symbol 309 MovieClip Frame 6 (23 B)
mg6.callSnd("swing1");
Symbol 309 MovieClip Frame 13 (23 B)
mg6.callSnd("swing1");
Symbol 309 MovieClip Frame 20 (20 B)
mg6.liftAtk = true;
Symbol 309 MovieClip Frame 22 (23 B)
mg6.callSnd("swing2");
Symbol 309 MovieClip Frame 36 (29 B)
_parent.gotoAndStop("idle");
Symbol 310 MovieClip Frame 6 (23 B)
mg6.callSnd("swing1");
Symbol 310 MovieClip Frame 10 (22 B)
mg6.comboMove = true;
Symbol 310 MovieClip Frame 21 (23 B)
mg6.comboMove = false;
Symbol 310 MovieClip Frame 29 (29 B)
_parent.gotoAndStop("idle");
Symbol 317 MovieClip Frame 5 (29 B)
stop();
mg6.enn.enn.stop();
Symbol 317 MovieClip Frame 11 (29 B)
_parent.gotoAndStop("idle");
Symbol 320 MovieClip Frame 1 (57 B)
stop();
if (mg6.startNextRound) {
gotoAndPlay (2);
}
Symbol 320 MovieClip Frame 12 (8 B)
stop();
Symbol 321 MovieClip Frame 3 (52 B)
if (!mg6.startNextRound) {
mg6.enn.enn.stop();
}
Symbol 321 MovieClip Frame 9 (66 B)
stop();
trace("fall_still");
_parent.gotoAndStop("fall_still");
Symbol 326 MovieClip Frame 17 (29 B)
_parent.gotoAndStop("idle");
Symbol 327 MovieClip Frame 1 (173 B)
state = "idle";
mg6.comboAvaible = true;
mg6.initAnim = false;
mg6.liftAtk = false;
mg6.jmpAtkAvaible = false;
mg6.charEasing = false;
mg6.uppercutTimer = 0;
stop();
Symbol 327 MovieClip Frame 6 (42 B)
state = "walk";
mg6.comboAvaible = true;
Symbol 327 MovieClip Frame 11 (42 B)
state = "walk";
mg6.comboAvaible = true;
Symbol 327 MovieClip Frame 16 (43 B)
state = "block";
mg6.comboAvaible = true;
Symbol 327 MovieClip Frame 21 (45 B)
state = "crounch";
mg6.comboAvaible = true;
Symbol 327 MovieClip Frame 26 (45 B)
state = "crounch";
mg6.comboAvaible = true;
Symbol 327 MovieClip Frame 31 (58 B)
state = "attack";
damage = 3;
mg6.comboAvaible = false;
Symbol 327 MovieClip Frame 36 (44 B)
state = "still";
mg6.comboAvaible = false;
Symbol 327 MovieClip Frame 41 (65 B)
state = "jump";
mg6.comboAvaible = false;
mg6.initAnim = true;
Symbol 327 MovieClip Frame 46 (86 B)
state = "attack";
mg6.jmpAtkAvaible = false;
damage = 8;
mg6.comboAvaible = false;
Symbol 327 MovieClip Frame 51 (43 B)
state = "jump";
mg6.comboAvaible = false;
Symbol 327 MovieClip Frame 56 (57 B)
state = "attack";
damage = 5;
mg6.comboAvaible = true;
Symbol 327 MovieClip Frame 61 (57 B)
state = "attack";
damage = 7;
mg6.comboAvaible = true;
Symbol 327 MovieClip Frame 66 (103 B)
state = "attack";
damage = 7;
mg6.liftAtk = false;
mg6.comboAvaible = false;
mg6.initAnim = false;
Symbol 327 MovieClip Frame 71 (59 B)
state = "attack";
damage = 12;
mg6.comboAvaible = false;
Symbol 327 MovieClip Frame 76 (43 B)
state = "hurt";
mg6.comboAvaible = false;
Symbol 327 MovieClip Frame 81 (43 B)
state = "hurt";
mg6.comboAvaible = false;
Symbol 327 MovieClip Frame 86 (43 B)
state = "hurt";
mg6.comboAvaible = false;
Symbol 327 MovieClip Frame 91 (67 B)
state = "hurt";
mg6.charEasing = true;
mg6.comboAvaible = false;
Symbol 327 MovieClip Frame 96 (43 B)
state = "hurt";
mg6.comboAvaible = false;
Symbol 331 MovieClip Frame 1 (8 B)
stop();
Symbol 331 MovieClip Frame 12 (17 B)
gotoAndStop (1);
Symbol 339 MovieClip Frame 1 (8 B)
stop();
Symbol 339 MovieClip Frame 22 (8 B)
stop();
Symbol 340 MovieClip Frame 1 (8 B)
stop();
Symbol 348 MovieClip Frame 1 (8 B)
stop();
Symbol 352 MovieClip Frame 1 (8 B)
stop();
Symbol 364 MovieClip Frame 1 (8 B)
stop();
Symbol 364 MovieClip Frame 2 (8 B)
stop();
Symbol 364 MovieClip Frame 3 (8 B)
stop();
Symbol 364 MovieClip Frame 4 (8 B)
stop();
Symbol 364 MovieClip Frame 5 (8 B)
stop();
Symbol 380 MovieClip Frame 1 (41 B)
txt_round.text = mg6.hud.txt_round.text;
Symbol 389 MovieClip Frame 1 (57 B)
round_mc._visible = false;
scorePanel._visible = false;
Symbol 389 MovieClip Frame 2 (106 B)
round_mc._visible = true;
if (mg6.showScore) {
scorePanel._visible = true;
mg6.showScore = false;
}
Symbol 389 MovieClip Frame 9 (22 B)
mg6.callSnd("clic1");
Symbol 389 MovieClip Frame 32 (22 B)
mg6.callSnd("clic1");
Symbol 389 MovieClip Frame 62 (22 B)
mg6.callSnd("clic1");
Symbol 389 MovieClip Frame 92 (22 B)
mg6.callSnd("clic1");
Symbol 389 MovieClip Frame 122 (22 B)
mg6.callSnd("clic1");
Symbol 389 MovieClip Frame 150 (37 B)
mg6.PAUSE = false;
gotoAndStop (1);
Symbol 393 MovieClip Frame 1 (26 B)
_parent.downPanel.play();
Instance of Symbol 392 MovieClip in Symbol 393 MovieClip Frame 1 (14 B)
on (press) {
}
Symbol 393 MovieClip Frame 11 (8 B)
stop();
Symbol 393 MovieClip Frame 12 (40 B)
_parent.downPanel.gotoAndPlay("close");
Instance of Symbol 392 MovieClip in Symbol 393 MovieClip Frame 12 (14 B)
on (press) {
}
Symbol 393 MovieClip Frame 22 (455 B)
_parent.downPanel.gotoAndPlay("open");
mg6.init._visible = true;
mg6.hud.char.char.gotoAndStop(1);
mg6.hud.enn.enn.gotoAndStop(1);
mg6.hud.txt_round.text = mg6.roundNum;
mg6.char.gotoAndStop("idle");
mg6.enn.gotoAndStop("idle");
mg6.char._x = mg6.initCharX;
mg6.enn._x = mg6.initEnnX;
mg6.char._y = mg6.initCharY;
mg6.enn._y = mg6.initEnnY;
mg6.char._xscale = mg6.initCharXScale;
mg6.enn._xscale = mg6.initEnnXScale;
mg6.init.gotoAndPlay(2);
Symbol 400 MovieClip Frame 7 (17 B)
gotoAndStop (1);
Symbol 400 MovieClip Frame 16 (17 B)
gotoAndStop (1);
Symbol 400 MovieClip Frame 26 (17 B)
gotoAndStop (1);
Symbol 400 MovieClip Frame 35 (17 B)
gotoAndStop (1);
Symbol 400 MovieClip Frame 43 (17 B)
gotoAndStop (1);
Symbol 400 MovieClip Frame 48 (17 B)
gotoAndStop (1);
Symbol 400 MovieClip Frame 53 (17 B)
gotoAndStop (1);
Symbol 407 MovieClip Frame 1 (8 B)
stop();
Symbol 407 MovieClip Frame 32 (8 B)
stop();
Symbol 411 Button (43 B)
on (press) {
_parent.gotoAndPlay("out");
}
Symbol 412 MovieClip Frame 1 (156 B)
txt_round.text = mg6.hud.txt_round.text;
if (mg6.cVictory == 1) {
win1.gotoAndStop("full");
}
if (mg6.eVictory == 1) {
lose1.gotoAndStop("full");
}
Symbol 413 MovieClip Frame 1 (8 B)
stop();
Symbol 413 MovieClip Frame 8 (8 B)
stop();
Symbol 413 MovieClip Frame 18 (34 B)
mg6.upPanel.gotoAndPlay("close");
Symbol 417 MovieClip Frame 1 (8 B)
stop();
Symbol 417 MovieClip Frame 8 (8 B)
stop();
Symbol 417 MovieClip Frame 18 (22 B)
_parent.StartBonus();
Symbol 425 MovieClip Frame 1 (8 B)
stop();
Symbol 428 MovieClip Frame 1 (8 B)
stop();
Symbol 428 MovieClip Frame 8 (1.1 KiB) ●
stop();
var timeRemaining = 300;
var animStarted = false;
var power = 2;
var keyADown = false;
var keySDown = false;
this.onEnterFrame = function () {
timeRemaining--;
if (timeRemaining <= 0) {
if (timeRemaining <= -90) {
delete this.onEnterFrame;
gotoAndPlay ("out");
} else if (!animStarted) {
animStarted = true;
mg6.char.gotoAndStop("punch");
if (power < 350) {
mg6.enn.enn.gotoAndStop(2);
} else if (power < 700) {
mg6.enn.enn.gotoAndStop(3);
} else if (power < 930) {
mg6.enn.enn.gotoAndStop(4);
} else {
mg6.enn.enn.gotoAndStop(5);
}
}
} else {
txt_time.text = Math.round(timeRemaining / 30);
power--;
KEYA = Key.isDown(83);
KEYS = Key.isDown(65);
if (KEYA) {
keyADown = true;
} else if (keyADown) {
keyADown = false;
power = power + 10;
}
if (KEYS) {
keySDown = true;
} else if (keySDown) {
keySDown = false;
power = power + 10;
}
if (power <= 0) {
power = 1;
}
if (power > 1000) {
power = 1000;
}
bar.gotoAndStop(Math.round(power / 10));
}
};
Symbol 428 MovieClip Frame 18 (31 B)
_parent.win.gotoAndPlay("in");
Symbol 434 MovieClip Frame 1 (58 B)
stop();
if (mainKarate.mute) {
gotoAndStop ("off");
}
Symbol 434 MovieClip Frame 2 (58 B)
stop();
if (!mainKarate.mute) {
gotoAndStop ("on");
}
Symbol 436 Button (159 B)
on (press) {
if (!mainKarate.mute) {
mainKarate.mute = true;
music.setVolume(0);
} else {
mainKarate.mute = false;
music.setVolume(default_vol);
}
}
Symbol 441 Button (73 B)
on (press) {
delete mg6.onEnterFrame;
mainKarate.gotoAndPlay("menu");
}
Symbol 442 MovieClip Frame 1 (58 B)
var music = new Sound(mainPaint);
var default_vol = 100;
Symbol 444 MovieClip Frame 23 (29 B)
_parent.gotoAndStop("idle");
Symbol 445 MovieClip Frame 23 (29 B)
_parent.gotoAndStop("idle");
Symbol 446 MovieClip Frame 19 (29 B)
_parent.gotoAndStop("idle");
Symbol 449 MovieClip Frame 5 (59 B)
mg6.ennInitAnim = false;
mg6.crntEnnSpeed = mg6.ennSpeed;
Symbol 449 MovieClip Frame 7 (29 B)
mg6.jmpEnnAtkAvaible = true;
Symbol 449 MovieClip Frame 17 (42 B)
stop();
_parent.gotoAndStop("get_down");
Symbol 452 MovieClip Frame 2 (23 B)
mg6.callSnd("swing2");
Symbol 452 MovieClip Frame 11 (42 B)
stop();
_parent.gotoAndStop("get_down");
Symbol 453 MovieClip Frame 8 (24 B)
mg6.ennInitAnim = true;
Symbol 453 MovieClip Frame 23 (29 B)
_parent.gotoAndStop("idle");
Symbol 454 MovieClip Frame 2 (23 B)
mg6.callSnd("swing1");
Symbol 454 MovieClip Frame 9 (29 B)
_parent.gotoAndStop("idle");
Symbol 455 MovieClip Frame 10 (29 B)
_parent.gotoAndStop("idle");
Symbol 456 MovieClip Frame 6 (23 B)
mg6.callSnd("swing1");
Symbol 456 MovieClip Frame 21 (23 B)
mg6.ennLiftAtk = true;
Symbol 456 MovieClip Frame 38 (38 B)
stop();
_parent.gotoAndStop("idle");
Symbol 457 MovieClip Frame 2 (23 B)
mg6.callSnd("swing2");
Symbol 457 MovieClip Frame 21 (22 B)
mg6.crntEnnSpeed = 0;
Symbol 457 MovieClip Frame 29 (29 B)
_parent.gotoAndStop("idle");
Symbol 466 MovieClip Frame 5 (31 B)
stop();
mg6.char.char.stop();
Symbol 466 MovieClip Frame 8 (29 B)
_parent.gotoAndStop("idle");
Symbol 468 MovieClip Frame 10 (22 B)
mg6.callSnd("hurt2");
Symbol 468 MovieClip Frame 21 (141 B)
stop();
if (mg6.cVictory < 2) {
if (mg6.startNextRound) {
mg6.checkEndRound();
} else {
_parent.gotoAndStop("recover");
}
}
Symbol 469 MovieClip Frame 1 (8 B)
play();
Symbol 469 MovieClip Frame 17 (29 B)
_parent.gotoAndStop("idle");
Symbol 472 MovieClip Frame 15 (38 B)
mg6.bonusScore = mg6.bonusScore + 20;
Symbol 472 MovieClip Frame 58 (38 B)
mg6.bonusScore = mg6.bonusScore + 20;
Symbol 472 MovieClip Frame 101 (38 B)
mg6.bonusScore = mg6.bonusScore + 20;
Symbol 472 MovieClip Frame 143 (38 B)
mg6.bonusScore = mg6.bonusScore + 20;
Symbol 472 MovieClip Frame 184 (38 B)
mg6.bonusScore = mg6.bonusScore + 20;
Symbol 472 MovieClip Frame 227 (38 B)
mg6.bonusScore = mg6.bonusScore + 20;
Symbol 472 MovieClip Frame 268 (38 B)
mg6.bonusScore = mg6.bonusScore + 20;
Symbol 472 MovieClip Frame 314 (38 B)
mg6.bonusScore = mg6.bonusScore + 20;
Symbol 472 MovieClip Frame 356 (38 B)
mg6.bonusScore = mg6.bonusScore + 20;
Symbol 472 MovieClip Frame 401 (38 B)
mg6.bonusScore = mg6.bonusScore + 20;
Symbol 472 MovieClip Frame 447 (38 B)
mg6.bonusScore = mg6.bonusScore + 20;
Symbol 473 MovieClip Frame 1 (199 B)
stop();
mg6.action = false;
mg6.jmpEnnAtkAvaible = false;
mg6.ennInitAnim = false;
mg6.spearAtk = false;
mg6.ennLiftAtk = false;
mg6.ennGrabAtk = false;
mg6.crntEnnSpeed = 0;
state = "idle";
Symbol 473 MovieClip Frame 6 (16 B)
state = "walk";
Symbol 473 MovieClip Frame 11 (16 B)
state = "walk";
Symbol 473 MovieClip Frame 16 (17 B)
state = "block";
Symbol 473 MovieClip Frame 21 (41 B)
state = "jump";
mg6.ennInitAnim = true;
Symbol 473 MovieClip Frame 26 (63 B)
state = "attack";
mg6.jmpEnnAtkAvaible = false;
damage = 10;
Symbol 473 MovieClip Frame 31 (48 B)
state = "still";
mg6.jmpEnnAtkAvaible = false;
Symbol 473 MovieClip Frame 36 (31 B)
state = "attack";
damage = 6;
Symbol 473 MovieClip Frame 41 (31 B)
state = "attack";
damage = 7;
Symbol 473 MovieClip Frame 46 (56 B)
state = "attack";
damage = 7;
mg6.ennLiftAtk = false;
Symbol 473 MovieClip Frame 51 (53 B)
state = "attack";
mg6.spearAtk = true;
damage = 8;
Symbol 473 MovieClip Frame 56 (16 B)
state = "hurt";
Symbol 473 MovieClip Frame 61 (16 B)
state = "hurt";
Symbol 473 MovieClip Frame 66 (16 B)
state = "hurt";
Symbol 473 MovieClip Frame 72 (33 B)
state = "attack";
damage = 150;
Symbol 475 MovieClip Frame 23 (29 B)
_parent.gotoAndStop("idle");
Symbol 476 MovieClip Frame 23 (29 B)
_parent.gotoAndStop("idle");
Symbol 477 MovieClip Frame 19 (29 B)
_parent.gotoAndStop("idle");
Symbol 482 MovieClip Frame 5 (59 B)
mg6.ennInitAnim = false;
mg6.crntEnnSpeed = mg6.ennSpeed;
Symbol 482 MovieClip Frame 7 (29 B)
mg6.jmpEnnAtkAvaible = true;
Symbol 482 MovieClip Frame 17 (42 B)
stop();
_parent.gotoAndStop("get_down");
Symbol 485 MovieClip Frame 2 (23 B)
mg6.callSnd("swing2");
Symbol 485 MovieClip Frame 11 (42 B)
stop();
_parent.gotoAndStop("get_down");
Symbol 486 MovieClip Frame 8 (24 B)
mg6.ennInitAnim = true;
Symbol 486 MovieClip Frame 23 (29 B)
_parent.gotoAndStop("idle");
Symbol 487 MovieClip Frame 2 (23 B)
mg6.callSnd("swing1");
Symbol 487 MovieClip Frame 9 (29 B)
_parent.gotoAndStop("idle");
Symbol 488 MovieClip Frame 10 (29 B)
_parent.gotoAndStop("idle");
Symbol 489 MovieClip Frame 6 (23 B)
mg6.callSnd("swing1");
Symbol 489 MovieClip Frame 21 (23 B)
mg6.ennLiftAtk = true;
Symbol 489 MovieClip Frame 38 (38 B)
stop();
_parent.gotoAndStop("idle");
Symbol 490 MovieClip Frame 2 (23 B)
mg6.callSnd("swing2");
Symbol 490 MovieClip Frame 21 (22 B)
mg6.crntEnnSpeed = 0;
Symbol 490 MovieClip Frame 29 (29 B)
_parent.gotoAndStop("idle");
Symbol 495 MovieClip Frame 5 (31 B)
stop();
mg6.char.char.stop();
Symbol 495 MovieClip Frame 8 (29 B)
_parent.gotoAndStop("idle");
Symbol 497 MovieClip Frame 10 (22 B)
mg6.callSnd("hurt2");
Symbol 497 MovieClip Frame 21 (141 B)
stop();
if (mg6.cVictory < 2) {
if (mg6.startNextRound) {
mg6.checkEndRound();
} else {
_parent.gotoAndStop("recover");
}
}
Symbol 498 MovieClip Frame 1 (8 B)
play();
Symbol 498 MovieClip Frame 17 (29 B)
_parent.gotoAndStop("idle");
Symbol 507 MovieClip Frame 9 (8 B)
stop();
Symbol 510 MovieClip Frame 9 (8 B)
stop();
Symbol 518 MovieClip Frame 15 (8 B)
stop();
Symbol 530 MovieClip Frame 17 (8 B)
stop();
Symbol 531 MovieClip Frame 1 (8 B)
stop();
Symbol 531 MovieClip Frame 3 (39 B)
mg6.bonusScore = mg6.bonusScore + 200;
Symbol 531 MovieClip Frame 4 (39 B)
mg6.bonusScore = mg6.bonusScore + 600;
Symbol 531 MovieClip Frame 5 (40 B)
mg6.bonusScore = mg6.bonusScore + 1000;
Symbol 532 MovieClip Frame 1 (199 B)
stop();
mg6.action = false;
mg6.jmpEnnAtkAvaible = false;
mg6.ennInitAnim = false;
mg6.spearAtk = false;
mg6.ennLiftAtk = false;
mg6.ennGrabAtk = false;
mg6.crntEnnSpeed = 0;
state = "idle";
Symbol 532 MovieClip Frame 6 (16 B)
state = "walk";
Symbol 532 MovieClip Frame 11 (16 B)
state = "walk";
Symbol 532 MovieClip Frame 16 (17 B)
state = "block";
Symbol 532 MovieClip Frame 21 (41 B)
state = "jump";
mg6.ennInitAnim = true;
Symbol 532 MovieClip Frame 26 (63 B)
state = "attack";
mg6.jmpEnnAtkAvaible = false;
damage = 12;
Symbol 532 MovieClip Frame 31 (48 B)
state = "still";
mg6.jmpEnnAtkAvaible = false;
Symbol 532 MovieClip Frame 36 (31 B)
state = "attack";
damage = 6;
Symbol 532 MovieClip Frame 41 (31 B)
state = "attack";
damage = 7;
Symbol 532 MovieClip Frame 46 (56 B)
state = "attack";
damage = 9;
mg6.ennLiftAtk = false;
Symbol 532 MovieClip Frame 51 (53 B)
state = "attack";
mg6.spearAtk = true;
damage = 9;
Symbol 532 MovieClip Frame 56 (16 B)
state = "hurt";
Symbol 532 MovieClip Frame 61 (16 B)
state = "hurt";
Symbol 532 MovieClip Frame 66 (16 B)
state = "hurt";
Symbol 532 MovieClip Frame 72 (33 B)
state = "attack";
damage = 150;
Symbol 534 MovieClip Frame 18 (29 B)
_parent.gotoAndStop("idle");
Symbol 535 MovieClip Frame 18 (29 B)
_parent.gotoAndStop("idle");
Symbol 536 MovieClip Frame 20 (29 B)
_parent.gotoAndStop("idle");
Symbol 543 MovieClip Frame 5 (59 B)
mg6.ennInitAnim = false;
mg6.crntEnnSpeed = mg6.ennSpeed;
Symbol 543 MovieClip Frame 7 (29 B)
mg6.jmpEnnAtkAvaible = true;
Symbol 543 MovieClip Frame 19 (42 B)
stop();
_parent.gotoAndStop("get_down");
Symbol 550 MovieClip Frame 2 (23 B)
mg6.callSnd("swing2");
Symbol 550 MovieClip Frame 16 (67 B)
stop();
mg6.ennLiftAtk = false;
_parent.gotoAndStop("get_down");
Symbol 557 MovieClip Frame 8 (24 B)
mg6.ennInitAnim = true;
Symbol 557 MovieClip Frame 18 (29 B)
_parent.gotoAndStop("idle");
Symbol 558 MovieClip Frame 2 (23 B)
mg6.callSnd("swing1");
Symbol 558 MovieClip Frame 29 (29 B)
_parent.gotoAndStop("idle");
Symbol 559 MovieClip Frame 2 (23 B)
mg6.callSnd("swing1");
Symbol 559 MovieClip Frame 29 (29 B)
_parent.gotoAndStop("idle");
Symbol 567 MovieClip Frame 6 (23 B)
mg6.callSnd("swing1");
Symbol 567 MovieClip Frame 27 (23 B)
mg6.ennLiftAtk = true;
Symbol 567 MovieClip Frame 48 (38 B)
stop();
_parent.gotoAndStop("idle");
Symbol 568 MovieClip Frame 6 (23 B)
mg6.callSnd("swing1");
Symbol 568 MovieClip Frame 27 (23 B)
mg6.ennLiftAtk = true;
Symbol 568 MovieClip Frame 48 (38 B)
stop();
_parent.gotoAndStop("idle");
Symbol 571 MovieClip Frame 5 (31 B)
stop();
mg6.char.char.stop();
Symbol 571 MovieClip Frame 8 (29 B)
_parent.gotoAndStop("idle");
Symbol 572 MovieClip Frame 11 (22 B)
mg6.callSnd("hurt2");
Symbol 572 MovieClip Frame 22 (141 B)
stop();
if (mg6.cVictory < 2) {
if (mg6.startNextRound) {
mg6.checkEndRound();
} else {
_parent.gotoAndStop("recover");
}
}
Symbol 573 MovieClip Frame 1 (8 B)
play();
Symbol 573 MovieClip Frame 18 (29 B)
_parent.gotoAndStop("idle");
Symbol 574 MovieClip Frame 1 (199 B)
stop();
mg6.action = false;
mg6.jmpEnnAtkAvaible = false;
mg6.ennInitAnim = false;
mg6.spearAtk = false;
mg6.ennLiftAtk = false;
mg6.ennGrabAtk = false;
mg6.crntEnnSpeed = 0;
state = "idle";
Symbol 574 MovieClip Frame 6 (16 B)
state = "walk";
Symbol 574 MovieClip Frame 11 (16 B)
state = "walk";
Symbol 574 MovieClip Frame 16 (17 B)
state = "block";
Symbol 574 MovieClip Frame 21 (41 B)
state = "jump";
mg6.ennInitAnim = true;
Symbol 574 MovieClip Frame 26 (87 B)
state = "attack";
mg6.jmpEnnAtkAvaible = false;
mg6.ennLiftAtk = true;
damage = 10;
Symbol 574 MovieClip Frame 31 (48 B)
state = "still";
mg6.jmpEnnAtkAvaible = false;
Symbol 574 MovieClip Frame 36 (31 B)
state = "attack";
damage = 8;
Symbol 574 MovieClip Frame 41 (31 B)
state = "attack";
damage = 8;
Symbol 574 MovieClip Frame 46 (57 B)
state = "attack";
damage = 12;
mg6.ennLiftAtk = false;
Symbol 574 MovieClip Frame 51 (57 B)
state = "attack";
damage = 12;
mg6.ennLiftAtk = false;
Symbol 574 MovieClip Frame 56 (16 B)
state = "hurt";
Symbol 574 MovieClip Frame 61 (16 B)
state = "hurt";
Symbol 574 MovieClip Frame 66 (16 B)
state = "hurt";
Symbol 575 MovieClip Frame 1 (203 B)
_global.mg6 = this;
drawGame = function (gameType) {
if (ennemyNbr > 3) {
_quality = "HIGH";
mainKarate.gotoAndPlay("menu");
} else {
gotoAndStop ("init");
}
};
drawGame("single");
Symbol 575 MovieClip Frame 6 (32 B)
gotoAndStop("enn" + ennemyNbr);
Instance of Symbol 205 MovieClip in Symbol 575 MovieClip Frame 6 (85 B)
onClipEvent (load) {
this.useHandCursor = false;
this.onPress = function () {
};
}
Symbol 575 MovieClip Frame 11 (15.25 KiB) ● ● ●
_quality = "MEDIUM";
root.sfx.gotoAndPlay("battleMonster");
hud.enn.ennface.gotoAndStop("coyote");
hud.enn.txt_name.text = "Wile E. Coyote";
PAUSE = false;
roundNum = 1;
charGap = 60;
top = 0;
left = 0;
sceneWidth = 500;
sceneHeight = 375;
groundLvl = 445;
vx = 0;
vy = 0;
friction = 0;
bounce = -0.8;
gravity = 2.6;
charHitDelay = -100;
uppercutTimer = 0;
atkUppercut = false;
charSpeed = 0;
cVictory = 0;
crntSpeed = 0;
initCharXScale = char._xscale;
initCharX = char._x;
initCharY = char._y;
lastCombo = "";
comboArray = new Array("", "", "");
comboTimer = 0;
initAnim = false;
comboAvaible = false;
comboMove = false;
liftAtk = false;
charEasingDelay = 30;
charEasing = false;
jmpAtkAvaible = false;
ennHitDelay = -100;
ennSpeed = 0;
sideDrop = 140;
playerGap = 100;
eVictory = 0;
hitInRow = 0;
aiAction1Gap = 80;
aiAction2Gap = 30;
aiAction3Gap = 40;
minDelay = 20;
maxDelay = 20;
initEnnXScale = enn._xscale;
initEnnX = enn._x;
initEnnY = enn._y;
ennInitAnim = false;
jmpEnnAtkAvaible = false;
ennLiftAtk = false;
ennGrabAtk = false;
ennBlock = false;
action = false;
spearAtk = true;
ennInvincible = false;
bonusMode = false;
lifeScore = 0;
roundScore = 0;
bonusScore = 0;
crntScore = 0;
FPS = 0;
minFrameEyeCandy = 20;
frame = 0;
repDelay = random(maxDelay) + minDelay;
bounceFct = function (hit_mc, path) {
bW = path._width / 2;
bH = path._height / 2;
vy = vy + gravity;
vx = vx * friction;
vy = vy * friction;
hit_mc._x = hit_mc._x + vx;
hit_mc._y = hit_mc._y + vy;
if ((hit_mc._x + bW) > sceneWidth) {
hit_mc._x = sceneWidth - bW;
vx = vx * bounce;
} else if ((hit_mc._x - bW) < left) {
hit_mc._x = left + bW;
vx = vx * bounce;
}
if ((hit_mc._y + bH) > groundLvl) {
setMiddle = -(hit_mc._width / 2);
if (hit_mc._xscale < 0) {
setMiddle = hit_mc._width / 2;
}
groundHit._x = hit_mc._x + setMiddle;
groundHit._y = groundLvl - 175;
groundHit.gotoAndPlay(2);
if (FPS >= minFrameEyeCandy) {
ShakeCamera(5);
}
hit_mc._y = groundLvl - bH;
vy = vy * bounce;
} else if ((hit_mc._y - bH) < top) {
}
};
callSnd = function (snd) {
sfx.gotoAndPlay(snd);
};
throwEndGame = function (winner) {
PAUSE = true;
ennemyNbr++;
if (ennemyNbr > 3) {
ennemyNbr = 1;
}
roundNum = 1;
if (winner) {
bonus.gotoAndPlay("in");
} else {
delete this.onEnterFrame;
_quality = "HIGH";
win.gotoAndPlay("in");
}
};
checkEndRound = function () {
startNextRound = false;
roundNum++;
PAUSE = true;
roundPanel.gotoAndPlay("in");
init._visible = false;
};
StartBonus = function () {
PAUSE = false;
enn.gotoAndStop("bonus");
enn._x = 500;
enn._y = 219;
char._x = 82;
char._y = 272;
bonusMode = true;
};
checkCharPauseGame = function () {
charHitDelay--;
if (charHitDelay > 0) {
PAUSE = true;
} else if (charHitDelay >= -10) {
char.char.play();
enn.enn.play();
PAUSE = false;
}
};
checkEnnPauseGame = function () {
ennHitDelay--;
if (ennHitDelay > 0) {
PAUSE = true;
} else if (ennHitDelay >= -30) {
char.char.play();
enn.enn.play();
PAUSE = false;
}
};
ShakeCamera = function (n) {
shakeur_mc = this.createEmptyMovieClip("shakeur_mc", this.getNextHighestDepth());
shakeur_mc.n = n;
shakeur_mc.dim = n / 25;
shakeur_mc.onEnterFrame = function () {
this.n = this.n - this.dim;
bkg._x = (random(this.n) - (this.n / 2)) - 40;
bkg._y = (random(this.n) - (this.n / 2)) - 40;
if (this.n <= 0) {
bkg._x = -40;
bkg._y = -40;
delete this.onEnterFrame;
}
};
};
checkColl = function () {
if (enn.state != "block") {
if (char.char.weapon.hitTest(enn.enn.hitzone)) {
hitInRow++;
if (hitInRow == 2) {
hitInRow = 0;
action = true;
}
callSnd("hit2");
crntFrame = hud.enn.enn._currentframe;
if ((crntFrame >= 100) && (!PAUSE)) {
trace("dead");
hk.leftHarm.gotoAndPlay(2);
cVictory++;
lifeScore = hud.char.char._totalframes - hud.char.char._currentframe;
roundScore = (250 + (lifeScore * 2)) + crntScore;
totalScore = totalScore + roundScore;
crntScore = 0;
hud.char.txt_score.text = totalScore;
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
if (cVictory >= 2) {
hud.char.charWin.dot2.gotoAndPlay("anim");
throwEndGame(true);
} else {
hud.char.charWin.dot1.gotoAndPlay("anim");
startNextRound = true;
}
PAUSE = true;
charHitDelay = -100;
ennHitDelay = -100;
enn.gotoAndStop("fall_lift");
} else {
trace("Dammage : " + char.damage);
crntScore = crntScore + Number(char.damage);
hud.char.txt_score.text = totalScore + crntScore;
if ((crntFrame + char.damage) > 100) {
hud.enn.enn.gotoAndStop(100);
} else {
hud.enn.enn.gotoAndStop(crntFrame + char.damage);
}
charHitDelay = 10;
if (liftAtk) {
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
liftAtk = false;
enn.gotoAndStop("fall_lift");
} else {
enn.gotoAndStop("hurt");
}
hitEnn._x = enn._x;
hitEnn.gotoAndPlay(2);
}
}
}
};
checkEnnColl = function () {
if ((char.state != "block") && (!PAUSE)) {
if (enn.enn.weapon.hitTest(char.char.hitzone)) {
callSnd("hit1");
crntFrame = hud.char.char._currentframe;
if (bonusMode) {
ShakeCamera(40);
char.gotoAndStop("fall_lift");
PAUSE = true;
win.gotoAndPlay("in");
} else if (crntFrame >= 100) {
hk.rightHarm.gotoAndPlay(2);
roundScore = roundScore + crntScore;
totalScore = totalScore + roundScore;
crntScore = 0;
eVictory++;
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
if (eVictory == 1) {
hud.enn.ennWin.dot1.gotoAndPlay("anim");
} else {
hud.enn.ennWin.dot2.gotoAndPlay("anim");
}
PAUSE = true;
charHitDelay = -100;
ennHitDelay = -100;
char.gotoAndStop("fall_lift");
startNextRound = true;
} else {
hud.char.char.gotoAndStop(crntFrame + enn.damage);
ennHitDelay = 5;
uppercutTimer = 0;
comboMove = false;
vx = ennSpeed;
vy = ennSpeed;
if (ennLiftAtk) {
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
ennLiftAtk = false;
char.gotoAndStop("fall_lift");
} else if (ennGrabAtk) {
char._visible = false;
char.gotoAndStop("hurt_throw");
enn.gotoAndStop("throw");
} else {
char.gotoAndStop("hurt");
}
hitChar._x = char._x;
hitChar.gotoAndPlay(2);
}
}
}
};
runCombo = function () {
if (KEYFOWARD) {
if (!fowDown) {
addComboKey("foward");
}
fowDown = true;
} else {
fowDown = false;
}
if (KEYBACKWARD) {
if (!backDown) {
addComboKey("backward");
}
backDown = true;
} else {
backDown = false;
}
if (KEYDOWN) {
if (!downDown) {
addComboKey("down");
}
downDown = true;
} else {
downDown = false;
}
if (KEYUP) {
if (!upDown) {
addComboKey("up");
}
upDown = true;
} else {
upDown = false;
}
if (KEYSPACE) {
if (!hitDown) {
addComboKey("hit");
}
hitDown = true;
} else {
hitDown = false;
}
if (KEYKICK) {
if (!hitDown) {
addComboKey("kick");
}
hitDown = true;
} else {
hitDown = false;
}
checkCombo();
};
checkCombo = function () {
combo = "";
combo = combo + (comboArray[0] + ",");
combo = combo + (comboArray[1] + ",");
combo = combo + comboArray[2];
if (lastCombo == combo) {
if (comboTimer == 15) {
for (var _local1 in comboArray) {
comboArray[_local1] = "";
}
comboTimer = 0;
}
comboTimer++;
} else {
if (comboAvaible) {
switch (combo) {
case "foward,foward,kick" :
char.gotoAndStop("spear");
break;
case "foward,foward,hit" :
char.gotoAndStop("high_attack");
}
}
lastCombo = combo;
}
if (comboMove) {
crntSpeed = charSpeed * 4;
}
};
addComboKey = function (key) {
comboArray[0] = comboArray[1];
comboArray[1] = comboArray[2];
comboArray[2] = key;
};
runEnnAI = function () {
if ((!PAUSE) && (!bonusMode)) {
if ((enn.state != "attack") && (enn.state != "hurt")) {
if (enn._x <= (char._x - 25)) {
ennSpeed = 8;
sideDrop = -140;
enn._xscale = -initEnnXScale;
} else if (enn._x > (char._x + 25)) {
ennSpeed = -8;
sideDrop = 140;
enn._xscale = initEnnXScale;
}
}
repDelay--;
if (repDelay == 0) {
action = true;
walkBack = false;
repDelay = random(maxDelay) + minDelay;
randMove = random(100);
}
if (action) {
if ((char.state == "attack") && (enn.state != "jump")) {
if (randMove <= 50) {
enn.gotoAndStop("jump");
} else {
enn.gotoAndStop("block");
}
ennBlock = true;
} else {
ennBlock = false;
}
if (!ennBlock) {
if ((((enn.state != "jump") && (enn.state != "walk")) && (enn.state != "still")) && (enn.state != "attack")) {
if ((enn._x >= ((char._x + playerGap) + aiAction1Gap)) || (enn._x <= ((char._x - playerGap) + aiAction1Gap))) {
if (randMove <= 30) {
enn.gotoAndStop("spear");
} else if (randMove <= 70) {
enn.gotoAndStop("walk");
} else {
walkBack = true;
enn.gotoAndStop("back");
}
} else if ((enn._x >= ((char._x + playerGap) + aiAction2Gap)) || (enn._x <= ((char._x - playerGap) + aiAction2Gap))) {
if (randMove <= 25) {
enn.gotoAndStop("spear");
} else if (randMove <= 70) {
enn.gotoAndStop("punch");
} else {
enn.gotoAndStop("high_attack");
}
} else if (enn.state != "hurt") {
if (randMove <= 40) {
enn.gotoAndStop("high_attack");
} else if (randMove <= 50) {
enn.gotoAndStop("hurl");
} else if (randMove <= 80) {
enn.gotoAndStop("jump");
} else {
walkBack = true;
enn.gotoAndStop("back");
}
}
}
}
action = false;
}
if (enn.state == "jump") {
if (jmpEnnAtkAvaible) {
if ((enn._x <= ((char._x + playerGap) - aiAction3Gap)) || (enn._x >= ((char._x - playerGap) + aiAction3Gap))) {
enn.gotoAndStop("jump_attack");
}
}
}
if ((ennInitAnim || (enn.state == "attack")) || (enn.state == "hurt")) {
if (!spearAtk) {
crntEnnSpeed = 0;
} else {
crntEnnSpeed = ennSpeed * 3;
}
}
if ((enn.state == "walk") || (enn.state == "jump")) {
if (walkBack) {
crntEnnSpeed = -ennSpeed;
} else {
crntEnnSpeed = ennSpeed;
}
}
if ((enn._x - 1) <= 100) {
enn._x = 100;
}
if ((enn._x - charGap) <= char._x) {
crntEnnSpeed = crntEnnSpeed / 2;
enn._x = char._x + charGap;
}
if (((enn._x + charGap) + 1) >= sceneWidth) {
enn._x = sceneWidth - charGap;
}
enn._x = enn._x + crntEnnSpeed;
}
};
this.onEnterFrame = function () {
KEYUP = Key.isDown(38);
KEYDOWN = Key.isDown(40);
if (!comboMove) {
if (char.state != "hurt") {
charSpeed = 8;
tweenGap = -150;
switchSide = true;
char._xscale = initCharXScale;
KEYBACKWARD = Key.isDown(37);
KEYFOWARD = Key.isDown(39);
}
}
KEYSPACE = Key.isDown(83);
KEYKICK = Key.isDown(65);
if (!PAUSE) {
if ((((char.state != "still") && (char.state != "crounch")) && (char.state != "hurt")) && (char.state != "attack")) {
if (KEYFOWARD) {
if ((!KEYBACKWARD) && (!KEYSPACE)) {
if (char.state != "block") {
crntSpeed = charSpeed;
}
if (((!KEYUP) && (char.state == "idle")) || (char.state == "walk")) {
char.gotoAndStop("walk");
}
}
}
if (KEYBACKWARD) {
if ((!KEYFOWARD) && (!KEYSPACE)) {
crntSpeed = (-charSpeed) / 2;
if ((((!KEYUP) && (char.state == "idle")) || (char.state == "block")) || (char.state == "walk")) {
char.gotoAndStop("back");
} else if (char.state == "jump") {
charSpeed = -charSpeed;
}
}
}
if (KEYDOWN) {
if (((char.state == "idle") && (!KEYBACKWARD)) && (!KEYFOWARD)) {
crntSpeed = 0;
char.gotoAndStop("down");
}
}
if (KEYUP) {
if (KEYBACKWARD || (KEYFOWARD)) {
crntSpeed = charSpeed * 2;
} else {
crntSpeed = 0;
}
if (((char.state != "jump") && (char.state != "attack")) && (!KEYSPACE)) {
char.gotoAndStop("jump");
}
}
if (KEYSPACE) {
uppercutTimer++;
if (!spacePress) {
spacePress = true;
if (char.state != "jump") {
if ((char.state != "attack") && (!KEYBACKWARD)) {
char.gotoAndStop("punch");
crntSpeed = 0;
}
} else if (jmpAtkAvaible) {
char.gotoAndStop("jump_attack");
}
}
} else if (KEYKICK) {
if (!kickPress) {
kickPress = true;
if (char.state != "jump") {
if ((char.state != "attack") && (!KEYBACKWARD)) {
char.gotoAndStop("kick");
crntSpeed = 0;
}
} else if (jmpAtkAvaible) {
char.gotoAndStop("jump_attack");
}
}
}
if (!KEYKICK) {
kickPress = false;
}
if (!KEYSPACE) {
if (uppercutTimer >= 20) {
atkUppercut = true;
char.gotoAndStop("high_attack");
}
uppercutTimer = 0;
spacePress = false;
}
} else if (char.state == "crounch") {
if (KEYSPACE) {
if (!kickPress) {
kickPress = true;
char.gotoAndStop("low_attack");
}
}
if (!KEYSPACE) {
kickPress = false;
}
if (KEYKICK) {
if (!spacePress) {
spacePress = true;
char.gotoAndStop("low_attack");
}
}
if (!KEYKICK) {
spacePress = false;
}
if (!KEYDOWN) {
char.gotoAndStop("get_up");
}
crntSpeed = 0;
}
if ((((((!KEYUP) && (!KEYFOWARD)) && (!KEYBACKWARD)) && (!KEYDOWN)) && (!KEYSPACE)) && (!KEYKICK)) {
if ((((char.state != "attack") && (char.state != "still")) && (char.state != "jump")) && (char.state != "hurt")) {
if (!atkUppercut) {
char.gotoAndStop("idle");
}
atkUppercut = false;
}
crntSpeed = 0;
}
if ((char._x - charGap) <= 0) {
char._x = charGap;
}
if ((char._x + 1) >= sceneWidth) {
char._x = sceneWidth;
}
if (((char._x + charGap) + 30) >= enn._x) {
crntSpeed = crntSpeed / 2;
if (crntSpeed != 0) {
enn._x = enn._x + crntSpeed;
}
char._x = (enn._x - charGap) - 30;
}
if ((initAnim || (char.state == "attack")) || (char.state == "hurt")) {
crntSpeed = 0;
}
runEnnAI();
runCombo();
checkColl();
checkEnnColl();
if (!charEasing) {
char._x = char._x + crntSpeed;
}
}
if (charEasing) {
charEasingDelay--;
if (charEasingDelay >= 0) {
bounceFct(char, char.char);
} else {
charEasingDelay = 30;
if (!startNextRound) {
charEasing = false;
char.gotoAndStop("recover");
char._y = groundLvl - 175;
} else if (eVictory < 2) {
mg6.checkEndRound();
} else {
throwEndGame(false);
}
charEasing = false;
}
}
checkCharPauseGame();
checkEnnPauseGame();
};
PAUSE = true;
init.scorePanel._visible = false;
stop();
Symbol 575 MovieClip Frame 17 (15.24 KiB) ● ● ●
_quality = "MEDIUM";
root.sfx.gotoAndPlay("battleMonster");
hud.enn.ennface.gotoAndStop("duck");
hud.enn.txt_name.text = "Daffy Duck";
PAUSE = false;
roundNum = 1;
charGap = 60;
top = 0;
left = 0;
sceneWidth = 500;
sceneHeight = 375;
groundLvl = 445;
vx = 0;
vy = 0;
friction = 0;
bounce = -0.8;
gravity = 2.6;
charHitDelay = -100;
uppercutTimer = 0;
atkUppercut = false;
charSpeed = 0;
cVictory = 0;
crntSpeed = 0;
initCharXScale = char._xscale;
initCharX = char._x;
initCharY = char._y;
lastCombo = "";
comboArray = new Array("", "", "");
comboTimer = 0;
initAnim = false;
comboAvaible = false;
comboMove = false;
liftAtk = false;
charEasingDelay = 30;
charEasing = false;
jmpAtkAvaible = false;
ennHitDelay = -100;
ennSpeed = 0;
sideDrop = 140;
playerGap = 100;
eVictory = 0;
hitInRow = 0;
aiAction1Gap = 80;
aiAction2Gap = 30;
aiAction3Gap = 40;
minDelay = 15;
maxDelay = 15;
initEnnXScale = enn._xscale;
initEnnX = enn._x;
initEnnY = enn._y;
ennInitAnim = false;
jmpEnnAtkAvaible = false;
ennLiftAtk = false;
ennGrabAtk = false;
ennBlock = false;
action = false;
spearAtk = true;
ennInvincible = false;
bonusMode = false;
lifeScore = 0;
roundScore = 0;
bonusScore = 0;
crntScore = 0;
FPS = 0;
minFrameEyeCandy = 20;
frame = 0;
repDelay = random(maxDelay) + minDelay;
bounceFct = function (hit_mc, path) {
bW = path._width / 2;
bH = path._height / 2;
vy = vy + gravity;
vx = vx * friction;
vy = vy * friction;
hit_mc._x = hit_mc._x + vx;
hit_mc._y = hit_mc._y + vy;
if ((hit_mc._x + bW) > sceneWidth) {
hit_mc._x = sceneWidth - bW;
vx = vx * bounce;
} else if ((hit_mc._x - bW) < left) {
hit_mc._x = left + bW;
vx = vx * bounce;
}
if ((hit_mc._y + bH) > groundLvl) {
setMiddle = -(hit_mc._width / 2);
if (hit_mc._xscale < 0) {
setMiddle = hit_mc._width / 2;
}
groundHit._x = hit_mc._x + setMiddle;
groundHit._y = groundLvl - 175;
groundHit.gotoAndPlay(2);
if (FPS >= minFrameEyeCandy) {
ShakeCamera(5);
}
callSnd("hit1");
path.gotoAndPlay(2);
hit_mc._y = groundLvl - bH;
vy = vy * bounce;
} else if ((hit_mc._y - bH) < top) {
}
};
callSnd = function (snd) {
sfx.gotoAndPlay(snd);
};
throwEndGame = function (winner) {
PAUSE = true;
ennemyNbr++;
if (ennemyNbr > 3) {
ennemyNbr = 1;
}
roundNum = 1;
if (winner) {
bonus.gotoAndPlay("in");
} else {
delete this.onEnterFrame;
_quality = "HIGH";
win.gotoAndPlay("in");
}
};
checkEndRound = function () {
startNextRound = false;
roundNum++;
PAUSE = true;
roundPanel.gotoAndPlay("in");
init._visible = false;
};
StartBonus = function () {
enn.gotoAndStop("bonus");
enn._x = 245;
enn._y = 261;
char._x = 172;
char._y = 272;
bonusMode = true;
bonusBlock.gotoAndPlay("in");
};
checkCharPauseGame = function () {
charHitDelay--;
if (charHitDelay > 0) {
PAUSE = true;
} else if (charHitDelay >= -10) {
char.char.play();
enn.enn.play();
PAUSE = false;
}
};
checkEnnPauseGame = function () {
ennHitDelay--;
if (ennHitDelay > 0) {
PAUSE = true;
} else if (ennHitDelay >= -30) {
char.char.play();
enn.enn.play();
PAUSE = false;
}
};
ShakeCamera = function (n) {
shakeur_mc = this.createEmptyMovieClip("shakeur_mc", this.getNextHighestDepth());
shakeur_mc.n = n;
shakeur_mc.dim = n / 25;
shakeur_mc.onEnterFrame = function () {
this.n = this.n - this.dim;
bkg._x = (random(this.n) - (this.n / 2)) - 40;
bkg._y = (random(this.n) - (this.n / 2)) - 40;
if (this.n <= 0) {
bkg._x = -40;
bkg._y = -40;
delete this.onEnterFrame;
}
};
};
checkColl = function () {
if (enn.state != "block") {
if (char.char.weapon.hitTest(enn.enn.hitzone)) {
hitInRow++;
if (hitInRow == 2) {
hitInRow = 0;
action = true;
}
callSnd("hit2");
crntFrame = hud.enn.enn._currentframe;
if (crntFrame >= 100) {
hk.leftHarm.gotoAndPlay(2);
cVictory++;
lifeScore = hud.char.char._totalframes - hud.char.char._currentframe;
roundScore = (250 + (lifeScore * 2)) + crntScore;
totalScore = totalScore + roundScore;
crntScore = 0;
hud.char.txt_score.text = totalScore;
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
if (cVictory >= 2) {
hud.char.charWin.dot2.gotoAndPlay("anim");
throwEndGame(true);
startNextRound = false;
} else {
hud.char.charWin.dot1.gotoAndPlay("anim");
startNextRound = true;
}
PAUSE = true;
charHitDelay = -100;
ennHitDelay = -100;
enn.gotoAndStop("fall_lift");
} else {
crntScore = crntScore + Number(char.damage);
hud.char.txt_score.text = totalScore + crntScore;
if ((crntFrame + char.damage) > 100) {
hud.enn.enn.gotoAndStop(100);
} else {
hud.enn.enn.gotoAndStop(crntFrame + char.damage);
}
charHitDelay = 10;
if (liftAtk) {
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
liftAtk = false;
enn.gotoAndStop("fall_lift");
} else {
enn.gotoAndStop("hurt");
}
hitEnn._x = enn._x;
hitEnn.gotoAndPlay(2);
}
}
}
};
checkEnnColl = function () {
if ((char.state != "block") && (!PAUSE)) {
if (enn.enn.weapon.hitTest(char.char.hitzone)) {
callSnd("hit1");
crntFrame = hud.char.char._currentframe;
if (bonusMode) {
ShakeCamera(40);
char.gotoAndStop("fall_lift");
PAUSE = true;
win.gotoAndPlay("in");
} else if (crntFrame >= 100) {
hk.rightHarm.gotoAndPlay(2);
roundScore = roundScore + crntScore;
totalScore = totalScore + roundScore;
eVictory++;
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
if (eVictory == 1) {
hud.enn.ennWin.dot1.gotoAndPlay("anim");
} else {
hud.enn.ennWin.dot2.gotoAndPlay("anim");
}
PAUSE = true;
charHitDelay = -100;
ennHitDelay = -100;
char.gotoAndStop("fall_lift");
startNextRound = true;
} else {
hud.char.char.gotoAndStop(crntFrame + enn.damage);
ennHitDelay = 5;
uppercutTimer = 0;
comboMove = false;
vx = ennSpeed;
vy = ennSpeed;
if (ennLiftAtk) {
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
ennLiftAtk = false;
char.gotoAndStop("fall_lift");
} else if (ennGrabAtk) {
char._visible = false;
char.gotoAndStop("hurt_throw");
enn.gotoAndStop("throw");
} else {
char.gotoAndStop("hurt");
}
hitChar._x = char._x;
hitChar.gotoAndPlay(2);
}
}
}
};
runCombo = function () {
if (KEYFOWARD) {
if (!fowDown) {
addComboKey("foward");
}
fowDown = true;
} else {
fowDown = false;
}
if (KEYBACKWARD) {
if (!backDown) {
addComboKey("backward");
}
backDown = true;
} else {
backDown = false;
}
if (KEYDOWN) {
if (!downDown) {
addComboKey("down");
}
downDown = true;
} else {
downDown = false;
}
if (KEYUP) {
if (!upDown) {
addComboKey("up");
}
upDown = true;
} else {
upDown = false;
}
if (KEYSPACE) {
if (!hitDown) {
addComboKey("hit");
}
hitDown = true;
} else {
hitDown = false;
}
if (KEYKICK) {
if (!hitDown) {
addComboKey("kick");
}
hitDown = true;
} else {
hitDown = false;
}
checkCombo();
};
checkCombo = function () {
combo = "";
combo = combo + (comboArray[0] + ",");
combo = combo + (comboArray[1] + ",");
combo = combo + comboArray[2];
if (lastCombo == combo) {
if (comboTimer == 15) {
for (var _local1 in comboArray) {
comboArray[_local1] = "";
}
comboTimer = 0;
}
comboTimer++;
} else {
if (comboAvaible) {
switch (combo) {
case "foward,foward,kick" :
char.gotoAndStop("spear");
break;
case "foward,foward,hit" :
char.gotoAndStop("high_attack");
}
}
lastCombo = combo;
}
if (comboMove) {
crntSpeed = charSpeed * 4;
}
};
addComboKey = function (key) {
comboArray[0] = comboArray[1];
comboArray[1] = comboArray[2];
comboArray[2] = key;
};
runEnnAI = function () {
if ((!PAUSE) && (!bonusMode)) {
if ((enn.state != "attack") && (enn.state != "hurt")) {
if (enn._x <= (char._x - 25)) {
ennSpeed = 8;
sideDrop = -140;
enn._xscale = -initEnnXScale;
} else if (enn._x > (char._x + 25)) {
ennSpeed = -8;
sideDrop = 140;
enn._xscale = initEnnXScale;
}
}
repDelay--;
if (repDelay == 0) {
action = true;
walkBack = false;
repDelay = random(maxDelay) + minDelay;
randMove = random(100);
}
if (action) {
if ((char.state == "attack") && (enn.state != "jump")) {
if (randMove <= 50) {
enn.gotoAndStop("jump");
} else {
enn.gotoAndStop("block");
}
ennBlock = true;
} else {
ennBlock = false;
}
if (!ennBlock) {
if ((((enn.state != "jump") && (enn.state != "walk")) && (enn.state != "still")) && (enn.state != "attack")) {
if ((enn._x >= ((char._x + playerGap) + aiAction1Gap)) || (enn._x <= ((char._x - playerGap) + aiAction1Gap))) {
if (randMove <= 30) {
enn.gotoAndStop("spear");
} else if (randMove <= 70) {
enn.gotoAndStop("walk");
} else {
walkBack = true;
enn.gotoAndStop("back");
}
} else if ((enn._x >= ((char._x + playerGap) + aiAction2Gap)) || (enn._x <= ((char._x - playerGap) + aiAction2Gap))) {
if (randMove <= 25) {
enn.gotoAndStop("spear");
} else if (randMove <= 70) {
enn.gotoAndStop("punch");
} else {
enn.gotoAndStop("high_attack");
}
} else if (enn.state != "hurt") {
if (randMove <= 40) {
enn.gotoAndStop("high_attack");
} else if (randMove <= 50) {
enn.gotoAndStop("hurl");
} else if (randMove <= 80) {
enn.gotoAndStop("jump");
} else {
walkBack = true;
enn.gotoAndStop("back");
}
}
}
}
action = false;
}
if (enn.state == "jump") {
if (jmpEnnAtkAvaible) {
if ((enn._x <= ((char._x + playerGap) - aiAction3Gap)) || (enn._x >= ((char._x - playerGap) + aiAction3Gap))) {
enn.gotoAndStop("jump_attack");
}
}
}
if ((ennInitAnim || (enn.state == "attack")) || (enn.state == "hurt")) {
if (!spearAtk) {
crntEnnSpeed = 0;
} else {
crntEnnSpeed = ennSpeed * 3;
}
}
if ((enn.state == "walk") || (enn.state == "jump")) {
if (walkBack) {
crntEnnSpeed = -ennSpeed;
} else {
crntEnnSpeed = ennSpeed;
}
}
if ((enn._x - 1) <= 100) {
enn._x = 100;
}
if ((enn._x - charGap) <= char._x) {
crntEnnSpeed = crntEnnSpeed / 2;
enn._x = char._x + charGap;
}
if (((enn._x + charGap) + 1) >= sceneWidth) {
enn._x = sceneWidth - charGap;
}
enn._x = enn._x + crntEnnSpeed;
}
};
this.onEnterFrame = function () {
KEYUP = Key.isDown(38);
KEYDOWN = Key.isDown(40);
if (!comboMove) {
if (char.state != "hurt") {
charSpeed = 8;
tweenGap = -150;
switchSide = true;
char._xscale = initCharXScale;
KEYBACKWARD = Key.isDown(37);
KEYFOWARD = Key.isDown(39);
}
}
KEYSPACE = Key.isDown(83);
KEYKICK = Key.isDown(65);
if (!PAUSE) {
if ((((char.state != "still") && (char.state != "crounch")) && (char.state != "hurt")) && (char.state != "attack")) {
if (KEYFOWARD) {
if ((!KEYBACKWARD) && (!KEYSPACE)) {
if (char.state != "block") {
crntSpeed = charSpeed;
}
if (((!KEYUP) && (char.state == "idle")) || (char.state == "walk")) {
char.gotoAndStop("walk");
}
}
}
if (KEYBACKWARD) {
if ((!KEYFOWARD) && (!KEYSPACE)) {
crntSpeed = (-charSpeed) / 2;
if ((((!KEYUP) && (char.state == "idle")) || (char.state == "block")) || (char.state == "walk")) {
char.gotoAndStop("back");
} else if (char.state == "jump") {
charSpeed = -charSpeed;
}
}
}
if (KEYDOWN) {
if (((char.state == "idle") && (!KEYBACKWARD)) && (!KEYFOWARD)) {
crntSpeed = 0;
char.gotoAndStop("down");
}
}
if (KEYUP) {
if (KEYBACKWARD || (KEYFOWARD)) {
crntSpeed = charSpeed * 2;
} else {
crntSpeed = 0;
}
if (((char.state != "jump") && (char.state != "attack")) && (!KEYSPACE)) {
char.gotoAndStop("jump");
}
}
if (KEYSPACE) {
uppercutTimer++;
if (!spacePress) {
spacePress = true;
if (char.state != "jump") {
if ((char.state != "attack") && (!KEYBACKWARD)) {
char.gotoAndStop("punch");
crntSpeed = 0;
}
} else if (jmpAtkAvaible) {
char.gotoAndStop("jump_attack");
}
}
} else if (KEYKICK) {
if (!kickPress) {
kickPress = true;
if (char.state != "jump") {
if ((char.state != "attack") && (!KEYBACKWARD)) {
char.gotoAndStop("kick");
crntSpeed = 0;
}
} else if (jmpAtkAvaible) {
char.gotoAndStop("jump_attack");
}
}
}
if (!KEYKICK) {
kickPress = false;
}
if (!KEYSPACE) {
if (uppercutTimer >= 20) {
atkUppercut = true;
char.gotoAndStop("high_attack");
}
uppercutTimer = 0;
spacePress = false;
}
} else if (char.state == "crounch") {
if (KEYSPACE) {
if (!kickPress) {
kickPress = true;
char.gotoAndStop("low_attack");
}
}
if (!KEYSPACE) {
kickPress = false;
}
if (KEYKICK) {
if (!spacePress) {
spacePress = true;
char.gotoAndStop("low_attack");
}
}
if (!KEYKICK) {
spacePress = false;
}
if (!KEYDOWN) {
char.gotoAndStop("get_up");
}
crntSpeed = 0;
}
if ((((((!KEYUP) && (!KEYFOWARD)) && (!KEYBACKWARD)) && (!KEYDOWN)) && (!KEYSPACE)) && (!KEYKICK)) {
if ((((char.state != "attack") && (char.state != "still")) && (char.state != "jump")) && (char.state != "hurt")) {
if (!atkUppercut) {
char.gotoAndStop("idle");
}
atkUppercut = false;
}
crntSpeed = 0;
}
if ((char._x - charGap) <= 0) {
char._x = charGap;
}
if ((char._x + 1) >= sceneWidth) {
char._x = sceneWidth;
}
if (((char._x + charGap) + 30) >= enn._x) {
crntSpeed = crntSpeed / 2;
if (crntSpeed != 0) {
enn._x = enn._x + crntSpeed;
}
char._x = (enn._x - charGap) - 30;
}
if ((initAnim || (char.state == "attack")) || (char.state == "hurt")) {
crntSpeed = 0;
}
runEnnAI();
runCombo();
checkColl();
checkEnnColl();
if (!charEasing) {
char._x = char._x + crntSpeed;
}
}
if (charEasing) {
charEasingDelay--;
if (charEasingDelay >= 0) {
bounceFct(char, char.char);
} else {
charEasingDelay = 30;
if (!startNextRound) {
charEasing = false;
char.gotoAndStop("recover");
char._y = groundLvl - 175;
} else if (eVictory < 2) {
mg6.checkEndRound();
} else {
throwEndGame(false);
}
charEasing = false;
}
}
checkCharPauseGame();
checkEnnPauseGame();
};
PAUSE = true;
init.scorePanel._visible = false;
stop();
Symbol 575 MovieClip Frame 22 (14.98 KiB) ● ●
_quality = "MEDIUM";
root.sfx.gotoAndPlay("battleMonster");
hud.enn.ennface.gotoAndStop("turtle");
hud.enn.txt_name.text = "Touche Turtle";
PAUSE = false;
roundNum = 1;
charGap = 60;
top = 0;
left = 0;
sceneWidth = 500;
sceneHeight = 375;
groundLvl = 445;
vx = 0;
vy = 0;
friction = 0;
bounce = -0.8;
gravity = 2.6;
charHitDelay = -100;
uppercutTimer = 0;
atkUppercut = false;
charSpeed = 0;
cVictory = 0;
crntSpeed = 0;
initCharXScale = char._xscale;
initCharX = char._x;
initCharY = char._y;
lastCombo = "";
comboArray = new Array("", "", "");
comboTimer = 0;
initAnim = false;
comboAvaible = false;
comboMove = false;
liftAtk = false;
charEasingDelay = 30;
charEasing = false;
jmpAtkAvaible = false;
ennHitDelay = -100;
ennSpeed = 0;
sideDrop = 140;
playerGap = 100;
eVictory = 0;
hitInRow = 0;
aiAction1Gap = 80;
aiAction2Gap = 30;
aiAction3Gap = 40;
minDelay = 10;
maxDelay = 12;
initEnnXScale = enn._xscale;
initEnnX = enn._x;
initEnnY = enn._y;
ennInitAnim = false;
jmpEnnAtkAvaible = false;
ennLiftAtk = false;
ennGrabAtk = false;
ennBlock = false;
action = false;
spearAtk = true;
ennInvincible = false;
bonusMode = false;
lifeScore = 0;
roundScore = 0;
bonusScore = 0;
crntScore = 0;
FPS = 0;
minFrameEyeCandy = 20;
frame = 0;
repDelay = random(maxDelay) + minDelay;
bounceFct = function (hit_mc, path) {
bW = path._width / 2;
bH = path._height / 2;
vy = vy + gravity;
vx = vx * friction;
vy = vy * friction;
hit_mc._x = hit_mc._x + vx;
hit_mc._y = hit_mc._y + vy;
if ((hit_mc._x + bW) > sceneWidth) {
hit_mc._x = sceneWidth - bW;
vx = vx * bounce;
} else if ((hit_mc._x - bW) < left) {
hit_mc._x = left + bW;
vx = vx * bounce;
}
if ((hit_mc._y + bH) > groundLvl) {
setMiddle = -(hit_mc._width / 2);
if (hit_mc._xscale < 0) {
setMiddle = hit_mc._width / 2;
}
groundHit._x = hit_mc._x + setMiddle;
groundHit._y = groundLvl - 175;
groundHit.gotoAndPlay(2);
if (FPS >= minFrameEyeCandy) {
ShakeCamera(5);
}
callSnd("hit1");
path.gotoAndPlay(2);
hit_mc._y = groundLvl - bH;
vy = vy * bounce;
} else if ((hit_mc._y - bH) < top) {
}
};
callSnd = function (snd) {
sfx.gotoAndPlay(snd);
};
throwEndGame = function (winner) {
PAUSE = true;
ennemyNbr++;
delete this.onEnterFrame;
_quality = "HIGH";
win.gotoAndPlay("in");
};
checkEndRound = function () {
startNextRound = false;
roundNum++;
PAUSE = true;
roundPanel.gotoAndPlay("in");
init._visible = false;
};
StartBonus = function () {
PAUSE = false;
enn.gotoAndStop("shuriken");
enn._x = 500;
enn._y = 219;
char._x = 82;
char._y = 272;
bonusMode = true;
};
checkCharPauseGame = function () {
charHitDelay--;
if (charHitDelay > 0) {
PAUSE = true;
} else if (charHitDelay >= -10) {
char.char.play();
enn.enn.play();
PAUSE = false;
}
};
checkEnnPauseGame = function () {
ennHitDelay--;
if (ennHitDelay > 0) {
PAUSE = true;
} else if (ennHitDelay >= -30) {
char.char.play();
enn.enn.play();
PAUSE = false;
}
};
ShakeCamera = function (n) {
shakeur_mc = this.createEmptyMovieClip("shakeur_mc", this.getNextHighestDepth());
shakeur_mc.n = n;
shakeur_mc.dim = n / 25;
shakeur_mc.onEnterFrame = function () {
this.n = this.n - this.dim;
bkg._x = (random(this.n) - (this.n / 2)) - 40;
bkg._y = (random(this.n) - (this.n / 2)) - 40;
if (this.n <= 0) {
bkg._x = -40;
bkg._y = -40;
delete this.onEnterFrame;
}
};
};
checkColl = function () {
if (enn.state != "block") {
if (char.char.weapon.hitTest(enn.enn.hitzone)) {
hitInRow++;
if (hitInRow == 2) {
hitInRow = 0;
action = true;
}
callSnd("hit2");
crntFrame = hud.enn.enn._currentframe;
if (crntFrame >= 100) {
hk.leftHarm.gotoAndPlay(2);
cVictory++;
lifeScore = hud.char.char._totalframes - hud.char.char._currentframe;
roundScore = (250 + (lifeScore * 2)) + crntScore;
totalScore = totalScore + roundScore;
crntScore = 0;
hud.char.txt_score.text = totalScore;
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
if (cVictory >= 2) {
hud.char.charWin.dot2.gotoAndPlay("anim");
throwEndGame(true);
startNextRound = false;
} else {
hud.char.charWin.dot1.gotoAndPlay("anim");
startNextRound = true;
}
PAUSE = true;
charHitDelay = -100;
ennHitDelay = -100;
enn.gotoAndStop("fall_lift");
} else {
crntScore = crntScore + Number(char.damage);
hud.char.txt_score.text = totalScore + crntScore;
if ((crntFrame + char.damage) > 100) {
hud.enn.enn.gotoAndStop(100);
} else {
hud.enn.enn.gotoAndStop(crntFrame + char.damage);
}
charHitDelay = 10;
if (liftAtk) {
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
liftAtk = false;
enn.gotoAndStop("fall_lift");
} else {
enn.gotoAndStop("hurt");
}
hitEnn._x = enn._x;
hitEnn.gotoAndPlay(2);
}
}
}
};
checkEnnColl = function () {
if ((char.state != "block") && (!PAUSE)) {
if (enn.enn.weapon.hitTest(char.char.hitzone)) {
callSnd("hit1");
crntFrame = hud.char.char._currentframe;
if (crntFrame >= 100) {
hk.rightHarm.gotoAndPlay(2);
roundScore = roundScore + crntScore;
totalScore = totalScore + roundScore;
eVictory++;
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
if (eVictory == 1) {
hud.enn.ennWin.dot1.gotoAndPlay("anim");
} else {
hud.enn.ennWin.dot2.gotoAndPlay("anim");
}
PAUSE = true;
charHitDelay = -100;
ennHitDelay = -100;
char.gotoAndStop("fall_lift");
startNextRound = true;
} else {
hud.char.char.gotoAndStop(crntFrame + enn.damage);
ennHitDelay = 5;
uppercutTimer = 0;
comboMove = false;
vx = ennSpeed;
vy = ennSpeed;
if (ennLiftAtk) {
if (FPS >= minFrameEyeCandy) {
ShakeCamera(40);
}
ennLiftAtk = false;
char.gotoAndStop("fall_lift");
} else if (ennGrabAtk) {
char._visible = false;
char.gotoAndStop("hurt_throw");
enn.gotoAndStop("throw");
} else {
char.gotoAndStop("hurt");
}
hitChar._x = char._x;
hitChar.gotoAndPlay(2);
}
}
}
};
runCombo = function () {
if (KEYFOWARD) {
if (!fowDown) {
addComboKey("foward");
}
fowDown = true;
} else {
fowDown = false;
}
if (KEYBACKWARD) {
if (!backDown) {
addComboKey("backward");
}
backDown = true;
} else {
backDown = false;
}
if (KEYDOWN) {
if (!downDown) {
addComboKey("down");
}
downDown = true;
} else {
downDown = false;
}
if (KEYUP) {
if (!upDown) {
addComboKey("up");
}
upDown = true;
} else {
upDown = false;
}
if (KEYSPACE) {
if (!hitDown) {
addComboKey("hit");
}
hitDown = true;
} else {
hitDown = false;
}
if (KEYKICK) {
if (!hitDown) {
addComboKey("kick");
}
hitDown = true;
} else {
hitDown = false;
}
checkCombo();
};
checkCombo = function () {
combo = "";
combo = combo + (comboArray[0] + ",");
combo = combo + (comboArray[1] + ",");
combo = combo + comboArray[2];
if (lastCombo == combo) {
if (comboTimer == 15) {
for (var _local1 in comboArray) {
comboArray[_local1] = "";
}
comboTimer = 0;
}
comboTimer++;
} else {
if (comboAvaible) {
switch (combo) {
case "foward,foward,kick" :
char.gotoAndStop("spear");
break;
case "foward,foward,hit" :
char.gotoAndStop("high_attack");
}
}
lastCombo = combo;
}
if (comboMove) {
crntSpeed = charSpeed * 4;
}
};
addComboKey = function (key) {
comboArray[0] = comboArray[1];
comboArray[1] = comboArray[2];
comboArray[2] = key;
};
runEnnAI = function () {
if ((!PAUSE) && (!bonusMode)) {
if ((enn.state != "attack") && (enn.state != "hurt")) {
if (enn._x <= (char._x - 25)) {
ennSpeed = 8;
sideDrop = -140;
enn._xscale = -initEnnXScale;
} else if (enn._x > (char._x + 25)) {
ennSpeed = -8;
sideDrop = 140;
enn._xscale = initEnnXScale;
}
}
repDelay--;
if (repDelay == 0) {
action = true;
walkBack = false;
repDelay = random(maxDelay) + minDelay;
randMove = random(100);
}
if (action) {
if ((char.state == "attack") && (enn.state != "jump")) {
if (randMove <= 50) {
enn.gotoAndStop("jump");
} else {
enn.gotoAndStop("block");
}
ennBlock = true;
} else {
ennBlock = false;
}
if (!ennBlock) {
if ((((enn.state != "jump") && (enn.state != "walk")) && (enn.state != "still")) && (enn.state != "attack")) {
if ((enn._x >= ((char._x + playerGap) + aiAction1Gap)) || (enn._x <= ((char._x - playerGap) + aiAction1Gap))) {
if (randMove <= 30) {
enn.gotoAndStop("spear");
} else if (randMove <= 70) {
enn.gotoAndStop("walk");
} else {
walkBack = true;
enn.gotoAndStop("back");
}
} else if ((enn._x >= ((char._x + playerGap) + aiAction2Gap)) || (enn._x <= ((char._x - playerGap) + aiAction2Gap))) {
if (randMove <= 25) {
enn.gotoAndStop("spear");
} else if (randMove <= 70) {
enn.gotoAndStop("punch");
} else {
enn.gotoAndStop("high_attack");
}
} else if (enn.state != "hurt") {
if (randMove <= 40) {
enn.gotoAndStop("high_attack");
} else if (randMove <= 50) {
enn.gotoAndStop("hurl");
} else if (randMove <= 80) {
enn.gotoAndStop("jump");
} else {
walkBack = true;
enn.gotoAndStop("back");
}
}
}
}
action = false;
}
if (enn.state == "jump") {
if (jmpEnnAtkAvaible) {
if ((enn._x <= ((char._x + playerGap) - aiAction3Gap)) || (enn._x >= ((char._x - playerGap) + aiAction3Gap))) {
enn.gotoAndStop("jump_attack");
}
}
}
if ((ennInitAnim || (enn.state == "attack")) || (enn.state == "hurt")) {
if (!spearAtk) {
crntEnnSpeed = 0;
} else {
crntEnnSpeed = ennSpeed * 3;
}
}
if ((enn.state == "walk") || (enn.state == "jump")) {
if (walkBack) {
crntEnnSpeed = -ennSpeed;
} else {
crntEnnSpeed = ennSpeed;
}
}
if ((enn._x - 1) <= 100) {
enn._x = 100;
}
if ((enn._x - charGap) <= char._x) {
crntEnnSpeed = crntEnnSpeed / 2;
enn._x = char._x + charGap;
}
if (((enn._x + charGap) + 1) >= sceneWidth) {
enn._x = sceneWidth - charGap;
}
enn._x = enn._x + crntEnnSpeed;
}
};
this.onEnterFrame = function () {
KEYUP = Key.isDown(38);
KEYDOWN = Key.isDown(40);
if (!comboMove) {
if (char.state != "hurt") {
charSpeed = 8;
tweenGap = -150;
switchSide = true;
char._xscale = initCharXScale;
KEYBACKWARD = Key.isDown(37);
KEYFOWARD = Key.isDown(39);
}
}
KEYSPACE = Key.isDown(83);
KEYKICK = Key.isDown(65);
if (!PAUSE) {
if ((((char.state != "still") && (char.state != "crounch")) && (char.state != "hurt")) && (char.state != "attack")) {
if (KEYFOWARD) {
if ((!KEYBACKWARD) && (!KEYSPACE)) {
if (char.state != "block") {
crntSpeed = charSpeed;
}
if (((!KEYUP) && (char.state == "idle")) || (char.state == "walk")) {
char.gotoAndStop("walk");
}
}
}
if (KEYBACKWARD) {
if ((!KEYFOWARD) && (!KEYSPACE)) {
crntSpeed = (-charSpeed) / 2;
if ((((!KEYUP) && (char.state == "idle")) || (char.state == "block")) || (char.state == "walk")) {
char.gotoAndStop("back");
} else if (char.state == "jump") {
charSpeed = -charSpeed;
}
}
}
if (KEYDOWN) {
if (((char.state == "idle") && (!KEYBACKWARD)) && (!KEYFOWARD)) {
crntSpeed = 0;
char.gotoAndStop("down");
}
}
if (KEYUP) {
if (KEYBACKWARD || (KEYFOWARD)) {
crntSpeed = charSpeed * 2;
} else {
crntSpeed = 0;
}
if (((char.state != "jump") && (char.state != "attack")) && (!KEYSPACE)) {
char.gotoAndStop("jump");
}
}
if (KEYSPACE) {
uppercutTimer++;
if (!spacePress) {
spacePress = true;
if (char.state != "jump") {
if ((char.state != "attack") && (!KEYBACKWARD)) {
char.gotoAndStop("punch");
crntSpeed = 0;
}
} else if (jmpAtkAvaible) {
char.gotoAndStop("jump_attack");
}
}
} else if (KEYKICK) {
if (!kickPress) {
kickPress = true;
if (char.state != "jump") {
if ((char.state != "attack") && (!KEYBACKWARD)) {
char.gotoAndStop("kick");
crntSpeed = 0;
}
} else if (jmpAtkAvaible) {
char.gotoAndStop("jump_attack");
}
}
}
if (!KEYKICK) {
kickPress = false;
}
if (!KEYSPACE) {
if (uppercutTimer >= 20) {
atkUppercut = true;
char.gotoAndStop("high_attack");
}
uppercutTimer = 0;
spacePress = false;
}
} else if (char.state == "crounch") {
if (KEYSPACE) {
if (!kickPress) {
kickPress = true;
char.gotoAndStop("low_attack");
}
}
if (!KEYSPACE) {
kickPress = false;
}
if (KEYKICK) {
if (!spacePress) {
spacePress = true;
char.gotoAndStop("low_attack");
}
}
if (!KEYKICK) {
spacePress = false;
}
if (!KEYDOWN) {
char.gotoAndStop("get_up");
}
crntSpeed = 0;
}
if ((((((!KEYUP) && (!KEYFOWARD)) && (!KEYBACKWARD)) && (!KEYDOWN)) && (!KEYSPACE)) && (!KEYKICK)) {
if ((((char.state != "attack") && (char.state != "still")) && (char.state != "jump")) && (char.state != "hurt")) {
if (!atkUppercut) {
char.gotoAndStop("idle");
}
atkUppercut = false;
}
crntSpeed = 0;
}
if ((char._x - charGap) <= 0) {
char._x = charGap;
}
if ((char._x + 1) >= sceneWidth) {
char._x = sceneWidth;
}
if (((char._x + charGap) + 30) >= enn._x) {
crntSpeed = crntSpeed / 2;
if (crntSpeed != 0) {
enn._x = enn._x + crntSpeed;
}
char._x = (enn._x - charGap) - 30;
}
if ((initAnim || (char.state == "attack")) || (char.state == "hurt")) {
crntSpeed = 0;
}
runEnnAI();
runCombo();
checkColl();
checkEnnColl();
if (!charEasing) {
char._x = char._x + crntSpeed;
}
}
if (charEasing) {
charEasingDelay--;
if (charEasingDelay >= 0) {
bounceFct(char, char.char);
} else {
charEasingDelay = 30;
if (!startNextRound) {
charEasing = false;
char.gotoAndStop("recover");
char._y = groundLvl - 175;
} else if (eVictory < 2) {
mg6.checkEndRound();
} else {
throwEndGame(false);
}
charEasing = false;
}
}
checkCharPauseGame();
checkEnnPauseGame();
};
PAUSE = true;
init.scorePanel._visible = false;
stop();