Section 1
//ag_intro_mc_4 (PenguinsAttack3_fla.ag_intro_mc_4)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class ag_intro_mc_4 extends MovieClip {
public function ag_intro_mc_4(){
addFrameScript(0, frame1, 217, frame218);
}
function frame218(){
MovieClip(parent).gotoAndStop(5);
}
function frame1(){
gotoAndPlay(2);
}
}
}//package PenguinsAttack3_fla
Section 2
//amg_123 (PenguinsAttack3_fla.amg_123)
package PenguinsAttack3_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.external.*;
public dynamic class amg_123 extends MovieClip {
public var link:String;
public function amg_123(){
addFrameScript(0, frame1);
}
function frame1(){
link = "http://armorgames.com";
this.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
}
public function onClick(_arg1:MouseEvent):void{
var event = _arg1;
try {
ExternalInterface.call("window.open", link, "_blank", "");
} catch(error:Error) {
navigateToURL(new URLRequest(link), "_blank");
};
}
}
}//package PenguinsAttack3_fla
Section 3
//enemyDisp_186 (PenguinsAttack3_fla.enemyDisp_186)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class enemyDisp_186 extends MovieClip {
public function enemyDisp_186(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PenguinsAttack3_fla
Section 4
//instructions_155 (PenguinsAttack3_fla.instructions_155)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class instructions_155 extends MovieClip {
public function instructions_155(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PenguinsAttack3_fla
Section 5
//level_1_163 (PenguinsAttack3_fla.level_1_163)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_1_163 extends MovieClip {
public function level_1_163(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 6
//level_10_204 (PenguinsAttack3_fla.level_10_204)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_10_204 extends MovieClip {
public function level_10_204(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 7
//level_11_205 (PenguinsAttack3_fla.level_11_205)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_11_205 extends MovieClip {
public function level_11_205(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 8
//level_12_206 (PenguinsAttack3_fla.level_12_206)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_12_206 extends MovieClip {
public function level_12_206(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 9
//level_13_207 (PenguinsAttack3_fla.level_13_207)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_13_207 extends MovieClip {
public function level_13_207(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 10
//level_14_208 (PenguinsAttack3_fla.level_14_208)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_14_208 extends MovieClip {
public function level_14_208(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 11
//level_15_209 (PenguinsAttack3_fla.level_15_209)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_15_209 extends MovieClip {
public function level_15_209(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 12
//level_2_196 (PenguinsAttack3_fla.level_2_196)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_2_196 extends MovieClip {
public function level_2_196(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 13
//level_3_197 (PenguinsAttack3_fla.level_3_197)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_3_197 extends MovieClip {
public function level_3_197(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 14
//level_4_198 (PenguinsAttack3_fla.level_4_198)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_4_198 extends MovieClip {
public function level_4_198(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 15
//level_5_199 (PenguinsAttack3_fla.level_5_199)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_5_199 extends MovieClip {
public function level_5_199(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 16
//level_6_200 (PenguinsAttack3_fla.level_6_200)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_6_200 extends MovieClip {
public function level_6_200(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 17
//level_7_201 (PenguinsAttack3_fla.level_7_201)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_7_201 extends MovieClip {
public function level_7_201(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 18
//level_8_202 (PenguinsAttack3_fla.level_8_202)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_8_202 extends MovieClip {
public function level_8_202(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 19
//level_9_203 (PenguinsAttack3_fla.level_9_203)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class level_9_203 extends MovieClip {
public function level_9_203(){
addFrameScript(0, frame1);
}
function frame1(){
Game(parent).gameLevel = this;
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 20
//loaderBar_1 (PenguinsAttack3_fla.loaderBar_1)
package PenguinsAttack3_fla {
import flash.display.*;
import flash.events.*;
public dynamic class loaderBar_1 extends MovieClip {
public var LBAR:MovieClip;
public function loaderBar_1(){
addFrameScript(0, frame1);
}
public function loading(_arg1:Event):void{
if (loaderInfo){
if ((loaderInfo.bytesLoaded / loaderInfo.bytesTotal) >= 1){
removeEventListener(Event.ENTER_FRAME, loading);
MovieClip(parent).gotoAndStop(2);
} else {
LBAR.scaleX = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal);
};
};
}
function frame1(){
stop();
addEventListener(Event.ENTER_FRAME, loading);
}
}
}//package PenguinsAttack3_fla
Section 21
//lock_212 (PenguinsAttack3_fla.lock_212)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class lock_212 extends MovieClip {
public function lock_212(){
addFrameScript(0, frame1);
}
function frame1(){
mouseEnabled = false;
}
}
}//package PenguinsAttack3_fla
Section 22
//MainTimeline (PenguinsAttack3_fla.MainTimeline)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class MainTimeline extends MovieClip {
public function MainTimeline(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
}
function frame5(){
stop();
}
}
}//package PenguinsAttack3_fla
Section 23
//march1_113 (PenguinsAttack3_fla.march1_113)
package PenguinsAttack3_fla {
import flash.display.*;
import flash.events.*;
public dynamic class march1_113 extends MovieClip {
public function march1_113(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, update, false, 0, true);
}
public function update(_arg1:Event){
y = (y + 1);
if (y > 0x0200){
y = -10;
};
}
}
}//package PenguinsAttack3_fla
Section 24
//march2_114 (PenguinsAttack3_fla.march2_114)
package PenguinsAttack3_fla {
import flash.display.*;
import flash.events.*;
public dynamic class march2_114 extends MovieClip {
public function march2_114(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, update, false, 0, true);
}
public function update(_arg1:Event){
y = (y + 1);
if (y > 0x0200){
y = -10;
};
}
}
}//package PenguinsAttack3_fla
Section 25
//march3_115 (PenguinsAttack3_fla.march3_115)
package PenguinsAttack3_fla {
import flash.display.*;
import flash.events.*;
public dynamic class march3_115 extends MovieClip {
public function march3_115(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, update, false, 0, true);
}
public function update(_arg1:Event){
y = (y + 1);
if (y > 0x0200){
y = -10;
};
}
}
}//package PenguinsAttack3_fla
Section 26
//march4_116 (PenguinsAttack3_fla.march4_116)
package PenguinsAttack3_fla {
import flash.display.*;
import flash.events.*;
public dynamic class march4_116 extends MovieClip {
public function march4_116(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, update, false, 0, true);
}
public function update(_arg1:Event){
y = (y + 1);
if (y > 0x0200){
y = -10;
};
}
}
}//package PenguinsAttack3_fla
Section 27
//march5_117 (PenguinsAttack3_fla.march5_117)
package PenguinsAttack3_fla {
import flash.display.*;
import flash.events.*;
public dynamic class march5_117 extends MovieClip {
public function march5_117(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, update, false, 0, true);
}
public function update(_arg1:Event){
y = (y + 1);
if (y > 0x0200){
y = -10;
};
}
}
}//package PenguinsAttack3_fla
Section 28
//tower10Anim_100 (PenguinsAttack3_fla.tower10Anim_100)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class tower10Anim_100 extends MovieClip {
public function tower10Anim_100(){
addFrameScript(20, frame21);
}
function frame21(){
gotoAndStop(1);
}
}
}//package PenguinsAttack3_fla
Section 29
//tower12Anim_102 (PenguinsAttack3_fla.tower12Anim_102)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class tower12Anim_102 extends MovieClip {
public function tower12Anim_102(){
addFrameScript(20, frame21);
}
function frame21(){
gotoAndStop(1);
}
}
}//package PenguinsAttack3_fla
Section 30
//tower3anim_92 (PenguinsAttack3_fla.tower3anim_92)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class tower3anim_92 extends MovieClip {
public function tower3anim_92(){
addFrameScript(24, frame25);
}
function frame25(){
gotoAndStop(1);
}
}
}//package PenguinsAttack3_fla
Section 31
//towerAnim7c_96 (PenguinsAttack3_fla.towerAnim7c_96)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class towerAnim7c_96 extends MovieClip {
public function towerAnim7c_96(){
addFrameScript(0, frame1, 30, frame31);
}
function frame1(){
mouseEnabled = false;
}
function frame31(){
gotoAndStop(1);
}
}
}//package PenguinsAttack3_fla
Section 32
//towerAnim8_98 (PenguinsAttack3_fla.towerAnim8_98)
package PenguinsAttack3_fla {
import flash.display.*;
public dynamic class towerAnim8_98 extends MovieClip {
public function towerAnim8_98(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndStop(1);
}
}
}//package PenguinsAttack3_fla
Section 33
//aaShot (aaShot)
package {
import flash.media.*;
public dynamic class aaShot extends Sound {
}
}//package
Section 34
//acPopup (acPopup)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class acPopup extends Sprite {
var life;// = 250
public var title:TextField;
public var msg:TextField;
var game:Game;
public function acPopup(_arg1:Game, _arg2:String, _arg3:String){
life = 250;
super();
game = _arg1;
mouseEnabled = false;
addEventListener(Event.ENTER_FRAME, tick, false, 0, true);
title.text = _arg2;
msg.text = (_arg3 + ". Check out the trophy room to view your award.");
}
public function tick(_arg1:Event){
life--;
if (life < 0){
removeEventListener(Event.ENTER_FRAME, tick);
parent.removeChild(this);
};
}
}
}//package
Section 35
//Ashot (Ashot)
package {
import flash.media.*;
public dynamic class Ashot extends Sound {
}
}//package
Section 36
//award1 (award1)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award1 extends MovieClip {
public function award1(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 12;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 37
//award10 (award10)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award10 extends MovieClip {
public function award10(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 9;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 38
//award11 (award11)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award11 extends MovieClip {
public function award11(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 7;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 39
//award12 (award12)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award12 extends MovieClip {
public function award12(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 10;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 40
//award13 (award13)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award13 extends MovieClip {
public function award13(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 15;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 41
//award14 (award14)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award14 extends MovieClip {
public function award14(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 3;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 42
//award15 (award15)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award15 extends MovieClip {
public function award15(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 13;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 43
//award2 (award2)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award2 extends MovieClip {
public function award2(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 14;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 44
//award3 (award3)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award3 extends MovieClip {
public function award3(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 5;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 45
//award4 (award4)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award4 extends MovieClip {
public function award4(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 1;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 46
//award5 (award5)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award5 extends MovieClip {
public function award5(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 6;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 47
//award6 (award6)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award6 extends MovieClip {
public function award6(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 4;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 48
//award7 (award7)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award7 extends MovieClip {
public function award7(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 8;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 49
//award8 (award8)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award8 extends MovieClip {
public function award8(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 11;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 50
//award9 (award9)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class award9 extends MovieClip {
public function award9(){
addFrameScript(0, frame1);
}
public function out(_arg1:MouseEvent){
awardDisplay(parent).clear();
}
function frame1(){
this.id = 2;
if (Game(parent.parent).gameInfo.achievements[this.id] == 1){
alpha = 1;
} else {
alpha = 0;
};
addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
}
public function over(_arg1:MouseEvent){
awardDisplay(parent).selectAward(this.id);
}
}
}//package
Section 51
//awardDisplay (awardDisplay)
package {
import flash.display.*;
public class awardDisplay extends Sprite {
var award:MovieClip;
public var Info:awardInfo;
var game:Game;
public function awardDisplay(){
game = Game(parent);
clear();
}
public function clear():void{
Info.title.text = "Hover Over a Trophy to view ";
Info.msg.text = "";
}
public function selectAward(_arg1):void{
var _local2:*;
_local2 = game.gameInfo.getAchievement(_arg1);
Info.title.text = _local2[0];
Info.msg.text = _local2[1];
}
}
}//package
Section 52
//awardInfo (awardInfo)
package {
import flash.display.*;
import flash.text.*;
public dynamic class awardInfo extends MovieClip {
public var title:TextField;
public var msg:TextField;
}
}//package
Section 53
//bacButton (bacButton)
package {
import flash.display.*;
public class bacButton extends gameButton2 {
override public function doAction():void{
MovieClip(parent).prevFrame();
}
}
}//package
Section 54
//BackButton (BackButton)
package {
public class BackButton extends gameButton {
override public function doAction():void{
game.getFrame(2);
}
}
}//package
Section 55
//BackButton2 (BackButton2)
package {
public class BackButton2 extends gameButton {
override public function doAction():void{
game.getFrame(1);
}
}
}//package
Section 56
//bgm (bgm)
package {
import flash.media.*;
public dynamic class bgm extends Sound {
}
}//package
Section 57
//bio_1 (bio_1)
package {
import flash.media.*;
public dynamic class bio_1 extends Sound {
}
}//package
Section 58
//bioBlob1 (bioBlob1)
package {
import flash.display.*;
public dynamic class bioBlob1 extends BitmapData {
public function bioBlob1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 59
//bioFX1 (bioFX1)
package {
import flash.display.*;
public dynamic class bioFX1 extends BitmapData {
public function bioFX1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 60
//bioHit1 (bioHit1)
package {
import flash.display.*;
public dynamic class bioHit1 extends BitmapData {
public function bioHit1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 61
//BlockSquare (BlockSquare)
package {
import flash.display.*;
public class BlockSquare extends Sprite {
public function BlockSquare(){
var _local1:Game;
var _local2:*;
var _local3:*;
super();
_local1 = Game(parent);
_local2 = Math.floor((x / _local1.gridSize));
_local3 = Math.floor((y / _local1.gridSize));
_local1.gameGrid.grid[_local2][_local3] = 1;
parent.removeChild(this);
}
}
}//package
Section 62
//blood1 (blood1)
package {
import flash.display.*;
public dynamic class blood1 extends BitmapData {
public function blood1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 63
//bombBlast1 (bombBlast1)
package {
import flash.display.*;
public dynamic class bombBlast1 extends BitmapData {
public function bombBlast1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 64
//bombExplode1 (bombExplode1)
package {
import flash.display.*;
public dynamic class bombExplode1 extends BitmapData {
public function bombExplode1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 65
//boulder1 (boulder1)
package {
import flash.display.*;
public dynamic class boulder1 extends BitmapData {
public function boulder1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 66
//bSplat (bSplat)
package {
import flash.media.*;
public dynamic class bSplat extends Sound {
}
}//package
Section 67
//bullet1 (bullet1)
package {
import flash.display.*;
public dynamic class bullet1 extends BitmapData {
public function bullet1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 68
//burning1 (burning1)
package {
import flash.display.*;
public dynamic class burning1 extends BitmapData {
public function burning1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 69
//clickLayer (clickLayer)
package {
import flash.display.*;
import flash.events.*;
public class clickLayer extends Sprite {
public var game:Game;
public function clickLayer(){
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
game = Game(parent);
}
private function clicked(_arg1:MouseEvent):void{
game.Selected = null;
}
}
}//package
Section 70
//clickObject (clickObject)
package {
import flash.display.*;
import flash.events.*;
public class clickObject extends Sprite {
public function clickObject(){
addEventListener(MouseEvent.MOUSE_UP, clicked, false, 0, true);
}
private function clicked(_arg1:MouseEvent):void{
Tower(parent).clicked();
}
}
}//package
Section 71
//crater1 (crater1)
package {
import flash.display.*;
public dynamic class crater1 extends BitmapData {
public function crater1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 72
//creditsButton (creditsButton)
package {
public class creditsButton extends gameButton {
override public function doAction():void{
game.getFrame(9);
}
}
}//package
Section 73
//Decal (Decal)
package {
import flash.display.*;
import flash.geom.*;
public class Decal extends Sprite {
var blood:BitmapData;
var gs:int;
var hs:int;
var clearRec:Rectangle;
var crater:BitmapData;
var canvas:BitmapData;
var tunnel:BitmapData;
var DisplayScreen:Bitmap;
var items:Array;
var game:Game;
var scorch:BitmapData;
public function Decal(){
items = new Array();
super();
game = Game(parent);
game.decalFX = this;
gs = game.gridSize;
hs = (gs * 0.5);
tunnel = new tunnel1(72, 24);
crater = new crater1(192, 48);
blood = new blood1(96, 24);
this.mouseEnabled = false;
canvas = new BitmapData(640, 0x0200, true, 0);
clearRec = new Rectangle(0, 0, 800, 600);
DisplayScreen = new Bitmap(canvas);
addChild(DisplayScreen);
}
public function Splat(_arg1, _arg2){
var _local3:*;
var _local4:*;
_arg1 = (_arg1 + (-4 + (Math.random() * 8)));
_arg2 = (_arg2 + (-4 + (Math.random() * 8)));
_local3 = (Math.random() * 3.9);
_local4 = new Rectangle((Math.floor(_local3) * 24), 0, 24, 24);
canvas.copyPixels(blood, _local4, new Point((_arg1 - 12), (_arg2 - 12)), null, null, true);
game.soundBox.playShot("hurt");
}
public function Crater(_arg1, _arg2){
var _local3:*;
var _local4:*;
_arg1 = (_arg1 + (-4 + (Math.random() * 8)));
_arg2 = (_arg2 + (-4 + (Math.random() * 8)));
_local3 = (Math.random() * 3.9);
_local4 = new Rectangle((Math.floor(_local3) * 48), 0, 48, 48);
canvas.copyPixels(crater, _local4, new Point((_arg1 - 24), (_arg2 - 24)), null, null, true);
game.soundBox.playShot("explode1");
}
public function Tunnel(_arg1, _arg2){
var _local3:*;
var _local4:*;
_arg1 = (_arg1 + (-4 + (Math.random() * 8)));
_arg2 = (_arg2 + (-4 + (Math.random() * 8)));
_local3 = (Math.random() * 2.9);
_local4 = new Rectangle((Math.floor(_local3) * 24), 0, 24, 24);
canvas.copyPixels(tunnel, _local4, new Point((_arg1 - 12), (_arg2 - 12)), null, null, true);
}
public function Scorch(_arg1, _arg2){
var _local3:*;
var _local4:*;
_arg1 = (_arg1 + (-4 + (Math.random() * 8)));
_arg2 = (_arg2 + (-4 + (Math.random() * 8)));
_local3 = (Math.random() * 3.9);
_local4 = new Rectangle((Math.floor(_local3) * 32), 0, 32, 32);
canvas.copyPixels(scorch, _local4, new Point((_arg1 - 16), (_arg2 - 16)), null, null, true);
}
}
}//package
Section 74
//dig1 (dig1)
package {
import flash.display.*;
public dynamic class dig1 extends BitmapData {
public function dig1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 75
//ebomb1 (ebomb1)
package {
import flash.display.*;
public dynamic class ebomb1 extends BitmapData {
public function ebomb1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 76
//EndTile1 (EndTile1)
package {
public class EndTile1 extends GameActor {
public function EndTile1(){
SetGrid();
game.endPoints1 = this;
visible = false;
}
}
}//package
Section 77
//EndTile2 (EndTile2)
package {
public class EndTile2 extends GameActor {
public function EndTile2(){
SetGrid();
game.endPoints2 = this;
visible = false;
}
}
}//package
Section 78
//EndTile3 (EndTile3)
package {
public class EndTile3 extends GameActor {
public function EndTile3(){
SetGrid();
game.endPoints3 = this;
visible = false;
}
}
}//package
Section 79
//Enemy (Enemy)
package {
import flash.display.*;
public class Enemy extends Sprite {
public var gy:int;
public var specialTimer:int;// = 0
public var bio:Number;// = 0
public var oldAng:Number;// = 1000
public var fire:Number;// = 0
public var pth:Array;
public var traveled:Number;// = 0
public var speed:Number;// = 1
public var ExtraType:int;// = 0
public var health:Number;// = 50
public var endPoint:GameActor;
public var bEnemy:Boolean;// = true
public var specialLimit:int;// = 100
public var fxTick:int;// = 0
public var bFlying:Boolean;// = false
public var radius:int;// = 8
public var hBar:MovieClip;
public var ty:int;
public var tx:int;
public var z:Number;// = 0
public var shock:Number;// = 0
public var baseHealth:Number;
public var vx:Number;
public var vy:Number;
public var sValue:int;// = 100
public var cValue:int;// = 10
public var bMetal:Boolean;// = false
public var ang:Number;
public var bDead:Boolean;// = false
public var gx:int;
public var bSpecial:Boolean;// = false
public var game:Game;
public var KillType:int;// = 1
public var baseSpeed:Number;
public function Enemy(){
health = 50;
speed = 1;
cValue = 10;
sValue = 100;
z = 0;
radius = 8;
oldAng = 1000;
bEnemy = true;
bDead = false;
traveled = 0;
bMetal = false;
bFlying = false;
fxTick = 0;
bio = 0;
fire = 0;
shock = 0;
bSpecial = false;
specialTimer = 0;
specialLimit = 100;
KillType = 1;
ExtraType = 0;
super();
mouseEnabled = false;
hBar = new hbar();
hBar.x = -13;
hBar.y = -24;
addChild(hBar);
}
public function Move(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
x = (x + ((vx * speed) * _arg1));
y = (y + ((vy * speed) * _arg1));
traveled = (traveled + (Math.abs(vx) + Math.abs(vy)));
if ((((gx == Math.floor((tx / 32)))) && ((gy == Math.floor((ty / 32)))))){
if ((((x > ((gx * game.gridSize) + 4))) && ((x < ((gx * game.gridSize) + 28))))){
if ((((y > ((gy * game.gridSize) + 4))) && ((y < ((gy * game.gridSize) + 28))))){
if ((((pth.length <= 0)) && (!(bDead)))){
bDead = true;
game.levelHealth = (game.levelHealth - 1);
game.killEnemy(this, true);
} else {
_local2 = Number(pth.pop());
_local3 = Number(pth.pop());
if (game.gameGrid.grid[_local3][_local2] == 1){
pth = game.gameGrid.findPath(gx, gy, endPoint.gx, endPoint.gy);
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
} else {
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
if (((bSpecial) && ((specialTimer == 0)))){
if (Math.random() < 0.05){
specialTimer = (specialTimer + 1);
doSpecial();
};
} else {
if (specialTimer > 0){
endSpecial();
};
};
vx = Math.cos(ang);
vy = Math.sin(ang);
setAngle();
};
};
};
};
}
public function closestAngle(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (_arg2 - _arg1);
_local3 = (_local3 % 360);
_local3 = (_local3 + 540);
_local3 = (_local3 % 360);
_local3 = (_local3 - 180);
return (_local3);
}
public function specialFX():void{
}
public function getDir():void{
var _local1:*;
var _local2:*;
if (pth == null){
baseSpeed = speed;
pth = game.gameGrid.findPath(gx, gy, endPoint.gx, endPoint.gy);
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local1 = (tx - x);
_local2 = (ty - y);
ang = Math.atan2(_local2, _local1);
vx = Math.cos(ang);
vy = Math.sin(ang);
setAngle();
};
}
public function endSpecial():void{
bSpecial = false;
specialTimer = 0;
}
public function damageFX():void{
makeFX();
specialFX();
}
public function makeFX():void{
var _local1:*;
var _local2:*;
fxTick++;
if (fxTick > 6){
fxTick = 0;
if (bio > 0){
health = (health - 1);
bio = (bio - 2);
speed = (baseSpeed * 0.6);
_local1 = new renderSprite(game, game.SpritePool.bioFX, 16, x, (y - 8), (-0.5 + Math.random()), -0.1, 10, 0.1, 10);
};
if (fire > 0){
speed = (baseSpeed * 1.1);
health = (health - 2);
fire = (fire - 2);
_local2 = new renderSprite(game, game.SpritePool.burning, 32, x, (y - 8), vx, (vy - 0.1), 10, 0.1, 10);
};
if (shock > 0){
speed = 0;
shock = (shock - 50);
};
if ((((((bio <= 0)) && ((fire <= 0)))) && ((shock <= 0)))){
speed = baseSpeed;
};
if (health <= 0){
takeDamage(1, "");
};
hBar.scaleX = (health / baseHealth);
};
}
public function doSpecial():void{
}
public function SetGrid():void{
gx = Math.floor((x / game.gridSize));
gy = Math.floor((y / game.gridSize));
}
public function deathFX():void{
var _local1:*;
if (bMetal){
_local1 = new renderSprite(game, game.SpritePool.explosion1, 64, x, y, 0, 0, 10, 0.2, 10);
game.decalFX.Crater(x, y);
} else {
if (bFlying){
_local1 = new renderSprite(game, game.SpritePool.explosion1, 64, x, y, 0, 0, 10, 0.2, 10);
} else {
_local1 = new renderSprite(game, game.SpritePool.penDie, 42, x, y, 0, 0, 10, 0.2, 10);
game.decalFX.Splat(x, y);
};
};
}
public function Tick(_arg1:Number):void{
SetGrid();
getDir();
Move(_arg1);
damageFX();
}
public function setPath(_arg1:Array):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
pth = new Array();
_local2 = _arg1.length;
for (_local3 in _arg1) {
pth.push(_arg1[_local3]);
};
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
vx = Math.cos(ang);
vy = Math.sin(ang);
setAngle();
}
public function setAngle():void{
}
public function findPath():void{
pth = game.gameGrid.findPath(gx, gy, endPoint.gx, endPoint.gy);
}
public function takeDamage(_arg1:Number=0, _arg2:String=""):void{
var _local3:*;
health = (health - _arg1);
if (_arg2 == "fire"){
fire = (fire + _arg1);
} else {
if (_arg2 == "poison"){
bio = (bio + _arg1);
} else {
if (_arg2 == "shock"){
shock = (shock + _arg1);
} else {
if (_arg2 == "heal"){
if (bMetal){
health = (health + _arg1);
} else {
_local3 = new renderSprite(game, game.SpritePool.healthUp, 16, x, (y - 8), (-0.5 + Math.random()), -0.1, 10, 0.1, 10);
};
} else {
if (_arg2 == "fix"){
if (!bMetal){
health = (health + _arg1);
} else {
_local3 = new renderSprite(game, game.SpritePool.healthUp, 16, x, (y - 8), (-0.5 + Math.random()), -0.1, 10, 0.1, 10);
};
};
};
};
};
};
if (health <= 0){
if (!visible){
game.gameInfo.addKills(5);
};
if (traveled < 30){
game.gameInfo.addKills(7);
};
if (pth.length < 4){
game.gameInfo.addKills[6];
};
deathFX();
game.killEnemy(this);
game.gameInfo.funds = (game.gameInfo.funds + cValue);
game.gameInfo.addCredit(cValue);
game.levelScore = (game.levelScore + (cValue * 2));
game.gameInfo.addKills(KillType);
} else {
if (health > baseHealth){
health = baseHealth;
};
};
}
public function reachedGoal():Boolean{
if ((((gx == endPoint.gx)) && ((gy == endPoint.gy)))){
return (true);
};
return (false);
}
public function snapToGrid():void{
SetGrid();
x = ((gx * game.gridSize) + (game.gridSize * 0.5));
y = ((gy * game.gridSize) + (game.gridSize * 0.5));
}
}
}//package
Section 80
//esplat (esplat)
package {
import flash.media.*;
public dynamic class esplat extends Sound {
}
}//package
Section 81
//explode1 (explode1)
package {
import flash.display.*;
public dynamic class explode1 extends BitmapData {
public function explode1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 82
//ExplodeS (ExplodeS)
package {
import flash.media.*;
public dynamic class ExplodeS extends Sound {
}
}//package
Section 83
//explosion_1 (explosion_1)
package {
import flash.media.*;
public dynamic class explosion_1 extends Sound {
}
}//package
Section 84
//faceBook (faceBook)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.external.*;
public dynamic class faceBook extends MovieClip {
public var link:String;
public function faceBook(){
addFrameScript(0, frame1);
}
function frame1(){
link = "http://www.facebook.com/pages/Armor-Games/19522089061";
this.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
}
public function onClick(_arg1:MouseEvent):void{
var event = _arg1;
try {
ExternalInterface.call("window.open", link, "_blank", "");
} catch(error:Error) {
navigateToURL(new URLRequest(link), "_blank");
};
}
}
}//package
Section 85
//fireBomb1 (fireBomb1)
package {
import flash.display.*;
public dynamic class fireBomb1 extends BitmapData {
public function fireBomb1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 86
//flame2 (flame2)
package {
import flash.display.*;
public dynamic class flame2 extends BitmapData {
public function flame2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 87
//forwButton (forwButton)
package {
import flash.display.*;
public class forwButton extends gameButton2 {
override public function doAction():void{
MovieClip(parent).nextFrame();
}
}
}//package
Section 88
//FrameController (FrameController)
package {
import flash.display.*;
import flash.events.*;
public class FrameController extends Sprite {
var targetFrame:int;
var owner:Game;
var bRunning:Boolean;// = false
public function FrameController(){
bRunning = false;
super();
owner = Game(parent);
owner.frameController = this;
addEventListener(Event.ENTER_FRAME, tick);
alpha = 1;
visible = true;
mouseEnabled = false;
getFrame(1);
}
private function tick(_arg1:Event):void{
if (bRunning){
if (owner.currentFrame != targetFrame){
if (alpha < 1){
alpha = (alpha + 0.02);
} else {
owner.gotoAndStop(targetFrame);
};
} else {
if (alpha > 0){
alpha = (alpha - 0.02);
} else {
visible = false;
bRunning = false;
alpha = 0;
owner.arrived(targetFrame);
};
};
};
}
public function getFrame(_arg1:int):void{
targetFrame = _arg1;
bRunning = true;
visible = true;
}
}
}//package
Section 89
//FxLayer (FxLayer)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class FxLayer extends Sprite {
private var clearRec:Rectangle;
public var sparks:Array;
private var bcanvas:BitmapData;
public var Canvas:MovieClip;
public var tracers:Array;
private var tbcanvas:Bitmap;
public var beams:Array;
public var Canvas2:MovieClip;
public var game:Game;
public function FxLayer(){
sparks = new Array();
tracers = new Array();
beams = new Array();
super();
mouseEnabled = false;
game = Game(parent);
clearRec = new Rectangle(0, 0, 640, 480);
addEventListener(Event.ENTER_FRAME, Tick, false, 0, true);
game.fx = this;
}
private function renderTracer(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local2 = _arg1.wgt;
_local3 = (((_arg1.x + _arg1.ex) * 0.5) + offSet(8));
_local4 = (((_arg1.y + _arg1.ey) * 0.5) + offSet(8));
_local5 = (((_arg1.x + _local3) * 0.5) + offSet(6));
_local6 = (((_arg1.y + _local4) * 0.5) + offSet(6));
_local7 = (((_arg1.ex + _local3) * 0.5) + offSet(4));
_local8 = (((_arg1.ey + _local4) * 0.5) + offSet(4));
Canvas.graphics.lineStyle((_local2 * Math.random()), 16764057, (_arg1.life * 0.1));
Canvas.graphics.moveTo(_arg1.x, _arg1.y);
Canvas.graphics.lineTo(_local5, _local6);
Canvas.graphics.lineStyle((_local2 * Math.random()), 16764057, (_arg1.life * 0.1));
Canvas.graphics.lineTo(_local3, _local4);
Canvas.graphics.lineStyle((_local2 * Math.random()), 16777113, (_arg1.life * 0.1));
Canvas.graphics.lineTo(_local7, _local8);
Canvas.graphics.lineStyle((_local2 * Math.random()), 16764057, (_arg1.life * 0.1));
Canvas.graphics.lineTo(_arg1.ex, _arg1.ey);
}
public function removeBeam(_arg1:lightning):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = beams.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = beams[_local3];
if (_local4 == _arg1){
beams.splice(_local3, 1);
};
_local3++;
};
}
public function removeTracer(_arg1:Tracer):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = tracers.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = tracers[_local3];
if (_local4 == _arg1){
tracers.splice(_local3, 1);
};
_local3++;
};
}
private function offSet(_arg1):Number{
return ((-(_arg1) + (Math.random() * (_arg1 * 2))));
}
private function renderBeam(_arg1:lightning):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:Number;
var _local8:Number;
var _local9:*;
_local2 = (_arg1.life / 50);
_local3 = _arg1.sx;
_local4 = _arg1.sy;
_local5 = _arg1.vx;
_local6 = _arg1.vy;
Canvas2.graphics.lineStyle((1 + _local2), 0xFFFFFF, (_local2 + 0.1));
Canvas2.graphics.moveTo(_local3, _local4);
_local9 = 0;
while (_local9 < 9) {
_local2 = (_local2 - 0.05);
Canvas.graphics.lineStyle((3 + (_local2 * 2)), 0xFFFFFF, (_local2 + 0.8));
_local7 = (-6 + (Math.random() * 12));
_local8 = (-6 + (Math.random() * 12));
_local8 = (_local8 - (Math.sin((_local9 * 0.5)) * 5));
_local3 = (_local3 + _local5);
_local4 = (_local4 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
Canvas2.graphics.lineTo(_local3, _local4);
_local9++;
};
Canvas2.graphics.lineTo(_arg1.ex, _arg1.ey);
}
public function Tick(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
Canvas.graphics.clear();
Canvas2.graphics.clear();
_local2 = sparks.length;
_local3 = 0;
while (_local3 < _local2) {
_local8 = sparks[_local3];
if (_local8 != undefined){
renderSpark(_local8);
_local8.Tick();
};
_local3++;
};
_local4 = tracers.length;
_local5 = 0;
while (_local5 < _local4) {
_local8 = tracers[_local5];
if (_local8 != undefined){
renderTracer(_local8);
_local8.Tick();
};
_local5++;
};
_local6 = beams.length;
_local7 = 0;
while (_local7 < _local6) {
_local9 = beams[_local7];
if (_local9 != undefined){
renderBeam(_local9);
_local9.Tick();
};
_local7++;
};
}
public function removeSpark(_arg1:Spark):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = sparks.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = sparks[_local3];
if (_local4 == _arg1){
sparks.splice(_local3, 1);
};
_local3++;
};
}
private function renderSpark(_arg1):void{
Canvas.graphics.lineStyle(1, 16777164, (_arg1.life / 10));
Canvas.graphics.moveTo(_arg1.x, _arg1.y);
Canvas.graphics.lineTo((_arg1.x - _arg1.vx), (_arg1.y - _arg1.vy));
}
}
}//package
Section 90
//Game (Game)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class Game extends MovieClip {
public const gridSize:int = 32;
private const gameWidth:int = 25;
private const firstLevelFrame:int = 11;
private const lastLevelFrame:int = 30;
private const gameHeight:int = 25;
var WaveControl:waveController;
var devKey:String;// = "41fc977e7c5062c362263e30ae881756"
var spawners:Array;
var enemies:Array;
var agi_url:String;// = "http://agi.armorgames.com/assets/agi/AGI.swf"
var soundBox:soundManager;
public var gameGrid:GameGrid;
var endPoints2:EndTile2;
var endPoints3:EndTile3;
var endPoints1:EndTile1;
var towers:Array;
var SpritePool:spritePool;
public var gameLevel:MovieClip;
var Selected:Tower;
var renderElements:Array;
var fx:FxLayer;
public var frameController:FrameController;
var startPoints1:StartTile1;
var startPoints2:StartTile2;
var startPoints3:StartTile3;
private var mainTick:Timer;
var hud:Hud;
public var levelHealth:Number;// = 25
var agi;
var gameKey:String;// = "penguins-attack-3"
var decalFX:Decal;
private var lastTick:Number;
public var GameSpeed:Number;
public var levelScore:int;// = 0
public var currentLevel:int;// = 0
var projectiles:Array;
public var gameInfo:GameInfo;
public var baseSpeed:Number;
public function Game(){
var _local1:URLRequest;
var _local2:Loader;
currentLevel = 0;
levelHealth = 25;
levelScore = 0;
agi_url = "http://agi.armorgames.com/assets/agi/AGI.swf";
devKey = "41fc977e7c5062c362263e30ae881756";
gameKey = "penguins-attack-3";
super();
addFrameScript(0, frame1, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25);
gotoAndStop(1);
Security.allowDomain(agi_url);
gameInfo = new GameInfo(true, this);
SpritePool = new spritePool();
soundBox = new soundManager(this);
mainTick = new Timer(25);
mainTick.addEventListener(TimerEvent.TIMER, Tick, false, 0, true);
WaveControl = new waveController(this);
soundBox.playbgm();
_local1 = new URLRequest(agi_url);
_local2 = new Loader();
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
_local2.load(_local1);
}
public function createEnemy(_arg1, _arg2:int, _arg3:int, _arg4:Array=null):void{
var _local5:Enemy;
var _local6:GameActor;
var _local7:GameActor;
if (_arg2 == 1){
_local6 = startPoints1;
_local7 = endPoints1;
} else {
if (_arg2 == 2){
_local6 = startPoints2;
_local7 = endPoints2;
} else {
_local6 = startPoints3;
_local7 = endPoints3;
};
};
switch (_arg1){
case "pen1":
_local5 = new Pen1(this, _local7);
break;
case "pen2":
_local5 = new Pen2(this, _local7);
_local5.KillType = 2;
break;
case "pen3":
_local5 = new Pen3(this, _local7);
break;
case "pen4":
_local5 = new Pen4(this, _local7);
break;
case "pen5":
_local5 = new Pen5(this, _local7);
break;
case "pen6":
_local5 = new Pen6(this, _local7);
_local5.KillType = 2;
break;
case "pen7":
_local5 = new Pen7(this, _local7);
break;
case "pen8":
_local5 = new Pen8(this, _local7);
break;
case "pen9":
_local5 = new Pen9(this, _local7);
break;
case "pen10":
_local5 = new Pen10(this, _local7);
break;
case "pen11":
_local5 = new Pen11(this, _local7);
_local5.KillType = 4;
break;
case "pen12":
_local5 = new Pen12(this, _local7);
_local5.KillType = 3;
break;
case "pen13":
_local5 = new Pen13(this, _local7);
_local5.KillType = 3;
break;
case "pen14":
_local5 = new Pen14(this, _local7);
_local5.KillType = 3;
break;
case "pen15":
_local5 = new Pen15(this, _local7);
_local5.KillType = 4;
break;
default:
_local5 = new Pen1(this, _local7);
break;
};
_local5.x = _local6.x;
_local5.y = _local6.y;
if (_arg4 != null){
_local5.setPath(_arg4);
};
_local5.health = ((_local5.health + ((currentLevel - 1) * 10)) + (_arg3 * 8));
_local5.baseHealth = _local5.health;
_local5.cValue = (_local5.cValue + 2);
gameLevel.addChild(_local5);
enemies.push(_local5);
}
public function killSpawner(_arg1:waveSpawner):void{
var _local2:*;
var _local3:*;
_local2 = (spawners.length - 1);
_local3 = _local2;
while (_local3 > -1) {
if (spawners[_local3] != undefined){
if (spawners[_local3] == _arg1){
spawners.splice(_local3, 1);
break;
};
};
_local3--;
};
}
function loadComplete(_arg1:Event):void{
agi = _arg1.currentTarget.content;
addChild(agi);
agi.init(devKey, gameKey);
}
public function startLevel():void{
lastTick = getTimer();
mainTick.start();
gameLevel.addEventListener(Event.ENTER_FRAME, SortActors, false, 0, true);
hud.updateWaveInfo();
}
function frame14(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen10", 4, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen8", 4, 25, 80, 1);
WaveControl.addWave("pen8", 4, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
}
public function killTower(_arg1):void{
var _local2:*;
var _local3:*;
_local2 = (towers.length - 1);
_local3 = _local2;
while (_local3 > -1) {
if (towers[_local3] == _arg1){
towers.splice(_local3, 1);
gameLevel.removeChild(_arg1);
break;
};
_local3--;
};
}
function frame16(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen9", 4, 30, 600, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen9", 8, 30, 60, 1);
WaveControl.addWave("pen9", 8, 30, 60, 2);
WaveControl.addWave("pen9", 8, 30, 600, 3);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 2);
WaveControl.addWave("pen1", 24, 20, 500, 1);
WaveControl.addWave("pen2", 18, 20, 500, 2);
WaveControl.addWave("pen3", 18, 30, 500, 3);
WaveControl.addWave("pen8", 6, 25, 80, 2);
WaveControl.addWave("pen8", 6, 25, 800, 3);
WaveControl.addWave("pen15", 10, 35, 800, 3);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen15", 10, 35, 800, 1);
WaveControl.addWave("pen6", 7, 20, 50, 2);
WaveControl.addWave("pen6", 7, 20, 500, 3);
WaveControl.addWave("pen7", 6, 15, 80, 1);
WaveControl.addWave("pen7", 6, 15, 80, 2);
WaveControl.addWave("pen7", 6, 15, 800, 3);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 5, 50, 100, 2);
WaveControl.addWave("pen14", 5, 50, 100, 3);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
}
function frame12(){
WaveControl.addWave("pen1", 2, 20, 500, 1);
WaveControl.addWave("pen1", 4, 20, 500, 2);
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen2", 4, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 5, 20, 500, 1);
WaveControl.addWave("pen3", 5, 30, 500, 2);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 3, 20, 50, 2);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen4", 3, 20, 50, 1);
WaveControl.addWave("pen2", 6, 20, 500, 3);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 3, 20, 500, 2);
WaveControl.addWave("pen9", 3, 30, 60, 1);
WaveControl.addWave("pen9", 3, 30, 60, 2);
WaveControl.addWave("pen9", 3, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
}
function frame18(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen9", 4, 30, 600, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen9", 8, 30, 60, 1);
WaveControl.addWave("pen9", 8, 30, 60, 2);
WaveControl.addWave("pen9", 8, 30, 600, 3);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 2);
WaveControl.addWave("pen1", 24, 20, 500, 1);
WaveControl.addWave("pen2", 18, 20, 500, 2);
WaveControl.addWave("pen3", 18, 30, 500, 3);
WaveControl.addWave("pen8", 6, 25, 80, 2);
WaveControl.addWave("pen8", 6, 25, 800, 3);
WaveControl.addWave("pen15", 10, 35, 800, 3);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen15", 10, 35, 800, 1);
WaveControl.addWave("pen6", 7, 20, 50, 2);
WaveControl.addWave("pen6", 7, 20, 500, 3);
WaveControl.addWave("pen7", 6, 15, 80, 1);
WaveControl.addWave("pen7", 6, 15, 80, 2);
WaveControl.addWave("pen7", 6, 15, 800, 3);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 5, 50, 100, 2);
WaveControl.addWave("pen14", 5, 50, 100, 3);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
}
function frame15(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen10", 4, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen8", 4, 25, 80, 1);
WaveControl.addWave("pen8", 4, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
}
function frame1(){
stop();
}
public function arrived(_arg1):void{
if ((((_arg1 >= firstLevelFrame)) && ((_arg1 <= lastLevelFrame)))){
startLevel();
soundBox.stopbgm();
} else {
soundBox.playbgm();
};
}
function frame23(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen9", 4, 30, 600, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen9", 8, 30, 60, 1);
WaveControl.addWave("pen9", 8, 30, 60, 2);
WaveControl.addWave("pen9", 8, 30, 600, 3);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 2);
WaveControl.addWave("pen1", 24, 20, 500, 1);
WaveControl.addWave("pen2", 18, 20, 500, 2);
WaveControl.addWave("pen3", 18, 30, 500, 3);
WaveControl.addWave("pen8", 6, 25, 80, 2);
WaveControl.addWave("pen8", 6, 25, 800, 3);
WaveControl.addWave("pen15", 10, 35, 800, 3);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen15", 10, 35, 800, 1);
WaveControl.addWave("pen6", 7, 20, 50, 2);
WaveControl.addWave("pen6", 7, 20, 500, 3);
WaveControl.addWave("pen7", 6, 15, 80, 1);
WaveControl.addWave("pen7", 6, 15, 80, 2);
WaveControl.addWave("pen7", 6, 15, 800, 3);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 5, 50, 100, 2);
WaveControl.addWave("pen14", 5, 50, 100, 3);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 5, 50, 100, 2);
WaveControl.addWave("pen14", 5, 50, 100, 3);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
}
function frame11(){
WaveControl.addWave("pen1", 2, 20, 500, 1);
WaveControl.addWave("pen1", 2, 20, 500, 2);
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen2", 4, 20, 500, 2);
WaveControl.addWave("pen3", 4, 30, 500, 3);
WaveControl.addWave("pen2", 5, 20, 500, 3);
WaveControl.addWave("pen3", 5, 30, 500, 2);
WaveControl.addWave("pen2", 8, 20, 500, 3);
WaveControl.addWave("pen3", 8, 30, 500, 1);
WaveControl.addWave("pen4", 1, 20, 50, 2);
WaveControl.addWave("pen1", 4, 20, 50, 1);
WaveControl.addWave("pen1", 4, 20, 500, 3);
WaveControl.addWave("pen4", 2, 20, 50, 2);
WaveControl.addWave("pen3", 6, 30, 50, 1);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen9", 1, 30, 60, 1);
WaveControl.addWave("pen9", 1, 30, 60, 2);
WaveControl.addWave("pen9", 1, 30, 600, 3);
WaveControl.addWave("pen5", 2, 20, 200, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen9", 4, 30, 600, 3);
WaveControl.addWave("pen5", 2, 20, 200, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen2", 5, 20, 500, 3);
WaveControl.addWave("pen3", 5, 30, 500, 2);
WaveControl.addWave("pen2", 8, 20, 500, 3);
WaveControl.addWave("pen3", 8, 30, 500, 1);
WaveControl.addWave("pen5", 5, 20, 200, 3);
WaveControl.addWave("pen14", 2, 100, 100, 3);
}
function frame25(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen9", 4, 30, 600, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen9", 8, 30, 60, 1);
WaveControl.addWave("pen9", 8, 30, 60, 2);
WaveControl.addWave("pen9", 8, 30, 600, 3);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen1", 20, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 2);
WaveControl.addWave("pen1", 24, 20, 500, 1);
WaveControl.addWave("pen2", 18, 20, 500, 2);
WaveControl.addWave("pen3", 18, 30, 500, 3);
WaveControl.addWave("pen8", 6, 25, 80, 2);
WaveControl.addWave("pen8", 6, 25, 800, 3);
WaveControl.addWave("pen15", 10, 35, 800, 3);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen15", 10, 35, 800, 1);
WaveControl.addWave("pen6", 7, 20, 50, 2);
WaveControl.addWave("pen6", 7, 20, 500, 3);
WaveControl.addWave("pen7", 6, 15, 80, 1);
WaveControl.addWave("pen7", 6, 15, 80, 2);
WaveControl.addWave("pen7", 6, 15, 800, 3);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 5, 50, 100, 2);
WaveControl.addWave("pen14", 5, 50, 100, 3);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 5, 50, 100, 2);
WaveControl.addWave("pen14", 5, 50, 100, 3);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
}
function frame13(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen10", 4, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen8", 4, 25, 80, 1);
WaveControl.addWave("pen8", 4, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 4, 50, 1000, 1);
}
function frame21(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen9", 4, 30, 600, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen9", 8, 30, 60, 1);
WaveControl.addWave("pen9", 8, 30, 60, 2);
WaveControl.addWave("pen9", 8, 30, 600, 3);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 2);
WaveControl.addWave("pen1", 24, 20, 500, 1);
WaveControl.addWave("pen2", 18, 20, 500, 2);
WaveControl.addWave("pen3", 18, 30, 500, 3);
WaveControl.addWave("pen8", 6, 25, 80, 2);
WaveControl.addWave("pen8", 6, 25, 800, 3);
WaveControl.addWave("pen15", 10, 35, 800, 3);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen15", 10, 35, 800, 1);
WaveControl.addWave("pen6", 7, 20, 50, 2);
WaveControl.addWave("pen6", 7, 20, 500, 3);
WaveControl.addWave("pen7", 6, 15, 80, 1);
WaveControl.addWave("pen7", 6, 15, 80, 2);
WaveControl.addWave("pen7", 6, 15, 800, 3);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 5, 50, 100, 2);
WaveControl.addWave("pen14", 5, 50, 100, 3);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
}
function frame22(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen9", 4, 30, 600, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen9", 8, 30, 60, 1);
WaveControl.addWave("pen9", 8, 30, 60, 2);
WaveControl.addWave("pen9", 8, 30, 600, 3);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 2);
WaveControl.addWave("pen1", 24, 20, 500, 1);
WaveControl.addWave("pen2", 18, 20, 500, 2);
WaveControl.addWave("pen3", 18, 30, 500, 3);
WaveControl.addWave("pen8", 6, 25, 80, 2);
WaveControl.addWave("pen8", 6, 25, 800, 3);
WaveControl.addWave("pen15", 10, 35, 800, 3);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen15", 10, 35, 800, 1);
WaveControl.addWave("pen6", 7, 20, 50, 2);
WaveControl.addWave("pen6", 7, 20, 500, 3);
WaveControl.addWave("pen7", 6, 15, 80, 1);
WaveControl.addWave("pen7", 6, 15, 80, 2);
WaveControl.addWave("pen7", 6, 15, 800, 3);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 5, 50, 100, 2);
WaveControl.addWave("pen14", 5, 50, 100, 3);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
}
function frame17(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen9", 4, 30, 600, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen9", 8, 30, 60, 1);
WaveControl.addWave("pen9", 8, 30, 60, 2);
WaveControl.addWave("pen9", 8, 30, 600, 3);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 2);
WaveControl.addWave("pen1", 24, 20, 500, 1);
WaveControl.addWave("pen2", 18, 20, 500, 2);
WaveControl.addWave("pen3", 18, 30, 500, 3);
WaveControl.addWave("pen8", 6, 25, 80, 2);
WaveControl.addWave("pen8", 6, 25, 800, 3);
WaveControl.addWave("pen15", 10, 35, 800, 3);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen15", 10, 35, 800, 1);
WaveControl.addWave("pen6", 7, 20, 50, 2);
WaveControl.addWave("pen6", 7, 20, 500, 3);
WaveControl.addWave("pen7", 6, 15, 80, 1);
WaveControl.addWave("pen7", 6, 15, 80, 2);
WaveControl.addWave("pen7", 6, 15, 800, 3);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 5, 50, 100, 2);
WaveControl.addWave("pen14", 5, 50, 100, 3);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
}
function frame24(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen9", 4, 30, 600, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen9", 8, 30, 60, 1);
WaveControl.addWave("pen9", 8, 30, 60, 2);
WaveControl.addWave("pen9", 8, 30, 600, 3);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 2);
WaveControl.addWave("pen1", 24, 20, 500, 1);
WaveControl.addWave("pen2", 18, 20, 500, 2);
WaveControl.addWave("pen3", 18, 30, 500, 3);
WaveControl.addWave("pen8", 6, 25, 80, 2);
WaveControl.addWave("pen8", 6, 25, 800, 3);
WaveControl.addWave("pen15", 10, 35, 800, 3);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen15", 10, 35, 800, 1);
WaveControl.addWave("pen6", 7, 20, 50, 2);
WaveControl.addWave("pen6", 7, 20, 500, 3);
WaveControl.addWave("pen7", 6, 15, 80, 1);
WaveControl.addWave("pen7", 6, 15, 80, 2);
WaveControl.addWave("pen7", 6, 15, 800, 3);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 5, 50, 100, 2);
WaveControl.addWave("pen14", 5, 50, 100, 3);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 5, 50, 100, 2);
WaveControl.addWave("pen14", 5, 50, 100, 3);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
}
function frame19(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen9", 4, 30, 600, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen9", 8, 30, 60, 1);
WaveControl.addWave("pen9", 8, 30, 60, 2);
WaveControl.addWave("pen9", 8, 30, 600, 3);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 2);
WaveControl.addWave("pen1", 24, 20, 500, 1);
WaveControl.addWave("pen2", 18, 20, 500, 2);
WaveControl.addWave("pen3", 18, 30, 500, 3);
WaveControl.addWave("pen8", 6, 25, 80, 2);
WaveControl.addWave("pen8", 6, 25, 800, 3);
WaveControl.addWave("pen15", 10, 35, 800, 3);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen15", 10, 35, 800, 1);
WaveControl.addWave("pen6", 7, 20, 50, 2);
WaveControl.addWave("pen6", 7, 20, 500, 3);
WaveControl.addWave("pen7", 6, 15, 80, 1);
WaveControl.addWave("pen7", 6, 15, 80, 2);
WaveControl.addWave("pen7", 6, 15, 800, 3);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 10, 30, 60, 1);
WaveControl.addWave("pen9", 10, 30, 600, 2);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen10", 10, 30, 1000, 3);
WaveControl.addWave("pen14", 6, 50, 100, 2);
WaveControl.addWave("pen14", 6, 50, 100, 3);
WaveControl.addWave("pen13", 3, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen14", 10, 50, 100, 2);
WaveControl.addWave("pen14", 10, 50, 100, 3);
WaveControl.addWave("pen13", 5, 60, 1000, 1);
}
private function SortActors(_arg1:Event):void{
var _local2:uint;
var _local3:*;
var _local4:*;
hud.Tick();
_local2 = gameLevel.numChildren;
_local3 = 0;
while (_local3 < (_local2 - 1)) {
_local4 = (_local3 + 1);
while (_local4 < _local2) {
if (gameLevel.getChildAt(_local3).y > gameLevel.getChildAt(_local4).y){
gameLevel.swapChildrenAt(_local3, _local4);
};
_local4++;
};
_local3++;
};
}
function frame20(){
WaveControl.addWave("pen1", 4, 20, 500, 1);
WaveControl.addWave("pen1", 6, 20, 500, 2);
WaveControl.addWave("pen1", 6, 20, 500, 1);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen2", 6, 20, 500, 2);
WaveControl.addWave("pen3", 6, 30, 500, 3);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen9", 4, 30, 600, 3);
WaveControl.addWave("pen2", 8, 20, 500, 1);
WaveControl.addWave("pen3", 8, 30, 500, 2);
WaveControl.addWave("pen2", 10, 20, 500, 1);
WaveControl.addWave("pen3", 10, 30, 500, 1);
WaveControl.addWave("pen4", 4, 20, 50, 2);
WaveControl.addWave("pen1", 10, 20, 500, 2);
WaveControl.addWave("pen4", 4, 20, 50, 1);
WaveControl.addWave("pen9", 8, 30, 60, 1);
WaveControl.addWave("pen9", 8, 30, 60, 2);
WaveControl.addWave("pen9", 8, 30, 600, 3);
WaveControl.addWave("pen2", 10, 20, 500, 3);
WaveControl.addWave("pen2", 12, 20, 500, 2);
WaveControl.addWave("pen3", 12, 30, 500, 3);
WaveControl.addWave("pen8", 5, 25, 80, 2);
WaveControl.addWave("pen8", 5, 25, 800, 3);
WaveControl.addWave("pen15", 6, 35, 800, 3);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen3", 8, 30, 50, 1);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen9", 4, 30, 60, 1);
WaveControl.addWave("pen9", 4, 30, 60, 2);
WaveControl.addWave("pen5", 2, 50, 400, 3);
WaveControl.addWave("pen15", 2, 35, 800, 3);
WaveControl.addWave("pen3", 10, 30, 50, 3);
WaveControl.addWave("pen4", 4, 20, 500, 2);
WaveControl.addWave("pen7", 4, 15, 80, 1);
WaveControl.addWave("pen7", 4, 15, 80, 2);
WaveControl.addWave("pen7", 4, 15, 800, 3);
WaveControl.addWave("pen1", 8, 20, 500, 1);
WaveControl.addWave("pen1", 12, 20, 500, 2);
WaveControl.addWave("pen1", 12, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 1);
WaveControl.addWave("pen1", 20, 20, 500, 2);
WaveControl.addWave("pen1", 24, 20, 500, 1);
WaveControl.addWave("pen2", 18, 20, 500, 2);
WaveControl.addWave("pen3", 18, 30, 500, 3);
WaveControl.addWave("pen8", 6, 25, 80, 2);
WaveControl.addWave("pen8", 6, 25, 800, 3);
WaveControl.addWave("pen15", 10, 35, 800, 3);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen15", 10, 35, 800, 1);
WaveControl.addWave("pen6", 7, 20, 50, 2);
WaveControl.addWave("pen6", 7, 20, 500, 3);
WaveControl.addWave("pen7", 6, 15, 80, 1);
WaveControl.addWave("pen7", 6, 15, 80, 2);
WaveControl.addWave("pen7", 6, 15, 800, 3);
WaveControl.addWave("pen10", 8, 30, 1000, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 60, 2);
WaveControl.addWave("pen9", 6, 30, 600, 3);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen5", 2, 50, 100, 1);
WaveControl.addWave("pen12", 2, 45, 100, 1);
WaveControl.addWave("pen5", 2, 50, 100, 2);
WaveControl.addWave("pen12", 2, 45, 100, 2);
WaveControl.addWave("pen5", 2, 50, 100, 3);
WaveControl.addWave("pen12", 2, 45, 500, 3);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen11", 4, 35, 1000, 2);
WaveControl.addWave("pen15", 6, 35, 800, 1);
WaveControl.addWave("pen6", 4, 20, 50, 2);
WaveControl.addWave("pen6", 4, 20, 500, 3);
WaveControl.addWave("pen9", 6, 30, 60, 1);
WaveControl.addWave("pen9", 6, 30, 600, 2);
WaveControl.addWave("pen10", 10, 30, 100, 1);
WaveControl.addWave("pen10", 10, 30, 100, 2);
WaveControl.addWave("pen13", 2, 60, 1000, 1);
WaveControl.addWave("pen8", 8, 25, 80, 2);
WaveControl.addWave("pen8", 8, 25, 800, 2);
WaveControl.addWave("pen12", 5, 45, 100, 1);
WaveControl.addWave("pen12", 5, 45, 100, 2);
WaveControl.addWave("pen14", 4, 50, 75, 2);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 3);
WaveControl.addWave("pen12", 8, 45, 1000, 1);
WaveControl.addWave("pen11", 8, 35, 1000, 2);
WaveControl.addWave("pen12", 10, 45, 1000, 1);
WaveControl.addWave("pen14", 6, 50, 1000, 1);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
WaveControl.addWave("pen14", 8, 50, 100, 2);
WaveControl.addWave("pen14", 8, 50, 100, 3);
WaveControl.addWave("pen13", 4, 60, 1000, 1);
}
public function stopLevel(){
mainTick.stop();
removeEventListener(Event.ENTER_FRAME, SortActors, false);
}
public function killEnemy(_arg1:Enemy, _arg2:Boolean=false):void{
var _local3:*;
var _local4:*;
_arg1.visible = false;
_local3 = (enemies.length - 1);
_arg1.x = -50;
_arg1.y = -50;
_local4 = _local3;
while (_local4 > -1) {
if (enemies[_local4] == _arg1){
enemies.splice(_local4, 1);
gameLevel.removeChild(_arg1);
break;
};
_local4--;
};
}
private function Update(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
_local3 = enemies.length;
_local4 = 0;
while (_local4 < _local3) {
_local2 = enemies[_local4];
if (_local2 != undefined){
_local2.Tick(_arg1);
};
_local4++;
};
_local5 = projectiles.length;
_local6 = 0;
while (_local6 < _local5) {
_local2 = projectiles[_local6];
if (_local2 != undefined){
_local2.Tick(_arg1);
};
_local6++;
};
_local7 = towers.length;
_local8 = 0;
while (_local8 < _local7) {
_local2 = towers[_local8];
if (_local2 != undefined){
_local2.Tick(_arg1);
};
_local8++;
};
_local9 = spawners.length;
_local10 = 0;
while (_local10 < _local9) {
_local2 = spawners[_local10];
if (_local2 != undefined){
_local2.Tick(_arg1);
};
_local10++;
};
WaveControl.Tick(_arg1);
_local11 = renderElements.length;
_local12 = 0;
while (_local12 < _local11) {
_local2 = renderElements[_local12];
if (_local2 != undefined){
_local2.Tick(_arg1);
};
_local12++;
};
}
public function levelUpPlayer():void{
hud.levelUp();
}
public function destroyTower(_arg1, _arg2):void{
var _local3:*;
var _local4:*;
_local3 = (towers.length - 1);
_local4 = _local3;
while (_local4 > -1) {
if ((((towers[_local4].gx == _arg1)) && ((towers[_local4].gy == _arg2)))){
towers[_local4].blowUp();
break;
};
_local4--;
};
}
public function inRange(_arg1:Tower, _arg2:Enemy):Boolean{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if (_arg2.visible){
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
_local5 = ((_local3 * _local3) + (_local4 * _local4));
_local6 = _arg1.Range;
_local7 = (_arg1.Range * _local6);
if (_local5 <= _local7){
return (true);
};
return (false);
//unresolved jump
};
return (false);
}
public function getFrame(_arg1):void{
frameController.getFrame(_arg1);
}
public function makeTower(_arg1:int, _arg2:int=50):void{
var _local3:Tower;
if ((((Selected == null)) || ((Selected.bHeld == false)))){
switch (_arg1){
case 1:
_local3 = new tower1(this);
break;
case 2:
_local3 = new tower2(this);
break;
case 3:
_local3 = new tower3(this);
break;
case 4:
_local3 = new tower4(this);
break;
case 5:
_local3 = new tower5(this);
break;
case 6:
_local3 = new tower6(this);
break;
case 7:
_local3 = new tower7(this);
break;
case 8:
_local3 = new tower8(this);
break;
case 9:
_local3 = new tower9(this);
break;
case 10:
_local3 = new tower10(this);
break;
};
_local3.cost = _arg2;
gameLevel.addChild(_local3);
towers.push(_local3);
if (towers.length == 50){
gameInfo.unlockAchievement(7);
};
};
}
public function Tick(_arg1:TimerEvent){
var _local2:*;
var _local3:Number;
_local2 = getTimer();
_local3 = (_local2 - lastTick);
lastTick = _local2;
GameSpeed = ((baseSpeed * _local3) * 0.08);
if (GameSpeed > 4){
GameSpeed = 4;
};
Update(GameSpeed);
}
public function killSprite(_arg1:renderSprite):void{
var _local2:*;
var _local3:*;
_local2 = (renderElements.length - 1);
_local3 = _local2;
while (_local3 > -1) {
if (renderElements[_local3] == _arg1){
renderElements.splice(_local3, 1);
break;
};
_local3--;
};
}
public function getLevel(_arg1):void{
newLevel();
getFrame((_arg1 + 10));
currentLevel = _arg1;
}
public function newLevel():void{
gameGrid = new GameGrid(gameHeight, gameWidth, 0, this);
WaveControl.resetWC();
enemies = new Array();
projectiles = new Array();
renderElements = new Array();
towers = new Array();
spawners = new Array();
levelHealth = 25;
baseSpeed = 1;
Selected = null;
gameInfo.funds = gameInfo.startFunds;
}
public function getEnemy(_arg1:Tower):Enemy{
var _local2:*;
var _local3:Enemy;
var _local4:Enemy;
var _local5:*;
var _local6:Boolean;
var _local7:*;
var _local8:*;
_local2 = enemies.length;
_local3 = null;
_local4 = null;
_local5 = 0;
_local6 = false;
_local7 = _arg1.bNoFly;
_local8 = 0;
while (_local8 < _local2) {
_local4 = enemies[_local8];
if (_local4 != undefined){
if (inRange(_arg1, _local4)){
if (!_local7){
_local3 = _local4;
_local6 = true;
} else {
if (!_local4.bFlying){
_local3 = _local4;
_local6 = true;
};
};
};
};
if (_local6){
_local8 = _local2;
};
_local8++;
};
return (_local3);
}
public function killProjectile(_arg1, _arg2:Boolean=false):void{
var _local3:*;
var _local4:*;
_local3 = (projectiles.length - 1);
_local4 = _local3;
while (_local4 > -1) {
if (projectiles[_local4] != undefined){
if (projectiles[_local4] == _arg1){
if (!_arg2){
decalFX.Crater(_arg1.x, _arg1.y);
};
projectiles.splice(_local4, 1);
break;
};
};
_local4--;
};
}
}
}//package
Section 91
//GameActor (GameActor)
package {
import flash.display.*;
public class GameActor extends Sprite {
public var gy:int;
public var vx:Number;
public var vy:Number;
public var gx:int;
public var game:Game;
public function GameActor(){
game = Game(parent.parent);
}
public function SetGrid():void{
gx = Math.floor((x / game.gridSize));
gy = Math.floor((y / game.gridSize));
}
public function Tick(_arg1:Number):void{
}
}
}//package
Section 92
//gameButton (gameButton)
package {
import flash.display.*;
import flash.events.*;
public class gameButton extends Sprite {
var game:Game;
public function gameButton(){
game = Game(parent);
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
}
public function clicked(_arg1:MouseEvent){
doAction();
}
public function doAction():void{
}
}
}//package
Section 93
//gameButton2 (gameButton2)
package {
import flash.display.*;
import flash.events.*;
public class gameButton2 extends Sprite {
var game:Game;
public function gameButton2(){
game = Game(parent.parent);
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
}
public function clicked(_arg1:MouseEvent){
doAction();
}
public function doAction():void{
}
}
}//package
Section 94
//GameGrid (GameGrid)
package {
public class GameGrid {
public var grid:Array;
private var game:Game;
private var blank:int;
public function GameGrid(_arg1:int, _arg2:int, _arg3:int, _arg4:Game){
game = _arg4;
blank = _arg3;
createBlankGrid(_arg1, _arg2, _arg3);
}
public function getArray(_arg1, _arg2):int{
if ((((((((_arg1 < 0)) || ((_arg1 > 25)))) || ((_arg2 < 0)))) || ((_arg2 > 25)))){
return (1);
};
return (int(grid[_arg1][_arg2]));
}
public function findPath(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:Number;
var _local10:*;
_local5 = {};
_local6 = [];
_local5.unchecked = [];
_local5.done = false;
_local7 = (Math.abs((_arg1 - _arg3)) + Math.abs((_arg2 - _arg4)));
_local5.name = ((("cell_" + _arg2) + "_") + _arg1);
_local5[_local5.name] = {x:_arg1, y:_arg2, visited:true, px:null, py:null, cost:_local7};
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
while (_local5.unchecked.length > 0) {
_local8 = _local5.unchecked.shift();
_local9 = 0;
if ((((_local8.x == _arg3)) && ((_local8.y == _arg4)))){
while (_local8.px != null) {
_local6[_local6.length] = _local8.x;
_local6[_local6.length] = _local8.y;
_local8 = _local5[((("cell_" + _local8.py) + "_") + _local8.px)];
};
_local5.done = true;
break;
} else {
_local8.visited = true;
_local10 = false;
if (getArray((_local8.x + 1), _local8.y) == blank){
_local9 = (Math.abs(((_local8.x + 1) - _arg3)) + Math.abs((_local8.y - _arg4)));
_local5.name = ((("cell_" + _local8.y) + "_") + (_local8.x + 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x + 1), y:_local8.y, visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if (getArray((_local8.x - 1), _local8.y) == blank){
_local9 = (Math.abs(((_local8.x - 1) - _arg3)) + Math.abs((_local8.y - _arg4)));
_local5.name = ((("cell_" + _local8.y) + "_") + (_local8.x - 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x - 1), y:_local8.y, visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if (getArray(_local8.x, (_local8.y + 1)) == blank){
_local9 = (Math.abs((_local8.x - _arg3)) + Math.abs(((_local8.y + 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y + 1)) + "_") + _local8.x);
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:_local8.x, y:(_local8.y + 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if (getArray(_local8.x, (_local8.y - 1)) == blank){
_local9 = (Math.abs((_local8.x - _arg3)) + Math.abs(((_local8.y - 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y - 1)) + "_") + _local8.x);
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:_local8.x, y:(_local8.y - 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if ((((((getArray((_local8.x + 1), (_local8.y + 1)) == blank)) && ((getArray(_local8.x, (_local8.y + 1)) == blank)))) && ((getArray((_local8.x + 1), _local8.y) == blank)))){
_local9 = (Math.abs(((_local8.x + 1) - _arg3)) + Math.abs(((_local8.y + 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y + 1)) + "_") + (_local8.x + 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x + 1), y:(_local8.y + 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if ((((((getArray((_local8.x - 1), (_local8.y - 1)) == blank)) && ((getArray(_local8.x, (_local8.y - 1)) == blank)))) && ((getArray((_local8.x - 1), _local8.y) == blank)))){
_local9 = (Math.abs(((_local8.x - 1) - _arg3)) + Math.abs(((_local8.y - 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y - 1)) + "_") + (_local8.x - 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x - 1), y:(_local8.y - 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if ((((((getArray((_local8.x - 1), (_local8.y + 1)) == blank)) && ((getArray(_local8.x, (_local8.y + 1)) == blank)))) && ((getArray((_local8.x - 1), _local8.y) == blank)))){
_local9 = (Math.abs(((_local8.x - 1) - _arg3)) + Math.abs(((_local8.y + 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y + 1)) + "_") + (_local8.x - 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x - 1), y:(_local8.y + 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if ((((((getArray((_local8.x + 1), (_local8.y - 1)) == blank)) && ((getArray(_local8.x, (_local8.y - 1)) == blank)))) && ((getArray((_local8.x + 1), _local8.y) == blank)))){
_local9 = (Math.abs(((_local8.x + 1) - _arg3)) + Math.abs(((_local8.y - 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y - 1)) + "_") + (_local8.x + 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x + 1), y:(_local8.y - 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
};
};
if (_local5.done){
return (_local6);
};
return (undefined);
}
public function checkPath(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:Number;
var _local10:*;
_local5 = {};
_local6 = [];
_local5.unchecked = [];
_local5.done = false;
_local7 = (Math.abs((_arg1 - _arg3)) + Math.abs((_arg2 - _arg4)));
_local5.name = ((("cell_" + _arg2) + "_") + _arg1);
_local5[_local5.name] = {x:_arg1, y:_arg2, visited:true, px:null, py:null, cost:_local7};
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
while (_local5.unchecked.length > 0) {
_local8 = _local5.unchecked.shift();
_local9 = 0;
if ((((_local8.x == _arg3)) && ((_local8.y == _arg4)))){
while (_local8.px != null) {
_local6[_local6.length] = _local8.x;
_local6[_local6.length] = _local8.y;
_local8 = _local5[((("cell_" + _local8.py) + "_") + _local8.px)];
};
_local5.done = true;
break;
} else {
_local8.visited = true;
_local10 = false;
if (getArray((_local8.x + 1), _local8.y) == blank){
_local9 = (Math.abs(((_local8.x + 1) - _arg3)) + Math.abs((_local8.y - _arg4)));
_local5.name = ((("cell_" + _local8.y) + "_") + (_local8.x + 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x + 1), y:_local8.y, visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if (getArray((_local8.x - 1), _local8.y) == blank){
_local9 = (Math.abs(((_local8.x - 1) - _arg3)) + Math.abs((_local8.y - _arg4)));
_local5.name = ((("cell_" + _local8.y) + "_") + (_local8.x - 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x - 1), y:_local8.y, visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if (getArray(_local8.x, (_local8.y + 1)) == blank){
_local9 = (Math.abs((_local8.x - _arg3)) + Math.abs(((_local8.y + 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y + 1)) + "_") + _local8.x);
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:_local8.x, y:(_local8.y + 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if (getArray(_local8.x, (_local8.y - 1)) == blank){
_local9 = (Math.abs((_local8.x - _arg3)) + Math.abs(((_local8.y - 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y - 1)) + "_") + _local8.x);
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:_local8.x, y:(_local8.y - 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if ((((((getArray((_local8.x + 1), (_local8.y + 1)) == blank)) && ((getArray(_local8.x, (_local8.y + 1)) == blank)))) && ((getArray((_local8.x + 1), _local8.y) == blank)))){
_local9 = (Math.abs(((_local8.x + 1) - _arg3)) + Math.abs(((_local8.y + 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y + 1)) + "_") + (_local8.x + 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x + 1), y:(_local8.y + 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if ((((((getArray((_local8.x - 1), (_local8.y - 1)) == blank)) && ((getArray(_local8.x, (_local8.y - 1)) == blank)))) && ((getArray((_local8.x - 1), _local8.y) == blank)))){
_local9 = (Math.abs(((_local8.x - 1) - _arg3)) + Math.abs(((_local8.y - 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y - 1)) + "_") + (_local8.x - 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x - 1), y:(_local8.y - 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if ((((((getArray((_local8.x - 1), (_local8.y + 1)) == blank)) && ((getArray(_local8.x, (_local8.y + 1)) == blank)))) && ((getArray((_local8.x - 1), _local8.y) == blank)))){
_local9 = (Math.abs(((_local8.x - 1) - _arg3)) + Math.abs(((_local8.y + 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y + 1)) + "_") + (_local8.x - 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x - 1), y:(_local8.y + 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
_local10 = false;
if ((((((getArray((_local8.x + 1), (_local8.y - 1)) == blank)) && ((getArray(_local8.x, (_local8.y - 1)) == blank)))) && ((getArray((_local8.x + 1), _local8.y) == blank)))){
_local9 = (Math.abs(((_local8.x + 1) - _arg3)) + Math.abs(((_local8.y - 1) - _arg4)));
_local5.name = ((("cell_" + (_local8.y - 1)) + "_") + (_local8.x + 1));
if (_local5[_local5.name] == undefined){
_local5[_local5.name] = {x:(_local8.x + 1), y:(_local8.y - 1), visited:false, px:_local8.x, py:_local8.y, cost:_local9};
if (_local10 == false){
_local5.unchecked[_local5.unchecked.length] = _local5[_local5.name];
};
};
};
};
};
if (_local5.done){
return (true);
};
return (false);
}
public function checkDrop(_arg1:Tower):Boolean{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = _arg1.gx;
_local3 = _arg1.gy;
grid[_local2][_local3] = 1;
_local4 = true;
if (game.startPoints1 != null){
_local4 = checkPath(game.startPoints1.gx, game.startPoints1.gy, game.endPoints1.gx, game.endPoints1.gy);
};
if (((!((game.startPoints2 == null))) && (!((_local4 == false))))){
_local4 = checkPath(game.startPoints2.gx, game.startPoints2.gy, game.endPoints2.gx, game.endPoints2.gy);
};
if (((!((game.startPoints3 == null))) && (!((_local4 == false))))){
_local4 = checkPath(game.startPoints3.gx, game.startPoints3.gy, game.endPoints3.gx, game.endPoints3.gy);
};
if (_local4 == false){
grid[_local2][_local3] = 0;
};
return (_local4);
}
private function createBlankGrid(_arg1:int, _arg2:int, _arg3:int){
var _local4:*;
var _local5:*;
grid = new Array();
_local4 = 0;
while (_local4 < _arg2) {
grid.push(new Array());
_local5 = 0;
while (_local5 < _arg1) {
grid[_local4].push(_arg3);
_local5++;
};
_local4++;
};
}
}
}//package
Section 95
//GameInfo (GameInfo)
package {
import flash.net.*;
public class GameInfo {
public var startFunds:int;// = 300
public var towerCount:int;// = 0
public var funds:int;// = 500
public var ugLevel:int;// = 1
public var upgradeCount:int;// = 0
public var Levels:Array;
public var credits:int;// = 0
public var playerLevel:int;// = 1
public var wavesEarly:int;// = 0
public var Towers:Array;
public var achievements:Array;
public var game:Game;
public var Kills:Array;
public var GameData:SharedObject;
public function GameInfo(_arg1:Boolean, _arg2:Game){
funds = 500;
startFunds = 300;
credits = 0;
ugLevel = 1;
playerLevel = 1;
towerCount = 0;
upgradeCount = 0;
wavesEarly = 0;
super();
game = _arg2;
GameData = SharedObject.getLocal("PA3-rel-01", "/", false);
if (GameData.data.bPlayed == 1){
LoadData();
} else {
createNewData();
};
}
public function saveLevel(_arg1:int, _arg2:int):void{
if (int(Levels[_arg1]) < _arg2){
Levels[_arg1] = _arg2;
saveData();
if (_arg1 == 15){
unlockAchievement(15);
};
};
}
public function addUpgrade():void{
upgradeCount++;
GameData.data.upgradeCount = upgradeCount;
if ((((upgradeCount > 200)) && ((achievements[10] == 0)))){
unlockAchievement(10);
};
}
public function addCredit(_arg1){
var _local2:*;
credits = (credits + _arg1);
GameData.data.credits = credits;
_local2 = (500 + ((playerLevel - 1) * 250));
if (credits >= _local2){
game.levelUpPlayer();
playerLevel = (playerLevel + 1);
credits = (credits - _local2);
GameData.data.credits = credits;
GameData.data.playerLevel = playerLevel;
if (playerLevel == 5){
unlockAchievement(4);
} else {
if (playerLevel == 10){
unlockAchievement(9);
};
};
};
}
public function unlockAchievement(_arg1):void{
var _local2:*;
var _local3:*;
if (achievements[_arg1] == 0){
achievements[_arg1] = 1;
GameData.data[("achievements" + _arg1)] = 1;
if (_arg1 < 15){
_local2 = getAchievement(_arg1);
_local3 = new acPopup(game, _local2[0], _local2[1]);
_local3.x = 304;
_local3.y = 416;
game.hud.addChild(_local3);
};
};
}
public function LoadData():void{
var _local1:*;
GameData.data.bPlayed = 1;
credits = int(GameData.data.credits);
ugLevel = GameData.data.ugLevel;
playerLevel = GameData.data.playerLevel;
towerCount = GameData.data.towerCount;
upgradeCount = GameData.data.upgradeCount;
wavesEarly = GameData.data.waves;
startFunds = int(GameData.data.stFunds);
Towers = new Array();
Levels = new Array();
achievements = new Array();
Kills = new Array();
_local1 = 0;
while (_local1 < 20) {
Towers.push(int(GameData.data[("Tower" + _local1)]));
_local1++;
};
_local1 = 0;
while (_local1 < 40) {
Levels.push(int(GameData.data[("Level" + _local1)]));
_local1++;
};
_local1 = 0;
while (_local1 < 16) {
Kills.push(int(GameData.data[("Kills" + _local1)]));
_local1++;
};
_local1 = 0;
while (_local1 < 16) {
achievements.push(int(GameData.data[("achievements" + _local1)]));
_local1++;
};
funds = startFunds;
}
public function addWaves():void{
wavesEarly++;
GameData.data.waves = wavesEarly;
if (wavesEarly == 200){
unlockAchievement(8);
};
}
public function createNewData():void{
var _local1:*;
credits = 0;
ugLevel = 1;
Towers = new Array();
Levels = new Array();
achievements = new Array();
Kills = new Array();
_local1 = 0;
while (_local1 < 20) {
Towers.push(0);
_local1++;
};
Towers[1] = 1;
Towers[4] = 1;
Towers[3] = 1;
_local1 = 0;
while (_local1 < 40) {
Levels.push(0);
_local1++;
};
_local1 = 0;
while (_local1 < 16) {
Kills.push(0);
_local1++;
};
_local1 = 0;
while (_local1 < 16) {
achievements.push(0);
_local1++;
};
Levels[0] = 1;
saveData();
}
public function saveData():void{
var _local1:*;
GameData.data.bPlayed = 1;
GameData.data.credits = credits;
GameData.data.stFunds = startFunds;
GameData.data.ugLevel = ugLevel;
GameData.data.playerLevel = playerLevel;
GameData.data.towerCount = towerCount;
GameData.data.upgradeCount = upgradeCount;
GameData.data.waves = wavesEarly;
_local1 = 0;
while (_local1 < 20) {
GameData.data[("Tower" + _local1)] = int(Towers[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < 40) {
GameData.data[("Level" + _local1)] = int(Levels[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < 40) {
GameData.data[("Kills" + _local1)] = int(Kills[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < 40) {
GameData.data[("achievements" + _local1)] = int(achievements[_local1]);
_local1++;
};
}
public function unlockTower(_arg1:int):void{
Towers[_arg1] = 1;
saveData();
}
public function addTower():void{
towerCount++;
GameData.data.towerCount = towerCount;
if ((((towerCount > 200)) && ((achievements[12] == 0)))){
unlockAchievement(12);
};
}
public function addStartFunds(_arg1:int):void{
startFunds = (startFunds + _arg1);
saveData();
}
public function addUgLevel():void{
ugLevel = (ugLevel + 1);
saveData();
}
public function buyItem(_arg1:int, _arg2:String){
if (_arg2 == "tower"){
unlockTower(_arg1);
};
if (_arg2 == "bonus"){
addStartFunds(_arg1);
};
if (_arg2 == "level"){
Levels[(_arg1 - 1)] = 1;
saveData();
};
}
public function addKills(_arg1):void{
Kills[_arg1] = (int(Kills[_arg1]) + 1);
GameData.data[("Kills" + _arg1)] = int(Kills[_arg1]);
if ((((_arg1 == 1)) && ((Kills[_arg1] > 500)))){
if (achievements[1] == 0){
unlockAchievement(1);
};
} else {
if ((((_arg1 == 2)) && ((Kills[_arg1] > 200)))){
if (achievements[2] == 0){
unlockAchievement(2);
};
} else {
if ((((_arg1 == 3)) && ((Kills[_arg1] > 200)))){
if (achievements[3] == 0){
unlockAchievement(3);
};
} else {
if ((((_arg1 == 4)) && ((Kills[_arg1] > 50)))){
if (achievements[5] == 0){
unlockAchievement(5);
};
} else {
if ((((_arg1 == 6)) && ((Kills[_arg1] > 100)))){
if (achievements[13] == 0){
unlockAchievement(13);
};
} else {
if ((((_arg1 == 7)) && ((Kills[_arg1] > 100)))){
if (achievements[14] == 0){
unlockAchievement(14);
};
};
};
};
};
};
};
}
public function getAchievement(_arg1):Array{
var _local2:Array;
switch (_arg1){
case 1:
_local2 = new Array("Lambs to the Slaughter", "Kill your first 500 penguins");
break;
case 2:
_local2 = new Array("To Fast for You", "Kill 200 Runners or Ninjas");
break;
case 3:
_local2 = new Array("Tank Buster", "Destroy 200 Tanks");
break;
case 4:
_local2 = new Array("Five Star", "Reach player level 5");
break;
case 5:
_local2 = new Array("Chirpy Chirpy Jeep Jeep", "Destroy 250 Jeeps");
break;
case 6:
_local2 = new Array("No Where to Hide", "Kill 50 Burrowers while underground");
break;
case 7:
_local2 = new Array("King of the Hill", "Build 50 towers in one level");
break;
case 8:
_local2 = new Array("Raise the Stakes", "Send in 200 waves early");
break;
case 9:
_local2 = new Array("Who Da Man", "Reach Player Level 10");
break;
case 10:
_local2 = new Array("Pimp My Tower", "Upgrade 200 times");
break;
case 11:
_local2 = new Array("Rags to Riches", "hold $5000 + in the bank in any level");
break;
case 12:
_local2 = new Array("Strength in Numbers", "Build 250 towers");
break;
case 13:
_local2 = new Array("Too Close for Comfort", "Stop 100 penguins at the gate");
break;
case 14:
_local2 = new Array("Enemies at the Gate", "Stop 100 penguins at the entrance");
break;
case 15:
_local2 = new Array("The Whole 15 Yards", "Complete all Levels");
break;
};
return (_local2);
}
}
}//package
Section 96
//gun (gun)
package {
import flash.media.*;
public dynamic class gun extends Sound {
}
}//package
Section 97
//hbar (hbar)
package {
import flash.display.*;
public dynamic class hbar extends MovieClip {
}
}//package
Section 98
//healthUp1 (healthUp1)
package {
import flash.display.*;
public dynamic class healthUp1 extends BitmapData {
public function healthUp1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 99
//heli (heli)
package {
import flash.media.*;
public dynamic class heli extends Sound {
}
}//package
Section 100
//hit1 (hit1)
package {
import flash.display.*;
public dynamic class hit1 extends BitmapData {
public function hit1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 101
//horn (horn)
package {
import flash.media.*;
public dynamic class horn extends Sound {
}
}//package
Section 102
//Hud (Hud)
package {
import flash.display.*;
import flash.text.*;
public class Hud extends Sprite {
public var cashText:TextField;
public var pw:pauseWindow;
public var rangeText:TextField;
public var enemyDisplay:MovieClip;
var bTriggered:Boolean;// = false
public var damageText:TextField;
var lvlUp:levelUpWindow;
var buttons:Array;
public var rofText:TextField;
public var ucost:TextField;
public var scost:TextField;
public var livesText:TextField;
public var enemyNum:TextField;
public var scoreText:TextField;
public var countText:TextField;
public var wavesText:TextField;
var game:Game;
public var EXP:MovieClip;
public function Hud(){
buttons = new Array();
bTriggered = false;
super();
mouseEnabled = false;
game = Game(parent);
game.hud = this;
updateWaveInfo();
}
public function updateWaveInfo():void{
if (game.WaveControl.waves[0] != undefined){
enemyDisplay.visible = true;
enemyNum.text = String((" x " + game.WaveControl.waves[0][1]));
enemyDisplay.gotoAndStop(getEnemyType(game.WaveControl.waves[0][0]));
} else {
enemyNum.text = "";
enemyDisplay.visible = false;
};
}
public function getEnemyType(_arg1:String):int{
switch (_arg1){
case "pen1":
return (1);
case "pen2":
return (2);
case "pen3":
return (3);
case "pen4":
return (4);
case "pen5":
return (5);
case "pen6":
return (6);
case "pen7":
return (7);
case "pen8":
return (8);
case "pen9":
return (9);
case "pen10":
return (10);
case "pen11":
return (11);
case "pen12":
return (12);
case "pen13":
return (13);
case "pen14":
return (14);
case "pen15":
return (15);
default:
return (16);
};
}
public function levelUp():void{
game.baseSpeed = 0;
lvlUp = new levelUpWindow(this, game);
lvlUp.x = 320;
lvlUp.y = 0x0100;
addChild(lvlUp);
}
public function removeLvlUp():void{
var _local1:*;
removeChild(lvlUp);
lvlUp = null;
game.baseSpeed = 1;
for (_local1 in buttons) {
buttons[_local1].updateStatus();
};
}
public function addButton(_arg1){
buttons.push(_arg1);
}
public function Tick():void{
var _local1:*;
EXP.scaleX = (game.gameInfo.credits / (500 + ((game.gameInfo.playerLevel - 1) * 100)));
for (_local1 in buttons) {
buttons[_local1].update();
};
cashText.text = String(game.gameInfo.funds);
if ((((game.gameInfo.funds >= 5000)) && (!(bTriggered)))){
bTriggered = true;
game.gameInfo.unlockAchievement(11);
};
livesText.text = String(Math.floor(game.levelHealth));
scoreText.text = String(game.levelScore);
countText.text = String((Math.floor((game.WaveControl.nextSpawn / 100)) + " secs"));
wavesText.text = String(((("Wave: " + game.WaveControl.currentWave) + "/") + game.WaveControl.numWaves));
if (game.Selected != null){
rangeText.text = String(game.Selected.Range);
damageText.text = String(game.Selected.Damage);
rofText.text = String(game.Selected.RoF);
if (game.Selected.Level < game.gameInfo.ugLevel){
ucost.text = String(("$" + Math.floor((game.Selected.cost * 0.25))));
} else {
ucost.text = "N/A";
};
scost.text = String(("$" + Math.floor(game.Selected.cost)));
} else {
rangeText.text = "--";
damageText.text = "--";
rofText.text = "--";
ucost.text = "--";
scost.text = "--";
};
}
}
}//package
Section 103
//insButton (insButton)
package {
public class insButton extends gameButton {
override public function doAction():void{
game.getFrame(10);
}
}
}//package
Section 104
//lazerSound (lazerSound)
package {
import flash.media.*;
public dynamic class lazerSound extends Sound {
}
}//package
Section 105
//lecw (lecw)
package {
import flash.media.*;
public dynamic class lecw extends Sound {
}
}//package
Section 106
//levelButton (levelButton)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.filters.*;
public class levelButton extends MovieClip {
public var LvlNumber:int;
public var Lock:MovieClip;
public var bUnlocked:Boolean;
public var levelText:TextField;
public var scoreText:TextField;
public var game:Game;
public function levelButton(_arg1:int, _arg2:Game, _arg3:int, _arg4:int){
var _local5:*;
super();
game = _arg2;
gotoAndStop(1);
_local5 = new DropShadowFilter(2);
this.filters = [_local5];
LvlNumber = _arg1;
levelText.text = String(("Level " + LvlNumber));
scoreText.text = String(("Score: " + _arg3));
if (_arg4 > 0){
Lock.visible = false;
bUnlocked = true;
};
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
addEventListener(MouseEvent.MOUSE_OVER, hover, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, off, false, 0, true);
}
public function clicked(_arg1:MouseEvent){
if (bUnlocked){
game.getLevel(LvlNumber);
};
}
public function hover(_arg1:MouseEvent){
gotoAndStop(2);
}
public function off(_arg1:MouseEvent){
gotoAndStop(1);
}
}
}//package
Section 107
//levelMenu (levelMenu)
package {
import flash.display.*;
public class levelMenu extends Sprite {
public var game:Game;
public function levelMenu(){
game = Game(parent);
mouseEnabled = false;
BuildButtons();
}
private function BuildButtons():void{
var _local1:levelButton;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = 144;
_local3 = 122;
_local4 = 1;
while (_local4 < 16) {
_local5 = game.gameInfo.Levels[(_local4 - 1)];
_local6 = game.gameInfo.Levels[_local4];
_local1 = new levelButton(_local4, game, _local6, _local5);
_local1.x = _local2;
_local1.y = _local3;
addChild(_local1);
_local3 = (_local3 + 64);
if (_local3 > 378){
_local3 = 122;
_local2 = (_local2 + 240);
};
_local4++;
};
}
}
}//package
Section 108
//levelUpWindow (levelUpWindow)
package {
import flash.display.*;
public class levelUpWindow extends Sprite {
var it2:upgradeItem;
var it3:upgradeItem;
var it1:upgradeItem;
var owner:Hud;
var game:Game;
public function levelUpWindow(_arg1:Hud, _arg2:Game){
game = _arg2;
owner = _arg1;
visible = false;
mouseEnabled = false;
it1 = new upgradeItem(this);
it2 = new upgradeItem(this);
it3 = new upgradeItem(this);
it2.x = -192;
it3.x = 192;
addChild(it1);
addChild(it2);
addChild(it3);
getItems();
}
public function getItems():void{
var _local1:Array;
var _local2:*;
_local2 = getTower();
if (_local2 > 0){
_local1 = getTowerInfo(_local2);
it1.setInfo(_local1);
} else {
it1.setInfo(new Array("Extra Funding", "Start each level with an extra $50 in the bank", 50, "funds"));
};
if (game.gameInfo.ugLevel < 5){
it2.setInfo(new Array("Tower Upgrade", String((("Unlock level " + (game.gameInfo.ugLevel + 1)) + " tower upgrades")), 0, "upgrade"));
} else {
it2.setInfo(new Array("Extra Funding", "Start each level with an extra $50 in the bank", 50, "funds"));
};
it3.setInfo(new Array("Extra Funding", "Start each level with an extra $50 in the bank", 50, "funds"));
visible = true;
}
public function selectItem(_arg1:upgradeItem):void{
if (_arg1.type == "tower"){
game.gameInfo.unlockTower(_arg1.id);
} else {
if (_arg1.type == "funds"){
game.gameInfo.addStartFunds(_arg1.id);
} else {
if (_arg1.type == "upgrade"){
game.gameInfo.addUgLevel();
};
};
};
visible = false;
owner.removeLvlUp();
}
public function getTower():int{
var _local1:Boolean;
var _local2:int;
var _local3:*;
_local1 = false;
_local3 = 1;
while (_local3 < 11) {
if (game.gameInfo.Towers[_local3] == 0){
_local1 = true;
_local2 = _local3;
break;
};
_local3++;
};
if ((((_local2 <= 10)) && (_local1))){
return (_local2);
};
return (undefined);
}
public function getTowerInfo(_arg1):Array{
if (_arg1 == 1){
return (new Array("Bullet Tower", "Basic Bullet firing tower with average damage, range and RoF.", _arg1, "tower"));
};
if (_arg1 == 2){
return (new Array("MG Tower", "The Machine Gun Tower's fast rate of fire more than makes up for its low stopping power.", _arg1, "tower"));
};
if (_arg1 == 3){
return (new Array("Lightning Tower", "Momentarily stuns the penguins, Great stopping faster enemies in their tracks.", _arg1, "tower"));
};
if (_arg1 == 4){
return (new Array("Poison Tower", "Hit those penguins with a splash of DTD, not only are poisoned penguins slower, they'll also lose health over time.", _arg1, "tower"));
};
if (_arg1 == 5){
return (new Array("Bomb Tower", "Launches a short fuse bomb towards those pesky penguins, great for penguins in tight groups.", _arg1, "tower"));
};
if (_arg1 == 6){
return (new Array("Flame Tower", "Hit those penguins with a shot of burning napalm, Warning burning penguins run faster!.", _arg1, "tower"));
};
if (_arg1 == 7){
return (new Array("Heat Ray Tower", "Slow firing but very powerful. Great against larger stronger targets", _arg1, "tower"));
};
if (_arg1 == 8){
return (new Array("Molatov Tower", "Launches a fire bomb towards those pesky penguins, great for penguins in tight groups.", _arg1, "tower"));
};
if (_arg1 == 9){
return (new Array("Poison Puffer", "Poisons every penguin within range with a puff of poisonous gas.", _arg1, "tower"));
};
return (new Array("The Thumper", "Shakes the ground causing all nearby enemies to be momentarily stunned.", _arg1, "tower"));
}
}
}//package
Section 109
//lightning (lightning)
package {
public class lightning {
public var vx:Number;
public var vy:Number;
public var sx:Number;
public var sy:Number;
public var Tgt:Enemy;
public var game:Game;
public var ex:Number;
public var ey:Number;
public var life:Number;
public var vLen:Number;
public function lightning(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7=null){
var _local8:*;
var _local9:*;
var _local10:*;
super();
game = _arg6;
sx = _arg1;
sy = _arg2;
ex = _arg3;
ey = _arg4;
life = _arg5;
_local8 = (sx - ex);
_local9 = (sy - ey);
_local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
vx = -((_local8 / 10));
vy = -((_local9 / 10));
game.fx.beams.push(this);
}
public function Tick():void{
life = (life - 3);
if (life <= 0){
game.fx.removeBeam(this);
};
}
}
}//package
Section 110
//lsButton (lsButton)
package {
public class lsButton extends gameButton {
override public function doAction():void{
game.getFrame(2);
}
}
}//package
Section 111
//March (March)
package {
import flash.media.*;
public dynamic class March extends Sound {
}
}//package
Section 112
//mg_2 (mg_2)
package {
import flash.media.*;
public dynamic class mg_2 extends Sound {
}
}//package
Section 113
//missileLaunchS (missileLaunchS)
package {
import flash.media.*;
public dynamic class missileLaunchS extends Sound {
}
}//package
Section 114
//mmButton (mmButton)
package {
public class mmButton extends gameButton {
override public function doAction():void{
game.getFrame(1);
}
}
}//package
Section 115
//mmButton2 (mmButton2)
package {
public class mmButton2 extends gameButton2 {
override public function doAction():void{
game.getFrame(1);
}
}
}//package
Section 116
//moreGames (moreGames)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.external.*;
public dynamic class moreGames extends MovieClip {
public var link:String;
public function moreGames(){
addFrameScript(0, frame1);
}
function frame1(){
link = "http://armorgames.com";
this.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
}
public function onClick(_arg1:MouseEvent):void{
var event = _arg1;
try {
ExternalInterface.call("window.open", link, "_blank", "");
} catch(error:Error) {
navigateToURL(new URLRequest(link), "_blank");
};
}
}
}//package
Section 117
//muteButton (muteButton)
package {
import flash.display.*;
import flash.events.*;
public class muteButton extends MovieClip {
var game:Game;
public function muteButton(){
game = Game(parent);
addEventListener(Event.ENTER_FRAME, tick, false, 0, true);
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
}
public function clicked(_arg1:MouseEvent):void{
game.soundBox.mute();
}
public function tick(_arg1:Event):void{
if (game.soundBox.bMute){
gotoAndStop(2);
} else {
gotoAndStop(1);
};
}
}
}//package
Section 118
//ninflash1 (ninflash1)
package {
import flash.display.*;
public dynamic class ninflash1 extends BitmapData {
public function ninflash1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 119
//ouch (ouch)
package {
import flash.media.*;
public dynamic class ouch extends Sound {
}
}//package
Section 120
//paButton (paButton)
package {
public class paButton extends gameButton {
override public function doAction():void{
game.getFrame(5);
}
}
}//package
Section 121
//PauseButton (PauseButton)
package {
import flash.display.*;
import flash.events.*;
public class PauseButton extends MovieClip {
var hud:Hud;
var game:Game;
public function PauseButton(){
game = Game(parent.parent);
hud = Hud(parent);
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
}
public function clicked(_arg1:MouseEvent):void{
game.baseSpeed = 0;
hud.pw.visible = true;
}
}
}//package
Section 122
//pauseWindow (pauseWindow)
package {
import flash.display.*;
import flash.events.*;
public class pauseWindow extends MovieClip {
var hud:Hud;
var game:Game;
public function pauseWindow(){
visible = false;
game = Game(parent.parent);
hud = Hud(parent);
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
}
public function clicked(_arg1:MouseEvent):void{
game.baseSpeed = 1;
visible = false;
}
}
}//package
Section 123
//Pen1 (Pen1)
package {
import flash.display.*;
public class Pen1 extends Enemy {
public var soldier:MovieClip;
public function Pen1(_arg1:Game, _arg2:GameActor){
endPoint = _arg2;
game = _arg1;
speed = 1;
baseSpeed = speed;
health = 50;
}
override public function setAngle():void{
soldier.gotoAndStop((Math.round(((180 + ((ang * 180) / Math.PI)) / 45)) + 1));
}
}
}//package
Section 124
//Pen10 (Pen10)
package {
import flash.display.*;
public class Pen10 extends Enemy {
public var myFuse:MovieClip;
public var desiredAngle:Number;// = 0
public var soldier:MovieClip;
public var bombTimer:Number;// = 0
public function Pen10(_arg1:Game, _arg2:GameActor){
desiredAngle = 0;
bombTimer = 0;
super();
endPoint = _arg2;
game = _arg1;
speed = 1;
baseSpeed = speed;
bSpecial = true;
bMetal = true;
specialLimit = 10;
bombTimer = (Math.random() * 1000);
cValue = 5;
}
override public function specialFX():void{
}
override public function endSpecial():void{
var _local1:*;
bSpecial = false;
_local1 = new renderSprite(game, game.SpritePool.dig, 64, x, y, 0, 0, 10, 0.2, 10);
specialTimer = 0;
visible = true;
game.decalFX.Tunnel(x, y);
}
override public function doSpecial():void{
visible = false;
game.destroyTower(gx, (gy + 1));
game.destroyTower(gx, (gy - 1));
game.destroyTower((gx + 1), gy);
game.destroyTower((gx - 1), gy);
bMetal = false;
takeDamage(1000, "self");
}
override public function deathFX():void{
var _local1:*;
if (bMetal){
_local1 = new renderSprite(game, game.SpritePool.explosion1, 64, x, y, 0, 0, 10, 0.2, 10);
game.decalFX.Crater(x, y);
} else {
_local1 = new renderSprite(game, game.SpritePool.bombBlast, 64, x, y, 0, 0, 10, 0.2, 10);
game.decalFX.Crater(x, y);
};
}
override public function setAngle():void{
var _local1:Number;
var _local2:*;
_local1 = ((ang * 180) / Math.PI);
if (_local1 != desiredAngle){
_local2 = (closestAngle(desiredAngle, _local1) * 0.3);
if (Math.abs(_local2) < 0.1){
desiredAngle = _local1;
} else {
desiredAngle = (desiredAngle + _local2);
};
};
if (desiredAngle > 180){
desiredAngle = (desiredAngle - 360);
} else {
if (desiredAngle < -180){
desiredAngle = (desiredAngle + 360);
};
};
soldier.gotoAndStop(Math.round(((desiredAngle + 180) / 5)));
}
override public function Move(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
x = (x + ((vx * speed) * _arg1));
y = (y + ((vy * speed) * _arg1));
bombTimer--;
myFuse.alpha = ((1000 - bombTimer) / 1000);
myFuse.scalex = (0.5 + myFuse.alpha);
myFuse.scaleY = myFuse.scaleX;
traveled = (traveled + (Math.abs(vx) + Math.abs(vy)));
if ((((gx == Math.floor((tx / 32)))) && ((gy == Math.floor((ty / 32)))))){
if ((((x > ((gx * game.gridSize) + 4))) && ((x < ((gx * game.gridSize) + 28))))){
if ((((y > ((gy * game.gridSize) + 4))) && ((y < ((gy * game.gridSize) + 28))))){
if ((((pth.length <= 0)) && (!(bDead)))){
bDead = true;
game.levelHealth = (game.levelHealth - 1);
game.killEnemy(this, true);
} else {
_local2 = Number(pth.pop());
_local3 = Number(pth.pop());
if (game.gameGrid.grid[_local3][_local2] == 1){
pth = game.gameGrid.findPath(gx, gy, endPoint.gx, endPoint.gy);
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
} else {
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
if ((((bombTimer <= 0)) && (bSpecial))){
bSpecial = false;
doSpecial();
};
vx = Math.cos(ang);
vy = Math.sin(ang);
};
};
};
};
setAngle();
}
}
}//package
Section 125
//Pen11 (Pen11)
package {
import flash.display.*;
public class Pen11 extends Enemy {
public var desiredAngle:Number;// = 0
public var soldier:MovieClip;
public var bombTimer:Number;// = 0
public function Pen11(_arg1:Game, _arg2:GameActor){
desiredAngle = 0;
bombTimer = 0;
super();
endPoint = _arg2;
game = _arg1;
speed = 1.1;
baseSpeed = speed;
bSpecial = true;
bMetal = true;
specialLimit = 10;
health = 300;
cValue = 30;
}
public function doMySpecial(_arg1, _arg2):void{
game.destroyTower(_arg1, _arg2);
}
override public function specialFX():void{
}
override public function endSpecial():void{
var _local1:*;
bSpecial = false;
_local1 = new renderSprite(game, game.SpritePool.dig, 64, x, y, 0, 0, 10, 0.2, 10);
specialTimer = 0;
visible = true;
game.decalFX.Tunnel(x, y);
}
override public function setAngle():void{
var _local1:Number;
var _local2:*;
_local1 = ((ang * 180) / Math.PI);
if (_local1 != desiredAngle){
_local2 = (closestAngle(desiredAngle, _local1) * 0.3);
if (Math.abs(_local2) < 0.1){
desiredAngle = _local1;
} else {
desiredAngle = (desiredAngle + _local2);
};
};
if (desiredAngle > 180){
desiredAngle = (desiredAngle - 360);
} else {
if (desiredAngle < -180){
desiredAngle = (desiredAngle + 360);
};
};
soldier.gotoAndStop(Math.round(((desiredAngle + 180) / 5)));
}
override public function Move(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
x = (x + ((vx * speed) * _arg1));
y = (y + ((vy * speed) * _arg1));
traveled = (traveled + (Math.abs(vx) + Math.abs(vy)));
if ((((gx == Math.floor((tx / 32)))) && ((gy == Math.floor((ty / 32)))))){
if ((((x > ((gx * game.gridSize) + 4))) && ((x < ((gx * game.gridSize) + 28))))){
if ((((y > ((gy * game.gridSize) + 4))) && ((y < ((gy * game.gridSize) + 28))))){
if ((((pth.length <= 0)) && (!(bDead)))){
bDead = true;
game.levelHealth = (game.levelHealth - 1);
game.killEnemy(this, true);
} else {
_local2 = Number(pth.pop());
_local3 = Number(pth.pop());
if (game.gameGrid.grid[_local3][_local2] == 1){
if (bSpecial){
bSpecial = false;
doMySpecial(_local3, _local2);
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
} else {
pth = game.gameGrid.findPath(gx, gy, endPoint.gx, endPoint.gy);
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
} else {
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
vx = Math.cos(ang);
vy = Math.sin(ang);
};
};
};
};
setAngle();
}
}
}//package
Section 126
//Pen12 (Pen12)
package {
import flash.display.*;
public class Pen12 extends Enemy {
public var desiredAngle:Number;// = 0
public var soldier:MovieClip;
public var bombTimer:Number;// = 0
public function Pen12(_arg1:Game, _arg2:GameActor){
desiredAngle = 0;
bombTimer = 0;
super();
endPoint = _arg2;
game = _arg1;
speed = 0.9;
baseSpeed = speed;
bSpecial = true;
bMetal = true;
specialLimit = 10;
health = 400;
cValue = 40;
}
public function doMySpecial(_arg1, _arg2):void{
game.destroyTower(_arg1, _arg2);
}
override public function specialFX():void{
}
override public function endSpecial():void{
var _local1:*;
bSpecial = false;
_local1 = new renderSprite(game, game.SpritePool.dig, 64, x, y, 0, 0, 10, 0.2, 10);
specialTimer = 0;
visible = true;
game.decalFX.Tunnel(x, y);
}
override public function setAngle():void{
var _local1:Number;
var _local2:*;
_local1 = ((ang * 180) / Math.PI);
if (_local1 != desiredAngle){
_local2 = (closestAngle(desiredAngle, _local1) * 0.3);
if (Math.abs(_local2) < 0.1){
desiredAngle = _local1;
} else {
desiredAngle = (desiredAngle + _local2);
};
};
if (desiredAngle > 180){
desiredAngle = (desiredAngle - 360);
} else {
if (desiredAngle < -180){
desiredAngle = (desiredAngle + 360);
};
};
soldier.gotoAndStop(Math.round(((desiredAngle + 180) / 5)));
}
override public function Move(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
x = (x + ((vx * speed) * _arg1));
y = (y + ((vy * speed) * _arg1));
traveled = (traveled + (Math.abs(vx) + Math.abs(vy)));
if ((((gx == Math.floor((tx / 32)))) && ((gy == Math.floor((ty / 32)))))){
if ((((x > ((gx * game.gridSize) + 4))) && ((x < ((gx * game.gridSize) + 28))))){
if ((((y > ((gy * game.gridSize) + 4))) && ((y < ((gy * game.gridSize) + 28))))){
if ((((pth.length <= 0)) && (!(bDead)))){
bDead = true;
game.levelHealth = (game.levelHealth - 1);
game.killEnemy(this, true);
} else {
_local2 = Number(pth.pop());
_local3 = Number(pth.pop());
if (game.gameGrid.grid[_local3][_local2] == 1){
if (bSpecial){
bSpecial = false;
doMySpecial(_local3, _local2);
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
} else {
pth = game.gameGrid.findPath(gx, gy, endPoint.gx, endPoint.gy);
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
} else {
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
vx = Math.cos(ang);
vy = Math.sin(ang);
};
};
};
};
setAngle();
}
}
}//package
Section 127
//Pen13 (Pen13)
package {
import flash.display.*;
public class Pen13 extends Enemy {
public var desiredAngle:Number;// = 0
public var soldier:MovieClip;
public var bombTimer:Number;// = 0
public function Pen13(_arg1:Game, _arg2:GameActor){
desiredAngle = 0;
bombTimer = 0;
super();
endPoint = _arg2;
game = _arg1;
speed = 0.6;
baseSpeed = speed;
bSpecial = true;
bMetal = true;
specialLimit = 10;
health = 1000;
cValue = 100;
}
public function doMySpecial(_arg1, _arg2):void{
game.destroyTower(_arg1, _arg2);
}
override public function specialFX():void{
}
override public function endSpecial():void{
var _local1:*;
bSpecial = false;
_local1 = new renderSprite(game, game.SpritePool.dig, 64, x, y, 0, 0, 10, 0.2, 10);
specialTimer = 0;
visible = true;
game.decalFX.Tunnel(x, y);
}
override public function setAngle():void{
var _local1:Number;
var _local2:*;
_local1 = ((ang * 180) / Math.PI);
if (_local1 != desiredAngle){
_local2 = (closestAngle(desiredAngle, _local1) * 0.3);
if (Math.abs(_local2) < 0.1){
desiredAngle = _local1;
} else {
desiredAngle = (desiredAngle + _local2);
};
};
if (desiredAngle > 180){
desiredAngle = (desiredAngle - 360);
} else {
if (desiredAngle < -180){
desiredAngle = (desiredAngle + 360);
};
};
soldier.gotoAndStop(Math.round(((desiredAngle + 180) / 5)));
}
override public function Move(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
x = (x + ((vx * speed) * _arg1));
y = (y + ((vy * speed) * _arg1));
traveled = (traveled + (Math.abs(vx) + Math.abs(vy)));
if ((((gx == Math.floor((tx / 32)))) && ((gy == Math.floor((ty / 32)))))){
if ((((x > ((gx * game.gridSize) + 4))) && ((x < ((gx * game.gridSize) + 28))))){
if ((((y > ((gy * game.gridSize) + 4))) && ((y < ((gy * game.gridSize) + 28))))){
if ((((pth.length <= 0)) && (!(bDead)))){
bDead = true;
game.levelHealth = (game.levelHealth - 1);
game.killEnemy(this, true);
} else {
_local2 = Number(pth.pop());
_local3 = Number(pth.pop());
if (game.gameGrid.grid[_local3][_local2] == 1){
if (bSpecial){
bSpecial = false;
doMySpecial(_local3, _local2);
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
} else {
pth = game.gameGrid.findPath(gx, gy, endPoint.gx, endPoint.gy);
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
} else {
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
vx = Math.cos(ang);
vy = Math.sin(ang);
};
};
};
};
setAngle();
}
}
}//package
Section 128
//Pen14 (Pen14)
package {
import flash.display.*;
public class Pen14 extends Enemy {
public var desiredAngle:Number;// = 0
public var soldier:MovieClip;
public var bombTimer:Number;// = 0
public function Pen14(_arg1:Game, _arg2:GameActor){
desiredAngle = 0;
bombTimer = 0;
super();
endPoint = _arg2;
game = _arg1;
speed = 0.7;
baseSpeed = speed;
bSpecial = true;
bMetal = true;
specialLimit = 10;
health = 600;
cValue = 50;
}
public function doMySpecial(_arg1, _arg2):void{
game.destroyTower(_arg1, _arg2);
}
override public function specialFX():void{
}
override public function endSpecial():void{
var _local1:*;
bSpecial = false;
_local1 = new renderSprite(game, game.SpritePool.dig, 64, x, y, 0, 0, 10, 0.2, 10);
specialTimer = 0;
visible = true;
game.decalFX.Tunnel(x, y);
}
override public function setAngle():void{
var _local1:Number;
var _local2:*;
_local1 = ((ang * 180) / Math.PI);
if (_local1 != desiredAngle){
_local2 = (closestAngle(desiredAngle, _local1) * 0.3);
if (Math.abs(_local2) < 0.1){
desiredAngle = _local1;
} else {
desiredAngle = (desiredAngle + _local2);
};
};
if (desiredAngle > 180){
desiredAngle = (desiredAngle - 360);
} else {
if (desiredAngle < -180){
desiredAngle = (desiredAngle + 360);
};
};
soldier.gotoAndStop(Math.round(((desiredAngle + 180) / 5)));
}
override public function Move(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
x = (x + ((vx * speed) * _arg1));
y = (y + ((vy * speed) * _arg1));
traveled = (traveled + (Math.abs(vx) + Math.abs(vy)));
if ((((gx == Math.floor((tx / 32)))) && ((gy == Math.floor((ty / 32)))))){
if ((((x > ((gx * game.gridSize) + 4))) && ((x < ((gx * game.gridSize) + 28))))){
if ((((y > ((gy * game.gridSize) + 4))) && ((y < ((gy * game.gridSize) + 28))))){
if ((((pth.length <= 0)) && (!(bDead)))){
bDead = true;
game.levelHealth = (game.levelHealth - 1);
game.killEnemy(this, true);
} else {
_local2 = Number(pth.pop());
_local3 = Number(pth.pop());
if (game.gameGrid.grid[_local3][_local2] == 1){
if (bSpecial){
bSpecial = false;
doMySpecial(_local3, _local2);
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
} else {
pth = game.gameGrid.findPath(gx, gy, endPoint.gx, endPoint.gy);
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
} else {
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
vx = Math.cos(ang);
vy = Math.sin(ang);
};
};
};
};
setAngle();
}
}
}//package
Section 129
//Pen15 (Pen15)
package {
import flash.display.*;
public class Pen15 extends Enemy {
public var desiredAngle:Number;// = 0
public var soldier:MovieClip;
public var bombTimer:Number;// = 0
public function Pen15(_arg1:Game, _arg2:GameActor){
desiredAngle = 0;
bombTimer = 0;
super();
endPoint = _arg2;
game = _arg1;
speed = 1;
baseSpeed = speed;
bSpecial = true;
bMetal = true;
specialLimit = 10;
health = 250;
cValue = 20;
}
public function doMySpecial(_arg1, _arg2):void{
game.destroyTower(_arg1, _arg2);
}
override public function specialFX():void{
}
override public function endSpecial():void{
var _local1:*;
bSpecial = false;
_local1 = new renderSprite(game, game.SpritePool.dig, 64, x, y, 0, 0, 10, 0.2, 10);
specialTimer = 0;
visible = true;
game.decalFX.Tunnel(x, y);
}
override public function setAngle():void{
var _local1:Number;
var _local2:*;
_local1 = ((ang * 180) / Math.PI);
if (_local1 != desiredAngle){
_local2 = (closestAngle(desiredAngle, _local1) * 0.3);
if (Math.abs(_local2) < 0.1){
desiredAngle = _local1;
} else {
desiredAngle = (desiredAngle + _local2);
};
};
if (desiredAngle > 180){
desiredAngle = (desiredAngle - 360);
} else {
if (desiredAngle < -180){
desiredAngle = (desiredAngle + 360);
};
};
soldier.gotoAndStop(Math.round(((desiredAngle + 180) / 5)));
}
override public function Move(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
x = (x + ((vx * speed) * _arg1));
y = (y + ((vy * speed) * _arg1));
traveled = (traveled + (Math.abs(vx) + Math.abs(vy)));
if ((((gx == Math.floor((tx / 32)))) && ((gy == Math.floor((ty / 32)))))){
if ((((x > ((gx * game.gridSize) + 4))) && ((x < ((gx * game.gridSize) + 28))))){
if ((((y > ((gy * game.gridSize) + 4))) && ((y < ((gy * game.gridSize) + 28))))){
if ((((pth.length <= 0)) && (!(bDead)))){
bDead = true;
game.levelHealth = (game.levelHealth - 1);
game.killEnemy(this, true);
} else {
_local2 = Number(pth.pop());
_local3 = Number(pth.pop());
if (game.gameGrid.grid[_local3][_local2] == 1){
if (bSpecial){
bSpecial = false;
doMySpecial(_local3, _local2);
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
} else {
pth = game.gameGrid.findPath(gx, gy, endPoint.gx, endPoint.gy);
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
} else {
ty = ((_local2 * game.gridSize) + 16);
tx = ((_local3 * game.gridSize) + 16);
_local4 = (tx - x);
_local5 = (ty - y);
ang = Math.atan2(_local5, _local4);
};
vx = Math.cos(ang);
vy = Math.sin(ang);
};
};
};
};
setAngle();
}
}
}//package
Section 130
//Pen2 (Pen2)
package {
import flash.display.*;
public class Pen2 extends Enemy {
public var soldier:MovieClip;
public function Pen2(_arg1:Game, _arg2:GameActor){
endPoint = _arg2;
game = _arg1;
speed = 1.2;
baseSpeed = speed;
health = 40;
}
override public function setAngle():void{
soldier.gotoAndStop((Math.round(((180 + ((ang * 180) / Math.PI)) / 45)) + 1));
}
}
}//package
Section 131
//Pen3 (Pen3)
package {
import flash.display.*;
public class Pen3 extends Enemy {
public var soldier:MovieClip;
public function Pen3(_arg1:Game, _arg2:GameActor){
endPoint = _arg2;
game = _arg1;
speed = 0.8;
baseSpeed = speed;
health = 80;
}
override public function setAngle():void{
soldier.gotoAndStop((Math.round(((180 + ((ang * 180) / Math.PI)) / 45)) + 1));
}
}
}//package
Section 132
//Pen4 (Pen4)
package {
import flash.display.*;
public class Pen4 extends Enemy {
public var soldier:MovieClip;
public function Pen4(_arg1:Game, _arg2:GameActor){
endPoint = _arg2;
game = _arg1;
speed = 0.6;
baseSpeed = speed;
health = 100;
}
override public function setAngle():void{
var _local1:*;
soldier.gotoAndStop((Math.round(((180 + ((ang * 180) / Math.PI)) / 45)) + 1));
_local1 = new RadialBlast(game, x, y, 50, -5, "heal");
}
}
}//package
Section 133
//Pen5 (Pen5)
package {
import flash.display.*;
public class Pen5 extends Enemy {
public var soldier:MovieClip;
public function Pen5(_arg1:Game, _arg2:GameActor){
endPoint = _arg2;
game = _arg1;
speed = 0.5;
baseSpeed = speed;
health = 150;
}
override public function setAngle():void{
var _local1:*;
soldier.gotoAndStop((Math.round(((180 + ((ang * 180) / Math.PI)) / 45)) + 1));
_local1 = new RadialBlast(game, x, y, 50, -30, "fix");
}
}
}//package
Section 134
//Pen6 (Pen6)
package {
import flash.display.*;
import flash.filters.*;
public class Pen6 extends Enemy {
public var soldier:MovieClip;
public function Pen6(_arg1:Game, _arg2:GameActor){
endPoint = _arg2;
game = _arg1;
speed = 1.2;
baseSpeed = speed;
bSpecial = true;
health = 80;
}
override public function endSpecial():void{
var _local1:*;
this.filters = null;
speed = baseSpeed;
bSpecial = false;
_local1 = new renderSprite(game, game.SpritePool.ninFlash, 64, x, y, 0, 0, 10, 0.3, 10);
specialTimer = 0;
visible = true;
}
override public function doSpecial():void{
var _local1:*;
var _local2:*;
var _local3:int;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local1 = new renderSprite(game, game.SpritePool.ninFlash, 64, x, y, 0, 0, 10, 0.3, 10);
_local2 = 8;
if ((_local2 * 2) > pth.length){
_local2 = (pth.length * 0.25);
};
_local3 = (Math.random() * _local2);
_local4 = 0;
while (_local4 < _local3) {
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local4++;
};
_local5 = new BlurFilter(8, 8, 1);
this.filters = [_local5];
speed = 2;
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local6 = (tx - x);
_local7 = (ty - y);
ang = Math.atan2(_local7, _local6);
vx = Math.cos(ang);
vy = Math.sin(ang);
setAngle();
}
override public function setAngle():void{
soldier.gotoAndStop((Math.round(((180 + ((ang * 180) / Math.PI)) / 45)) + 1));
}
}
}//package
Section 135
//Pen7 (Pen7)
package {
import flash.display.*;
public class Pen7 extends Enemy {
public var soldier:MovieClip;
public function Pen7(_arg1:Game, _arg2:GameActor){
endPoint = _arg2;
game = _arg1;
speed = 0.8;
baseSpeed = speed;
health = 120;
}
override public function setAngle():void{
soldier.gotoAndStop((Math.round(((180 + ((ang * 180) / Math.PI)) / 45)) + 1));
}
}
}//package
Section 136
//Pen8 (Pen8)
package {
import flash.display.*;
public class Pen8 extends Enemy {
public var soldier:MovieClip;
public function Pen8(_arg1:Game, _arg2:GameActor){
endPoint = _arg2;
game = _arg1;
speed = 0.6;
baseSpeed = speed;
bMetal = true;
health = 250;
}
override public function setAngle():void{
soldier.gotoAndStop((Math.round(((180 + ((ang * 180) / Math.PI)) / 45)) + 1));
}
}
}//package
Section 137
//Pen9 (Pen9)
package {
import flash.display.*;
public class Pen9 extends Enemy {
public var soldier:MovieClip;
public function Pen9(_arg1:Game, _arg2:GameActor){
endPoint = _arg2;
game = _arg1;
speed = 0.8;
baseSpeed = speed;
bSpecial = true;
specialLimit = 10;
health = 80;
}
override public function specialFX():void{
if (((bSpecial) && (!(visible)))){
game.decalFX.Tunnel(x, y);
};
}
override public function endSpecial():void{
var _local1:*;
bSpecial = false;
_local1 = new renderSprite(game, game.SpritePool.dig, 64, x, y, 0, 0, 10, 0.2, 10);
specialTimer = 0;
visible = true;
game.decalFX.Tunnel(x, y);
}
override public function doSpecial():void{
var _local1:*;
var _local2:*;
var _local3:int;
var _local4:*;
var _local5:*;
var _local6:*;
visible = false;
_local1 = new renderSprite(game, game.SpritePool.dig, 64, x, y, 0, 0, 10, 0.2, 10);
game.decalFX.Tunnel(x, y);
_local2 = (4 + (Math.random() * 6));
if ((_local2 * 2) > pth.length){
_local2 = (pth.length * 0.25);
};
_local3 = _local2;
_local4 = 0;
while (_local4 < _local3) {
ty = ((Number(pth.pop()) * game.gridSize) + 16);
tx = ((Number(pth.pop()) * game.gridSize) + 16);
_local4++;
};
_local5 = (tx - x);
_local6 = (ty - y);
ang = Math.atan2(_local6, _local5);
vx = Math.cos(ang);
vy = Math.sin(ang);
setAngle();
}
override public function setAngle():void{
soldier.gotoAndStop((Math.round(((180 + ((ang * 180) / Math.PI)) / 45)) + 1));
}
}
}//package
Section 138
//penSplatter1 (penSplatter1)
package {
import flash.display.*;
public dynamic class penSplatter1 extends BitmapData {
public function penSplatter1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 139
//plasHit (plasHit)
package {
import flash.display.*;
public dynamic class plasHit extends BitmapData {
public function plasHit(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 140
//plasmaSound (plasmaSound)
package {
import flash.media.*;
public dynamic class plasmaSound extends Sound {
}
}//package
Section 141
//playButton (playButton)
package {
public class playButton extends gameButton {
override public function doAction():void{
game.getFrame(2);
}
}
}//package
Section 142
//poisonBomb1 (poisonBomb1)
package {
import flash.display.*;
public dynamic class poisonBomb1 extends BitmapData {
public function poisonBomb1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 143
//poisonPuff1 (poisonPuff1)
package {
import flash.display.*;
public dynamic class poisonPuff1 extends BitmapData {
public function poisonPuff1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 144
//RadialBlast (RadialBlast)
package {
public class RadialBlast {
public var game:Game;
public var radius:Number;
public var damage:Number;
public var x:Number;
public var y:Number;
public var dType:String;
public function RadialBlast(_arg1:Game, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String){
game = _arg1;
x = _arg2;
y = _arg3;
radius = (_arg4 * 2);
dType = _arg6;
damage = _arg5;
blast();
}
private function inRange(_arg1):Boolean{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = false;
_local3 = (x - _arg1.x);
_local4 = (y - _arg1.y);
_local5 = ((_local3 * _local3) + (_local4 * _local4));
_local6 = (radius * radius);
if (_local5 <= _local6){
_local2 = true;
};
return (_local2);
}
private function blast():void{
var _local1:*;
var _local2:Enemy;
var _local3:*;
_local1 = game.enemies.length;
_local3 = 0;
while (_local3 < _local1) {
_local2 = Enemy(game.enemies[_local3]);
if (_local2 != null){
if (inRange(_local2)){
_local2.takeDamage(damage, dType);
};
};
_local3++;
};
}
}
}//package
Section 145
//RadialCloud (RadialCloud)
package {
public class RadialCloud {
public var Rate:Number;// = 10
public var y:Number;
public var radius:Number;
public var Type:String;
public var Life:int;// = 100
public var damage:Number;
public var game:Game;
private var counter:Number;// = 0
public var dType:String;
public var x:Number;
public function RadialCloud(_arg1:Game, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String="", _arg8:int=100, _arg9:Number=10){
Rate = 10;
Life = 100;
counter = 0;
super();
game = _arg1;
x = _arg2;
y = _arg3;
radius = (_arg4 * 2);
dType = _arg6;
damage = _arg5;
Type = _arg7;
Life = _arg8;
Rate = _arg9;
game.projectiles.push(this);
}
private function inRange(_arg1):Boolean{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = false;
_local3 = (x - _arg1.x);
_local4 = (y - _arg1.y);
_local5 = ((_local3 * _local3) + (_local4 * _local4));
_local6 = (radius * radius);
if (_local5 <= _local6){
_local2 = true;
};
return (_local2);
}
private function blast():void{
var _local1:*;
var _local2:Enemy;
var _local3:*;
_local1 = game.enemies.length;
_local3 = 0;
while (_local3 < _local1) {
_local2 = Enemy(game.enemies[_local3]);
if (_local2 != null){
if (inRange(_local2)){
_local2.takeDamage(0, dType);
};
};
_local3++;
};
}
public function Tick(_arg1):void{
Life = (Life - _arg1);
counter = (counter + _arg1);
if (Life <= 0){
game.killProjectile(this, false);
};
if (counter >= Rate){
counter = 0;
blast();
};
if (Math.random() > 0.7){
if (Type == "fire"){
};
};
}
}
}//package
Section 146
//RangeRing (RangeRing)
package {
import flash.display.*;
import flash.events.*;
public class RangeRing extends MovieClip {
var game:Game;
public function RangeRing(){
mouseEnabled = false;
visible = false;
game = Game(parent);
addEventListener(Event.ENTER_FRAME, Tick, false, 0, true);
}
public function Tick(_arg1:Event):void{
var _local2:*;
if (game.Selected != null){
x = game.Selected.x;
y = game.Selected.y;
_local2 = game.Selected.Range;
scaleX = (_local2 / 100);
scaleY = scaleX;
visible = true;
if (game.Selected.bHeld){
if (game.Selected.bBlocked){
gotoAndStop(2);
} else {
gotoAndStop(1);
};
} else {
gotoAndStop(1);
};
} else {
visible = false;
};
}
}
}//package
Section 147
//Renderer (Renderer)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class Renderer extends Sprite {
var clearRec:Rectangle;
var canvas:BitmapData;
var DisplayScreen:Bitmap;
var items:Array;
var game:Game;
public function Renderer(){
items = new Array();
super();
mouseEnabled = false;
game = Game(parent);
addEventListener(Event.ENTER_FRAME, Tick, false, 0, true);
this.mouseEnabled = false;
canvas = new BitmapData(640, 640, true, 0);
clearRec = new Rectangle(0, 0, 640, 640);
DisplayScreen = new Bitmap(canvas);
addChild(DisplayScreen);
}
private function render(_arg1:BitmapData, _arg2:Number, _arg3:Number, _arg4:int, _arg5:int, _arg6:Boolean, _arg7:Boolean, _arg8:Number):void{
var _local9:Rectangle;
var _local10:Point;
var _local11:Point;
_local9 = new Rectangle((_arg5 * _arg4), 0, _arg4, _arg4);
if (!_arg7){
_local10 = new Point((_arg2 - (_arg4 * 0.5)), (_arg3 - (_arg4 * 0.5)));
canvas.copyPixels(_arg1, _local9, _local10, null, null, true);
} else {
_local10 = new Point((_arg2 - (_arg4 * 0.5)), ((_arg3 - _arg8) - (_arg4 * 0.5)));
_local11 = new Point((_arg2 - (_arg4 * 0.5)), (_arg3 - (_arg4 * 0.5)));
canvas.copyPixels(_arg1, _local9, _local10, null, null, true);
canvas.copyPixels(game.SpritePool.shadow, _local9, _local11, null, null, true);
};
}
public function Tick(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
canvas.fillRect(clearRec, 0);
_local2 = game.renderElements.length;
_local3 = (_local2 - 1);
while (_local3 >= 0) {
_local4 = game.renderElements[_local3];
render(_local4.bmp, _local4.x, _local4.y, _local4.bSize, _local4.frame, _local4.glow, _local4.shadow, _local4.z);
_local3--;
};
}
}
}//package
Section 148
//renderSprite (renderSprite)
package {
import flash.display.*;
public class renderSprite {
public var y:Number;
public var bSize:int;
public var bmp:BitmapData;
public var bPoison:Boolean;// = false
public var radius:Number;// = 6
public var glow:Boolean;
public var game:Game;
public var shadow:Boolean;// = false
public var bFire:Boolean;// = false
public var vx:Number;
public var vy:Number;
public var vz:Number;// = 0
public var dType:String;// = ""
public var grid:int;
public var speed:Number;
public var bTrail:Boolean;// = false
public var numFrames:int;
public var bDie:Boolean;// = false
public var tFrame:Number;// = 0
public var bProj:Boolean;
public var tgt:Enemy;
public var fRate:Number;
public var frame:int;
public var damage:int;
public var gx:int;
public var gy:int;
public var lifeSpan:int;
public var x:Number;
public var z:Number;// = 0
public var life:Number;// = 0
public function renderSprite(_arg1:Game, _arg2:BitmapData, _arg3:int, _arg4:Number, _arg5:Number, _arg6:Number=0, _arg7:Number=0, _arg8:int=0, _arg9:Number=1, _arg10:int=100, _arg11:int=0, _arg12:Enemy=null, _arg13:String="", _arg14:Number=1, _arg15:Boolean=false, _arg16:Boolean=false, _arg17:Boolean=false){
var _local18:*;
var _local19:*;
var _local20:*;
vz = 0;
z = 0;
radius = 6;
dType = "";
tFrame = 0;
life = 0;
bDie = false;
shadow = false;
bTrail = false;
bFire = false;
bPoison = false;
super();
game = _arg1;
bmp = _arg2;
bSize = _arg3;
x = _arg4;
y = _arg5;
vx = _arg6;
vy = _arg7;
numFrames = _arg8;
fRate = _arg9;
lifeSpan = _arg10;
damage = _arg11;
tgt = _arg12;
speed = _arg14;
glow = _arg15;
if (damage >= 1){
bProj = true;
dType = _arg13;
};
grid = game.gridSize;
game.renderElements.push(this);
if (_arg16){
shadow = _arg16;
_local18 = ((tgt.x + (tgt.vx * 40)) - x);
_local19 = ((tgt.y + (tgt.vy * 40)) - y);
_local20 = Math.sqrt(((_local18 * _local18) + (_local19 * _local19)));
vz = (_local20 * (speed * 0.018));
};
bTrail = _arg17;
}
public function destroyed():void{
game = null;
bmp = null;
dType = null;
tgt = null;
}
private function hitFX():void{
var _local1:*;
if (dType == "bullet"){
_local1 = new renderSprite(game, game.SpritePool.bulletHit, 32, x, y, 0, 0, 10, 0.5, 10);
} else {
if (dType == "poison"){
_local1 = new renderSprite(game, game.SpritePool.bioHit, 32, x, y, 0, 0, 10, 0.5, 10);
};
};
}
public function Tick(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
x = (x + (vx * _arg1));
y = (y + (vy * _arg1));
if (shadow){
z = (z + (vz * _arg1));
vz = (vz - (0.09 * _arg1));
if (bTrail){
if (Math.random() > 0.5){
_local2 = new renderSprite(game, game.SpritePool.flameShot, 32, x, (y - z), 0, -0.1, 10, 0.2, 10);
};
};
if (z < 0){
_local3 = new RadialBlast(game, x, y, 40, (damage * 0.5), dType);
if (bFire){
_local5 = new RadialCloud(game, x, y, 20, 0, "fire", "fire", 500, 10);
game.decalFX.Crater(x, y);
} else {
if (bPoison){
_local5 = new RadialCloud(game, x, y, 20, 0, "poison", "poison", 1000, 20);
game.decalFX.Crater(x, y);
};
};
_local4 = new renderSprite(game, game.SpritePool.explosion1, 64, x, y, 0, 0, 10, 0.2, 10);
game.decalFX.Crater(x, y);
bDie = true;
game.killSprite(this);
destroyed();
};
} else {
if (bTrail){
if (Math.random() > 0.5){
};
};
};
life = (life + (fRate * _arg1));
tFrame = (tFrame + (fRate * _arg1));
frame = Math.floor(tFrame);
if (frame >= numFrames){
tFrame = 0;
};
if (life > lifeSpan){
bDie = true;
game.killSprite(this);
};
if (bProj){
setGrid();
if (((!(shadow)) || ((vz >= -0.05)))){
setVelocity();
};
if (!shadow){
testCollision();
};
};
}
private function setGrid():void{
gx = Math.floor((x / grid));
gy = Math.floor((y / grid));
}
private function testCollision():void{
if (!bDie){
if ((((tgt.gx >= (gx - 1))) && ((tgt.gx <= (gx + 1))))){
if ((((tgt.gy >= (gy - 1))) && ((tgt.gy <= (gy + 1))))){
testRadial();
};
};
};
}
private function testRadial():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = (x - tgt.x);
_local2 = (y - tgt.y);
_local3 = ((radius * radius) + (tgt.radius * tgt.radius));
_local4 = ((_local1 * _local1) + (_local2 * _local2));
if (_local4 <= _local3){
collide();
};
}
private function collide():void{
tgt.takeDamage(damage, dType);
if (dType != "fire"){
bDie = true;
game.killSprite(this);
hitFX();
destroyed();
} else {
bProj = false;
vx = 0;
vy = -1;
};
}
private function setVelocity():void{
var _local1:*;
var _local2:*;
var _local3:*;
if (((!(bDie)) && ((tgt.health > 0)))){
_local1 = (tgt.x - x);
_local2 = (tgt.y - y);
if (shadow){
_local1 = ((tgt.x + (tgt.vx * 25)) - x);
_local2 = ((tgt.y + (tgt.vy * 25)) - y);
};
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
vx = ((_local1 / _local3) * speed);
vy = ((_local2 / _local3) * speed);
};
if (((!(tgt.visible)) && (!(shadow)))){
life = (life + 100);
};
}
}
}//package
Section 149
//runDown (runDown)
package {
import flash.display.*;
import flash.text.*;
public class runDown extends MovieClip {
var exp:Number;
public var totalText:TextField;
var playerCredits:int;
public var fundsText:TextField;
var totalScore:Number;
public var livesText:TextField;
public var scoreText:TextField;
var game:Game;
public function runDown(){
game = Game(parent);
init();
}
public function init():void{
var _local1:*;
var _local2:*;
_local1 = Math.floor((game.levelHealth * 100));
_local2 = Math.floor((game.gameInfo.funds * 5));
totalScore = ((Math.floor(game.levelScore) + _local1) + _local2);
livesText.text = String(((Math.floor(game.levelHealth) + " x ") + 100));
scoreText.text = String(Math.floor(game.levelScore));
fundsText.text = String(((Math.floor(game.gameInfo.funds) + " x ") + 5));
totalText.text = String(totalScore);
saveScore();
}
public function saveScore():void{
var _local1:int;
var _local2:*;
game.gameInfo.saveLevel(game.currentLevel, totalScore);
_local1 = 0;
_local2 = 1;
while (_local2 < 16) {
_local1 = (_local1 + int(game.gameInfo.Levels[_local2]));
_local2++;
};
game.agi.showScoreboardSubmit(_local1);
}
}
}//package
Section 150
//selectUgButton (selectUgButton)
package {
import flash.display.*;
public dynamic class selectUgButton extends MovieClip {
}
}//package
Section 151
//sellButton (sellButton)
package {
import flash.display.*;
import flash.events.*;
public class sellButton extends Sprite {
var game:Game;
public function sellButton(){
game = Game(parent.parent);
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
}
public function clicked(_arg1:MouseEvent):void{
game.Selected.sell();
game.Selected = null;
}
}
}//package
Section 152
//sendWaveButton (sendWaveButton)
package {
import flash.display.*;
import flash.events.*;
public class sendWaveButton extends Sprite {
var lastClick:int;// = 200
var game:Game;
public function sendWaveButton(){
lastClick = 200;
super();
game = Game(parent.parent);
addEventListener(Event.ENTER_FRAME, ticker, false, 0, true);
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
}
public function ticker(_arg1:Event):void{
lastClick++;
if (lastClick >= 200){
alpha = 1;
} else {
alpha = 0.2;
};
}
public function clicked(_arg1:MouseEvent):void{
var _local2:*;
if (alpha == 1){
_local2 = game.WaveControl.newWave();
lastClick = 0;
game.gameInfo.addWaves();
};
}
}
}//package
Section 153
//shadow1 (shadow1)
package {
import flash.display.*;
public dynamic class shadow1 extends BitmapData {
public function shadow1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 154
//shock1 (shock1)
package {
import flash.display.*;
public dynamic class shock1 extends BitmapData {
public function shock1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 155
//shopButton (shopButton)
package {
public class shopButton extends gameButton {
override public function doAction():void{
game.getFrame(8);
}
}
}//package
Section 156
//soundManager (soundManager)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class soundManager extends Sprite {
var game:Game;
var bMus:Boolean;// = false
var hs:SoundChannel;
var hurt1:Sound;
var t2:Sound;
var t3:Sound;
var t5:Sound;
var t7:Sound;
var t1:Sound;
var t9:Sound;
var t6:Sound;
var t4:Sound;
var t8:Sound;
var explode1:Sound;
var explode2:Sound;
var t10:Sound;
var ms:SoundChannel;
var bMute:Boolean;// = false
var ds:SoundChannel;
var bgNoise:Sound;
var bgMusic:Sound;
var fadeClock:Timer;
public function soundManager(_arg1){
bMute = false;
bMus = false;
super();
bgMusic = new bgm();
game = _arg1;
fadeClock = new Timer(20, 0);
fadeClock.addEventListener(TimerEvent.TIMER, fadeout, false, 0, true);
SoundMixer.soundTransform = new SoundTransform(1);
t1 = new gun();
t2 = new mg_2();
t3 = new lecw();
t4 = new bio_1();
t5 = new Ashot();
t6 = new missileLaunchS();
t7 = new lazerSound();
t8 = new Ashot();
t9 = new missileLaunchS();
explode1 = new ExplodeS();
explode2 = new explosion_1();
hurt1 = new ouch();
}
public function mute():void{
var _local1:*;
if (bMute){
bMute = false;
SoundMixer.soundTransform = new SoundTransform(1);
_local1 = new SoundTransform(0.6);
if (ds != null){
ds.soundTransform = _local1;
};
if (ms != null){
ms.soundTransform = _local1;
};
} else {
bMute = true;
SoundMixer.soundTransform = new SoundTransform(0);
_local1 = new SoundTransform(0);
if (ds != null){
ds.soundTransform = _local1;
};
if (ms != null){
ms.soundTransform = _local1;
};
};
}
public function playbgm():void{
var _local1:*;
if (!bMute){
if (!bMus){
bMus = true;
_local1 = new SoundTransform(0.9);
ms = bgMusic.play(0, 3, _local1);
};
};
}
public function stopNoise():void{
var _local1:*;
if (ds != null){
_local1 = new SoundTransform(0);
ds.soundTransform = _local1;
};
}
public function fadeout(_arg1:TimerEvent):void{
var _local2:*;
if (ms.soundTransform.volume > 0.02){
_local2 = new SoundTransform((ms.soundTransform.volume - 0.01));
ms.soundTransform = _local2;
} else {
ms.stop();
bMus = false;
fadeClock.stop();
};
}
public function playShot(_arg1:String):void{
if (!bMute){
switch (_arg1){
case "t1":
t1.play();
break;
case "t2":
t2.play();
break;
case "t3":
t3.play();
break;
case "t4":
t4.play();
break;
case "t5":
t5.play();
break;
case "t6":
t6.play();
break;
case "t7":
t7.play();
break;
case "t8":
t8.play();
break;
case "t9":
t9.play();
break;
case "t10":
t10.play();
break;
case "explode1":
explode1.play();
break;
case "explode2":
explode2.play();
break;
case "hurt":
hurt1.play();
break;
};
};
}
public function playNoise():void{
var _local1:*;
if (!bMute){
_local1 = new SoundTransform(0.6);
ds = bgNoise.play(0, 100, _local1);
};
}
public function stopbgm():void{
fadeClock.start();
}
public function Win():void{
if (!bMute){
};
}
}
}//package
Section 157
//Spark (Spark)
package {
public class Spark {
public var vx:Number;
public var vy:Number;
public var game:Game;
public var x:Number;
public var y:Number;
public var life:Number;
public var bFade:Boolean;
public function Spark(_arg1, _arg2, _arg3, _arg4, _arg5:Number=0, _arg6:Number=0, _arg7:Boolean=true){
game = _arg4;
x = _arg1;
y = _arg2;
life = _arg3;
bFade = _arg7;
if ((((_arg5 == 0)) && ((_arg6 == 0)))){
vx = (-4 + (Math.random() * 8));
vy = (-4 + (Math.random() * 4));
} else {
vx = _arg5;
vy = _arg6;
};
game.fx.sparks.push(this);
}
public function Tick():void{
life--;
x = (x + vx);
y = (y + vy);
if (bFade){
vy = (vy + 0.1);
vx = (vx * 0.99);
};
if (life <= 0){
game.fx.removeSpark(this);
};
}
}
}//package
Section 158
//splat_2 (splat_2)
package {
import flash.media.*;
public dynamic class splat_2 extends Sound {
}
}//package
Section 159
//spritePool (spritePool)
package {
import flash.display.*;
public class spritePool {
public var dig:BitmapData;
public var poisonPuff:BitmapData;
public var flameShot:BitmapData;
public var bomb2:BitmapData;
public var bomb3:BitmapData;
public var healthUp:BitmapData;
public var bomb:BitmapData;
public var bulletShot:BitmapData;
public var ninFlash:BitmapData;
public var bomb1:BitmapData;
public var shadow:BitmapData;
public var bioShot:BitmapData;
public var penDie:BitmapData;
public var shock:BitmapData;
public var bioHit:BitmapData;
public var boulder:BitmapData;
public var bulletHit:BitmapData;
public var bioFX:BitmapData;
public var burning:BitmapData;
public var bombBlast:BitmapData;
public var explosion1:BitmapData;
public function spritePool(){
flameShot = new flame2(320, 32);
bioShot = new bioBlob1(320, 32);
bioHit = new bioHit1(320, 32);
bulletShot = new bullet1(32, 32);
bulletHit = new hit1(320, 32);
bioFX = new bioFX1(160, 16);
healthUp = new healthUp1(160, 16);
burning = new burning1(320, 32);
explosion1 = new explode1(640, 64);
penDie = new penSplatter1(420, 42);
ninFlash = new ninflash1(640, 64);
bomb = new bombExplode1(640, 64);
bombBlast = new bombBlast1(640, 64);
dig = new dig1(640, 64);
boulder = new boulder1(0x0100, 32);
shadow = new shadow1(0x0100, 32);
shock = new shock1(160, 16);
bomb1 = new ebomb1(96, 24);
bomb2 = new poisonBomb1(96, 24);
bomb3 = new fireBomb1(96, 24);
poisonPuff = new poisonPuff1(320, 32);
}
}
}//package
Section 160
//stars (stars)
package {
import flash.display.*;
public dynamic class stars extends MovieClip {
public function stars(){
addFrameScript(0, frame1);
}
function frame1(){
mouseEnabled = false;
}
}
}//package
Section 161
//StartTile1 (StartTile1)
package {
public class StartTile1 extends GameActor {
public function StartTile1(){
SetGrid();
game.startPoints1 = this;
visible = false;
}
}
}//package
Section 162
//StartTile2 (StartTile2)
package {
public class StartTile2 extends GameActor {
public function StartTile2(){
SetGrid();
game.startPoints2 = this;
visible = false;
}
}
}//package
Section 163
//StartTile3 (StartTile3)
package {
public class StartTile3 extends GameActor {
public function StartTile3(){
SetGrid();
game.startPoints3 = this;
visible = false;
}
}
}//package
Section 164
//tankSound (tankSound)
package {
import flash.media.*;
public dynamic class tankSound extends Sound {
}
}//package
Section 165
//tb1 (tb1)
package {
public class tb1 extends towerButton {
public function tb1(){
id = 1;
cost = 50;
}
}
}//package
Section 166
//tb10 (tb10)
package {
public class tb10 extends towerButton {
public function tb10(){
id = 10;
cost = 350;
}
}
}//package
Section 167
//tb2 (tb2)
package {
public class tb2 extends towerButton {
public function tb2(){
id = 2;
cost = 80;
}
}
}//package
Section 168
//tb3 (tb3)
package {
public class tb3 extends towerButton {
public function tb3(){
id = 3;
cost = 100;
}
}
}//package
Section 169
//tb4 (tb4)
package {
public class tb4 extends towerButton {
public function tb4(){
id = 4;
cost = 170;
}
}
}//package
Section 170
//tb5 (tb5)
package {
public class tb5 extends towerButton {
public function tb5(){
id = 5;
cost = 200;
}
}
}//package
Section 171
//tb6 (tb6)
package {
public class tb6 extends towerButton {
public function tb6(){
id = 6;
cost = 300;
}
}
}//package
Section 172
//tb7 (tb7)
package {
public class tb7 extends towerButton {
public function tb7(){
id = 7;
cost = 300;
}
}
}//package
Section 173
//tb8 (tb8)
package {
public class tb8 extends towerButton {
public function tb8(){
id = 8;
cost = 400;
}
}
}//package
Section 174
//tb9 (tb9)
package {
public class tb9 extends towerButton {
public function tb9(){
id = 9;
cost = 350;
}
}
}//package
Section 175
//Tower (Tower)
package {
import flash.display.*;
public class Tower extends MovieClip {
public var gy:int;
public var Range:int;// = 100
public var bBlocked:Boolean;// = false
public var loading:int;// = 0
public var eTarget:Enemy;
public var saleValue:int;// = 20
public var Level:int;// = 1
private var starR:MovieClip;
public var RoF:int;// = 1
public var Damage:int;// = 0
public var bNoFly:Boolean;// = false
public var bHeld:Boolean;// = true
public var cost:int;// = 50
public var angle:Number;
public var gx:int;
public var game:Game;
public function Tower(){
Damage = 0;
RoF = 1;
Range = 100;
Level = 1;
loading = 0;
bHeld = true;
bBlocked = false;
saleValue = 20;
bNoFly = false;
cost = 50;
super();
mouseEnabled = false;
starR = new stars();
starR.y = -32;
addChild(starR);
starR.gotoAndStop(1);
}
public function select():void{
game.Selected = this;
}
public function clicked():void{
if (bHeld){
dropTower();
} else {
select();
};
}
public function levelUp():void{
if (((!(bHeld)) && ((Level < game.gameInfo.ugLevel)))){
if (game.gameInfo.funds >= Math.floor((cost * 0.25))){
game.gameInfo.funds = (game.gameInfo.funds - Math.floor((cost * 0.25)));
game.gameInfo.addCredit(5);
Damage = (Damage + (Damage * 0.2));
RoF = (RoF * 1.1);
Range = (Range + 6);
Level = (Level + 1);
starR.nextFrame();
game.gameInfo.addUpgrade();
};
};
}
public function aim():void{
}
public function dropTower():void{
SetGrid();
if (game.gameGrid.grid[gx][gy] == 0){
if (game.gameGrid.checkDrop(this)){
snapToGrid();
game.gameInfo.funds = (game.gameInfo.funds - cost);
game.gameInfo.addCredit(5);
bHeld = false;
bBlocked = false;
game.gameInfo.addTower();
};
};
}
public function Fire():void{
}
public function sell():void{
if (!bHeld){
game.gameInfo.funds = (game.gameInfo.funds + cost);
game.gameGrid.grid[gx][gy] = 0;
};
bHeld = true;
game.killTower(this);
}
public function SetGrid():void{
gx = Math.floor((x / game.gridSize));
gy = Math.floor((y / game.gridSize));
}
public function checkTarget():Boolean{
var _local1:*;
_local1 = false;
if (eTarget != null){
if (((eTarget.bEnemy) && (eTarget.visible))){
if (game.inRange(this, eTarget)){
_local1 = true;
};
};
};
if (!_local1){
eTarget = null;
};
return (_local1);
}
public function Tick(_arg1:Number):void{
if (scaleX > 1){
scaleX = (scaleX - 0.01);
scaleY = scaleX;
};
if (bHeld){
game.Selected = this;
x = game.mouseX;
y = game.mouseY;
if (x > 640){
x = 640;
};
snapToGrid();
if (game.gameGrid.grid[gx][gy] == 0){
bBlocked = false;
} else {
bBlocked = true;
};
} else {
loading = (loading + (RoF * _arg1));
if ((((eTarget == null)) || ((eTarget.health <= 0)))){
if (loading >= 60){
eTarget = game.getEnemy(this);
};
} else {
aim();
if (loading >= 100){
if (checkTarget()){
loading = 0;
scaleX = 1.1;
scaleY = 1.1;
Fire();
} else {
eTarget = game.getEnemy(this);
};
};
};
};
}
public function snapToGrid():void{
SetGrid();
x = ((gx * game.gridSize) + (game.gridSize * 0.5));
y = (((gy * game.gridSize) + (game.gridSize * 0.5)) + 1);
}
public function blowUp():void{
var _local1:*;
if (!bHeld){
if (game.Selected == this){
game.Selected = null;
};
game.gameGrid.grid[gx][gy] = 0;
_local1 = new renderSprite(game, game.SpritePool.bomb, 64, x, y, 0, -0.2, 10, 0.2, 10);
game.decalFX.Crater(x, y);
game.killTower(this);
};
}
}
}//package
Section 176
//tower1 (tower1)
package {
import flash.display.*;
public class tower1 extends Tower {
public var turret:MovieClip;
public function tower1(_arg1:Game=null){
Damage = 20;
RoF = 2;
Range = 75;
if (_arg1 != null){
game = _arg1;
} else {
game = Game(parent.parent);
game.towers.push(this);
bHeld = false;
};
turret.gotoAndStop(1);
turret.mouseEnabled = false;
}
override public function aim():void{
var _local1:*;
var _local2:*;
var _local3:*;
if (eTarget.health > 0){
_local1 = (eTarget.x - x);
_local2 = (eTarget.y - y);
_local3 = ((Math.atan2(_local2, _local1) * 180) / 3.16);
turret.gotoAndStop(Math.round(((_local3 + 180) / 5)));
};
}
override public function Fire():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = (eTarget.x - x);
_local2 = (eTarget.y - y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local4 = ((_local1 / _local3) * 20);
_local5 = ((_local2 / _local3) * 20);
_local6 = new renderSprite(game, game.SpritePool.bulletShot, 32, (x + _local4), ((y - 8) + _local5), 0, 0, 1, 0, 100, Damage, eTarget, "bullet", 3, false);
game.soundBox.playShot("t1");
}
}
}//package
Section 177
//tower10 (tower10)
package {
import flash.display.*;
public class tower10 extends Tower {
public var turret:MovieClip;
public function tower10(_arg1:Game=null){
Damage = 50;
RoF = 1;
Range = 50;
if (_arg1 != null){
game = _arg1;
} else {
game = Game(parent.parent);
game.towers.push(this);
bHeld = false;
};
turret.gotoAndStop(1);
turret.mouseEnabled = false;
}
override public function aim():void{
}
override public function Fire():void{
var _local1:renderSprite;
var _local2:*;
var _local3:*;
var _local4:*;
turret.gotoAndPlay(2);
_local2 = -14;
_local3 = 0;
_local1 = new renderSprite(game, game.SpritePool.dig, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = -9;
_local3 = -9;
_local1 = new renderSprite(game, game.SpritePool.dig, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = 0;
_local3 = -14;
_local1 = new renderSprite(game, game.SpritePool.dig, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = 9;
_local3 = -9;
_local1 = new renderSprite(game, game.SpritePool.dig, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = 14;
_local3 = 0;
_local1 = new renderSprite(game, game.SpritePool.dig, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = 9;
_local3 = 9;
_local1 = new renderSprite(game, game.SpritePool.dig, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = 0;
_local3 = 14;
_local1 = new renderSprite(game, game.SpritePool.dig, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = -9;
_local3 = 9;
_local1 = new renderSprite(game, game.SpritePool.dig, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local4 = new RadialBlast(game, x, y, Range, Damage, "shock");
game.soundBox.playShot("t9");
}
}
}//package
Section 178
//tower2 (tower2)
package {
import flash.display.*;
public class tower2 extends Tower {
public var turret2:MovieClip;
public var turret:MovieClip;
public function tower2(_arg1:Game=null){
Damage = 7;
RoF = 6;
Range = 75;
if (_arg1 != null){
game = _arg1;
} else {
game = Game(parent.parent);
game.towers.push(this);
bHeld = false;
};
turret.gotoAndStop(1);
turret2.gotoAndStop(1);
turret.mouseEnabled = false;
turret2.mouseEnabled = false;
}
override public function aim():void{
var _local1:*;
var _local2:*;
var _local3:*;
if (eTarget.health > 0){
_local1 = (eTarget.x - x);
_local2 = (eTarget.y - y);
_local3 = ((Math.atan2(_local2, _local1) * 180) / 3.16);
turret.gotoAndStop(Math.round(((_local3 + 180) / 5)));
turret2.gotoAndStop(Math.round(((_local3 + 180) / 5)));
};
}
override public function Fire():void{
var _local1:*;
if (eTarget.health > 0){
turret2.alpha = 1;
turret2.visible = true;
_local1 = new renderSprite(game, game.SpritePool.bulletHit, 32, (eTarget.x + offSet()), ((eTarget.y - 4) + offSet()), 0, 0, 10, 0.5, 10);
game.soundBox.playShot("t2");
if (eTarget.bMetal){
eTarget.takeDamage((Damage * 0.5), "bullet");
} else {
eTarget.takeDamage(Damage, "bullet");
};
};
}
private function offSet(){
return ((-4 + (Math.random() * 8)));
}
override public function Tick(_arg1:Number):void{
if (scaleX > 1){
scaleX = (scaleX - 0.01);
scaleY = scaleX;
};
if (turret2.alpha > 0){
turret2.alpha = (turret2.alpha - 0.5);
} else {
turret2.visible = false;
};
if (bHeld){
game.Selected = this;
x = game.mouseX;
y = game.mouseY;
if (x > 640){
x = 640;
};
snapToGrid();
if (game.gameGrid.grid[gx][gy] == 0){
bBlocked = false;
} else {
bBlocked = true;
};
} else {
loading = (loading + (RoF * _arg1));
if ((((eTarget == null)) || ((eTarget.health <= 0)))){
if (loading >= 60){
eTarget = game.getEnemy(this);
};
} else {
aim();
if (loading >= 100){
if (checkTarget()){
loading = 0;
scaleX = 1.1;
scaleY = 1.1;
Fire();
} else {
eTarget = game.getEnemy(this);
};
};
};
};
}
}
}//package
Section 179
//tower3 (tower3)
package {
import flash.display.*;
public class tower3 extends Tower {
public var turret:MovieClip;
public function tower3(_arg1:Game=null){
Damage = 30;
RoF = 4;
Range = 50;
if (_arg1 != null){
game = _arg1;
} else {
game = Game(parent.parent);
game.towers.push(this);
bHeld = false;
};
turret.gotoAndStop(1);
turret.mouseEnabled = false;
}
override public function aim():void{
}
override public function Fire():void{
var _local1:*;
var _local2:*;
if (eTarget.health > 0){
turret.gotoAndPlay(2);
_local1 = new lightning(x, (y - 24), eTarget.x, (eTarget.y - 8), (Damage * 3), game, eTarget);
_local2 = new renderSprite(game, game.SpritePool.shock, 16, eTarget.x, (eTarget.y - 8), 0, 0, 10, 0.2, 10);
game.soundBox.playShot("t3");
if (eTarget.bMetal){
eTarget.takeDamage((Damage * 0.8), "shock");
} else {
eTarget.takeDamage(Damage, "shock");
};
};
}
}
}//package
Section 180
//tower4 (tower4)
package {
import flash.display.*;
public class tower4 extends Tower {
public var turret:MovieClip;
public function tower4(_arg1:Game=null){
Damage = 30;
RoF = 3;
Range = 75;
if (_arg1 != null){
game = _arg1;
} else {
game = Game(parent.parent);
game.towers.push(this);
bHeld = false;
};
turret.gotoAndStop(1);
turret.mouseEnabled = false;
}
override public function aim():void{
var _local1:*;
var _local2:*;
var _local3:*;
if (eTarget.health > 0){
_local1 = (eTarget.x - x);
_local2 = (eTarget.y - y);
_local3 = ((Math.atan2(_local2, _local1) * 180) / 3.16);
turret.gotoAndStop(Math.round(((_local3 + 180) / 5)));
};
}
override public function Fire():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = (eTarget.x - x);
_local2 = (eTarget.y - y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local4 = ((_local1 / _local3) * 20);
_local5 = ((_local2 / _local3) * 20);
_local6 = new renderSprite(game, game.SpritePool.bioShot, 32, (x + _local4), ((y - 8) + _local5), 0, 0, 1, 0, 100, Damage, eTarget, "poison", 3, false);
game.soundBox.playShot("t4");
}
}
}//package
Section 181
//tower5 (tower5)
package {
import flash.display.*;
public class tower5 extends Tower {
public var turret:MovieClip;
public function tower5(_arg1:Game=null){
Damage = 50;
RoF = 1.5;
Range = 100;
if (_arg1 != null){
game = _arg1;
} else {
game = Game(parent.parent);
game.towers.push(this);
bHeld = false;
};
turret.gotoAndStop(1);
turret.mouseEnabled = false;
}
override public function aim():void{
}
override public function Fire():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
turret.gotoAndPlay(2);
_local1 = (eTarget.x - x);
_local2 = (eTarget.y - y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local4 = ((_local1 / _local3) * 12);
_local5 = ((_local2 / _local3) * 12);
_local6 = new renderSprite(game, game.SpritePool.bomb1, 24, x, (y - 8), 0, 0, 3, 0.2, 100, Damage, eTarget, "bomb", 1.6, false, true, false);
game.soundBox.playShot("t5");
}
}
}//package
Section 182
//tower6 (tower6)
package {
import flash.display.*;
public class tower6 extends Tower {
public var turret:MovieClip;
public function tower6(_arg1:Game=null){
Damage = 10;
RoF = 8;
Range = 60;
if (_arg1 != null){
game = _arg1;
} else {
game = Game(parent.parent);
game.towers.push(this);
bHeld = false;
};
turret.gotoAndStop(1);
turret.mouseEnabled = false;
}
override public function aim():void{
var _local1:*;
var _local2:*;
var _local3:*;
if (eTarget.visible){
_local1 = (eTarget.x - x);
_local2 = (eTarget.y - y);
_local3 = ((Math.atan2(_local2, _local1) * 180) / 3.16);
turret.gotoAndStop(Math.round(((_local3 + 180) / 5)));
};
}
override public function Fire():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = (eTarget.x - x);
_local2 = (eTarget.y - y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local4 = ((_local1 / _local3) * 20);
_local5 = ((_local2 / _local3) * 20);
_local6 = new renderSprite(game, game.SpritePool.flameShot, 32, (x + _local4), ((y - 8) + _local5), 0, 0, 10, 0.2, 10, Damage, eTarget, "fire", 1.2, false);
game.soundBox.playShot("t6");
}
}
}//package
Section 183
//tower7 (tower7)
package {
import flash.display.*;
public class tower7 extends Tower {
public var turret2:MovieClip;
public var turret:MovieClip;
public function tower7(_arg1:Game=null){
Damage = 200;
RoF = 2;
Range = 100;
if (_arg1 != null){
game = _arg1;
} else {
game = Game(parent.parent);
game.towers.push(this);
bHeld = false;
};
turret.gotoAndStop(1);
turret2.gotoAndStop(1);
turret.mouseEnabled = false;
turret2.mouseEnabled = false;
}
override public function aim():void{
var _local1:*;
var _local2:*;
var _local3:*;
if (eTarget.health > 0){
_local1 = (eTarget.x - x);
_local2 = (eTarget.y - y);
_local3 = ((Math.atan2(_local2, _local1) * 180) / 3.16);
turret.gotoAndStop(Math.round(((_local3 + 180) / 5)));
turret2.gotoAndStop(Math.round(((_local3 + 180) / 5)));
};
}
override public function Fire():void{
var _local1:*;
if (eTarget.health > 0){
_local1 = new Tracer(x, (y - 20), eTarget.x, (eTarget.y - 8), 20, game, (Damage * 0.02));
turret2.alpha = 1;
turret2.visible = true;
if (eTarget.bMetal){
eTarget.takeDamage(Damage, "shock");
} else {
eTarget.takeDamage(Damage, "shock");
};
game.soundBox.playShot("t7");
};
}
override public function Tick(_arg1:Number):void{
if (scaleX > 1){
scaleX = (scaleX - 0.01);
scaleY = scaleX;
};
if (turret2.alpha > 0){
turret2.alpha = (turret2.alpha - 0.1);
} else {
turret2.visible = false;
};
if (bHeld){
game.Selected = this;
x = game.mouseX;
y = game.mouseY;
if (x > 640){
x = 640;
};
snapToGrid();
if (game.gameGrid.grid[gx][gy] == 0){
bBlocked = false;
} else {
bBlocked = true;
};
} else {
loading = (loading + (RoF * _arg1));
if ((((eTarget == null)) || ((eTarget.health <= 0)))){
if (loading >= 60){
eTarget = game.getEnemy(this);
};
} else {
aim();
if (loading >= 100){
if (checkTarget()){
loading = 0;
scaleX = 1.1;
scaleY = 1.1;
Fire();
} else {
eTarget = game.getEnemy(this);
};
};
};
};
}
}
}//package
Section 184
//tower8 (tower8)
package {
import flash.display.*;
public class tower8 extends Tower {
public var turret:MovieClip;
public function tower8(_arg1:Game=null){
Damage = 50;
RoF = 1;
Range = 100;
if (_arg1 != null){
game = _arg1;
} else {
game = Game(parent.parent);
game.towers.push(this);
bHeld = false;
};
turret.gotoAndStop(1);
turret.mouseEnabled = false;
}
override public function aim():void{
}
override public function Fire():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
turret.gotoAndPlay(2);
_local1 = (eTarget.x - x);
_local2 = (eTarget.y - y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local4 = ((_local1 / _local3) * 12);
_local5 = ((_local2 / _local3) * 12);
_local6 = new renderSprite(game, game.SpritePool.bomb3, 24, x, (y - 8), 0, 0, 3, 0.2, 100, Damage, eTarget, "fire", 1.6, false, true, false);
game.soundBox.playShot("t8");
}
}
}//package
Section 185
//tower9 (tower9)
package {
import flash.display.*;
public class tower9 extends Tower {
public var turret:MovieClip;
public function tower9(_arg1:Game=null){
Damage = 10;
RoF = 1;
Range = 75;
if (_arg1 != null){
game = _arg1;
} else {
game = Game(parent.parent);
game.towers.push(this);
bHeld = false;
};
turret.gotoAndStop(1);
turret.mouseEnabled = false;
}
override public function aim():void{
}
override public function Fire():void{
var _local1:renderSprite;
var _local2:*;
var _local3:*;
var _local4:*;
turret.gotoAndPlay(2);
_local2 = -14;
_local3 = 0;
_local1 = new renderSprite(game, game.SpritePool.poisonPuff, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = -9;
_local3 = -9;
_local1 = new renderSprite(game, game.SpritePool.poisonPuff, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = 0;
_local3 = -14;
_local1 = new renderSprite(game, game.SpritePool.poisonPuff, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = 9;
_local3 = -9;
_local1 = new renderSprite(game, game.SpritePool.poisonPuff, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = 14;
_local3 = 0;
_local1 = new renderSprite(game, game.SpritePool.poisonPuff, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = 9;
_local3 = 9;
_local1 = new renderSprite(game, game.SpritePool.poisonPuff, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = 0;
_local3 = 14;
_local1 = new renderSprite(game, game.SpritePool.poisonPuff, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local2 = -9;
_local3 = 9;
_local1 = new renderSprite(game, game.SpritePool.poisonPuff, 32, (x + _local2), (y + _local3), (_local2 * 0.05), (_local3 * 0.05), 10, 0.2, 10);
_local4 = new RadialBlast(game, x, y, Range, Damage, "poison");
game.soundBox.playShot("t9");
}
}
}//package
Section 186
//towerButton (towerButton)
package {
import flash.display.*;
import flash.events.*;
public class towerButton extends Sprite {
var id:int;
var cost:int;// = 50
var hud:Hud;
var game:Game;
public function towerButton(){
cost = 50;
super();
game = Game(parent.parent);
hud = Hud(parent);
hud.addButton(this);
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
}
public function init(_arg1:Event):void{
if (game.gameInfo.Towers[id] == 1){
visible = true;
} else {
visible = false;
};
removeEventListener(Event.ADDED_TO_STAGE, init);
}
public function updateStatus():void{
if (game.gameInfo.Towers[id] == 1){
visible = true;
} else {
visible = false;
};
}
public function clicked(_arg1:MouseEvent){
if (alpha == 1){
game.makeTower(id, cost);
};
}
public function update():void{
if (game.gameInfo.funds >= cost){
alpha = 1;
} else {
alpha = 0.2;
};
}
}
}//package
Section 187
//Tracer (Tracer)
package {
public class Tracer {
public var vx:Number;
public var vy:Number;
public var game:Game;
public var wgt:Number;
public var ex:Number;
public var ey:Number;
public var x:Number;
public var y:Number;
public var life:Number;
public var bFade:Boolean;
public function Tracer(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7:Number=1){
game = _arg6;
x = _arg1;
y = _arg2;
ex = _arg3;
ey = _arg4;
life = _arg5;
wgt = _arg7;
game.fx.tracers.push(this);
}
public function Tick():void{
life--;
if (life <= 0){
game.fx.removeTracer(this);
};
}
}
}//package
Section 188
//TryAgainButton (TryAgainButton)
package {
public class TryAgainButton extends gameButton {
override public function doAction():void{
game.getLevel(game.currentLevel);
}
}
}//package
Section 189
//tunnel1 (tunnel1)
package {
import flash.display.*;
public dynamic class tunnel1 extends BitmapData {
public function tunnel1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 190
//twitter (twitter)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.external.*;
public dynamic class twitter extends MovieClip {
public var link:String;
public function twitter(){
addFrameScript(0, frame1);
}
function frame1(){
link = "http://twitter.com/armorgames";
this.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
}
public function onClick(_arg1:MouseEvent):void{
var event = _arg1;
try {
ExternalInterface.call("window.open", link, "_blank", "");
} catch(error:Error) {
navigateToURL(new URLRequest(link), "_blank");
};
}
}
}//package
Section 191
//ugButton (ugButton)
package {
import flash.display.*;
import flash.events.*;
public class ugButton extends Sprite {
var game:Game;
public function ugButton(){
game = Game(parent.parent);
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
}
public function clicked(_arg1:MouseEvent):void{
game.Selected.levelUp();
}
}
}//package
Section 192
//upgradeItem (upgradeItem)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class upgradeItem extends Sprite {
public var piccie:MovieClip;
public var description:TextField;
var id:int;
var seButton:MovieClip;
var type:String;
public var title:TextField;
var owner:levelUpWindow;
public function upgradeItem(_arg1:levelUpWindow){
owner = _arg1;
mouseEnabled = false;
seButton = new selectUgButton();
seButton.x = 0;
seButton.y = 115;
seButton.addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
addChild(seButton);
}
public function clicked(_arg1:MouseEvent){
owner.selectItem(this);
}
public function setInfo(_arg1:Array):void{
title.text = String(_arg1[0]);
description.text = String(_arg1[1]);
id = int(_arg1[2]);
type = String(_arg1[3]);
if (type == "tower"){
piccie.gotoAndStop(id);
} else {
if (type == "upgrade"){
piccie.gotoAndStop(11);
} else {
piccie.gotoAndStop(12);
};
};
}
}
}//package
Section 193
//waveController (waveController)
package {
public class waveController {
public var bAutoSpawn:Boolean;// = false
public var allOut:Boolean;// = false
public var nextSpawn:int;// = 1000
public var game:Game;
public var numWaves:int;// = 0
public var currentWave:int;// = 0
public var waves:Array;
public var running:Boolean;// = true
public function waveController(_arg1:Game){
waves = new Array();
nextSpawn = 1000;
numWaves = 0;
currentWave = 0;
running = true;
allOut = false;
bAutoSpawn = false;
super();
game = _arg1;
}
public function newWave():Boolean{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = false;
_local2 = waves.shift();
if (_local2 != undefined){
_local1 = true;
currentWave = (currentWave + 1);
_local3 = new waveSpawner(game, _local2[0], _local2[1], _local2[2], _local2[4], currentWave);
game.spawners.push(_local3);
nextSpawn = (Number(_local2[3]) * 2);
};
return (_local1);
}
public function resetWC():void{
waves = new Array();
numWaves = 0;
nextSpawn = 500;
allOut = false;
running = true;
currentWave = 0;
}
public function addWave(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{
waves.push(new Array(_arg1, _arg2, _arg3, _arg4, _arg5));
numWaves++;
}
public function Tick(_arg1):void{
if (running){
nextSpawn = (nextSpawn - _arg1);
if (nextSpawn <= 0){
nextSpawn = 1000;
if (newWave()){
game.hud.updateWaveInfo();
} else {
running = false;
allOut = true;
};
};
if (game.levelHealth <= 0){
running = false;
game.getFrame(4);
game.stopLevel();
game.baseSpeed = 0;
};
} else {
if (allOut){
if (game.levelHealth <= 0){
allOut = false;
game.getFrame(4);
game.stopLevel();
game.baseSpeed = 0;
} else {
if (game.enemies.length <= 0){
allOut = false;
game.stopLevel();
game.getFrame(3);
game.baseSpeed = 0;
};
};
};
};
}
}
}//package
Section 194
//waveSpawner (waveSpawner)
package {
public class waveSpawner {
var tPath:Array;
var space:int;
var ticker:int;// = 0
var startPoint:int;
var game:Game;
var count:int;
var wave:int;
var eType:String;
public function waveSpawner(_arg1:Game, _arg2:String, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean=false, _arg8:Boolean=false){
var _local9:GameActor;
var _local10:GameActor;
ticker = 0;
super();
game = _arg1;
eType = _arg2;
count = _arg3;
space = _arg4;
wave = _arg6;
startPoint = _arg5;
if (!_arg7){
if (_arg5 == 1){
_local9 = game.startPoints1;
_local10 = game.endPoints1;
} else {
if (_arg5 == 2){
_local9 = game.startPoints2;
_local10 = game.endPoints2;
} else {
if (_arg5 == 3){
_local9 = game.startPoints3;
_local10 = game.endPoints3;
};
};
};
tPath = game.gameGrid.findPath(_local9.gx, _local9.gy, _local10.gx, _local10.gy);
};
}
public function destroy():void{
game = null;
}
public function Tick(_arg1):void{
if (count > 0){
ticker = (ticker + _arg1);
if (ticker >= space){
ticker = 0;
count--;
game.createEnemy(eType, startPoint, wave, tPath);
};
} else {
destroy();
};
}
}
}//package
Section 195
//voice1 (voice1)
package {
import flash.media.*;
public dynamic class voice1 extends Sound {
}
}//package
Section 196
//voice2 (voice2)
package {
import flash.media.*;
public dynamic class voice2 extends Sound {
}
}//package