Frame 1
function init() {
this.attachMovie("character_steel", "player_1", _root.getNextHighestDepth(), {_visible:false, _x:100, _y:200});
this.attachMovie("character_dummy", "player_2", _root.getNextHighestDepth(), {_visible:false, _x:500, _y:200});
_root.player_1._visible = true;
_root.player_2._xscale = -105;
_root.player_2._yscale = 105;
_root.player_2._y = _root.player_2._y - 10;
_root.player_2._visible = true;
}
function player2() {
if (this.player_2_action == "") {
if ((_root.player_2._x > 300) && (_root.player_2._x > (_root.player_1._x + 100))) {
_root.player_2.gotoAndStop(2);
_root.player_2._x = _root.player_2._x - 4;
} else {
_root.player_2.gotoAndStop(1);
}
} else if (this.player_2_action == "stepback") {
_root.player_2.gotoAndStop(3);
} else if (this.player_2_action == "drop") {
_root.player_2.gotoAndStop(4);
_root.player_2._x = _root.player_2._x + 10;
}
}
this.player_1_action = "";
this.player_1_action_counter = 0;
this.player_1_action_counter_temp = "";
this.player_1_noaction_coutner = 0;
this.player_2_talk = false;
this.player_2_action = "";
this.onEnterFrame = function () {
if (this.player_1_action == "") {
if (Key.isDown(39)) {
this.player_1_action_counter_temp = "walk";
if (_root.player_1._xscale != 100) {
_root.player_1._xscale = 100;
}
if ((_root.player_1._x < (_root.player_2._x - 100)) && (_root.player_1._x < 400)) {
_root.player_1.gotoAndStop(2);
_root.player_1._x = _root.player_1._x + 15;
} else {
_root.player_1.gotoAndStop(1);
}
} else if (Key.isDown(37)) {
this.player_1_action_counter_temp = "walk";
if (_root.player_1._xscale != -100) {
_root.player_1._xscale = -100;
}
if (_root.player_1._x > 70) {
_root.player_1.gotoAndStop(2);
_root.player_1._x = _root.player_1._x - 15;
} else {
_root.player_1.gotoAndStop(1);
}
} else if (Key.isDown(40)) {
this.player_1_action_counter_temp = "kneel";
_root.player_1.gotoAndStop(5);
} else if (Key.isDown(17)) {
this.player_1_action = "punch";
if (((this.player_1_action_counter >= 3) || (this.player_1_noaction_counter >= 2)) || (this.player_1_action_counter_temp != "punch")) {
this.player_1_action_counter = 0;
this.player_1_action_counter_temp = "punch";
}
this.player_1_action_counter++;
} else {
this.player_1_noaction_counter++;
_root.player_1.gotoAndStop(1);
}
} else if (this.player_1_action == "del") {
this.player_1_noaction_counter = 0;
_root.player_1.gotoAndStop(1);
}
if (this.player_1_action != "") {
switch (this.player_1_action) {
case "punch" :
if (this.player_1_action_counter < 3) {
_root.player_1.gotoAndStop(3);
if ((((_root.player_1._x + 60) < _root.player_2._x) && (_root.player_2._x < (_root.player_1._x + 110))) && (_root.player_1._xscale == 100)) {
this.player_2_action = "stepback";
this.attachMovie("character_hit", "pl_hit", _root.getNextHighestDepth(), {_x:_root.player_2._x + 5, _y:_root.player_2._y - 45});
}
} else if (this.player_1_action_counter == 3) {
_root.player_1.gotoAndStop(4);
if ((((_root.player_1._x + 60) < _root.player_2._x) && (_root.player_2._x < (_root.player_1._x + 110))) && (_root.player_1._xscale == 100)) {
this.player_2_action = "drop";
this.attachMovie("character_hit", "pl_hit", _root.getNextHighestDepth(), {_x:_root.player_2._x + 5, _y:_root.player_2._y - 30});
}
}
break;
default :
this.player_1_punch = "del";
}
}
player2();
};
init();
Symbol 4 MovieClip Frame 3
_root.player_1_action = "";
Symbol 19 MovieClip Frame 4
_root.player_1_action = "del";
Symbol 28 MovieClip Frame 9
_root.player_1_action = "del";
Symbol 42 MovieClip Frame 13
_root.character._x = _root.character._x + (_root.player_direction * 80);
_root.player_action = false;
Symbol 50 MovieClip [character_steel] Frame 1
this.gotoAndStop(1);
Symbol 64 MovieClip Frame 2
this._x = this._x - 10;
_root.player_2_action = "";
Symbol 71 MovieClip Frame 12
_root.player_2_action = "";
_root.player_2._x = 610;
Symbol 72 MovieClip [character_dummy] Frame 1
this.gotoAndStop(1);
Symbol 78 MovieClip [character_hitme] Frame 45
_root.player_2_talk = false;
this.removeMovieClip();
Symbol 81 MovieClip [character_hit] Frame 2
this.removeMovieClip();