Combined Code
movieClip 4 user {
}
frame 1 {
fscommand('fullscreen', 'true');
fscommand('showmenu', 'false');
}
frame 1 {
ifFrameLoaded (41) {
gotoAndPlay(10);
}
}
button 6 {
on (keyPress 'q') {
toggleHighQuality();
}
}
movieClip 14 {
frame 75 {
stop();
}
}
movieClip 16 {
}
instance cpu of movieClip 16 {
onClipEvent (enterFrame) {
cpu.getBytesLoaded();
}
onClipEvent (enterFrame) {
_root.much = _root.getBytesLoaded();
}
onClipEvent (enterFrame) {
trace(_root.getBytesLoaded());
}
onClipEvent (enterFrame) {
_root.numb == _root.getBytesLoaded();
}
onClipEvent (enterFrame) {
if (_root.much > 100000) {
_root.bytesclip._x = 334.8;
} else {
if (_root6.much < 100000) {
_root.bytesclip._x = 344.8;
} else {
if (_root.much > 1000000) {
_root.bytesclip._x = 325.3;
}
}
}
}
onClipEvent (enterFrame) {
}
}
movieClip 22 {
}
frame 9 {
gotoAndPlay(1);
}
instance cpu of movieClip 16 {
onClipEvent (enterFrame) {
cpu.getBytesLoaded();
}
onClipEvent (enterFrame) {
_root.much = _root.getBytesLoaded();
}
onClipEvent (enterFrame) {
trace(_root.getBytesLoaded());
}
onClipEvent (enterFrame) {
_root.numb == _root.getBytesLoaded();
}
onClipEvent (enterFrame) {
if (_root.much > 100000) {
_root.bytesclip._x = 334.8;
} else {
if (_root.much > 1000000) {
}
}
}
}
frame 10 {
stop();
}
frame 10 {
p = 0;
while (p < 5) {
++p;
}
mySound = new Sound();
mySound.attachSound('song1');
mySound.start(0, 99999);
}
button 27 {
on (press) {
stopAllSounds();
gotoAndPlay(15);
}
}
movieClip 50 {
}
movieClip 54 {
frame 30 {
stop();
}
}
instance of movieClip 14 {
onClipEvent (enterFrame) {
++p;
}
}
movieClip 56 {
frame 43 {
gotoAndPlay(31);
}
}
frame 15 {
chosenUser = '';
}
frame 15 {
stop();
}
frame 15 {
function gotoWin() {
gotoAndPlay(41);
}
function gotoLose() {
gotoAndPlay(36);
}
gettingHurt = false;
startWalk = true;
count = 0;
attacking = false;
cpublocking = false;
screenSize1 = 450;
screenSize2 = 50;
beAgressive = false;
moveCount = 0;
counterAttack = false;
userGettingHurt = false;
fireBallCounter = false;
_root.userhp = 100;
_root.cpuhp = 100;
userDefeated = false;
defeated = false;
clock = 90;
tickToc = 0;
_root.userDidWin = false;
_root.cpuDidWin = false;
superA = 0;
cpuSuper = 0;
cpuSuperCondition = false;
superAttacking = false;
gameoverCount = 0;
}
frame 15 {
e = 0;
while (e < 5) {
++e;
}
mySound = new Sound();
mySound.attachSound('song1');
mySound.start(0, 99999);
}
movieClip 59 {
}
movieClip 62 {
}
button 64 {
on (release) {
_root.chosenUser = 'golan';
stopAllSounds();
gotoAndStop(31);
}
}
button 66 {
on (release) {
_root.chosenUser = 'rip';
stopAllSounds();
gotoAndStop(25);
}
}
movieClip 68 {
}
movieClip 70 {
}
movieClip 72 {
}
button 74 {
on (release) {
_root.chosenUser = 'crimson';
stopAllSounds();
gotoAndStop(20);
}
}
movieClip 76 {
}
movieClip 78 {
}
movieClip 80 {
}
movieClip 82 {
}
movieClip 91 {
}
frame 20 {
stop();
}
frame 20 {
function gotoWin() {
gotoAndPlay(41);
}
function gotoLose() {
gotoAndPlay(36);
}
gettingHurt = false;
startWalk = true;
count = 0;
attacking = false;
cpublocking = false;
screenSize1 = 450;
screenSize2 = 50;
beAgressive = false;
moveCount = 0;
counterAttack = false;
userGettingHurt = false;
fireBallCounter = false;
_root.userhp = 100;
_root.cpuhp = 100;
userDefeated = false;
defeated = false;
clock = 90;
tickToc = 0;
_root.userDidWin = false;
_root.cpuDidWin = false;
superA = 0;
cpuSuper = 0;
cpuSuperCondition = false;
superAttacking = false;
gameoverCount = 0;
}
frame 20 {
y = 0;
while (y < 5) {
++y;
}
mySound = new Sound();
mySound.attachSound('song2');
mySound.start(0, 99999);
}
movieClip 103 {
}
button 118 {
on (keyPress 'x') {
gotoAndPlay(35);
}
}
movieClip 137 {
}
movieClip 258 {
frame 1 {
_root.gettingHurt = true;
_root.startWalk = true;
_root.attacking = false;
_root.cpublocking = false;
_root.counterAttack = false;
_root.fireballCounter = false;
_root.defeated = false;
_root.cpuWin = false;
_root.cpuSuperCondition = false;
}
frame 2 {
_root.gettingHurt = true;
_root.cpublocking = false;
_root.attacking = false;
}
frame 8 {
_root.startWalk = false;
}
frame 9 {
gotoAndPlay(1);
}
frame 10 {
_root.cpublocking = false;
_root.gettingHurt = true;
_root.attacking = false;
}
frame 21 {
gotoAndPlay(1);
}
frame 22 {
_root.attacking = true;
_root.cpublocking = false;
_root.gettingHurt = true;
_root.counterAttack = true;
}
frame 27 {
gotoAndPlay(1);
}
frame 28 {
_root.attacking = true;
_root.cpublocking = false;
_root.gettingHurt = true;
}
frame 34 {
gotoAndPlay(1);
}
frame 37 {
_root.gettingHurt = true;
}
frame 37 {
_root.attacking = true;
cpublocking = false;
}
frame 39 {
_root.gettingHurt = false;
}
frame 39 {
gotoAndPlay(1);
}
frame 40 {
_root.attacking = true;
_root.cpublocking = false;
_root.gettingHurt = true;
}
frame 54 {
gotoAndPlay(1);
}
frame 55 {
_root.attacking = true;
_root.cpublocking = false;
_root.gettingHurt = true;
_root.counterAttack = true;
}
frame 90 {
gotoAndPlay(1);
}
frame 91 {
_root.attacking = true;
_root.cpublocking = false;
_root.gettingHurt = true;
if (_root.chosenUser == 'golan') {
_root.fireballCounter = true;
}
}
frame 124 {
gotoAndPlay(1);
}
frame 125 {
_root.attacking = true;
_root.cpublocking = false;
}
frame 126 {
_root.gettingHurt = false;
}
frame 128 {
gotoAndPlay(1);
}
frame 130 {
_root.cpublocking = true;
}
frame 137 {
gotoAndPlay(1);
}
frame 138 {
_root.defeated = true;
_root.gettingHurt = true;
_root.startWalk = false;
_root.attacking = false;
_root.cpublocking = false;
_root.counterAttack = false;
_root.fireballCounter = false;
}
frame 143 {
_root.defeated = true;
}
frame 143 {
stop();
}
frame 144 {
_root.cpuWin = true;
}
frame 154 {
stop();
}
frame 155 {
_root.cpuSuperCondition = true;
_root.attacking = true;
_root.cpublocking = false;
_root.gettingHurt = true;
_root.fireballCounter = true;
}
frame 155 {
_root.cpuSuper -= 100;
}
frame 200 {
gotoAndPlay(1);
}
}
instance cpu of movieClip 258 {
onClipEvent (enterFrame) {
if (this._x <= _root.user._x + 70) {
this._x = _root.user._x + 70;
}
}
onClipEvent (enterFrame) {
if (_root.cpu.hitTest(_root.user) && _root.count >= 0 && _root.count <= 10 && _root.attacking == false && _root.fireball == false && _root.userDefeated == false && _root.defeated == false) {
_root.cpu.gotoAndPlay('punch');
}
}
onClipEvent (enterFrame) {
if (_root.fireball == true && _root.countX >= 40 && _root.countX <= 50 && _root.attacking == false && _root.userDefeated == false) {
_root.cpu.gotoAndPlay('blocking');
}
}
onClipEvent (enterFrame) {
if (_root.userAttacking == true && _root.countX >= 10 && _root.countX <= 20 && _root.userDefeated == false) {
this.gotoAndPlay('blocking');
}
}
onClipEvent (enterFrame) {
if (_root.fireball == false && this._x > _root.user._x && _root.startWalk == true && _root.beAgressive == true && _root.userDefeated == false) {
this._x -= 20;
} else {
this._x = this._x;
}
}
onClipEvent (enterFrame) {
if (_root.walking == true && _root.fireball == false && this._x < _root.screenSize1 && _root.startWalk == true && _root.beAgressive == false && _root.userDefeated == false) {
this._x += 20;
} else {
if (_root.beAgressive == true && _root.fireball == false && _root.userDefeated == false) {
this._x -= 20;
}
}
}
onClipEvent (enterFrame) {
for (;;) {
if (!(_root.moveCount > 0 && _root.moveCount < 5 && _root.user.hit.hitTest(_root.cpu) && _root.userDefeated == false)) break;
this._x += 10;
}
}
onClipEvent (enterFrame) {
if (_root.user._x <= this._x - 100 && _root.userAttacking == false && _root.countO >= 1 && _root.countO <= 10 && _root.fireball == false && _root.userDefeated == false && _root.attacking == false && _root.defeated == false) {
this.gotoAndPlay('attack6');
} else {
if (_root.user._x <= this._x - 300 && _root.attacking == false && _root.countO >= 11 && _root.countO <= 20 && _root.userDefeated == false && _root.defeated == false) {
this.gotoAndPlay('fireball');
} else {
if (_root.user._x >= this._x - 100 && _root.attacking == false && _root.countO >= 35 && _root.countO <= 40 && _root.userDefeated == false && _root.defeated == false && _root.defeated == false) {
this.gotoAndPlay('kick');
} else {
if (_root.user._x <= this._x - 50 && _root.attacking == false && _root.countO >= 75 && _root.countO <= 100 && _root.userDefeated == false && _root.defeated == false && _root.defeated == false && _root.cpuSuper >= 100 && _root.cpuSuperCondition == false) {
this.gotoAndPlay('super');
}
}
}
}
}
onClipEvent (enterFrame) {
if (_root.countB >= 10 && _root.countB <= 20 && _root.countC >= 10 && _root.countC <= 30 && _root.counterAttack == false && _root.gettingHurt == false && _root.userDefeated == false && _root.defeated == false) {
this.gotoAndPlay('punch');
}
}
onClipEvent (enterFrame) {
if (_root.beAgressive == true && _root.mat4 <= 20 && _root.mat4 >= 10 && _root.fireBallCounter == false && _root.fireball == true && _root.attacking == false && _root.userDefeated == false && _root.defeated == false) {
this.gotoAndPlay('attack6');
}
}
}
movieClip 260 {
}
instance cpuLifeBar of movieClip 260 {
onClipEvent (enterFrame) {
this._width = _root.cpuhp;
}
}
instance userLifeBar of movieClip 260 {
onClipEvent (enterFrame) {
this._width = _root.userhp;
}
}
button 262 {
on (keyPress 'z') {
gotoAndPlay(59);
}
on (keyPress 'x') {
gotoAndPlay(29);
}
on (keyPress 's') {
if (Key.isDown(39) && Key.isDown(40)) {
gotoAndPlay(12);
}
}
on (keyPress '<Right>') {
gotoAndPlay(2);
}
on (keyPress '<Left>') {
gotoAndPlay(2);
}
on (keyPress '<Up>') {
gotoAndPlay(41);
}
on (keyPress '<Space>') {
gotoAndPlay(82);
}
on (keyPress 'w') {
if (Key.isDown(40) && _root.superA >= 100) {
gotoAndPlay(67);
}
}
}
movieClip 279 {
}
button 322 {
on (release, keyPress '<Space>') {
gotoAndStop(1);
}
}
movieClip 343 {
frame 1 {
_root.blocking = false;
_root.walking = false;
_root.userAttacking = false;
_root.fireball = false;
_root.userGettingHurt = false;
_root.userDefeated = false;
_root.userWins = false;
_root.superAttacking = false;
}
frame 1 {
stop();
}
frame 2 {
_root.walking = true;
}
frame 11 {
gotoAndPlay(1);
}
frame 12 {
_root.userAttacking = true;
_root.fireball == true;
}
frame 24 {
gotoAndStop(1);
}
frame 29 {
_root.userAttacking = true;
}
frame 39 {
gotoAndStop(1);
}
frame 53 {
gotoAndStop(1);
}
frame 58 {
gotoAndStop(1);
}
frame 59 {
_root.userAttacking = true;
}
frame 65 {
gotoAndStop(1);
}
frame 67 {
_root.userAttacking = true;
_root.superAttacking = true;
}
frame 67 {
_root.superA -= 100;
}
frame 81 {
gotoAndStop(1);
}
frame 82 {
stop();
}
frame 82 {
_root.blocking = true;
}
frame 86 {
_root.userGettingHurt = true;
}
frame 90 {
gotoAndPlay(1);
}
frame 91 {
_root.userDefeated = true;
_root.walking = false;
}
frame 95 {
stop();
}
frame 96 {
_root.userWins = true;
_root.blocking = false;
_root.walking = false;
_root.userAttacking = false;
_root.fireball = false;
_root.userGettingHurt = false;
_root.userDefeated = false;
}
frame 105 {
stop();
}
}
instance user of movieClip 343 {
onClipEvent (enterFrame) {
if (Key.isDown(39) && _root.walking == true) {
this._x += 20;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(37) && _root.walking == true) {
this._x -= 20;
}
}
onClipEvent (enterFrame) {
if (_root.user.hit.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == false) {
_root.cpu.gotoAndPlay('damage');
_root.cpuhp -= 5;
_root.cpu._x += 20;
_root.cpuSuper += 3;
} else {
if (_root.user.hit.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == true) {
_root.cpuhp -= 0.5;
_root.cpu._x += 20;
_root.cpuSuper += 1;
} else {
if (_root.user.hit.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == true && _root.superAttacking == true) {
_root.cpu.gotoAndPlay('damage');
_root.cpuhp -= 10;
_root.cpu._x += 20;
_root.cpuSuper += 10;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.user.fire.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == false) {
_root.cpu.gotoAndPlay('damage');
_root.cpuhp -= 5;
_root.cpu._x += 20;
_root.cpuSuper += 10;
} else {
if (_root.user.fire.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == true) {
_root.cpuhp -= 0.5;
_root.cpu._x += 20;
_root.cpuSuper += 1;
}
}
}
onClipEvent (enterFrame) {
++_root.count;
}
onClipEvent (enterFrame) {
if (_root.count >= 20) {
_root.count -= 20;
}
}
onClipEvent (enterFrame) {
trace(_root.tickToc);
}
onClipEvent (enterFrame) {
if (_root.fireball == true || _root.attacking == true) {
_root.mat = int(Math.random() * 50);
}
}
onClipEvent (enterFrame) {
++_root.countX;
}
onClipEvent (enterFrame) {
if (_root.countX >= 50) {
_root.countX -= _root.mat;
}
}
onClipEvent (enterFrame) {
++_root.countA;
}
onClipEvent (enterFrame) {
if (_root.countA >= 100) {
_root.countA -= _root.mat2;
}
}
onClipEvent (enterFrame) {
_root.mat2 = int(Math.random() * 100);
}
onClipEvent (enterFrame) {
if (_root.countA >= 75 && _root.countA <= 100 && _root.defeated == false) {
_root.beAgressive = true;
} else {
_root.beAgressive = false;
}
}
onClipEvent (enterFrame) {
if (_root.countR >= 50) {
_root.countR -= _root.mat3;
}
}
onClipEvent (enterFrame) {
++_root.countR;
}
onClipEvent (enterFrame) {
_root.mat3 = int(Math.random() * 50);
}
onClipEvent (enterFrame) {
if (_root.user.hit.hitTest(_root.cpu)) {
++_root.moveCount;
}
}
onClipEvent (enterFrame) {
if (_root.moveCount >= 5) {
_root.moveCount -= 5;
}
}
onClipEvent (enterFrame) {
if (_root.countD >= 4) {
_root.countD -= 4;
}
}
onClipEvent (enterFrame) {
++_root.countD;
}
onClipEvent (enterFrame) {
if (_root.countO >= 100) {
_root.countO -= _root.mat4;
}
}
onClipEvent (enterFrame) {
_root.mat4 = int(Math.random() * 100);
}
onClipEvent (enterFrame) {
++_root.countO;
}
onClipEvent (enterFrame) {
++_root.countC;
}
onClipEvent (enterFrame) {
if (_root.user.hit.hitTest(_root.cpu)) {
++_root.countB;
} else {
if (_root.countB >= 3) {
_root.countB -= _root.mat3;
}
}
}
onClipEvent (enterFrame) {
if (_root.countC >= 50) {
_root.countC -= 50;
}
}
onClipEvent (enterFrame) {
_root.countO = _root.mat4;
}
onClipEvent (enterFrame) {
if (_root.cpu.hit.hitTest(_root.user) && _root.userGettingHurt == false && _root.blocking == false && _root.defeated == false) {
_root.user.gotoAndPlay('damage');
_root.userhp -= 5;
_root.superA += 10;
_root.user._x -= 20;
} else {
if (_root.cpu.hit.hitTest(_root.user) && _root.userGettingHurt == false && _root.blocking == true && _root.defeated == false) {
_root.userhp -= 0.5;
_root.user._x -= 20;
_root.superA += 1;
}
}
}
onClipEvent (enterFrame) {
if (_root.cpuhp <= 0 && _root.defeated == false) {
_root.cpu.gotoAndPlay('defeated');
_root.user.gotoAndPlay('userWins');
_root.clock = 0;
}
}
onClipEvent (enterFrame) {
if (_root.userhp <= 0 && _root.userDefeated == false) {
_root.user.gotoAndPlay('defeated');
_root.cpu.gotoAndPlay('cpuWin');
_root.clock = 0;
}
}
onClipEvent (enterFrame) {
if (_root.user._x <= _root.screensize2) {
_root.user._x = _root.screensize2;
} else {
if (_root.user._x >= _root.screensize1) {
_root.user._x = _root.screensize1;
}
}
}
onClipEvent (enterFrame) {
if (_root.cpu._x <= _root.screensize2) {
_root.cpu._x = _root.screensize2;
} else {
if (_root.cpu._x >= _root.screensize1) {
_root.cpu._x = _root.screensize1;
}
}
}
onClipEvent (enterFrame) {
if (_root.tickToc >= 10) {
_root.tickToc -= 10;
}
}
onClipEvent (enterFrame) {
++_root.tickToc;
}
onClipEvent (enterFrame) {
_root.timer = _root.clock;
}
onClipEvent (enterFrame) {
if (_root.tickToc >= 10 && _root.clock > 0) {
--_root.clock;
}
}
onClipEvent (enterFrame) {
if (_root.userhp < _root.cpuhp && _root.clock <= 0 && _root.userDefeated == false) {
_root.userhp = 0;
_root.cpuDidWin = true;
} else {
if (_root.cpuhp < _root.userhp && _root.clock <= 0 && _root.defeated == false) {
_root.cpuhp = 0;
_root.userDidWin = true;
}
}
}
onClipEvent (enterFrame) {
if (_root.superA >= 100) {
_root.superA = 100;
}
}
onClipEvent (enterFrame) {
if (_root.cpuSuper >= 100) {
_root.cpuSuper = 100;
}
}
onClipEvent (enterFrame) {
if (_root.defeated == true) {
++_root.gameoverCount;
} else {
if (_root.userDefeated == true) {
++_root.gameoverCount;
}
}
}
onClipEvent (enterFrame) {
if (_root.gameoverCount > 30 && _root.defeated == true) {
_root.gotoWin();
} else {
if (_root.gameoverCount > 30 && _root.userDefeated == true) {
_root.gotoLose();
}
}
}
}
movieClip 345 {
}
instance superBar of movieClip 260 {
onClipEvent (enterFrame) {
this._width = _root.superA;
}
}
instance superBar of movieClip 260 {
onClipEvent (enterFrame) {
this._width = _root.cpuSuper;
}
}
movieClip 348 {
frame 1 {
_root.superText = true;
}
frame 15 {
gotoAndPlay(1);
}
}
instance of movieClip 348 {
onClipEvent (enterFrame) {
this._alpha = _root.cpuSuper;
}
}
instance of movieClip 348 {
onClipEvent (enterFrame) {
this._alpha = _root.superA;
}
}
movieClip 350 {
}
movieClip 356 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
}
instance winner of movieClip 356 {
onClipEvent (enterFrame) {
if (_root.cpuhp <= 0 && _root.defeated == true) {
this.gotoAndStop('userWon');
} else {
if (_root.userhp <= 0 && _root.userDefeated == true) {
this.gotoAndStop('cpuWon');
}
}
}
onClipEvent (enterFrame) {
if (_root.userDidWin == true) {
this.gotoAndStop('userWon');
} else {
if (_root.cpuDidWin == true) {
this.gotoAndStop('cpuWon');
}
}
}
}
frame 25 {
stop();
}
frame 25 {
function gotoWin() {
gotoAndPlay(41);
}
function gotoLose() {
gotoAndPlay(36);
}
gettingHurt = false;
startWalk = true;
count = 0;
attacking = false;
cpublocking = false;
screenSize1 = 450;
screenSize2 = 50;
beAgressive = false;
moveCount = 0;
counterAttack = false;
userGettingHurt = false;
fireBallCounter = false;
_root.userhp = 100;
_root.cpuhp = 100;
userDefeated = false;
defeated = false;
clock = 90;
tickToc = 0;
_root.userDidWin = false;
_root.cpuDidWin = false;
superA = 0;
cpuSuper = 0;
cpuSuperCondition = false;
superAttacking = false;
gameoverCount = 0;
}
frame 25 {
u = 0;
while (u < 5) {
++u;
}
mySound = new Sound();
mySound.attachSound('song2');
mySound.start(0, 99999);
}
button 360 {
on (keyPress '<Right>') {
gotoAndPlay(2);
}
on (keyPress '<Left>') {
gotoAndPlay(2);
}
on (keyPress 'x') {
gotoAndPlay(7);
}
on (keyPress 'z') {
gotoAndPlay(12);
}
on (keyPress 's') {
if (Key.isDown(40)) {
gotoAndPlay(46);
}
}
on (keyPress '<Up>') {
gotoAndPlay(29);
}
on (keyPress 'a') {
if (Key.isDown(39)) {
gotoAndPlay(21);
}
}
on (keyPress '<Space>') {
gotoAndStop(66);
}
on (keyPress 'q') {
if (Key.isDown(39) && _root.superA >= 100) {
gotoAndPlay(78);
_root.superStyle.gotoAndPlay(nextframe);
}
}
}
button 406 {
on (release, keyPress '<Space>') {
gotoAndStop(1);
}
}
movieClip 424 {
}
movieClip 443 {
frame 1 {
stop();
}
frame 1 {
_root.blocking = false;
_root.walking = false;
_root.userAttacking = false;
_root.fireball = false;
_root.userGettingHurt = false;
_root.userDefeated = false;
_root.userWins = false;
_root.superAttacking = false;
}
frame 2 {
_root.walking = true;
}
frame 6 {
gotoAndStop(1);
}
frame 7 {
_root.userAttacking = true;
}
frame 11 {
gotoAndStop(1);
}
frame 12 {
_root.userAttacking = true;
}
frame 20 {
gotoAndStop(1);
}
frame 21 {
_root.userAttacking = true;
}
frame 28 {
gotoAndStop(1);
}
frame 45 {
gotoAndStop(1);
}
frame 46 {
_root.userAttacking;
}
frame 65 {
gotoAndStop(1);
}
frame 66 {
_root.blocking = true;
}
frame 66 {
_root.blocking = true;
}
frame 72 {
gotoAndStop(1);
}
frame 73 {
_root.userGettingHurt = true;
}
frame 77 {
gotoAndPlay(1);
}
frame 78 {
_root.userAttacking = true;
_root.superAttacking = true;
}
frame 78 {
_root.superA -= 100;
}
frame 104 {
gotoAndPlay(1);
}
frame 105 {
_root.userDefeated = true;
_root.walking = false;
}
frame 108 {
stop();
}
frame 109 {
_root.userWins = true;
_root.blocking = false;
_root.walking = false;
_root.userAttacking = false;
_root.fireball = false;
_root.userGettingHurt = false;
_root.userDefeated = false;
}
frame 117 {
stop();
}
}
instance user of movieClip 443 {
onClipEvent (enterFrame) {
if (Key.isDown(39) && _root.walking == true) {
this._x += 20;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(37) && _root.walking == true) {
this._x -= 20;
}
}
onClipEvent (enterFrame) {
if (_root.user.hit.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == false) {
_root.cpu.gotoAndPlay('damage');
_root.cpuhp -= 5;
_root.cpu._x += 20;
_root.cpuSuper += 3;
} else {
if (_root.user.hit.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == true) {
_root.cpuhp -= 0.5;
_root.cpu._x += 20;
_root.cpuSuper += 1;
} else {
if (_root.user.hit.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == true && _root.superAttacking == true) {
_root.cpu.gotoAndPlay('damage');
_root.cpuhp -= 10;
_root.cpu._x += 20;
_root.cpuSuper += 10;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.user.fire.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == false) {
_root.cpu.gotoAndPlay('damage');
_root.cpuhp -= 5;
_root.cpu._x += 20;
_root.cpuSuper += 10;
} else {
if (_root.user.fire.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == true) {
_root.cpuhp -= 0.5;
_root.cpu._x += 20;
_root.cpuSuper += 1;
}
}
}
onClipEvent (enterFrame) {
++_root.count;
}
onClipEvent (enterFrame) {
if (_root.count >= 20) {
_root.count -= 20;
}
}
onClipEvent (enterFrame) {
trace(_root.tickToc);
}
onClipEvent (enterFrame) {
if (_root.fireball == true || _root.attacking == true) {
_root.mat = int(Math.random() * 50);
}
}
onClipEvent (enterFrame) {
++_root.countX;
}
onClipEvent (enterFrame) {
if (_root.countX >= 50) {
_root.countX -= _root.mat;
}
}
onClipEvent (enterFrame) {
++_root.countA;
}
onClipEvent (enterFrame) {
if (_root.countA >= 100) {
_root.countA -= _root.mat2;
}
}
onClipEvent (enterFrame) {
_root.mat2 = int(Math.random() * 100);
}
onClipEvent (enterFrame) {
if (_root.countA >= 75 && _root.countA <= 100 && _root.defeated == false) {
_root.beAgressive = true;
} else {
_root.beAgressive = false;
}
}
onClipEvent (enterFrame) {
if (_root.countR >= 50) {
_root.countR -= _root.mat3;
}
}
onClipEvent (enterFrame) {
++_root.countR;
}
onClipEvent (enterFrame) {
_root.mat3 = int(Math.random() * 50);
}
onClipEvent (enterFrame) {
if (_root.user.hit.hitTest(_root.cpu)) {
++_root.moveCount;
}
}
onClipEvent (enterFrame) {
if (_root.moveCount >= 5) {
_root.moveCount -= 5;
}
}
onClipEvent (enterFrame) {
if (_root.countD >= 4) {
_root.countD -= 4;
}
}
onClipEvent (enterFrame) {
++_root.countD;
}
onClipEvent (enterFrame) {
if (_root.countO >= 100) {
_root.countO -= _root.mat4;
}
}
onClipEvent (enterFrame) {
_root.mat4 = int(Math.random() * 100);
}
onClipEvent (enterFrame) {
++_root.countO;
}
onClipEvent (enterFrame) {
++_root.countC;
}
onClipEvent (enterFrame) {
if (_root.user.hit.hitTest(_root.cpu)) {
++_root.countB;
} else {
if (_root.countB >= 3) {
_root.countB -= _root.mat3;
}
}
}
onClipEvent (enterFrame) {
if (_root.countC >= 50) {
_root.countC -= 50;
}
}
onClipEvent (enterFrame) {
_root.countO = _root.mat4;
}
onClipEvent (enterFrame) {
if (_root.cpu.hit.hitTest(_root.user) && _root.userGettingHurt == false && _root.blocking == false && _root.defeated == false) {
_root.user.gotoAndPlay('damage');
_root.userhp -= 5;
_root.superA += 10;
_root.user._x -= 20;
} else {
if (_root.cpu.hit.hitTest(_root.user) && _root.userGettingHurt == false && _root.blocking == true && _root.defeated == false) {
_root.userhp -= 0.5;
_root.user._x -= 20;
_root.superA += 1;
}
}
}
onClipEvent (enterFrame) {
if (_root.cpuhp <= 0 && _root.defeated == false) {
_root.cpu.gotoAndPlay('defeated');
_root.user.gotoAndPlay('userWins');
_root.clock = 0;
}
}
onClipEvent (enterFrame) {
if (_root.userhp <= 0 && _root.userDefeated == false) {
_root.user.gotoAndPlay('defeated');
_root.cpu.gotoAndPlay('cpuWin');
_root.clock = 0;
}
}
onClipEvent (enterFrame) {
if (_root.user._x <= _root.screensize2) {
_root.user._x = _root.screensize2;
} else {
if (_root.user._x >= _root.screensize1) {
_root.user._x = _root.screensize1;
}
}
}
onClipEvent (enterFrame) {
if (_root.cpu._x <= _root.screensize2) {
_root.cpu._x = _root.screensize2;
} else {
if (_root.cpu._x >= _root.screensize1) {
_root.cpu._x = _root.screensize1;
}
}
}
onClipEvent (enterFrame) {
if (_root.tickToc >= 10) {
_root.tickToc -= 10;
}
}
onClipEvent (enterFrame) {
++_root.tickToc;
}
onClipEvent (enterFrame) {
_root.timer = _root.clock;
}
onClipEvent (enterFrame) {
if (_root.tickToc >= 10 && _root.clock > 0) {
--_root.clock;
}
}
onClipEvent (enterFrame) {
if (_root.userhp < _root.cpuhp && _root.clock <= 0 && _root.userDefeated == false) {
_root.userhp = 0;
_root.cpuDidWin = true;
} else {
if (_root.cpuhp < _root.userhp && _root.clock <= 0 && _root.defeated == false) {
_root.cpuhp = 0;
_root.userDidWin = true;
}
}
}
onClipEvent (enterFrame) {
if (_root.superA >= 100) {
_root.superA = 100;
}
}
onClipEvent (enterFrame) {
if (_root.cpuSuper >= 100) {
_root.cpuSuper = 100;
}
}
onClipEvent (enterFrame) {
if (_root.defeated == true) {
++_root.gameoverCount;
} else {
if (_root.userDefeated == true) {
++_root.gameoverCount;
}
}
}
onClipEvent (enterFrame) {
if (_root.gameoverCount > 30 && _root.defeated == true) {
_root.gotoWin();
} else {
if (_root.gameoverCount > 30 && _root.userDefeated == true) {
_root.gotoLose();
}
}
}
}
frame 31 {
stop();
}
frame 31 {
function gotoWin() {
gotoAndPlay(41);
}
function gotoLose() {
gotoAndPlay(36);
}
gettingHurt = false;
startWalk = true;
count = 0;
attacking = false;
cpublocking = false;
screenSize1 = 450;
screenSize2 = 50;
beAgressive = false;
moveCount = 0;
counterAttack = false;
userGettingHurt = false;
fireBallCounter = false;
_root.userhp = 100;
_root.cpuhp = 100;
userDefeated = false;
defeated = false;
clock = 90;
tickToc = 0;
_root.userDidWin = false;
_root.cpuDidWin = false;
superA = 0;
cpuSuper = 0;
cpuSuperCondition = false;
superAttacking = false;
gameoverCount = 0;
}
frame 31 {
n = 0;
while (n < 5) {
++n;
}
mySound = new Sound();
mySound.attachSound('song2');
mySound.start(0, 99999);
}
button 446 {
on (keyPress '<Right>') {
gotoAndPlay(2);
}
on (keyPress '<Left>') {
gotoAndPlay(2);
}
on (keyPress 'z') {
gotoAndPlay(12);
}
on (keyPress 'x') {
if (Key.isDown(Key.Down)) {
gotoAndPlay(63);
}
}
on (keyPress 'a') {
if (Key.isDown(40) && Key.isDown(37)) {
gotoAndPlay(76);
}
}
on (keyPress '<Space>') {
gotoAndPlay(104);
}
on (keyPress '<Up>') {
gotoAndPlay(8);
}
on (keyPress 'd') {
if (Key.isDown(40) && Key.isDown(37) && _root.superA >= 100 && _root.superAttacking == false) {
gotoAndPlay(20);
}
}
}
movieClip 461 {
}
button 507 {
on (keyPress '<Space>') {
gotoAndStop(1);
}
}
movieClip 521 {
frame 1 {
_root.blocking = false;
_root.walking = false;
_root.userAttacking = false;
_root.fireball = false;
_root.userGettingHurt = false;
_root.userDefeated = false;
_root.userWins = false;
_root.superAttacking = false;
}
frame 1 {
stop();
}
frame 2 {
_root.walking = true;
_root.blocking = false;
}
frame 7 {
gotoAndPlay(1);
}
frame 11 {
gotoAndPlay(1);
}
frame 12 {
_root.userAttacking = true;
}
frame 15 {
gotoAndPlay(1);
}
frame 20 {
_root.fireball = true;
_root.userAttacking = true;
_root.superAttacking = true;
}
frame 20 {
_root.superA -= 100;
}
frame 56 {
gotoAndPlay(1);
}
frame 63 {
_root.fireball = true;
}
frame 75 {
gotoAndPlay(1);
}
frame 76 {
_root.fireball = true;
}
frame 96 {
gotoAndPlay(1);
}
frame 97 {
_root.userGettingHurt = true;
}
frame 103 {
gotoAndPlay(1);
}
frame 104 {
_root.blocking = true;
}
frame 107 {
stop();
}
frame 108 {
_root.userDefeated = true;
_root.walking = false;
}
frame 112 {
stop();
}
frame 114 {
_root.userWins = true;
_root.blocking = false;
_root.walking = false;
_root.userAttacking = false;
_root.fireball = false;
_root.userGettingHurt = false;
_root.userDefeated = false;
}
frame 120 {
stop();
}
}
instance user of movieClip 521 {
onClipEvent (enterFrame) {
if (Key.isDown(39) && _root.walking == true) {
this._x += 20;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(37) && _root.walking == true) {
this._x -= 20;
}
}
onClipEvent (enterFrame) {
if (_root.user.hit.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == false) {
_root.cpu.gotoAndPlay('damage');
_root.cpuhp -= 5;
_root.cpu._x += 20;
_root.cpuSuper += 3;
} else {
if (_root.user.hit.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == true) {
_root.cpuhp -= 0.5;
_root.cpu._x += 20;
_root.cpuSuper += 1;
} else {
if (_root.user.hit.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == true && _root.superAttacking == true) {
_root.cpu.gotoAndPlay('damage');
_root.cpuhp -= 10;
_root.cpu._x += 20;
_root.cpuSuper += 10;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.user.fire.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == false) {
_root.cpu.gotoAndPlay('damage');
_root.cpuhp -= 5;
_root.cpu._x += 20;
_root.cpuSuper += 10;
} else {
if (_root.user.fire.hitTest(_root.cpu) && _root.gettingHurt == true && _root.counterAttack == false && _root.fireBallCounter == false && _root.defeated == false && _root.cpublocking == true) {
_root.cpuhp -= 0.5;
_root.cpu._x += 20;
_root.cpuSuper += 1;
}
}
}
onClipEvent (enterFrame) {
++_root.count;
}
onClipEvent (enterFrame) {
if (_root.count >= 20) {
_root.count -= 20;
}
}
onClipEvent (enterFrame) {
trace(_root.tickToc);
}
onClipEvent (enterFrame) {
if (_root.fireball == true || _root.attacking == true) {
_root.mat = int(Math.random() * 50);
}
}
onClipEvent (enterFrame) {
++_root.countX;
}
onClipEvent (enterFrame) {
if (_root.countX >= 50) {
_root.countX -= _root.mat;
}
}
onClipEvent (enterFrame) {
++_root.countA;
}
onClipEvent (enterFrame) {
if (_root.countA >= 100) {
_root.countA -= _root.mat2;
}
}
onClipEvent (enterFrame) {
_root.mat2 = int(Math.random() * 100);
}
onClipEvent (enterFrame) {
if (_root.countA >= 75 && _root.countA <= 100 && _root.defeated == false) {
_root.beAgressive = true;
} else {
_root.beAgressive = false;
}
}
onClipEvent (enterFrame) {
if (_root.countR >= 50) {
_root.countR -= _root.mat3;
}
}
onClipEvent (enterFrame) {
++_root.countR;
}
onClipEvent (enterFrame) {
_root.mat3 = int(Math.random() * 50);
}
onClipEvent (enterFrame) {
if (_root.user.hit.hitTest(_root.cpu)) {
++_root.moveCount;
}
}
onClipEvent (enterFrame) {
if (_root.moveCount >= 5) {
_root.moveCount -= 5;
}
}
onClipEvent (enterFrame) {
if (_root.countD >= 4) {
_root.countD -= 4;
}
}
onClipEvent (enterFrame) {
++_root.countD;
}
onClipEvent (enterFrame) {
if (_root.countO >= 100) {
_root.countO -= _root.mat4;
}
}
onClipEvent (enterFrame) {
_root.mat4 = int(Math.random() * 100);
}
onClipEvent (enterFrame) {
++_root.countO;
}
onClipEvent (enterFrame) {
++_root.countC;
}
onClipEvent (enterFrame) {
if (_root.user.hit.hitTest(_root.cpu)) {
++_root.countB;
} else {
if (_root.countB >= 3) {
_root.countB -= _root.mat3;
}
}
}
onClipEvent (enterFrame) {
if (_root.countC >= 50) {
_root.countC -= 50;
}
}
onClipEvent (enterFrame) {
_root.countO = _root.mat4;
}
onClipEvent (enterFrame) {
if (_root.cpu.hit.hitTest(_root.user) && _root.userGettingHurt == false && _root.blocking == false && _root.defeated == false) {
_root.user.gotoAndPlay('damage');
_root.userhp -= 5;
_root.superA += 10;
_root.user._x -= 20;
} else {
if (_root.cpu.hit.hitTest(_root.user) && _root.userGettingHurt == false && _root.blocking == true && _root.defeated == false) {
_root.userhp -= 0.5;
_root.user._x -= 20;
_root.superA += 1;
}
}
}
onClipEvent (enterFrame) {
if (_root.cpuhp <= 0 && _root.defeated == false) {
_root.cpu.gotoAndPlay('defeated');
_root.user.gotoAndPlay('userWins');
_root.clock = 0;
}
}
onClipEvent (enterFrame) {
if (_root.userhp <= 0 && _root.userDefeated == false) {
_root.user.gotoAndPlay('defeated');
_root.cpu.gotoAndPlay('cpuWin');
_root.clock = 0;
}
}
onClipEvent (enterFrame) {
if (_root.user._x <= _root.screensize2) {
_root.user._x = _root.screensize2;
} else {
if (_root.user._x >= _root.screensize1) {
_root.user._x = _root.screensize1;
}
}
}
onClipEvent (enterFrame) {
if (_root.cpu._x <= _root.screensize2) {
_root.cpu._x = _root.screensize2;
} else {
if (_root.cpu._x >= _root.screensize1) {
_root.cpu._x = _root.screensize1;
}
}
}
onClipEvent (enterFrame) {
if (_root.tickToc >= 10) {
_root.tickToc -= 10;
}
}
onClipEvent (enterFrame) {
++_root.tickToc;
}
onClipEvent (enterFrame) {
_root.timer = _root.clock;
}
onClipEvent (enterFrame) {
if (_root.tickToc >= 10 && _root.clock > 0) {
--_root.clock;
}
}
onClipEvent (enterFrame) {
if (_root.userhp < _root.cpuhp && _root.clock <= 0 && _root.userDefeated == false) {
_root.userhp = 0;
_root.cpuDidWin = true;
} else {
if (_root.cpuhp < _root.userhp && _root.clock <= 0 && _root.defeated == false) {
_root.cpuhp = 0;
_root.userDidWin = true;
}
}
}
onClipEvent (enterFrame) {
if (_root.superA >= 100) {
_root.superA = 100;
}
}
onClipEvent (enterFrame) {
if (_root.cpuSuper >= 100) {
_root.cpuSuper = 100;
}
}
onClipEvent (enterFrame) {
if (_root.defeated == true) {
++_root.gameoverCount;
} else {
if (_root.userDefeated == true) {
++_root.gameoverCount;
}
}
}
onClipEvent (enterFrame) {
if (_root.gameoverCount > 30 && _root.defeated == true) {
_root.gotoWin();
} else {
if (_root.gameoverCount > 30 && _root.userDefeated == true) {
_root.gotoLose();
}
}
}
}
frame 36 {
}
frame 36 {
stop();
}
button 523 {
on (release) {
gotoAndPlay(10);
}
}
instance of movieClip 50 {
onClipEvent (enterFrame) {
++_root.digitsCount;
}
onClipEvent (enterFrame) {
if (_root.digitsCount > 35) {
_root.goBegin();
}
}
onClipEvent (enterFrame) {
_root.digitsCount = 0;
}
onClipEvent (enterFrame) {
stopAllSounds();
}
}
movieClip 526 {
frame 24 {
stop();
}
}
frame 41 {
stopAllSounds();
}
frame 41 {
stop();
}