Section 1
//MainTimeline (jdp_fla.MainTimeline)
package jdp_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var pop1:Sound;
public var keyRIGHT:Boolean;
public var tecla:String;
public var keyLEFT:Boolean;
public var pausa:Boolean;
public var inimigos:Array;
public var Lang:String;
public var P2:Sound;
public var P5:Sound;
public var vfeed:MovieClip;
public var tu_mc:player;
public var TimerSegundos:Timer;
public var int1:uint;
public var tempo:Number;
public var SHIELD_mc:MovieClip;
public var BOMBA_fx:MovieClip;
public var GameMusic:Sound;
public var keyUP:Boolean;
public var Altura:int;
public var MenuMusicChannel:SoundChannel;
public var FREEZE_mc:MovieClip;
public var hits:int;
public var score_txt:TextField;
public var percent:Number;
public var velox:Number;
public var veloxtu:Number;
public var mortos:int;
public var yym:Array;
public var GameMusicChannel:SoundChannel;
public var wavemg:MovieClip;
public var FREEZEactive:Boolean;
public var inimigosHP:Array;
public var tuFrame:int;
public var xxm:Array;
public var explode1:Sound;
public var clash1:Sound;
public var combotimer:int;
public var dista:Number;
public var keyDOWN:Boolean;
public var seguitsREC:Number;
public var f1:TextField;
public var preloaderMC:MovieClip;
public var som:Boolean;
public var score:int;
public var elesFreqCounter:uint;
public var hittimer:int;
public var Largura:int;
public var gameloop;
public var waveDiff:int;
public var Clang1:Sound;
public var waveMax:int;
public var vivo:Boolean;
public var SHIELDactive:Boolean;
public var levelprogress:Number;
public var elesFreq:uint;
public var tin1:Sound;
public var comboclick:int;
public var sweep1:Sound;
public var lado:int;
public var linkButton:SimpleButton;
public var pancafeed:int;
public var sombra:MovieClip;
public var P1:Sound;
public var P3:Sound;
public var saia:MovieClip;
public var seguits:int;
public var MenuMusic:Sound;
public var progress_mc:MovieClip;
public var pa:MovieClip;
public var P4:Sound;
public var caixa:MovieClip;
public var BOMBA_mc:MovieClip;
public var wave:int;
public var counter:int;
public var pressstart:SimpleButton;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 10, frame11, 15, frame16, 19, frame20, 20, frame21);
}
public function BOMBA(){
BOMBA_mc.visible = false;
explode1.play(150, 1);
BOMBA_fx.visible = true;
BOMBA_fx.x = tu_mc.x;
BOMBA_fx.y = tu_mc.y;
BOMBA_fx.gotoAndPlay(2);
var _local1:int;
while (_local1 <= (inimigos.length - 1)) {
if ((((inimigos[_local1].anims.currentFrame < 40)) && ((inimigosHP[_local1] > 0)))){
mortos++;
vfeed.gotoAndPlay(1);
vfeed.x = inimigos[_local1].x;
vfeed.y = inimigos[_local1].y;
inimigos[_local1].anims.gotoAndPlay(40);
if (hittimer <= 12){
seguits++;
} else {
seguits = 0;
};
hittimer = 0;
inimigosHP[_local1] = (inimigosHP[_local1] - 1);
if (inimigosHP[_local1] <= 0){
setChildIndex(inimigos[_local1], 1);
inimigos[_local1].anims.gotoAndPlay(60);
serafimwave();
};
};
_local1++;
};
}
public function showBOMBA(){
BOMBA_mc.visible = true;
BOMBA_mc.gotoAndPlay(1);
if (this.tu_mc.x <= 200){
BOMBA_mc.x = ((Math.random() * 380) + 230);
} else {
if (this.tu_mc.x >= 400){
BOMBA_mc.x = ((Math.random() * 200) + 30);
} else {
if ((Math.random() * 100) >= 50){
BOMBA_mc.x = ((Math.random() * 100) + 30);
} else {
BOMBA_mc.x = ((Math.random() * 480) + 130);
};
};
};
BOMBA_mc.y = ((Math.random() * 340) + 35);
}
public function mouseMove(_arg1:MouseEvent):void{
}
public function novaWave(){
var esperaV:uint;
var espera:Function;
espera = function ():void{
inimigos.splice(0, inimigos.length);
inimigosHP.splice(0, inimigosHP.length);
wavemg.visible = false;
pausa = false;
clearInterval(esperaV);
vivo = true;
};
GameMusicChannel = GameMusic.play(0, 9999);
pausa = true;
pa.visible = false;
wave++;
BOMBA_mc.visible = false;
SHIELD_mc.visible = false;
FREEZE_mc.visible = false;
elesFreqCounter = 0;
progress_mc.gotoAndStop(1);
mortos = 0;
trace(("wave: " + wave));
switch (wave){
case 1:
elesFreq = 18;
velox = 2;
waveMax = 12;
waveDiff = 1;
break;
case 2:
elesFreq = 32;
velox = 3.5;
waveMax = 2;
waveDiff = 6;
break;
case 3:
elesFreq = 16;
velox = 2.5;
waveMax = 32;
waveDiff = 2;
break;
case 4:
elesFreq = 3;
velox = 2.8;
waveMax = 32;
waveDiff = 3;
break;
case 5:
elesFreq = 20;
velox = 4;
waveMax = 3;
waveDiff = 8;
break;
case 6:
elesFreq = 16;
velox = 6;
waveMax = 2;
waveDiff = 10;
break;
case 7:
elesFreq = 8;
velox = 4;
waveMax = 64;
waveDiff = 1;
break;
case 8:
elesFreq = 4;
velox = 4;
waveMax = 32;
waveDiff = 4;
break;
case 9:
elesFreq = 28;
velox = 14;
waveMax = 22;
waveDiff = 1;
break;
case 10:
elesFreq = 1;
velox = 4;
waveMax = 42;
waveDiff = 6;
break;
case 11:
elesFreq = 1;
velox = 7.2;
waveMax = 6;
waveDiff = 18;
break;
default:
elesFreq = 64;
velox = Math.ceil((wave / 3));
waveMax = 100000;
waveDiff = (wave + 2);
break;
};
wavemg.visible = true;
switch (Lang){
case "PT":
wavemg.wavemg_txt.text = (wave + "ª Fornada!!");
wavemg.wavemg2_txt.text = (("Derruba " + waveMax) + " inimigos!");
if (wave == 2){
wavemg.wavemg2_txt.text = (("Derruba " + waveMax) + " inimigos! Eles as vezes são duros e não caem à primeira!");
};
if (wave == 12){
wavemg.wavemg2_txt.text = (("Derruba " + waveMax) + " inimigos! Parabéns! chegas-te ao fim do jogo! Mas nós vamos deitar-te continuar a jogar, vamos lá ver quanto aguentas.");
};
break;
case "EN":
wavemg.wavemg_txt.text = ("Level " + wave);
wavemg.wavemg2_txt.text = (("Take down " + waveMax) + " opponents!");
if (wave == 2){
wavemg.wavemg2_txt.text = (("Take down " + waveMax) + " opponents! Some don't go down with one hit!");
};
if (wave == 12){
wavemg.wavemg2_txt.text = (("Take down " + waveMax) + " opponents! Congratulations you beat the game! But we will let you continue to play in survival mode!!");
};
break;
};
var ia:int;
while (ia < inimigos.length) {
removeChild(inimigos[ia]);
ia = (ia + 1);
};
esperaV = setInterval(espera, 4000);
comboclick = 0;
}
public function novoJogo(){
wave = 0;
tu_mc.x = 350;
tu_mc.y = 250;
veloxtu = 8;
comboclick = 0;
combotimer = 0;
hittimer = 0;
counter = 0;
seguits = 0;
novaWave();
score = 0;
tempo = 0;
hits = 0;
vivo = true;
}
public function continuar(){
seguits = 0;
wave = (wave - 1);
tu_mc.x = 350;
tu_mc.y = 250;
veloxtu = 8;
comboclick = 0;
combotimer = 0;
hittimer = 0;
counter = 0;
score = 0;
tempo = 0;
hits = 0;
novaWave();
}
function frame16(){
stop();
Lang = "EN";
som = true;
MenuMusic = new InMenuMusic();
MenuMusicChannel = new SoundChannel();
MenuMusicChannel = MenuMusic.play(0, 9999);
switch (Lang){
case "PT":
this.caixa.instructions.gotoAndStop(1);
this.caixa.titulo.gotoAndStop(1);
this.caixa.clicktoplay.gotoAndStop(1);
break;
case "EN":
this.caixa.instructions.gotoAndStop(2);
this.caixa.titulo.gotoAndStop(2);
this.caixa.clicktoplay.gotoAndStop(2);
break;
};
int1 = setInterval(waitart, 1500);
this.caixa.instructions.visible = false;
this.caixa.titulo.visible = false;
this.caixa.clicktoplay.visible = false;
this.caixa.decos.visible = false;
pressstart.addEventListener(MouseEvent.MOUSE_UP, splashgo);
}
public function getCa(_arg1:Number, _arg2:Number):Number{
_arg1 = ((_arg1 * Math.PI) / 180);
return ((Math.cos(_arg1) * _arg2));
}
public function impulsor(){
var _local2:Boolean;
var _local1:int;
while (_local1 <= (inimigos.length - 1)) {
if ((((inimigos[_local1].anims.currentFrame < 40)) && ((inimigosHP[_local1] > 0)))){
_local2 = false;
if (tu_mc.charanim.pau.hitTestPoint(inimigos[_local1].x, inimigos[_local1].y, true)){
_local2 = true;
} else {
if (tu_mc.charanim.pau.hitTestObject(inimigos[_local1].col)){
_local2 = true;
} else {
if (tu_mc.charanim.pau.hitTestObject(inimigos[_local1].col)){
_local2 = true;
} else {
if (tu_mc.charanim.pau.hitTestObject(inimigos[_local1].col)){
_local2 = true;
} else {
if (tu_mc.charanim.pau.hitTestObject(inimigos[_local1].col)){
_local2 = true;
};
};
};
};
};
if (_local2){
if (hittimer > 1){
switch ((Math.floor((Math.random() * 3)) + 1)){
case 1:
P1.play();
break;
case 2:
P2.play();
break;
case 3:
P3.play();
break;
case 4:
P4.play();
break;
case 5:
P5.play();
break;
};
};
mortos++;
inimigos[_local1].gotoAndStop(2);
vfeed.gotoAndPlay(1);
vfeed.x = inimigos[_local1].x;
vfeed.y = inimigos[_local1].y;
inimigos[_local1].anims.gotoAndPlay(40);
if (hittimer <= 12){
seguits++;
} else {
seguits = 0;
};
hittimer = 0;
inimigosHP[_local1] = (inimigosHP[_local1] - 1);
if (inimigosHP[_local1] <= 0){
inimigos[_local1].gotoAndStop(1);
setChildIndex(inimigos[_local1], 1);
inimigos[_local1].anims.gotoAndPlay(60);
serafimwave();
};
};
};
_local1++;
};
}
function frame11(){
gotoAndStop(6);
}
public function getCo(_arg1:Number, _arg2:Number):Number{
_arg1 = ((_arg1 * Math.PI) / 180);
return ((Math.sin(_arg1) * _arg2));
}
function frame2(){
gotoAndStop(6, "Jogo");
}
public function sempre(_arg1:Event):void{
var es1:uint;
var i:int;
var iend:int;
var e = _arg1;
stage.focus = stage;
if ((((((((this.tu_mc.charanim.currentFrame == 2)) || ((this.tu_mc.charanim.currentFrame == 16)))) || ((this.tu_mc.charanim.currentFrame == 24)))) || ((this.tu_mc.charanim.currentFrame == 33)))){
sweep1.play(100, 1);
};
if (((tu_mc.tuload.hitTestObject(BOMBA_mc)) && ((BOMBA_mc.visible == true)))){
BOMBA();
};
if (((tu_mc.tuload.hitTestObject(SHIELD_mc)) && ((SHIELD_mc.visible == true)))){
SHIELD();
};
if (((tu_mc.tuload.hitTestObject(FREEZE_mc)) && ((FREEZE_mc.visible == true)))){
FREEZE();
};
sombra.x = tu_mc.x;
sombra.y = tu_mc.y;
saia.x = tu_mc.x;
saia.y = tu_mc.y;
saia.rotation = tu_mc.rotation;
levelprogress = Math.round(((mortos * 100) / (waveMax * waveDiff)));
progress_mc.gotoAndStop(levelprogress);
switch (Lang){
case "PT":
score_txt.text = ("Pontos: " + mortos.toString());
break;
case "EN":
score_txt.text = ("Score: " + mortos.toString());
break;
};
if (!pausa){
var es1f:Function = function ():void{
pa.visible = false;
clearInterval(es1);
};
if (((((((Math.random() * 1000) >= 996)) && (!(FREEZEactive)))) && (!(SHIELDactive)))){
switch (Math.round((Math.random() * 2))){
case 0:
showBOMBA();
break;
case 1:
showSHIELD();
break;
case 2:
showFREEZE();
break;
};
};
tu_mc.charanim.gotoAndStop(tu_mc.currentFrame);
elesFreqCounter++;
if (elesFreqCounter > elesFreq){
elesTimer();
elesFreqCounter = 0;
};
hittimer++;
if (hittimer >= 12){
seguits = 0;
};
if (seguits >= seguitsREC){
seguitsREC = seguits;
pa.pa2_txt.textColor = 0xFFFF;
} else {
pa.pa2_txt.textColor = 0xFFFFFF;
};
if (seguits >= 3){
pa.visible = true;
pa.pa_txt.text = seguits.toString();
pa.pa2_txt.text = seguitsREC.toString();
} else {
if ((((seguits < 3)) && ((pa.visible == true)))){
es1 = setInterval(es1f, 999);
};
};
if (comboclick >= 1){
combotimer++;
if (combotimer >= 8){
comboclick = 0;
combotimer = 0;
};
};
if (seguits >= 12){
pa.pa_txt.textColor = 0xFF0000;
} else {
pa.pa_txt.textColor = 0xFFFFFF;
};
switch (tu_mc.currentFrame){
case 8:
if ((((comboclick >= 2)) && ((hittimer <= 4)))){
tu_mc.gotoAndPlay(16);
};
break;
case 14:
tu_mc.gotoAndStop(1);
break;
case 21:
if ((((((comboclick >= 3)) && ((hittimer <= 6)))) && ((seguits >= 3)))){
} else {
if ((((comboclick <= 4)) && ((hittimer <= 2)))){
tu_mc.gotoAndStop(15);
} else {
tu_mc.gotoAndStop(1);
};
};
break;
case 36:
if ((((((comboclick >= 4)) && ((hittimer <= 6)))) && ((seguits >= 4)))){
tu_mc.gotoAndPlay(22);
};
break;
default:
break;
};
impulsor();
if (vivo){
if (((((keyUP) && (!(keyLEFT)))) && (!(keyRIGHT)))){
tu_mc.y = (tu_mc.y - veloxtu);
tu_mc.rotation = 0;
};
if (((((keyUP) && (!(keyLEFT)))) && (keyRIGHT))){
tu_mc.y = (tu_mc.y - (veloxtu / 1.6));
tu_mc.x = (tu_mc.x + (veloxtu / 1.6));
tu_mc.rotation = 45;
};
if (((((keyUP) && (keyLEFT))) && (!(keyRIGHT)))){
tu_mc.y = (tu_mc.y - (veloxtu / 1.6));
tu_mc.x = (tu_mc.x - (veloxtu / 1.6));
tu_mc.rotation = 315;
};
if (((((keyDOWN) && (!(keyLEFT)))) && (!(keyRIGHT)))){
tu_mc.y = (tu_mc.y + veloxtu);
tu_mc.rotation = 180;
};
if (((((keyDOWN) && (keyLEFT))) && (!(keyRIGHT)))){
tu_mc.y = (tu_mc.y + (veloxtu / 1.6));
tu_mc.x = (tu_mc.x - (veloxtu / 1.6));
tu_mc.rotation = 215;
};
if (((((keyDOWN) && (!(keyLEFT)))) && (keyRIGHT))){
tu_mc.y = (tu_mc.y + (veloxtu / 1.6));
tu_mc.x = (tu_mc.x + (veloxtu / 1.6));
tu_mc.rotation = 135;
};
if (((((keyLEFT) && (!(keyUP)))) && (!(keyDOWN)))){
tu_mc.x = (tu_mc.x - veloxtu);
tu_mc.rotation = 270;
};
if (((((keyRIGHT) && (!(keyUP)))) && (!(keyDOWN)))){
tu_mc.x = (tu_mc.x + veloxtu);
tu_mc.rotation = 90;
};
if (tu_mc.y <= 10){
tu_mc.y = 10;
};
if (tu_mc.y >= 400){
tu_mc.y = 400;
};
if (tu_mc.x <= 10){
tu_mc.x = 10;
};
if (tu_mc.x >= 630){
tu_mc.x = 630;
};
tempo++;
velox = (velox + (((tempo / 24) + (hits / 24)) / 24000));
i = 0;
while (i <= (inimigos.length - 1)) {
if ((((inimigos[i].anims.currentFrame >= 59)) && ((inimigos[i].anims.currentFrame <= 69)))){
if (inimigos[i].x > tu_mc.x){
inimigos[i].x = (inimigos[i].x + (4 + velox));
} else {
inimigos[i].x = (inimigos[i].x - (4 + velox));
};
if (inimigos[i].y > tu_mc.y){
inimigos[i].y = (inimigos[i].y + (4 + velox));
} else {
inimigos[i].y = (inimigos[i].y - (4 + velox));
};
};
if (inimigos[i].anims.currentFrame <= 60){
var rotacaoinimiga:Function = function (){
inimigos[i].rotation = getAngleBetweenVectors(inimigos[i].x, tu_mc.x, inimigos[i].y, tu_mc.y);
};
if ((((inimigos[i].anims.currentFrame >= 40)) && ((inimigos[i].anims.currentFrame <= 50)))){
rotacaoinimiga();
if (inimigos[i].x > tu_mc.x){
inimigos[i].x = (inimigos[i].x + (8 + velox));
} else {
inimigos[i].x = (inimigos[i].x - (8 + velox));
};
if (inimigos[i].y > tu_mc.y){
inimigos[i].y = (inimigos[i].y + (8 + velox));
} else {
inimigos[i].y = (inimigos[i].y - (8 + velox));
};
} else {
if (!FREEZEactive){
rotacaoinimiga();
inimigos[i].x = movimentoinimigo(inimigos[i].x, tu_mc.x);
inimigos[i].y = movimentoinimigo(inimigos[i].y, tu_mc.y);
} else {
if (FREEZEactive){
inimigos[i].rotation = (inimigos[i].rotation + 6);
inimigos[i].x = (inimigos[i].x + ((Math.random() * velox) - (velox / 2)));
inimigos[i].y = (inimigos[i].y + ((Math.random() * velox) - (velox / 2)));
};
};
};
if (inimigos[i].y <= 15){
inimigos[i].y = 15;
};
if (inimigos[i].x <= 15){
inimigos[i].x = 15;
};
if (inimigos[i].y >= (Altura - 15)){
inimigos[i].y = (Altura - 15);
};
if (inimigos[i].x >= (Largura - 15)){
inimigos[i].x = (Largura - 15);
};
};
if (((tu_mc.tuload.hitTestPoint(inimigos[i].x, inimigos[i].y, true)) && ((inimigos[i].anims.currentFrame <= 60)))){
if (!SHIELDactive){
counter = 0;
if (vivo){
Clang1.play();
};
vivo = false;
} else {
tin1.play();
inimigos[i].anims.gotoAndPlay(40);
};
};
i = (i + 1);
};
} else {
wavemg.visible = true;
GameMusicChannel.stop();
iend = 0;
while (iend <= (inimigos.length - 1)) {
inimigos[iend].anims.stop();
iend = (iend + 1);
};
switch (Lang){
case "PT":
wavemg.wavemg_txt.text = "A Padeira foi apanhada!!!";
wavemg.wavemg2_txt.text = (("Ficas-te pela " + wave) + "ª fornada?? Vamos lá tentar outra vez!");
break;
case "EN":
wavemg.wavemg_txt.text = "The Baker was caught! You Lost";
wavemg.wavemg2_txt.text = "But don't quit now, you can have another chance.";
break;
};
counter++;
if (counter > 100){
continuar();
};
};
};
}
public function SHIELD(){
var SH:uint;
var SHIELDtimer:Function;
SHIELDtimer = function ():void{
SHIELDactive = false;
tu_mc.FX.gotoAndStop(1);
clearInterval(SH);
};
SHIELD_mc.visible = false;
SHIELDactive = true;
tu_mc.FX.gotoAndStop(2);
SH = setInterval(SHIELDtimer, 4000);
}
function frame20(){
}
function frame21(){
stop();
tempo = 0;
hits = 0;
score = 0;
vivo = true;
counter = 0;
comboclick = 0;
combotimer = 0;
hittimer = 0;
seguits = 0;
seguitsREC = 0;
inimigos = new Array();
inimigosHP = new Array();
pausa = false;
lado = 1;
levelprogress = 0;
mortos = 0;
SHIELDactive = false;
FREEZEactive = false;
pancafeed = 0;
Altura = this.stage.height;
Largura = this.stage.width;
xxm = new Array();
yym = new Array();
elesFreqCounter = 0;
keyUP = false;
keyDOWN = false;
keyRIGHT = false;
keyLEFT = false;
P1 = new Punch1();
P2 = new Punch2();
P3 = new Punch3();
P4 = new Punch4();
P5 = new Punch5();
sweep1 = new sweep();
explode1 = new explode();
tin1 = new tin();
clash1 = new clash();
pop1 = new pop();
Clang1 = new Clang();
GameMusic = new InGameMusic();
GameMusicChannel = new SoundChannel();
stage.addEventListener(KeyboardEvent.KEY_UP, key_Up);
stage.addEventListener(KeyboardEvent.KEY_DOWN, key_Down);
gameloop = new Sprite();
gameloop.addEventListener(Event.ENTER_FRAME, sempre);
stage.addEventListener(MouseEvent.MOUSE_DOWN, strike);
stage.addEventListener(MouseEvent.CLICK, rato);
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
TimerSegundos = new Timer(1000, 0);
wavemg.visible = false;
pa.visible = false;
switch (Lang){
case "PT":
pa.gotoAndStop(1);
break;
case "EN":
pa.gotoAndStop(2);
break;
};
novoJogo();
}
public function splashgo(_arg1:MouseEvent){
clearInterval(int1);
MenuMusicChannel.stop();
gotoAndPlay(9);
}
public function FREEZE(){
var FR:uint;
var FREEZEtimer:Function;
FREEZEtimer = function ():void{
var _local1:int;
while (_local1 <= (inimigos.length - 1)) {
inimigos[_local1].gotoAndStop(1);
_local1++;
};
FREEZEactive = false;
clearInterval(FR);
};
FREEZE_mc.visible = false;
FREEZEactive = true;
pop1.play();
FR = setInterval(FREEZEtimer, 2500);
}
public function key_Up(_arg1:KeyboardEvent){
if (((!(pausa)) && (vivo))){
saia.play();
};
switch (_arg1.keyCode){
case 65:
case 37:
keyLEFT = false;
break;
case 87:
case 38:
keyUP = false;
break;
case 68:
case 39:
keyRIGHT = false;
break;
case 83:
case 40:
keyDOWN = false;
};
}
public function key_Down(_arg1:KeyboardEvent){
if (((!(pausa)) && (vivo))){
saia.play();
};
switch (_arg1.keyCode){
case 65:
case 37:
keyLEFT = true;
break;
case 87:
case 38:
keyUP = true;
break;
case 68:
case 39:
keyRIGHT = true;
break;
case 83:
case 40:
keyDOWN = true;
break;
case 48:
case 45:
case 96:
if (som){
SoundMixer.soundTransform = new SoundTransform(0);
som = false;
} else {
SoundMixer.soundTransform = new SoundTransform(1);
som = true;
};
break;
};
}
function frame1(){
stop();
loaderInfo.addEventListener(ProgressEvent.PROGRESS, update);
percent = Math.floor(((this.loaderInfo.bytesLoaded * 100) / this.loaderInfo.bytesTotal));
if (percent == 100){
nextFrame();
gotoAndPlay("Jogo");
};
}
public function showSHIELD(){
SHIELD_mc.visible = true;
SHIELD_mc.gotoAndPlay(1);
if (this.tu_mc.x <= 200){
SHIELD_mc.x = ((Math.random() * 380) + 230);
} else {
if (this.tu_mc.x >= 400){
SHIELD_mc.x = ((Math.random() * 200) + 30);
} else {
if ((Math.random() * 100) >= 50){
SHIELD_mc.x = ((Math.random() * 100) + 30);
} else {
SHIELD_mc.x = ((Math.random() * 480) + 130);
};
};
};
SHIELD_mc.y = ((Math.random() * 340) + 35);
}
public function elesTimer(){
var _local1:int;
if (inimigos.length < waveMax){
inimigos.push(new ele());
inimigosHP.push((inimigos.length - 1));
addChild(inimigos[(inimigos.length - 1)]);
setChildIndex(inimigos[(inimigos.length - 1)], 10);
inimigos[(inimigos.length - 1)].filters = [new DropShadowFilter(4, 45, 0, 0.6, 8, 8, 1, 1, false, false, false)];
inimigosHP[(inimigos.length - 1)] = waveDiff;
_local1 = Math.ceil((Math.random() * 4));
switch (lado){
case 1:
inimigos[(inimigos.length - 1)].x = (Math.round((Math.random() * 600)) + 20);
inimigos[(inimigos.length - 1)].y = -25;
lado++;
break;
case 2:
inimigos[(inimigos.length - 1)].x = (Math.round((Math.random() * 600)) + 20);
inimigos[(inimigos.length - 1)].y = 450;
lado++;
break;
case 3:
inimigos[(inimigos.length - 1)].x = -25;
inimigos[(inimigos.length - 1)].y = ((Math.round(Math.random()) * 350) + 20);
lado++;
break;
case 4:
inimigos[(inimigos.length - 1)].x = 625;
inimigos[(inimigos.length - 1)].y = ((Math.round(Math.random()) * 350) + 20);
lado = 1;
break;
};
};
}
public function strike(_arg1:MouseEvent):void{
if (((vivo) && (!(pausa)))){
combotimer = 0;
tu_mc.play();
switch (comboclick){
case 0:
comboclick = 1;
break;
case 1:
comboclick = 2;
break;
case 2:
comboclick = 3;
break;
case 3:
if (hittimer <= 18){
comboclick++;
};
break;
default:
comboclick++;
break;
};
};
}
public function update(_arg1:ProgressEvent):void{
var _local2:Number = Math.floor(((_arg1.bytesLoaded * 100) / _arg1.bytesTotal));
if ((preloaderMC is MovieClip)){
preloaderMC.gotoAndStop(_local2);
};
if (_local2 == 100){
play();
};
}
public function waitart():void{
this.caixa.escuro.play();
this.caixa.instructions.visible = true;
this.caixa.titulo.visible = true;
this.caixa.clicktoplay.visible = true;
this.caixa.decos.visible = true;
clearInterval(int1);
}
public function showFREEZE(){
FREEZE_mc.visible = true;
FREEZE_mc.gotoAndPlay(1);
if (this.tu_mc.x <= 200){
FREEZE_mc.x = ((Math.random() * 380) + 230);
} else {
if (this.tu_mc.x >= 400){
FREEZE_mc.x = ((Math.random() * 200) + 30);
} else {
if ((Math.random() * 100) >= 50){
FREEZE_mc.x = ((Math.random() * 100) + 30);
} else {
FREEZE_mc.x = ((Math.random() * 480) + 130);
};
};
};
FREEZE_mc.y = ((Math.random() * 340) + 35);
}
public function getGlobalX(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5):Number{
var _local6:Number = Math.sqrt((Math.pow(_arg1, 2) + Math.pow(_arg2, 2)));
var _local7:Number = Math.asin((_arg1 / _local6));
_arg4 = ((90 - _arg4) + ((_local7 * 180) / Math.PI));
switch (_arg5){
case 1:
return ((_arg3 + (_local6 * Math.cos(((_arg4 * Math.PI) / 180)))));
case 2:
return ((_arg3 - (_local6 * Math.cos(((_arg4 * Math.PI) / 180)))));
case 3:
return ((_arg3 - (_local6 * Math.cos(((_arg4 * Math.PI) / 180)))));
};
return ((_arg3 - (_local6 * Math.cos(((_arg4 * Math.PI) / 180)))));
}
public function serafimwave(){
var _local1:int;
while (_local1 <= (inimigos.length - 1)) {
if ((((inimigosHP[_local1] > 0)) && ((inimigos[_local1].anims.currentFrame <= 69)))){
_local1 = (inimigos.length - 1);
} else {
if ((((_local1 == (inimigos.length - 1))) && ((inimigos.length == waveMax)))){
pausa = true;
GameMusicChannel.stop();
novaWave();
};
};
_local1++;
};
}
public function movimentoinimigo(_arg1:Number, _arg2:Number){
dista = Math.abs((_arg2 - _arg1));
if (dista > velox){
if (_arg2 > _arg1){
_arg1 = (_arg1 + velox);
} else {
_arg1 = (_arg1 - velox);
};
} else {
_arg1 = _arg2;
};
return (_arg1);
}
public function getAngleBetweenVectors(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local6 = (_arg4 - _arg3);
_local5 = (_arg2 - _arg1);
if ((((_arg1 == _arg2)) && ((_arg3 == _arg4)))){
return (-1);
};
if (_local5 == 0){
if (_local6 >= 0){
return (180);
};
return (0);
} else {
_local7 = (Math.atan((_local6 / _local5)) * (180 / Math.PI));
if (_arg1 >= _arg2){
_local7 = (_local7 - 90);
} else {
_local7 = (_local7 - 270);
};
};
return (_local7);
}
public function getGlobalY(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Number{
var _local6:Number = Math.sqrt((Math.pow(_arg1, 2) + Math.pow(_arg2, 2)));
var _local7:Number = Math.acos((_arg2 / _local6));
if (_arg5 == 2){
_arg4 = ((90 - _arg4) - ((_local7 * 180) / Math.PI));
} else {
_arg4 = ((90 - _arg4) + ((_local7 * 180) / Math.PI));
};
switch (_arg5){
case 1:
return ((_arg3 + (_local6 * Math.sin(((_arg4 * Math.PI) / 180)))));
case 2:
return ((_arg3 + (_local6 * Math.sin(((_arg4 * Math.PI) / 180)))));
case 3:
return ((_arg3 + (_local6 * Math.sin(((_arg4 * Math.PI) / 180)))));
};
return ((_arg3 + (_local6 * Math.sin(((_arg4 * Math.PI) / 180)))));
}
public function rato(_arg1:MouseEvent):void{
}
public function getPointsDistance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (Math.sqrt((Math.pow(Math.abs((_arg1 - _arg3)), 2) + Math.pow(Math.abs((_arg2 - _arg4)), 2))));
}
}
}//package jdp_fla
Section 2
//Symbol13_44 (jdp_fla.Symbol13_44)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol13_44 extends MovieClip {
public function Symbol13_44(){
addFrameScript(15, frame16, 33, frame34, 51, frame52, 93, frame94);
}
function frame94(){
stop();
}
function frame52(){
gotoAndPlay(1);
}
function frame16(){
gotoAndPlay(1);
}
function frame34(){
stop();
}
}
}//package jdp_fla
Section 3
//Symbol14_38 (jdp_fla.Symbol14_38)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol14_38 extends MovieClip {
public var ono:MovieClip;
public function Symbol14_38(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 23, frame24);
}
function frame1(){
gotoAndPlay(10);
}
function frame2(){
gotoAndPlay(10);
}
function frame10(){
ono.gotoAndStop(Math.round(((Math.random() * 7) + 1)));
}
function frame24(){
stop();
}
}
}//package jdp_fla
Section 4
//Symbol32_33 (jdp_fla.Symbol32_33)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol32_33 extends MovieClip {
public function Symbol32_33(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jdp_fla
Section 5
//Symbol34_19 (jdp_fla.Symbol34_19)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol34_19 extends MovieClip {
public function Symbol34_19(){
addFrameScript(8, frame9);
}
function frame9(){
gotoAndStop(1);
}
}
}//package jdp_fla
Section 6
//Symbol35_40 (jdp_fla.Symbol35_40)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol35_40 extends MovieClip {
public function Symbol35_40(){
addFrameScript(0, frame1, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
stop();
}
}
}//package jdp_fla
Section 7
//Symbol42_21 (jdp_fla.Symbol42_21)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol42_21 extends MovieClip {
public function Symbol42_21(){
addFrameScript(8, frame9);
}
function frame9(){
gotoAndStop(1);
}
}
}//package jdp_fla
Section 8
//Symbol43_30 (jdp_fla.Symbol43_30)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol43_30 extends MovieClip {
public function Symbol43_30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jdp_fla
Section 9
//Symbol44_22 (jdp_fla.Symbol44_22)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol44_22 extends MovieClip {
public function Symbol44_22(){
addFrameScript(8, frame9);
}
function frame9(){
gotoAndStop(1);
}
}
}//package jdp_fla
Section 10
//Symbol64_5 (jdp_fla.Symbol64_5)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol64_5 extends MovieClip {
public var instructions:MovieClip;
public var decos:MovieClip;
public var clicktoplay:MovieClip;
public var titulo:MovieClip;
public var escuro:MovieClip;
public function Symbol64_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jdp_fla
Section 11
//Symbol65_6 (jdp_fla.Symbol65_6)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol65_6 extends MovieClip {
public function Symbol65_6(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package jdp_fla
Section 12
//Symbol7_27 (jdp_fla.Symbol7_27)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol7_27 extends MovieClip {
public var pau:MovieClip;
public function Symbol7_27(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jdp_fla
Section 13
//Symbol81_3 (jdp_fla.Symbol81_3)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol81_3 extends MovieClip {
public function Symbol81_3(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package jdp_fla
Section 14
//Symbol9_23 (jdp_fla.Symbol9_23)
package jdp_fla {
import flash.display.*;
public dynamic class Symbol9_23 extends MovieClip {
public function Symbol9_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jdp_fla
Section 15
//Clang (Clang)
package {
import flash.media.*;
public dynamic class Clang extends Sound {
}
}//package
Section 16
//clash (clash)
package {
import flash.media.*;
public dynamic class clash extends Sound {
}
}//package
Section 17
//cursor (cursor)
package {
import flash.display.*;
public dynamic class cursor extends MovieClip {
}
}//package
Section 18
//ele (ele)
package {
import flash.display.*;
public dynamic class ele extends MovieClip {
public var col:MovieClip;
public var anims:MovieClip;
public function ele(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 19
//explode (explode)
package {
import flash.media.*;
public dynamic class explode extends Sound {
}
}//package
Section 20
//InGameMusic (InGameMusic)
package {
import flash.media.*;
public dynamic class InGameMusic extends Sound {
}
}//package
Section 21
//InMenuMusic (InMenuMusic)
package {
import flash.media.*;
public dynamic class InMenuMusic extends Sound {
}
}//package
Section 22
//player (player)
package {
import flash.display.*;
public dynamic class player extends MovieClip {
public var FX:MovieClip;
public var tuload:MovieClip;
public var charanim:MovieClip;
public function player(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 23
//pop (pop)
package {
import flash.media.*;
public dynamic class pop extends Sound {
}
}//package
Section 24
//Punch1 (Punch1)
package {
import flash.media.*;
public dynamic class Punch1 extends Sound {
}
}//package
Section 25
//Punch2 (Punch2)
package {
import flash.media.*;
public dynamic class Punch2 extends Sound {
}
}//package
Section 26
//Punch3 (Punch3)
package {
import flash.media.*;
public dynamic class Punch3 extends Sound {
}
}//package
Section 27
//Punch4 (Punch4)
package {
import flash.media.*;
public dynamic class Punch4 extends Sound {
}
}//package
Section 28
//Punch5 (Punch5)
package {
import flash.media.*;
public dynamic class Punch5 extends Sound {
}
}//package
Section 29
//sweep (sweep)
package {
import flash.media.*;
public dynamic class sweep extends Sound {
}
}//package
Section 30
//tin (tin)
package {
import flash.media.*;
public dynamic class tin extends Sound {
}
}//package