Frame 1
function gotoMyGame() {
getURL (("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _root._url) + "&typ=rightclick", "_blank");
}
stop();
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
if (success) {
}
};
var my_lv = new LoadVars();
my_lv.game = "robot-territories";
my_lv.from = _root._url;
my_lv.sendAndLoad("http://mygame.com/loadcount.jsp", result_lv, "GET");
var cm = new ContextMenu();
var menuItem = new ContextMenuItem("Go to MyGame.com", gotoMyGame);
cm.customItems.push(menuItem);
cm.hideBuiltInItems();
_root.menu = cm;
_global.KONGREGATE_MODE = false;
if (_global.KONGREGATE_MODE == true) {
_root.kongregateServices.connect();
}
this.onEnterFrame = function () {
loaderBar_mc.progressBar._width = Math.floor(((getBytesLoaded() / getBytesTotal()) * 100) * 1.2);
if (getBytesLoaded() == getBytesTotal()) {
this.onEnterFrame = undefined;
gotoAndStop (2);
}
};
loaderBar_mc.onRelease = function () {
var _local2 = _root._url;
getURL (("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _local2) + "&typ=loader_progress", "_blank");
};
Frame 2
stop();
Frame 4
stop();
Stage.scaleMode = "noScale";
Symbol 43 MovieClip [obj_3_1] Frame 1
#initclip 1
Object.registerClass("obj_3_1", com.mygame.robotterritories.view.LevelObject);
#endinitclip
stop();
Symbol 43 MovieClip [obj_3_1] Frame 24
stop();
Symbol 103 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 1
stonesHitarea_mc.onRelease = function () {
var _local2 = _root._url;
getURL (("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _local2) + "&typ=loader_movie", "_blank");
};
Symbol 104 MovieClip Frame 79
stop();
btnPlay.onRelease = function () {
_root.gotoAndStop(4);
};
btnPlay.onRollOver = function () {
btnPlay.gotoAndStop(2);
};
btnPlay.onRollOut = function () {
btnPlay.gotoAndStop(1);
};
Symbol 106 MovieClip [hitarea] Frame 1
#initclip 143
Object.registerClass("hitarea", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 111 MovieClip [mc_logo] Frame 1
#initclip 64
Object.registerClass("mc_logo", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 118 MovieClip [EnemyFeeder] Frame 1
#initclip 65
Object.registerClass("EnemyFeeder", com.mygame.robotterritories.view.enemy.EnemyFeeder);
#endinitclip
Symbol 124 MovieClip Frame 1
stop();
Symbol 151 MovieClip Frame 1
stop();
stop();
Symbol 151 MovieClip Frame 21
stop();
Symbol 151 MovieClip Frame 27
gotoAndPlay ("reset");
Symbol 151 MovieClip Frame 28
Symbol 151 MovieClip Frame 40
stop();
Symbol 151 MovieClip Frame 55
gotoAndPlay ("reset");
Symbol 151 MovieClip Frame 77
gotoAndStop (1);
Symbol 156 MovieClip Frame 1
stop();
Symbol 158 MovieClip [HeroCanon] Frame 1
#initclip 66
Object.registerClass("HeroCanon", com.mygame.robotterritories.view.hero.HeroCanon);
#endinitclip
Symbol 172 MovieClip Frame 1
stop();
Symbol 172 MovieClip Frame 16
stop();
Symbol 172 MovieClip Frame 17
stop();
Symbol 172 MovieClip Frame 28
stop();
Symbol 172 MovieClip Frame 48
stop();
Symbol 255 MovieClip [Hero] Frame 1
#initclip 67
Object.registerClass("Hero", com.mygame.robotterritories.view.hero.Hero);
#endinitclip
Symbol 255 MovieClip [Hero] Frame 169
stop();
Symbol 270 MovieClip [mc_menu] Frame 1
#initclip 68
Object.registerClass("mc_menu", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 270 MovieClip [mc_menu] Frame 10
stop();
Symbol 278 MovieClip [mc_sound] Frame 1
#initclip 69
Object.registerClass("mc_sound", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 282 MovieClip [mc_life] Frame 1
#initclip 70
Object.registerClass("mc_life", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 294 MovieClip Frame 1
stop();
Symbol 297 MovieClip [pointsClip] Frame 1
#initclip 71
Object.registerClass("pointsClip", com.mygame.robotterritories.view.PointsHolder);
#endinitclip
Symbol 304 MovieClip [qualityHiBtn] Frame 1
#initclip 72
Object.registerClass("qualityHiBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 309 MovieClip [qualityLoBtn] Frame 1
#initclip 73
Object.registerClass("qualityLoBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 310 MovieClip [InGameGUI] Frame 1
#initclip 74
Object.registerClass("InGameGUI", com.mygame.robotterritories.view.InGameGUI);
#endinitclip
Symbol 319 MovieClip [ShotPowerMeter] Frame 1
#initclip 75
Object.registerClass("ShotPowerMeter", com.mygame.robotterritories.view.hero.ShotPowerMeter);
#endinitclip
stop();
Symbol 319 MovieClip [ShotPowerMeter] Frame 100
stop();
Symbol 333 MovieClip Frame 1
stop();
Symbol 334 MovieClip [levelRequire] Frame 1
#initclip 76
Object.registerClass("levelRequire", com.mygame.robotterritories.view.RequireClip);
#endinitclip
Symbol 336 MovieClip [bg] Frame 1
#initclip 77
Object.registerClass("bg", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 342 MovieClip [playMoreGames_2] Frame 1
#initclip 78
Object.registerClass("playMoreGames_2", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 342 MovieClip [playMoreGames_2] Frame 10
stop();
Symbol 346 MovieClip [playAgainBtn] Frame 1
#initclip 79
Object.registerClass("playAgainBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 346 MovieClip [playAgainBtn] Frame 10
stop();
Symbol 348 MovieClip [submitBtn] Frame 1
#initclip 80
Object.registerClass("submitBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 348 MovieClip [submitBtn] Frame 10
stop();
Symbol 351 MovieClip [nextLevelBtn] Frame 1
#initclip 81
Object.registerClass("nextLevelBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 351 MovieClip [nextLevelBtn] Frame 10
stop();
Symbol 360 MovieClip [levelClearedSign] Frame 1
#initclip 82
Object.registerClass("levelClearedSign", com.mygame.robotterritories.LevelClearedSign);
#endinitclip
Symbol 363 MovieClip [backSubmitBtn] Frame 1
#initclip 83
Object.registerClass("backSubmitBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 363 MovieClip [backSubmitBtn] Frame 10
stop();
Symbol 367 MovieClip [submitScoreView] Frame 1
#initclip 84
Object.registerClass("submitScoreView", com.mygame.robotterritories.view.SubmitView);
#endinitclip
Symbol 375 MovieClip [mc_BACKTOMENU] Frame 1
#initclip 85
Object.registerClass("mc_BACKTOMENU", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 377 MovieClip [addToWebsiteBtn] Frame 1
#initclip 86
Object.registerClass("addToWebsiteBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 379 MovieClip [instrBtn] Frame 1
#initclip 87
Object.registerClass("instrBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 381 MovieClip [highScoresBtn] Frame 1
#initclip 88
Object.registerClass("highScoresBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 384 MovieClip [moreGamesBtn] Frame 1
#initclip 89
Object.registerClass("moreGamesBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 389 MovieClip [logoBtn_menu] Frame 1
#initclip 90
Object.registerClass("logoBtn_menu", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 397 MovieClip [playBtn] Frame 1
#initclip 91
Object.registerClass("playBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 399 MovieClip [continueBtn] Frame 1
#initclip 92
Object.registerClass("continueBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 401 MovieClip [mapBg] Frame 1
#initclip 93
Object.registerClass("mapBg", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 415 MovieClip [levelBtnHit] Frame 1
#initclip 94
Object.registerClass("levelBtnHit", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 417 MovieClip [disableMapBtn] Frame 1
#initclip 95
Object.registerClass("disableMapBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 504 MovieClip [LevelBtn] Frame 1
#initclip 96
Object.registerClass("LevelBtn", com.mygame.robotterritories.view.MapBtn);
#endinitclip
Symbol 507 MovieClip [logoBtnMap] Frame 1
#initclip 97
Object.registerClass("logoBtnMap", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 508 MovieClip [MapView] Frame 1
#initclip 98
Object.registerClass("MapView", com.mygame.robotterritories.view.MapView);
#endinitclip
Symbol 509 MovieClip [MenuView] Frame 1
#initclip 99
Object.registerClass("MenuView", com.mygame.robotterritories.view.MenuView);
#endinitclip
Symbol 510 MovieClip [coverBg] Frame 1
#initclip 100
Object.registerClass("coverBg", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 514 MovieClip [webLinkBtn] Frame 1
#initclip 101
Object.registerClass("webLinkBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 516 MovieClip [mailLinkBtn] Frame 1
#initclip 102
Object.registerClass("mailLinkBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 519 MovieClip [lockGameSign] Frame 1
#initclip 103
Object.registerClass("lockGameSign", com.mygame.robotterritories.view.LockGameSign);
#endinitclip
Symbol 520 MovieClip [app] Frame 1
#initclip 104
Object.registerClass("app", com.mygame.robotterritories.view.Application);
#endinitclip
stop();
Symbol 552 MovieClip Frame 17
stop();
Symbol 571 MovieClip Frame 50
stop();
Symbol 584 MovieClip [Colossus] Frame 1
#initclip 105
Object.registerClass("Colossus", com.mygame.robotterritories.view.enemy.Colossus);
#endinitclip
Symbol 584 MovieClip [Colossus] Frame 117
stop();
Symbol 584 MovieClip [Colossus] Frame 130
stop();
Symbol 584 MovieClip [Colossus] Frame 141
stop();
Symbol 584 MovieClip [Colossus] Frame 152
stop();
Symbol 584 MovieClip [Colossus] Frame 163
stop();
Symbol 584 MovieClip [Colossus] Frame 173
stop();
Symbol 584 MovieClip [Colossus] Frame 193
stop();
Symbol 621 MovieClip Frame 24
stop();
Symbol 629 MovieClip Frame 58
gotoAndPlay (9);
Symbol 630 MovieClip [DiveBot] Frame 1
#initclip 106
Object.registerClass("DiveBot", com.mygame.robotterritories.view.enemy.DiveBot);
#endinitclip
Symbol 630 MovieClip [DiveBot] Frame 11
stop();
Symbol 630 MovieClip [DiveBot] Frame 16
stop();
Symbol 630 MovieClip [DiveBot] Frame 26
stop();
Symbol 630 MovieClip [DiveBot] Frame 27
stop();
Symbol 630 MovieClip [DiveBot] Frame 46
stop();
Symbol 630 MovieClip [DiveBot] Frame 52
stop();
Symbol 630 MovieClip [DiveBot] Frame 68
stop();
Symbol 630 MovieClip [DiveBot] Frame 81
stop();
Symbol 630 MovieClip [DiveBot] Frame 90
stop();
Symbol 663 MovieClip Frame 86
stop();
Symbol 678 MovieClip [GodMachine] Frame 1
#initclip 107
Object.registerClass("GodMachine", com.mygame.robotterritories.view.enemy.GodMachine);
#endinitclip
Symbol 678 MovieClip [GodMachine] Frame 76
stop();
Symbol 678 MovieClip [GodMachine] Frame 81
stop();
Symbol 678 MovieClip [GodMachine] Frame 83
stop();
Symbol 678 MovieClip [GodMachine] Frame 93
stop();
Symbol 678 MovieClip [GodMachine] Frame 104
stop();
Symbol 678 MovieClip [GodMachine] Frame 114
stop();
Symbol 678 MovieClip [GodMachine] Frame 126
stop();
Symbol 697 MovieClip Frame 63
gotoAndPlay (24);
Symbol 710 MovieClip Frame 24
stop();
Symbol 711 MovieClip [GunCruiser] Frame 1
#initclip 108
Object.registerClass("GunCruiser", com.mygame.robotterritories.view.enemy.GunCruiser);
#endinitclip
Symbol 711 MovieClip [GunCruiser] Frame 29
stop();
Symbol 711 MovieClip [GunCruiser] Frame 34
stop();
Symbol 711 MovieClip [GunCruiser] Frame 44
gotoAndPlay (1);
Symbol 730 MovieClip Frame 10
stop();
Symbol 742 MovieClip Frame 24
stop();
Symbol 743 MovieClip [InfantryBot] Frame 1
#initclip 109
Object.registerClass("InfantryBot", com.mygame.robotterritories.view.enemy.InfantryBot);
#endinitclip
Symbol 743 MovieClip [InfantryBot] Frame 29
stop();
Symbol 743 MovieClip [InfantryBot] Frame 34
stop();
Symbol 743 MovieClip [InfantryBot] Frame 44
gotoAndPlay (1);
Symbol 751 MovieClip Frame 1
stop();
Symbol 761 MovieClip Frame 40
gotoAndPlay (9);
Symbol 771 MovieClip Frame 16
stop();
Symbol 772 MovieClip [MechJeep] Frame 1
#initclip 110
Object.registerClass("MechJeep", com.mygame.robotterritories.view.enemy.MechJeep);
#endinitclip
Symbol 772 MovieClip [MechJeep] Frame 29
stop();
Symbol 772 MovieClip [MechJeep] Frame 34
stop();
Symbol 772 MovieClip [MechJeep] Frame 44
gotoAndPlay (1);
Symbol 784 MovieClip Frame 40
gotoAndPlay (9);
Symbol 798 MovieClip Frame 24
stop();
Symbol 799 MovieClip [NukeBot] Frame 1
#initclip 111
Object.registerClass("NukeBot", com.mygame.robotterritories.view.enemy.NukeBot);
#endinitclip
Symbol 799 MovieClip [NukeBot] Frame 16
Symbol 799 MovieClip [NukeBot] Frame 28
Symbol 799 MovieClip [NukeBot] Frame 35
stop();
Symbol 799 MovieClip [NukeBot] Frame 43
stop();
Symbol 799 MovieClip [NukeBot] Frame 52
stop();
Symbol 831 MovieClip Frame 24
stop();
Symbol 832 MovieClip [RocketBot] Frame 1
#initclip 112
Object.registerClass("RocketBot", com.mygame.robotterritories.view.enemy.RocketBot);
#endinitclip
Symbol 832 MovieClip [RocketBot] Frame 32
stop();
Symbol 832 MovieClip [RocketBot] Frame 33
stop();
Symbol 832 MovieClip [RocketBot] Frame 44
gotoAndPlay (1);
Symbol 849 MovieClip Frame 63
gotoAndPlay (24);
Symbol 861 MovieClip Frame 24
stop();
Symbol 862 MovieClip [RocketCruiser] Frame 1
#initclip 113
Object.registerClass("RocketCruiser", com.mygame.robotterritories.view.enemy.RocketCruiser);
#endinitclip
Symbol 862 MovieClip [RocketCruiser] Frame 29
stop();
Symbol 862 MovieClip [RocketCruiser] Frame 34
stop();
Symbol 862 MovieClip [RocketCruiser] Frame 44
gotoAndPlay (1);
Symbol 869 MovieClip Frame 1
stop();
Symbol 878 MovieClip Frame 75
gotoAndPlay (9);
Symbol 887 MovieClip Frame 16
stop();
Symbol 888 MovieClip [UltraTank] Frame 1
#initclip 114
Object.registerClass("UltraTank", com.mygame.robotterritories.view.enemy.UltraTank);
#endinitclip
Symbol 888 MovieClip [UltraTank] Frame 35
stop();
Symbol 888 MovieClip [UltraTank] Frame 40
stop();
Symbol 888 MovieClip [UltraTank] Frame 50
stop();
Symbol 891 MovieClip [sign_0] Frame 20
stop();
Symbol 893 MovieClip [sign_1] Frame 20
stop();
Symbol 895 MovieClip [sign_2] Frame 20
stop();
Symbol 897 MovieClip [sign_3] Frame 20
stop();
Symbol 899 MovieClip [sign_4] Frame 20
stop();
Symbol 901 MovieClip [sign_5] Frame 20
stop();
Symbol 903 MovieClip [sign_6] Frame 20
stop();
Symbol 905 MovieClip [sign_7] Frame 20
stop();
Symbol 907 MovieClip [sign_8] Frame 20
stop();
Symbol 909 MovieClip [sign_9] Frame 20
stop();
Symbol 910 MovieClip [sign_10] Frame 20
stop();
Symbol 913 MovieClip [sign_combo] Frame 21
stop();
Symbol 923 MovieClip [BigBullets] Frame 1
#initclip 115
Object.registerClass("BigBullets", com.mygame.robotterritories.view.enemy.projectiles.BigBullets);
#endinitclip
stop();
Symbol 923 MovieClip [BigBullets] Frame 9
stop();
Symbol 933 MovieClip [BigMissiles] Frame 1
#initclip 116
Object.registerClass("BigMissiles", com.mygame.robotterritories.view.enemy.projectiles.BigMissiles);
#endinitclip
stop();
Symbol 933 MovieClip [BigMissiles] Frame 9
stop();
Symbol 942 MovieClip [Gun] Frame 1
#initclip 117
Object.registerClass("Gun", com.mygame.robotterritories.view.enemy.projectiles.Gun);
#endinitclip
stop();
Symbol 942 MovieClip [Gun] Frame 9
stop();
Symbol 952 MovieClip [Missile] Frame 1
#initclip 118
Object.registerClass("Missile", com.mygame.robotterritories.view.enemy.projectiles.Missile);
#endinitclip
stop();
Symbol 952 MovieClip [Missile] Frame 9
stop();
Symbol 957 MovieClip [HealthMeter] Frame 1
#initclip 119
Object.registerClass("HealthMeter", com.mygame.robotterritories.view.hero.HealthMeter);
#endinitclip
Symbol 960 MovieClip [rocket] Frame 1
#initclip 120
Object.registerClass("rocket", com.mygame.robotterritories.view.projectiles.Rocket);
#endinitclip
Symbol 962 MovieClip [flare] Frame 1
#initclip 121
Object.registerClass("flare", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 964 MovieClip [flare_2] Frame 1
#initclip 122
Object.registerClass("flare_2", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 965 MovieClip [flare_3] Frame 1
#initclip 123
Object.registerClass("flare_3", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 966 MovieClip [flare_4] Frame 1
#initclip 124
Object.registerClass("flare_4", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 967 MovieClip [flare_5] Frame 1
#initclip 125
Object.registerClass("flare_5", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1021 MovieClip [superDuperRocket] Frame 1
#initclip 126
Object.registerClass("superDuperRocket", com.mygame.robotterritories.view.projectiles.SuperDuperRocket);
#endinitclip
stop();
Symbol 1021 MovieClip [superDuperRocket] Frame 37
stop();
Symbol 1036 MovieClip [superRocket] Frame 1
#initclip 127
Object.registerClass("superRocket", com.mygame.robotterritories.view.projectiles.SuperRocket);
#endinitclip
stop();
Symbol 1036 MovieClip [superRocket] Frame 25
stop();
Symbol 1043 MovieClip [colossusCourse_4] Frame 1
stop();
Symbol 1044 MovieClip [colossusCourse_9] Frame 1
stop();
Symbol 1045 MovieClip [colossusCourse_13] Frame 1
stop();
Symbol 1046 MovieClip [colossusCourse_17] Frame 1
stop();
Symbol 1047 MovieClip [colossusCourse_18] Frame 1
stop();
Symbol 1048 MovieClip [colossusCourse_20] Frame 1
stop();
Symbol 1049 MovieClip [diveBotCourse] Frame 1
stop();
Symbol 1052 MovieClip [gunCruiserCourse_3] Frame 1
stop();
Symbol 1053 MovieClip [gunCruiserCourse_15] Frame 1
stop();
Symbol 1054 MovieClip [gunCruiserCourse_14] Frame 1
stop();
Symbol 1055 MovieClip [gunCruiserCourse_9] Frame 1
stop();
Symbol 1056 MovieClip [gunCruiserCourse_11] Frame 1
stop();
Symbol 1057 MovieClip [gunCruiserCourse_13] Frame 1
stop();
Symbol 1058 MovieClip [gunCruiserCourse_16] Frame 1
stop();
Symbol 1059 MovieClip [gunCruiserCourse_19] Frame 1
stop();
Symbol 1061 MovieClip [infantryBotCourse_1] Frame 1
stop();
Symbol 1062 MovieClip [infantryBotCourse_2] Frame 1
stop();
Symbol 1063 MovieClip [infantryBotCourse_3] Frame 1
stop();
Symbol 1064 MovieClip [infantryBotCourse_4] Frame 1
stop();
Symbol 1065 MovieClip [infantryBotCourse_5] Frame 1
stop();
Symbol 1066 MovieClip [infantryBotCourse_6] Frame 1
stop();
Symbol 1067 MovieClip [infantryBotCourse_7] Frame 1
stop();
Symbol 1068 MovieClip [infantryBotCourse_8] Frame 1
stop();
Symbol 1069 MovieClip [infantryBotCourse_15] Frame 1
stop();
Symbol 1070 MovieClip [infantryBotCourse_14] Frame 1
stop();
Symbol 1071 MovieClip [infantryBotCourse_9] Frame 1
stop();
Symbol 1072 MovieClip [infantryBotCourse_10] Frame 1
stop();
Symbol 1073 MovieClip [infantryBotCourse_11] Frame 1
stop();
Symbol 1074 MovieClip [infantryBotCourse_12] Frame 1
stop();
Symbol 1075 MovieClip [infantryBotCourse_17] Frame 1
stop();
Symbol 1076 MovieClip [infantryBotCourse_19] Frame 1
stop();
Symbol 1078 MovieClip [mechJeepCourse_1] Frame 1
stop();
Symbol 1079 MovieClip [mechJeepCourse_2] Frame 1
stop();
Symbol 1080 MovieClip [mechJeepCourse_3] Frame 1
stop();
Symbol 1081 MovieClip [mechJeepCourse_4] Frame 1
stop();
Symbol 1082 MovieClip [mechJeepCourse_5] Frame 1
stop();
Symbol 1083 MovieClip [mechJeepCourse_6] Frame 1
stop();
Symbol 1084 MovieClip [mechJeepCourse_7] Frame 1
stop();
Symbol 1085 MovieClip [mechJeepCourse_15] Frame 1
stop();
Symbol 1086 MovieClip [mechJeepCourse_14] Frame 1
stop();
Symbol 1087 MovieClip [mechJeepCourse_10] Frame 1
stop();
Symbol 1088 MovieClip [mechJeepCourse_11] Frame 1
stop();
Symbol 1089 MovieClip [mechJeepCourse_12] Frame 1
stop();
Symbol 1090 MovieClip [mechJeepCourse_16] Frame 1
stop();
Symbol 1091 MovieClip [mechJeepCourse_17] Frame 1
stop();
Symbol 1092 MovieClip [mechJeepCourse_18] Frame 1
stop();
Symbol 1093 MovieClip [mechJeepCourse_20] Frame 1
stop();
Symbol 1094 MovieClip [rocketCruiserCourse_8] Frame 1
stop();
Symbol 1095 MovieClip [rocketCruiserCourse_14] Frame 1
stop();
Symbol 1096 MovieClip [rocketCruiserCourse_10] Frame 1
stop();
Symbol 1097 MovieClip [rocketCruiserCourse_13] Frame 1
stop();
Symbol 1098 MovieClip [rocketCruiserCourse_16] Frame 1
stop();
Symbol 1099 MovieClip [rocketCruiserCourse_17] Frame 1
stop();
Symbol 1100 MovieClip [rocketCruiserCourse_19] Frame 1
stop();
Symbol 1144 MovieClip [mapBtn] Frame 1
#initclip 128
Object.registerClass("mapBtn", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
stop();
Symbol 1155 MovieClip [FrameRateDisplay] Frame 1
#initclip 129
Object.registerClass("FrameRateDisplay", com.mygame.robotterritories.util.FrameRateDisplay);
#endinitclip
Symbol 1156 MovieClip [flare_6] Frame 1
#initclip 130
Object.registerClass("flare_6", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1157 MovieClip [rocketCruiserCourse_20] Frame 1
stop();
Symbol 1159 MovieClip [expP_1] Frame 1
#initclip 131
Object.registerClass("expP_1", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1161 MovieClip [expP_2] Frame 1
#initclip 132
Object.registerClass("expP_2", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1163 MovieClip [expP_3] Frame 1
#initclip 133
Object.registerClass("expP_3", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1165 MovieClip [expP_4] Frame 1
#initclip 134
Object.registerClass("expP_4", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1167 MovieClip [expP_5] Frame 1
#initclip 135
Object.registerClass("expP_5", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1169 MovieClip [expP_6] Frame 1
#initclip 136
Object.registerClass("expP_6", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1171 MovieClip [bigexpP_1] Frame 1
#initclip 137
Object.registerClass("bigexpP_1", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1173 MovieClip [bigexpP_2] Frame 1
#initclip 138
Object.registerClass("bigexpP_2", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1175 MovieClip [bigexpP_3] Frame 1
#initclip 139
Object.registerClass("bigexpP_3", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1177 MovieClip [bigexpP_4] Frame 1
#initclip 140
Object.registerClass("bigexpP_4", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1179 MovieClip [bigexpP_5] Frame 1
#initclip 141
Object.registerClass("bigexpP_5", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1181 MovieClip [bigexpP_6] Frame 1
#initclip 142
Object.registerClass("bigexpP_6", com.mygame.robotterritories.view.ExtendedMovieClip);
#endinitclip
Symbol 1182 MovieClip [sign_11] Frame 20
stop();
Symbol 1183 MovieClip [sign_12] Frame 20
stop();
Symbol 1184 MovieClip [sign_13] Frame 20
stop();
Symbol 1185 MovieClip [sign_14] Frame 20
stop();
Symbol 1186 MovieClip [sign_15] Frame 20
stop();
Symbol 1187 MovieClip [sign_16] Frame 20
stop();
Symbol 1188 MovieClip [sign_17] Frame 20
stop();
Symbol 1189 MovieClip [sign_18] Frame 20
stop();
Symbol 1190 MovieClip [sign_19] Frame 20
stop();
Symbol 1191 MovieClip [sign_20] Frame 20
stop();
Symbol 1192 MovieClip [sign_21] Frame 20
stop();
Symbol 1193 MovieClip [sign_22] Frame 20
stop();
Symbol 1194 MovieClip [sign_23] Frame 20
stop();
Symbol 1195 MovieClip [sign_24] Frame 20
stop();
Symbol 1196 MovieClip [sign_25] Frame 20
stop();
Symbol 1197 MovieClip [__Packages.com.mygame.robotterritories.view.LevelObject] Frame 0
class com.mygame.robotterritories.view.LevelObject extends MovieClip
{
var play;
function LevelObject () {
super();
}
function onImpact(proj) {
if (health < 0) {
play();
var _local3 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.None, 100, 0, 1, true);
_global.setTimeout(this, "removeMovieClip", 1000);
} else {
health = health - proj.damage;
}
}
var health = 1000;
}
Symbol 1198 MovieClip [__Packages.com.mygame.robotterritories.view.ExtendedMovieClip] Frame 0
class com.mygame.robotterritories.view.ExtendedMovieClip extends MovieClip
{
var dispatcher, onRelease, onPress, onRollOver, onRollOut, onDragOut, _name, onEnterFrame;
function ExtendedMovieClip () {
super();
dispatcher = new com.mygame.robotterritories.event.EventDispatcher();
}
function addEventListener(p_type, p_scope, p_function) {
dispatcher.addEventListener(p_type, p_scope, p_function);
switch (p_type) {
case RELEASE :
onRelease = _onRelease;
break;
case PRESS :
onPress = _onPress;
break;
case ROLLOVER :
onRollOver = _onRollOver;
break;
case ROLLOUT :
onRollOut = _onRollOut;
break;
case DRAGOUT :
onDragOut = _onDragOut;
break;
case ENTER_FRAME :
enterFrameObjects[_name] = this;
onEnterFrame = _onEnterFrame;
}
}
function removeEventListener(p_type, p_scope) {
dispatcher.removeEventListener(p_type);
switch (p_type) {
case RELEASE :
onRelease = undefined;
break;
case PRESS :
onPress = undefined;
break;
case ROLLOVER :
onRollOver = undefined;
break;
case ROLLOUT :
onRollOut = undefined;
break;
case DRAGOUT :
onDragOut = undefined;
break;
case ENTER_FRAME :
delete enterFrameObjects[_name];
onEnterFrame = undefined;
}
}
static function removeAllFrames() {
for (var _local1 in enterFrameObjects) {
enterFrameObjects[_local1].removeEventListener(ENTER_FRAME, enterFrameObjects[_local1]);
enterFrameObjects[_local1] = null;
}
isPaused = false;
}
static function pauseAllFrame() {
for (var _local1 in enterFrameObjects) {
enterFrameObjects[_local1].onEnterFrame = undefined;
}
isPaused = true;
}
static function restorePauseAllFrame() {
for (var _local1 in enterFrameObjects) {
enterFrameObjects[_local1].onEnterFrame = enterFrameObjects[_local1]._onEnterFrame;
}
isPaused = false;
}
function _onRelease() {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(RELEASE, this));
}
function _onPress() {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(PRESS, this));
}
function _onRollOver() {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ROLLOVER, this));
}
function _onRollOut() {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ROLLOUT, this));
}
function _onDragOut() {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(DRAGOUT, this));
}
function _onEnterFrame() {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ENTER_FRAME, this));
}
function dispatchEvent(evt) {
dispatcher.dispatchEvent(evt);
}
static var enterFrameObjects = {};
static var isPaused = false;
static var RELEASE = "release";
static var PRESS = "press";
static var ROLLOVER = "rollover";
static var ROLLOUT = "rollout";
static var DRAGOUT = "dragout";
static var ENTER_FRAME = "enterframe";
var fps = 40;
var oldTime = 0;
}
Symbol 1199 MovieClip [__Packages.com.mygame.robotterritories.event.EventDispatcher] Frame 0
class com.mygame.robotterritories.event.EventDispatcher
{
var listeners;
function EventDispatcher () {
listeners = new Object();
}
function addEventListener(p_type, p_scope, p_function) {
listeners[p_type] = {type:p_type, scope:p_scope, func:p_function};
}
function removeEventListener(p_type) {
for (var _local2 in listeners) {
if (p_type == listeners[_local2].type) {
listeners[_local2] = null;
}
}
}
function dispatchEvent(evt) {
for (var _local3 in listeners) {
if (evt.type == listeners[_local3].type) {
listeners[_local3].scope[listeners[_local3].func](evt);
}
}
}
}
Symbol 1200 MovieClip [__Packages.com.mygame.robotterritories.event.EventObject] Frame 0
class com.mygame.robotterritories.event.EventObject
{
var type, target;
function EventObject (p_type, p_target) {
type = p_type;
target = p_target;
}
}
Symbol 1201 MovieClip [__Packages.com.mygame.robotterritories.view.projectiles.IHeroProjectile] Frame 0
interface com.mygame.robotterritories.view.projectiles.IHeroProjectile
{
}
Symbol 1202 MovieClip [__Packages.com.mygame.robotterritories.view.projectiles.HeroProjectile] Frame 0
class com.mygame.robotterritories.view.projectiles.HeroProjectile extends com.mygame.robotterritories.view.ExtendedMovieClip implements com.mygame.robotterritories.view.projectiles.IHeroProjectile
{
var addEventListener, localToGlobal, ID, type, _width, _height, PARENT, _x, _y, removeEventListener, hitTest, smokeSet, play;
function HeroProjectile () {
super();
}
function onLoad() {
setup();
}
function start() {
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "shotFiredHandler");
com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().registerRocket(this);
}
function isHitable() {
return(hitable);
}
function getGlobalLeft() {
var _local2 = {x:0, y:0};
localToGlobal(_local2);
return(_local2.x);
}
function getGlobalTop() {
var _local2 = {x:0, y:0};
localToGlobal(_local2);
return(_local2.y);
}
function getSection() {
return(section);
}
function setSection(sec) {
section = sec;
}
function getId() {
return(ID);
}
function getType() {
return(type);
}
function getWidth() {
return(_width);
}
function getHeight() {
return(_height);
}
function setup() {
}
function checkImpact() {
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().changeSection(this);
}
if (PARENT.impactGround.hitTest(_x, _y, true)) {
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME);
}
var _local4 = com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().getEnemySection(Math.floor(getGlobalLeft() / 50));
for (var _local5 in _local4) {
var _local3 = com.mygame.robotterritories.view.enemy.IEnemy(_local4[_local5]);
if (hitTest(_local3.getHitarea()) && (!_local3.isRemoved())) {
_local3.onImpact(this);
onImpact();
}
}
if ((((getGlobalLeft() < 0) || (getGlobalLeft() > 555)) || (getGlobalTop() > 420)) || (getGlobalTop() < -10)) {
smokeSet.stop();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME);
com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().destroyProjectile(this);
_global.setTimeout(this, "removeMovieClip", 200);
}
}
function removeMovieClip() {
smokeSet.stop();
super.removeMovieClip();
}
function onImpact() {
play();
com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().destroyProjectile(this);
var _local3 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 0.2, true);
_global.setTimeout(this, "removeMovieClip", 200);
}
var hitable = true;
var check = false;
var section = 11;
}
Symbol 1203 MovieClip [__Packages.com.mygame.robotterritories.view.hero.Hero] Frame 0
class com.mygame.robotterritories.view.hero.Hero extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var rocketCollection, canon, redHit, parentRocketClip, parentSuperClip, parentDuperClip, parent, backGround, impactGround, objectArray, _x, _y, gotoAndStop, dispatchEvent, lockedPoint, lockedEnemy, txt_1;
function Hero () {
super();
rocketCollection = new Object();
}
function onLoad() {
canon.init(this);
}
function onHeroHit() {
redHit.play();
}
function init(c1, c2, c3, p_parent) {
parentRocketClip = c1;
parentSuperClip = c2;
parentDuperClip = c3;
parent = p_parent;
}
function setImpactGround(m, objArr, p_background) {
backGround = p_background;
impactGround = m;
objectArray = objArr;
_x = backGround.heroPoint._x;
_y = backGround.heroPoint._y;
backGround.heroPoint._x = -900;
}
function activateRotate() {
gotoAndStop(1);
canon.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, canon, "rotateHandler");
}
function deActivateRotate() {
canon.removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
var _local2 = new com.mygame.robotterritories.util.TimeOut();
_local2.setTimeout(this, "explode", 1500);
}
function explode() {
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_hero_explode", 70);
}
}
function dispatchParticle(evt) {
dispatchEvent(evt);
}
function setLockedPoint(point) {
lockedPoint = point;
}
function getProjRotation() {
var _local2 = lockedEnemy._x - parentDuperClip._x;
var _local3 = lockedEnemy._y - parentDuperClip._y;
var _local5 = Math.atan2(_local3, _local2);
var _local4 = convert(_local5);
return(_local4);
}
function convert(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
function fire(power, p_lockedEnemy) {
lockedEnemy = p_lockedEnemy;
txt_1.text = "" + Math.round((canon.barel._rotation / 180) * 100);
if (power <= 45) {
var _local6 = com.mygame.robotterritories.view.projectiles.Rocket(parentRocketClip.attachMovie(com.mygame.robotterritories.view.projectiles.Rocket.LINK, "rocket_" + rocketDepth, rocketDepth, {PARENT:this, ID:"rocket_" + rocketDepth}));
_local6.addEventListener("rocketParticle", this, "dispatchParticle");
var _local3 = {x:0, y:0};
canon.barel.rocketAttatchClip.localToGlobal(_local3);
_local6._x = _local3.x;
_local6._y = _local3.y;
canon.recoilRocket();
} else if ((power > 45) && (power <= 98)) {
var _local6 = com.mygame.robotterritories.view.projectiles.SuperRocket(parentSuperClip.attachMovie(com.mygame.robotterritories.view.projectiles.SuperRocket.LINK, "super_" + rocketDepth, rocketDepth, {PARENT:this, ID:"rocket_" + rocketDepth}));
var _local2 = {x:0, y:0};
canon.barel.superAttatchClip.localToGlobal(_local2);
parentSuperClip._x = _local2.x;
parentSuperClip._y = _local2.y;
canon.recoilSuperRocket();
} else {
var _local6 = com.mygame.robotterritories.view.projectiles.SuperDuperRocket(parentDuperClip.attachMovie(com.mygame.robotterritories.view.projectiles.SuperDuperRocket.LINK, "duper_" + rocketDepth, rocketDepth, {PARENT:this, ID:"rocket_" + rocketDepth, LOCKED_TARGET:lockedEnemy}));
var _local4 = {x:0, y:0};
canon.barel.duperAttatchClip.localToGlobal(_local4);
parentDuperClip._x = _local4.x;
parentDuperClip._y = _local4.y;
canon.recoilDuperRocket();
}
rocketCollection[rocketDepth] = _local6;
rocketDepth++;
}
var rocketDepth = 1;
}
Symbol 1204 MovieClip [__Packages.com.mygame.robotterritories.view.hero.HeroCanon] Frame 0
class com.mygame.robotterritories.view.hero.HeroCanon extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var parent, rotIsMouse, barel;
function HeroCanon () {
super();
}
function init(p_hero) {
parent = p_hero;
rotIsMouse = true;
}
function onLoad() {
}
function rotateHandler() {
var _local2 = barel._x - getAdj();
var _local3 = barel._y - getOpp();
var _local5 = Math.atan2(_local3, _local2);
var _local4 = convert(_local5);
barel._rotation = Math.abs(_local4 - 90);
barel._rotation = Math.abs(barel._rotation);
parent.gotoAndStop(Math.round((barel._rotation / 2) + 1));
}
function getAdj() {
return((rotIsMouse ? (parent._xmouse) : (parent.lockedPoint.x)));
}
function getOpp() {
return((rotIsMouse ? (parent._ymouse) : (parent.lockedPoint.y)));
}
function convert(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
function raiseWeapon(weapon) {
barel.canonClip.gotoAndPlay(weapon);
}
function resetWeapon() {
barel.canonClip.gotoAndPlay("reset");
}
function recoilRocket() {
rotIsMouse = true;
barel.arm_1.gotoAndPlay(1);
barel.canonClip.gotoAndStop(1);
}
function recoilSuperRocket() {
rotIsMouse = true;
barel.canonClip.gotoAndPlay("superShoot");
}
function recoilDuperRocket() {
rotIsMouse = true;
barel.canonClip.gotoAndPlay("duperShoot");
}
var canonType = 0;
}
Symbol 1205 MovieClip [__Packages.com.mygame.robotterritories.view.Application] Frame 0
class com.mygame.robotterritories.view.Application extends com.mygame.robotterritories.view.ExtendedMovieClip
{
static var instance;
var overarea, enemyFeeder, hero, shotMeter, levelClearedSign, menuView, inGameGUI, logoBtn, target, laser, rocketAttatchClip, superAttatchClip, duperAttatchClip, particleSet, particleClip, laserFilter, laserClip, projectileClip, getURL, hill, craterAttatchClip, dummyRect, objectArray, gunCruiserCourse, diveBotCourse, diveBotCourseGround, infantryBotCourse, rocketBotCourse, colossusCourse, nukeBotCourse, rocketCruiserCourse, mechJeepCourse, ultraTankCourse, godMachineCourse, background, requireClip, hillClip, backgroundClip, gunCruiserClip, diveBotClip, infantryBotClip, rocketBotClip, colossusClip, nukeBotClip, rocketCruiserClip, mechJeepClip, ultraTankClip, godMachineClip, ib, ib_delay, ib_dens, rb, rb_delay, rb_dens, mj, mj_delay, mj_dens, ut, ut_delay, ut_dens, gc, gc_delay, gc_dens, rc, rc_delay, rc_dens, db, db_delay, db_dens, nb, nb_delay, nb_dens, co, co_delay, co_dens, gm, gm_delay, gm_dens, mousePoint, enemyPoint, nearestPoint, addEventListener, _xmouse, _ymouse, getNextHighestDepth, removeEventListener;
function Application () {
super();
}
static function getInstance() {
if (instance == null) {
instance = new com.mygame.robotterritories.view.Application();
}
return(instance);
}
function getLevel() {
return(level);
}
function debugArrowCount() {
arrowCount++;
if (arrowCount == 10) {
arrowCount = 0;
}
}
function onKeyDown() {
if (Key.isDown(37)) {
previousLevel();
}
if (Key.isDown(39)) {
nextLevel();
}
}
function onLoad() {
com.midasplayer.fx.SoundManager.setup(this);
overarea.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.DRAGOUT, this, "abort");
overarea.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "tickFire");
enemyFeeder.addEventListener(com.mygame.robotterritories.view.enemy.EnemyFeeder.LEVEL_CLEARED, this, "levelClearedHandler");
hero.addEventListener("rocketParticle", this, "setRocketParticle");
shotMeter.addEventListener(com.mygame.robotterritories.view.hero.ShotPowerMeter.ACTIVATE_LASER, this, "activateLaser");
shotMeter.addEventListener(com.mygame.robotterritories.view.hero.ShotPowerMeter.DEACTIVATE_LASER, this, "deactivateLaser");
shotMeter.addEventListener(com.mygame.robotterritories.view.hero.ShotPowerMeter.SUPER_ROCKET, this, "raiseWeapon");
shotMeter.addEventListener(com.mygame.robotterritories.view.hero.ShotPowerMeter.SUPER_DUPER_ROCKET, this, "raiseWeapon");
levelClearedSign.addEventListener(com.mygame.robotterritories.LevelClearedSign.NEXT_LEVEL, this, "nextLevel");
levelClearedSign.addEventListener(com.mygame.robotterritories.LevelClearedSign.PLAY_AGAIN, this, "submitDoneHandler");
levelClearedSign.addEventListener(com.mygame.robotterritories.LevelClearedSign.UNLOCK_LEVEL, this, "unlockHandler");
levelClearedSign.addEventListener(com.mygame.robotterritories.LevelClearedSign.SUBMIT_DONE, this, "submitDoneHandler");
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.EnemyModel.LEAVE_CRATER, this, "leaveCraterHandler");
menuView.addEventListener(com.mygame.robotterritories.view.MenuView.START_GAME, this, "startGame");
menuView.addEventListener(com.mygame.robotterritories.view.MenuView.CONTINUE_PLAY, this, "continueGame");
menuView.addEventListener(com.mygame.robotterritories.view.MenuView.START_FROM_LEVEL, this, "startFromLevel");
inGameGUI.addEventListener(com.mygame.robotterritories.view.InGameGUI.SHOW_MENU, this, "menuHandler");
logoBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onLogoBtn");
logoBtn.useHandCursor = false;
overarea.useHandCursor = false;
target._visible = false;
laser._visible = false;
hero.init(rocketAttatchClip, superAttatchClip, duperAttatchClip, this);
particleSet = new com.mygame.robotterritories.view.ParticleSet(particleClip);
laserFilter = new flash.filters.GlowFilter(16777215, 0.25, 5, 5, 20, 1, false, false);
laserClip.filters = [laserFilter];
enemyFeeder.projectileClip = projectileClip;
menuView.init();
menuView._visible = true;
com.midasplayer.fx.SoundManager.stopAll();
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("menu_loop", 50, true);
}
}
function onLogoBtn() {
getURL(("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _root._url) + "&typ=sign", "_blank");
}
function submitDoneHandler() {
com.midasplayer.fx.SoundManager.stopAll();
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("menu_loop", 50, true);
}
menuView.init();
menuView._visible = true;
}
function menuHandler() {
com.midasplayer.fx.SoundManager.stopAll();
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("menu_loop", 50, true);
}
menuView._visible = true;
menuView.setContinue();
}
function continueGame() {
com.midasplayer.fx.SoundManager.stopAll();
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("loop", 30, true);
}
}
function startGame() {
level = menuView.mapView.level;
resetPoints();
initLevel();
}
function leaveHeroProjCraterHandler(tmpProj) {
if (tmpProj.getType() == "SuperDuperRocket") {
particleSet.create(tmpProj.getGlobalLeft(), tmpProj.getGlobalTop(), ["bigexpP_1", "bigexpP_2", "bigexpP_3", "bigexpP_4", "bigexpP_5", "bigexpP_6"], true, 3, 6, 3, 10, 0.4, 0.99);
} else {
particleSet.create(tmpProj.getGlobalLeft(), tmpProj.getGlobalTop(), ["bigexpP_1", "bigexpP_2", "bigexpP_3", "bigexpP_4", "bigexpP_5", "bigexpP_6"], true, 1, 3, 1, 3, 0.12, 0.99);
}
}
function setParticleExplotion(en) {
var _local2 = {x:0, y:0};
en.localToGlobal(_local2);
particleSet.create(_local2.x, _local2.y, ["expP_1", "expP_2", "expP_3", "expP_4", "expP_5", "expP_6"], true, 1, 3, 1, 3, 0.12, 0.99);
}
function setRocketParticle(evt) {
var _local3 = MovieClip(evt.target);
var _local2 = {x:0, y:0};
_local3.localToGlobal(_local2);
particleSet.create(_local2.x, _local2.y, ["particle_1", "particle_2", "particle_3", "particle_4", "particle_5", "particle_6"], false, 1, 3, 1, 3, 0.12, 0.99);
}
function leaveCraterHandler(evt) {
var _local3 = {x:0, y:0};
var _local5 = com.mygame.robotterritories.view.enemy.IEnemy(evt.target);
_local5.localToGlobal(_local3);
if (hill.hitTest(_local3.x, _local3.y, true)) {
var _local4 = craterAttatchClip.attachMovie("crater", "c", craterAttatchClip.getNextHighestDepth());
_local4._x = _local3.x;
_local4._y = _local3.y;
_local4._width = _local5.getWidth();
var _local6 = new mx.transitions.Tween(_local4, "_alpha", mx.transitions.easing.None.easeNone, 100, 0, 3, true);
_global.setTimeout(_local4, "removeMovieClip", 3000);
}
}
function previousLevel() {
Key.removeListener(this);
if (level > 1) {
level--;
} else if (level == 1) {
level = 20;
}
resetLevels();
initLevel();
}
function nextLevel() {
if (level < 20) {
level++;
resetLevels();
initLevel();
} else if (level == 20) {
levelClearedSign.init("GAME CLEARED, GOOD WORK!!!", false, level);
}
}
function resetPoints() {
inGameGUI.pointsHolder.resetPoints();
com.mygame.robotterritories.PointModel.getInstance().resetCombos();
com.mygame.robotterritories.PointModel.getInstance().resetHighestCombo();
}
function showEnemieSection(en) {
dummyRect._x = en.getSection() * 50;
}
function resetLevels() {
var _local2 = 0;
while (_local2 < objectArray.length) {
objectArray[_local2].removeMovieClip();
_local2++;
}
gunCruiserCourse.removeMovieClip();
diveBotCourse.removeMovieClip();
diveBotCourseGround.removeMovieClip();
infantryBotCourse.removeMovieClip();
rocketBotCourse.removeMovieClip();
colossusCourse.removeMovieClip();
nukeBotCourse.removeMovieClip();
rocketCruiserCourse.removeMovieClip();
mechJeepCourse.removeMovieClip();
ultraTankCourse.removeMovieClip();
godMachineCourse.removeMovieClip();
hill.removeMovieClip();
background.removeMovieClip();
com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().resetTrails();
enemyFeeder.resetFeeder();
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().resetModel();
com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().resetModel();
}
function initLevel() {
resetLevels();
com.mygame.robotterritories.util.TimeOut.removeAllTimeouts();
com.midasplayer.fx.SoundManager.stopAll();
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("loop", 30, true);
}
overarea.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.PRESS, this, "chargeWeapon");
requireClip.init(level);
hill = hillClip.attachMovie("hill_" + level, "hill", hillClip.getNextHighestDepth());
background = backgroundClip.attachMovie("b_" + level, "background", backgroundClip.getNextHighestDepth());
background.cacheAsBitmap = true;
gunCruiserCourse = gunCruiserClip.attachMovie("gunCruiserCourse_" + level, "gunCruiserCourse", gunCruiserClip.getNextHighestDepth());
diveBotCourse = diveBotClip.attachMovie("diveBotCourse", "diveBotCourse", diveBotClip.getNextHighestDepth());
diveBotCourseGround = diveBotClip.attachMovie("infantryBotCourse_" + level, "diveBotCourseGround", diveBotClip.getNextHighestDepth());
infantryBotCourse = infantryBotClip.attachMovie("infantryBotCourse_" + level, "infantryBotCourse", infantryBotClip.getNextHighestDepth());
rocketBotCourse = rocketBotClip.attachMovie("infantryBotCourse_" + level, "rocketBotCourse", rocketBotClip.getNextHighestDepth());
colossusCourse = colossusClip.attachMovie("colossusCourse_" + level, "rcolossusCourse", colossusClip.getNextHighestDepth());
nukeBotCourse = nukeBotClip.attachMovie("mechJeepCourse_" + level, "nukeBotCourse", nukeBotClip.getNextHighestDepth());
rocketCruiserCourse = rocketCruiserClip.attachMovie("rocketCruiserCourse_" + level, "rocketCruiserCourse", rocketCruiserClip.getNextHighestDepth());
mechJeepCourse = mechJeepClip.attachMovie("mechJeepCourse_" + level, "mechJeepCourse", mechJeepClip.getNextHighestDepth());
ultraTankCourse = ultraTankClip.attachMovie("mechJeepCourse_" + level, "ultraTankCourse", ultraTankClip.getNextHighestDepth());
godMachineCourse = godMachineClip.attachMovie("colossusCourse_" + level, "godMachineCourse", godMachineClip.getNextHighestDepth());
objectArray = new Array();
levelClearedSign._visible = false;
inGameGUI.init(this);
inGameGUI.addEventListener(com.mygame.robotterritories.view.InGameGUI.GAME_OVER, this, "gameOverHandler");
hero.setImpactGround(hill, objectArray, background);
enemyFeeder.init(this);
shotMeter._y = background.heroPoint._y - 20;
hero.activateRotate();
ib.text = "" + com.mygame.robotterritories.view.enemy.InfantryBot.amountArray[level - 1];
ib_delay.text = "" + com.mygame.robotterritories.view.enemy.InfantryBot.startTime[level - 1];
ib_dens.text = (("" + com.mygame.robotterritories.view.enemy.InfantryBot.density[level - 1][0]) + "-") + com.mygame.robotterritories.view.enemy.InfantryBot.density[level - 1][1];
rb.text = "" + com.mygame.robotterritories.view.enemy.RocketBot.amountArray[level - 1];
rb_delay.text = "" + com.mygame.robotterritories.view.enemy.RocketBot.startTime[level - 1];
rb_dens.text = (("" + com.mygame.robotterritories.view.enemy.RocketBot.density[level - 1][0]) + "-") + com.mygame.robotterritories.view.enemy.RocketBot.density[level - 1][1];
mj.text = "" + com.mygame.robotterritories.view.enemy.MechJeep.amountArray[level - 1];
mj_delay.text = "" + com.mygame.robotterritories.view.enemy.MechJeep.startTime[level - 1];
mj_dens.text = (("" + com.mygame.robotterritories.view.enemy.MechJeep.density[level - 1][0]) + "-") + com.mygame.robotterritories.view.enemy.MechJeep.density[level - 1][1];
ut.text = "" + com.mygame.robotterritories.view.enemy.UltraTank.amountArray[level - 1];
ut_delay.text = "" + com.mygame.robotterritories.view.enemy.UltraTank.startTime[level - 1];
ut_dens.text = (("" + com.mygame.robotterritories.view.enemy.UltraTank.density[level - 1][0]) + "-") + com.mygame.robotterritories.view.enemy.UltraTank.density[level - 1][1];
gc.text = "" + com.mygame.robotterritories.view.enemy.GunCruiser.amountArray[level - 1];
gc_delay.text = "" + com.mygame.robotterritories.view.enemy.GunCruiser.startTime[level - 1];
gc_dens.text = (("" + com.mygame.robotterritories.view.enemy.GunCruiser.density[level - 1][0]) + "-") + com.mygame.robotterritories.view.enemy.GunCruiser.density[level - 1][1];
rc.text = "" + com.mygame.robotterritories.view.enemy.RocketCruiser.amountArray[level - 1];
rc_delay.text = "" + com.mygame.robotterritories.view.enemy.RocketCruiser.startTime[level - 1];
rc_dens.text = (("" + com.mygame.robotterritories.view.enemy.RocketCruiser.density[level - 1][0]) + "-") + com.mygame.robotterritories.view.enemy.RocketCruiser.density[level - 1][1];
db.text = "" + com.mygame.robotterritories.view.enemy.DiveBot.amountArray[level - 1];
db_delay.text = "" + com.mygame.robotterritories.view.enemy.DiveBot.startTime[level - 1];
db_dens.text = (("" + com.mygame.robotterritories.view.enemy.DiveBot.density[level - 1][0]) + "-") + com.mygame.robotterritories.view.enemy.DiveBot.density[level - 1][1];
nb.text = "" + com.mygame.robotterritories.view.enemy.NukeBot.amountArray[level - 1];
nb_delay.text = "" + com.mygame.robotterritories.view.enemy.NukeBot.startTime[level - 1];
nb_dens.text = (("" + com.mygame.robotterritories.view.enemy.NukeBot.density[level - 1][0]) + "-") + com.mygame.robotterritories.view.enemy.NukeBot.density[level - 1][1];
co.text = "" + com.mygame.robotterritories.view.enemy.Colossus.amountArray[level - 1];
co_delay.text = "" + com.mygame.robotterritories.view.enemy.Colossus.startTime[level - 1];
co_dens.text = (("" + com.mygame.robotterritories.view.enemy.Colossus.density[level - 1][0]) + "-") + com.mygame.robotterritories.view.enemy.Colossus.density[level - 1][1];
gm.text = "" + com.mygame.robotterritories.view.enemy.GodMachine.amountArray[level - 1];
gm_delay.text = "" + com.mygame.robotterritories.view.enemy.GodMachine.startTime[level - 1];
gm_dens.text = (("" + com.mygame.robotterritories.view.enemy.GodMachine.density[level - 1][0]) + "-") + com.mygame.robotterritories.view.enemy.GodMachine.density[level - 1][1];
}
function activateLaser() {
mousePoint = new flash.geom.Point();
enemyPoint = new flash.geom.Point();
nearestPoint = new flash.geom.Point(1000, 1000);
laser._rotation = hero.canon._rotation;
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("laser_activated", com.mygame.robotterritories.util.Randomizer.getRandomNumber(10, 70), true);
}
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "lockTarget");
Mouse.hide();
}
function lockTarget() {
target._x = _xmouse;
target._y = _ymouse;
target._visible = true;
laser.removeMovieClip();
laser = laserClip.createEmptyMovieClip("laser", getNextHighestDepth());
laser.lineStyle(1, 65280, 100);
var _local2 = {x:0, y:0};
hero.canon.barel.duperAttatchClip.localToGlobal(_local2);
laser.moveTo(_local2.x, _local2.y);
laser.lineTo(target._x, target._y);
if (laserFlash >= 1) {
laserFlash = 0;
laser._visible = (laser._visible ? false : true);
} else {
laserFlash++;
}
if (_xmouse < _local2.x) {
abort();
}
}
function setLaserRotation() {
laser._rotation = hero.canon._rotation;
}
function deactivateLaser() {
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
com.midasplayer.fx.SoundManager.stop("laser_activated");
Mouse.show();
target._visible = false;
laser._visible = false;
}
function gameOverHandler() {
hero.deActivateRotate();
hero.gotoAndPlay("destroy");
_global.setTimeout(levelClearedSign, "init", 3000, "GAME OVER", false, level);
overarea.removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.PRESS);
inGameGUI.removeEventListener(com.mygame.robotterritories.view.hero.HealthMeter.GAME_OVER, this, "gameOverHandler");
abort();
}
function levelClearedHandler() {
_global.setTimeout(levelClearedSign, "init", 1200, "NICE WORK STRUGGLER!", true, level);
overarea.removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.PRESS);
abort();
}
function unlockHandler() {
menuView.unLockLevel(level + 1);
}
function abort() {
Mouse.show();
shotMeter.disCharge();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
target._visible = false;
laser._visible = false;
hero.canon.barel.canonClip.gotoAndPlay("reset");
overarea.removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this);
}
function tickFire() {
fireTicker++;
if (fireTicker >= 4) {
allowFire = true;
overarea.removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
fireTicker = 0;
}
}
function fire() {
overarea.removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "fire");
hero.fire(shotMeter.getPower(), target);
shotMeter.disCharge();
}
function raiseWeapon(evt) {
hero.canon.raiseWeapon(evt.type);
}
function chargeWeapon() {
if (allowFire) {
allowFire = false;
overarea.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "fire");
overarea.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "tickFire");
shotMeter.charge();
}
}
var level = 1;
var debugLev = 1;
var laserFlash = 0;
var fireTicker = 0;
var allowFire = true;
var arrowCount = 0;
}
Symbol 1206 MovieClip [__Packages.com.mygame.robotterritories.util.FrameRateDisplay] Frame 0
class com.mygame.robotterritories.util.FrameRateDisplay extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var addEventListener, fps;
function FrameRateDisplay () {
super();
}
function onLoad() {
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "updateFrameRate");
}
function updateFrameRate() {
if (tick >= 4) {
var _local2 = Math.round(1 / (((getTimer() - milliOffset) / 5) / 1000));
fps.text = "fps : " + _local2;
milliOffset = getTimer();
tick = 0;
} else {
tick++;
}
}
var rate = 30;
var tick = 0;
var milliOffset = 0;
}
Symbol 1207 MovieClip [__Packages.com.mygame.robotterritories.view.LockGameSign] Frame 0
class com.mygame.robotterritories.view.LockGameSign extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var bg, webBtn, mailBtn, _visible, getURL;
function LockGameSign () {
super();
}
function onLoad() {
bg.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "cover");
bg.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.PRESS, this, "cover");
bg.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "cover");
bg.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "cover");
bg.useHandCursor = false;
webBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onWeb");
mailBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onMail");
if (_root._url.substring(0, 4) == "http") {
_visible = false;
}
}
function cover() {
}
function onWeb() {
getURL(("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _root._url) + "&typ=protect", "_blank");
}
function onMail() {
getURL("mailto:alex@mygame.com");
}
}
Symbol 1208 MovieClip [__Packages.com.mygame.robotterritories.view.hero.ShotPowerMeter] Frame 0
class com.mygame.robotterritories.view.hero.ShotPowerMeter extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var gotoAndStop, aim, attachMovie, getNextHighestDepth, addEventListener, _currentframe, removeEventListener, dispatchEvent, laserActivated;
function ShotPowerMeter () {
super();
}
function onLoad() {
gotoAndStop(1);
aim = attachMovie("aim", "aim", getNextHighestDepth());
aim._visible = false;
}
function charge() {
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_charging", 40);
}
gotoAndStop(1);
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "startScaleMask");
}
function getPower() {
return(_currentframe);
}
function disCharge() {
gotoAndStop(1);
com.midasplayer.fx.SoundManager.stop("snd_charging");
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME);
dispatchEvent(new com.mygame.robotterritories.event.EventObject(DEACTIVATE_LASER, this));
laserActivated = false;
superActive = false;
duperActive = false;
aim._visible = false;
Mouse.show();
}
function startScaleMask() {
if ((_currentframe > 20) && (!superActive)) {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(SUPER_ROCKET, this));
superActive = true;
}
if ((_currentframe > 80) && (!duperActive)) {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(SUPER_DUPER_ROCKET, this));
duperActive = true;
}
if ((_currentframe >= 99) && (!laserActivated)) {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ACTIVATE_LASER, this));
laserActivated = true;
}
gotoAndStop(_currentframe + 2);
}
var superActive = false;
var duperActive = false;
static var ACTIVATE_LASER = "activateLaser";
static var DEACTIVATE_LASER = "dectivateLaser";
static var SUPER_ROCKET = "superRocket";
static var SUPER_DUPER_ROCKET = "superDuperRocket";
}
Symbol 1209 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 1210 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 1211 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1212 MovieClip [__Packages.com.midasplayer.util.Map] Frame 0
class com.midasplayer.util.Map
{
var map, lastSize;
function Map (init) {
map = new Object();
for (var _local3 in init) {
map["" + _local3] = init[_local3];
}
lastSize = -1;
}
function put(key, value) {
map["" + key] = value;
lastSize = -1;
}
function get(key) {
return(map["" + key]);
}
function remove(key) {
var _local2 = "" + key;
var _local3 = map[_local2];
delete map[_local2];
lastSize = -1;
return(_local3);
}
function contains(key) {
return(map["" + key] != undefined);
}
function count() {
if (lastSize < 0) {
lastSize = 0;
for (var _local2 in map) {
lastSize++;
}
}
return(lastSize);
}
function size() {
return(count());
}
function clear() {
map = {};
lastSize = 0;
}
function dump() {
var _local2 = "";
for (var _local3 in map) {
_local2 = _local2 + (((_local3 + "=>") + map[_local3]) + newline);
}
}
function toArray() {
var _local2 = [];
for (var _local3 in map) {
_local2[_local2.length] = map[_local3];
}
return(_local2);
}
function keySet() {
var _local2 = [];
for (var _local3 in map) {
_local2[_local2.length] = _local3;
}
return(_local2);
}
function get iterator() {
return(new com.midasplayer.util.MapIterator(this));
}
function get valueIterator() {
return(new com.midasplayer.util.MapValueIterator(this));
}
function foreach(fn) {
var _local3 = arguments.slice(1);
if (_local3.length > 0) {
do {
if ((in map) == null) {
break;
}
var _local5 = in map;
} while (fn(_local5, map[_local5], _local3[0], _local3[1], _local3[2], _local3[3], _local3[4]) != false);
do {
} while ("foreach" != null);
} else {
do {
if ((in map) == null) {
break;
}
var _local5 = in map;
} while (fn(_local5, map[_local5]) != false);
do {
} while (_local2 != null);
}
lastSize = -1;
}
function get _content() {
return(map);
}
}
Symbol 1213 MovieClip [__Packages.com.midasplayer.util.Iterator] Frame 0
interface com.midasplayer.util.Iterator
{
}
Symbol 1214 MovieClip [__Packages.com.midasplayer.util.MapIterator] Frame 0
class com.midasplayer.util.MapIterator implements com.midasplayer.util.Iterator
{
var map, keys, ptr;
function MapIterator (map) {
this.map = map;
keys = map.keySet();
ptr = 0;
}
function next() {
if (ptr < keys.length) {
return(keys[ptr++]);
}
return(undefined);
}
function hasNext() {
return(ptr != keys.length);
}
function remove() {
if (ptr == 0) {
return(undefined);
}
map.remove(keys[ptr - 1]);
}
}
Symbol 1215 MovieClip [__Packages.com.midasplayer.util.MapValueIterator] Frame 0
class com.midasplayer.util.MapValueIterator implements com.midasplayer.util.Iterator
{
var map, mapRef, keys, ptr;
function MapValueIterator (map) {
this.map = map;
mapRef = map._content;
keys = map.keySet();
ptr = 0;
}
function next() {
return(mapRef[keys[ptr++]]);
}
function hasNext() {
return(ptr != keys.length);
}
function remove() {
if (ptr == 0) {
return(undefined);
}
map.remove(keys[ptr - 1]);
}
}
Symbol 1216 MovieClip [__Packages.com.midasplayer.fx.SoundManager] Frame 0
class com.midasplayer.fx.SoundManager
{
static var preloadLastId, progressCallback, preloadList, preloadNum, preloadLast, beginLoadCallback;
function SoundManager () {
}
static function setup(useClip) {
m_placeholder = useClip;
}
static function isSoundEnabled() {
return(soundEnabled);
}
static function enableSounds(enabled) {
soundEnabled = enabled;
if (!enabled) {
muteAll();
} else {
restoreMuteAll();
}
}
static function stopAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.stop();
soundEntry.playStatus = false;
});
}
static function muteAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.setVolume(0);
soundEntry.isMuted = true;
});
}
static function restoreMuteAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.setVolume(soundEntry.realVol);
soundEntry.isMuted = false;
});
}
static function stop(resource) {
var _local1 = sounds.get(resource);
if (_local1 != undefined) {
_local1.sound.stop();
_local1.playStatus = false;
}
}
static function getCalibratedVolume(flashVolume) {
flashVolume = Math.min(100, flashVolume);
flashVolume = Math.max(0, flashVolume);
return(Math.ceil(Math.pow(flashVolume / 100, 1.46) * 100));
}
static function setVolume(resource, percent) {
var _local1 = sounds.get(resource);
if ((_local1 != undefined) && (_local1.playStatus == true)) {
if (!_local1.isMuted) {
_local1.sound.setVolume(percent);
}
_local1.realVol = percent;
}
}
static function getPosition(resource) {
var _local1 = sounds.get(resource);
if ((_local1 != undefined) && (_local1.playStatus == true)) {
return(_local1.sound.position);
}
return(-1);
}
static function getLength(resource) {
var _local1 = sounds.get(resource);
if (_local1 != undefined) {
return(_local1.sound.duration);
}
return(-1);
}
static function isPlaying(resource) {
var _local1 = sounds.get(resource);
return((_local1 != undefined) && (_local1.playStatus == true));
}
static function initialize(list) {
for (var _local8 in list) {
var resource = list[_local8];
var _local2 = m_placeholder.getNextHighestDepth();
var _local1 = new Sound(m_placeholder.createEmptyMovieClip("sm_sndhold_" + _local2, _local2));
_local1.attachSound(resource);
_local1.onSoundComplete = function () {
var _local1 = com.midasplayer.fx.SoundManager.sounds.get(resource);
_local1.playStatus = false;
};
sounds.put(resource, {realVol:100, sound:_local1, playStatus:false});
}
}
static function killPreload() {
unload(preloadLastId);
progressCallback = undefined;
preloadLastId = undefined;
preloadList = undefined;
preloadNum = 0;
preloadLast = undefined;
}
static function preload(urlList, fnProgressCallback, fnBeginLoadCallback) {
beginLoadCallback = fnBeginLoadCallback;
progressCallback = fnProgressCallback;
preloadList = new Array();
for (var _local2 in urlList) {
preloadList.push(urlList[_local2]);
}
preloadLast = "";
preloadNum = urlList.length;
loadUrl_();
}
static function unload(name) {
var _local1 = sounds.get(name);
if ((_local1 != undefined) && (_local1.runtime == true)) {
var _local2 = m_placeholder[_local1.clipId];
_local2.removeMovieClip();
delete _local1.sound;
_local1.sound = undefined;
sounds.remove(name);
}
}
static function setPlaceholderParent(p) {
m_placeholder = p;
}
static function play(resource, volume, isLoop, fn) {
if (volume == undefined) {
volume = 100;
}
if (isLoop == undefined) {
isLoop = false;
}
volume = getCalibratedVolume(volume);
var _local1 = sounds.get(resource);
if (_local1 != undefined) {
_local1.sound.setVolume((soundEnabled ? (volume) : 0));
_local1.realVol = volume;
_local1.isMuted = !soundEnabled;
_local1.playStatus = true;
_local1.onPlayedFn = fn;
_local1.sound.start(0, (isLoop ? 65535 : 1));
} else {
var _local5 = m_placeholder.getNextHighestDepth();
var _local3 = new Sound(m_placeholder.createEmptyMovieClip("sm_sndhold_" + _local5, _local5));
_local3.attachSound(resource);
_local3.onSoundComplete = function () {
var _local1 = com.midasplayer.fx.SoundManager.sounds.get(resource);
_local1.playStatus = false;
com.midasplayer.fx.SoundManager.onPlayed_(resource);
};
_local3.setVolume((soundEnabled ? (volume) : 0));
_local3.start(0, (isLoop ? 65535 : 1));
sounds.put(resource, {isMuted:!soundEnabled, realVol:volume, onPlayedFn:fn, sound:_local3, playStatus:true});
}
}
static function onPlayed_(name) {
var _local1 = sounds.get(name);
if ((_local1 != undefined) && (_local1.onPlayedFn != undefined)) {
_local1.onPlayedFn();
}
}
static function loadUrl_(success) {
var _local8 = preloadNum - preloadList.length;
if (_local8 != 0) {
if (success == false) {
}
progressCallback(_local8, success);
}
if (preloadList.length == 0) {
progressCallback = undefined;
preloadList = undefined;
preloadNum = 0;
preloadLast = undefined;
return(undefined);
}
var _local5 = preloadList.pop();
preloadLast = _local5.url;
var nextId = _local5.id;
if (!_local5.id) {
var _local3 = preloadLast.lastIndexOf("/");
if (_local3 == -1) {
_local3 = 0;
} else {
_local3++;
}
var _local4 = preloadLast.lastIndexOf(".");
if (_local4 == -1) {
_local4 = preloadLast.length;
}
nextId = preloadLast.substring(_local3, _local4);
}
var _local7 = m_placeholder.getNextHighestDepth();
var _local6 = "dn_sndhold_" + _local7;
var _local2 = new Sound(m_placeholder.createEmptyMovieClip(_local6, _local7));
_local2.onLoad = function (a) {
var _local2 = com.midasplayer.fx.SoundManager.loadUrl_;
com.midasplayer.util.Delay.oneShot(this, _local2, 50, a);
};
_local2.onSoundComplete = function () {
var _local1 = com.midasplayer.fx.SoundManager.sounds.get(nextId);
_local1.playStatus = false;
com.midasplayer.fx.SoundManager.onPlayed_(nextId);
};
preloadLastId = nextId;
_local2.loadSound("" + preloadLast, false);
sounds.put(nextId, {realVol:100, clipId:_local6, sound:_local2, playStatus:false, runtime:true});
if (beginLoadCallback) {
beginLoadCallback(_local2, preloadLast, nextId, (preloadNum - preloadList.length) - 1);
}
}
static var hackIsMuted = false;
static var m_placeholder = _root;
static var sounds = new com.midasplayer.util.Map();
static var soundEnabled = true;
}
Symbol 1217 MovieClip [__Packages.com.midasplayer.util.Delay] Frame 0
class com.midasplayer.util.Delay
{
var m_fn, m_param, m_context, m_delay, m_started, m_timerId;
function Delay (context, fn, delay) {
m_fn = fn;
m_param = new Array();
var _local3 = 3;
while (_local3 < arguments.length) {
m_param.push(arguments[_local3]);
_local3++;
}
m_context = context;
m_delay = delay;
m_started = getTimer();
m_timerId = setInterval(mx.utils.Delegate.create(this, onEvent), delay);
}
function onEvent() {
if (getTimer() >= (m_delay + m_started)) {
clearInterval(m_timerId);
m_fn.apply(m_context, m_param);
m_fn = undefined;
m_param = undefined;
}
}
static function oneShot(context, fn, delay) {
var _local3 = new com.midasplayer.util.Delay(context, fn, delay);
_local3.m_param = new Array();
var _local2 = 3;
while (_local2 < arguments.length) {
_local3.m_param.push(arguments[_local2]);
_local2++;
}
}
}
Symbol 1218 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1219 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.EnemyFeeder] Frame 0
class com.mygame.robotterritories.view.enemy.EnemyFeeder extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var hill, projectileArray, colossusTimeout, diveBotTimeout, godMachineTimeout, gunCruiserTimeout, infantryTimeout, nukeBotTimeout, rocketBotTimeout, rocketCruiserTimeout, ultraTankTimeout, mechJeepTimeout, gunCruiserCourse, diveBotCourse, diveBotCourseGround, infantryBotCourse, rocketBotCourse, rocketCruiserCourse, colossusCourse, nukeBotCourse, mechJeepCourse, ultraTankCourse, godMachineCourse, parent, attachClip, colossusClip, diveBotClip, godMachineClip, gunCruiserClip, infantryBotClip, nukeBotClip, rocketBotClip, rocketCruiserClip, ultraTankClip, mechJeepClip, dispatchEvent;
function EnemyFeeder () {
super();
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.EnemyModel.ALL_ENEMIES_DESTROYED, this, "checkLevelStatus");
com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.TrailGenerator.COLOSSUS_READY, this, "startColossus");
com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.TrailGenerator.DIVEBOT_READY, this, "startDiveBot");
com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.TrailGenerator.GUNCRUISER_READY, this, "startGunCruiser");
com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.TrailGenerator.INFANTRYBOT_READY, this, "startInfantryBot");
com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.TrailGenerator.MECHJEEP_READY, this, "startMechJeep");
com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.TrailGenerator.ROCKETCRUISER_READY, this, "startRocketCruiser");
}
function onLoad() {
}
function init(m) {
hill = m.hill;
projectileArray = new Array();
colossusTimeout = new com.mygame.robotterritories.util.TimeOut();
diveBotTimeout = new com.mygame.robotterritories.util.TimeOut();
godMachineTimeout = new com.mygame.robotterritories.util.TimeOut();
gunCruiserTimeout = new com.mygame.robotterritories.util.TimeOut();
infantryTimeout = new com.mygame.robotterritories.util.TimeOut();
nukeBotTimeout = new com.mygame.robotterritories.util.TimeOut();
rocketBotTimeout = new com.mygame.robotterritories.util.TimeOut();
rocketCruiserTimeout = new com.mygame.robotterritories.util.TimeOut();
ultraTankTimeout = new com.mygame.robotterritories.util.TimeOut();
mechJeepTimeout = new com.mygame.robotterritories.util.TimeOut();
gunCruiserCourse = m.gunCruiserCourse;
diveBotCourse = m.diveBotCourse;
diveBotCourseGround = m.diveBotCourseGround;
infantryBotCourse = m.infantryBotCourse;
rocketBotCourse = m.rocketBotCourse;
rocketCruiserCourse = m.rocketCruiserCourse;
colossusCourse = m.colossusCourse;
nukeBotCourse = m.nukeBotCourse;
mechJeepCourse = m.mechJeepCourse;
ultraTankCourse = m.ultraTankCourse;
godMachineCourse = m.godMachineCourse;
projectileCount = 0;
parent = m;
com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().resetTrails();
com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().setTrails(parent.getLevel(), this);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().updateEnemyCount(com.mygame.robotterritories.view.enemy.Colossus.amountArray[parent.getLevel() - 1]);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().updateEnemyCount(com.mygame.robotterritories.view.enemy.DiveBot.amountArray[parent.getLevel() - 1]);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().updateEnemyCount(com.mygame.robotterritories.view.enemy.GodMachine.amountArray[parent.getLevel() - 1]);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().updateEnemyCount(com.mygame.robotterritories.view.enemy.GunCruiser.amountArray[parent.getLevel() - 1]);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().updateEnemyCount(com.mygame.robotterritories.view.enemy.InfantryBot.amountArray[parent.getLevel() - 1]);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().updateEnemyCount(com.mygame.robotterritories.view.enemy.NukeBot.amountArray[parent.getLevel() - 1]);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().updateEnemyCount(com.mygame.robotterritories.view.enemy.RocketBot.amountArray[parent.getLevel() - 1]);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().updateEnemyCount(com.mygame.robotterritories.view.enemy.RocketCruiser.amountArray[parent.getLevel() - 1]);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().updateEnemyCount(com.mygame.robotterritories.view.enemy.UltraTank.amountArray[parent.getLevel() - 1]);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().updateEnemyCount(com.mygame.robotterritories.view.enemy.MechJeep.amountArray[parent.getLevel() - 1]);
}
function resetFeeder() {
attachClip.removeMovieClip();
colossusTimeout.clearTimeout();
diveBotTimeout.clearTimeout();
godMachineTimeout.clearTimeout();
gunCruiserTimeout.clearTimeout();
infantryTimeout.clearTimeout();
mechJeepTimeout.clearTimeout();
nukeBotTimeout.clearTimeout();
rocketBotTimeout.clearTimeout();
rocketCruiserTimeout.clearTimeout();
ultraTankTimeout.clearTimeout();
var _local2 = 0;
while (_local2 < projectileArray.length) {
projectileArray[_local2].removeMovieClip();
_local2++;
}
colossusCounter = 0;
diveBotCounter = 0;
godMachineCounter = 0;
gunCruiserCounter = 0;
infantryBotCounter = 0;
mechJeepCounter = 0;
nukeBotCounter = 0;
rocketBotCounter = 0;
rocketCruiserCounter = 0;
ultraTankCounter = 0;
clearedEnemies = 0;
}
function startColossus() {
startGodMachine();
parent.debugArrowCount();
parent.colossusCourse.removeMovieClip();
colossusTimeout.setTimeout(this, "startLandEnemies", ((com.mygame.robotterritories.view.enemy.Colossus.amountArray[parent.getLevel() - 1] == 0) ? 500 : (com.mygame.robotterritories.view.enemy.Colossus.startTime[parent.getLevel() - 1] * 1000)), com.mygame.robotterritories.view.enemy.Colossus.LINK);
}
function startDiveBot() {
parent.debugArrowCount();
parent.diveBotCourse.removeMovieClip();
parent.diveBotCourseGround.removeMovieClip();
diveBotTimeout.setTimeout(this, "startLandEnemies", ((com.mygame.robotterritories.view.enemy.DiveBot.amountArray[parent.getLevel() - 1] == 0) ? 500 : (com.mygame.robotterritories.view.enemy.DiveBot.startTime[parent.getLevel() - 1] * 1000)), com.mygame.robotterritories.view.enemy.DiveBot.LINK);
}
function startGodMachine() {
parent.debugArrowCount();
parent.godMachineCourse.removeMovieClip();
godMachineTimeout.setTimeout(this, "startLandEnemies", ((com.mygame.robotterritories.view.enemy.GodMachine.amountArray[parent.getLevel() - 1] == 0) ? 500 : (com.mygame.robotterritories.view.enemy.GodMachine.startTime[parent.getLevel() - 1] * 1000)), com.mygame.robotterritories.view.enemy.GodMachine.LINK);
}
function startGunCruiser() {
parent.debugArrowCount();
parent.gunCruiserCourse.removeMovieClip();
gunCruiserTimeout.setTimeout(this, "startLandEnemies", ((com.mygame.robotterritories.view.enemy.GunCruiser.amountArray[parent.getLevel() - 1] == 0) ? 500 : (com.mygame.robotterritories.view.enemy.GunCruiser.startTime[parent.getLevel() - 1] * 1000)), com.mygame.robotterritories.view.enemy.GunCruiser.LINK);
}
function startInfantryBot() {
if (com.mygame.robotterritories.view.enemy.DiveBot.amountArray[parent.getLevel() - 1] != 0) {
com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().setDiveBotTrail();
} else {
startDiveBot();
}
startRocketBot();
parent.debugArrowCount();
parent.infantryBotCourse.removeMovieClip();
infantryTimeout.setTimeout(this, "startLandEnemies", ((com.mygame.robotterritories.view.enemy.InfantryBot.amountArray[parent.getLevel() - 1] == 0) ? 500 : (com.mygame.robotterritories.view.enemy.InfantryBot.startTime[parent.getLevel() - 1] * 1000)), com.mygame.robotterritories.view.enemy.InfantryBot.LINK);
}
function startMechJeep() {
startNukeBot();
startUltraTank();
parent.debugArrowCount();
parent.mechJeepCourse.removeMovieClip();
mechJeepTimeout.setTimeout(this, "startLandEnemies", ((com.mygame.robotterritories.view.enemy.MechJeep.amountArray[parent.getLevel() - 1] == 0) ? 500 : (com.mygame.robotterritories.view.enemy.MechJeep.startTime[parent.getLevel() - 1] * 1000)), com.mygame.robotterritories.view.enemy.MechJeep.LINK);
}
function startNukeBot() {
parent.debugArrowCount();
parent.nukeBotCourse.removeMovieClip();
nukeBotTimeout.setTimeout(this, "startLandEnemies", ((com.mygame.robotterritories.view.enemy.NukeBot.amountArray[parent.getLevel() - 1] == 0) ? 500 : (com.mygame.robotterritories.view.enemy.NukeBot.startTime[parent.getLevel() - 1] * 1000)), com.mygame.robotterritories.view.enemy.NukeBot.LINK);
}
function startRocketBot() {
parent.debugArrowCount();
parent.rocketBotCourse.removeMovieClip();
rocketBotTimeout.setTimeout(this, "startLandEnemies", ((com.mygame.robotterritories.view.enemy.RocketBot.amountArray[parent.getLevel() - 1] == 0) ? 500 : (com.mygame.robotterritories.view.enemy.RocketBot.startTime[parent.getLevel() - 1] * 1000)), com.mygame.robotterritories.view.enemy.RocketBot.LINK);
}
function startRocketCruiser() {
parent.debugArrowCount();
parent.rocketCruiserCourse.removeMovieClip();
rocketCruiserTimeout.setTimeout(this, "startLandEnemies", ((com.mygame.robotterritories.view.enemy.RocketCruiser.amountArray[parent.getLevel() - 1] == 0) ? 500 : (com.mygame.robotterritories.view.enemy.RocketCruiser.startTime[parent.getLevel() - 1] * 1000)), com.mygame.robotterritories.view.enemy.RocketCruiser.LINK);
}
function startUltraTank() {
parent.debugArrowCount();
parent.ultraTankCourse.removeMovieClip();
ultraTankTimeout.setTimeout(this, "startLandEnemies", ((com.mygame.robotterritories.view.enemy.UltraTank.amountArray[parent.getLevel() - 1] == 0) ? 500 : (com.mygame.robotterritories.view.enemy.UltraTank.startTime[parent.getLevel() - 1] * 1000)), com.mygame.robotterritories.view.enemy.UltraTank.LINK);
}
function startLandEnemies(enemyType) {
var _local10;
var _local4;
var _local5;
var _local2;
switch (enemyType) {
case com.mygame.robotterritories.view.enemy.Colossus.LINK :
attachClip = colossusClip;
_local4 = com.mygame.robotterritories.view.enemy.Colossus.density;
_local5 = com.mygame.robotterritories.view.enemy.Colossus.amountArray;
_local2 = colossusCounter;
colossusCounter++;
break;
case com.mygame.robotterritories.view.enemy.DiveBot.LINK :
attachClip = diveBotClip;
_local4 = com.mygame.robotterritories.view.enemy.DiveBot.density;
_local5 = com.mygame.robotterritories.view.enemy.DiveBot.amountArray;
_local2 = diveBotCounter;
diveBotCounter++;
break;
case com.mygame.robotterritories.view.enemy.GodMachine.LINK :
attachClip = godMachineClip;
_local4 = com.mygame.robotterritories.view.enemy.GodMachine.density;
_local5 = com.mygame.robotterritories.view.enemy.GodMachine.amountArray;
_local2 = godMachineCounter;
godMachineCounter++;
break;
case com.mygame.robotterritories.view.enemy.GunCruiser.LINK :
attachClip = gunCruiserClip;
_local4 = com.mygame.robotterritories.view.enemy.GunCruiser.density;
_local5 = com.mygame.robotterritories.view.enemy.GunCruiser.amountArray;
_local2 = gunCruiserCounter;
gunCruiserCounter++;
break;
case com.mygame.robotterritories.view.enemy.InfantryBot.LINK :
attachClip = infantryBotClip;
_local4 = com.mygame.robotterritories.view.enemy.InfantryBot.density;
_local5 = com.mygame.robotterritories.view.enemy.InfantryBot.amountArray;
_local2 = infantryBotCounter;
infantryBotCounter++;
break;
case com.mygame.robotterritories.view.enemy.NukeBot.LINK :
attachClip = nukeBotClip;
_local4 = com.mygame.robotterritories.view.enemy.NukeBot.density;
_local5 = com.mygame.robotterritories.view.enemy.NukeBot.amountArray;
_local2 = nukeBotCounter;
nukeBotCounter++;
break;
case com.mygame.robotterritories.view.enemy.RocketBot.LINK :
attachClip = rocketBotClip;
_local4 = com.mygame.robotterritories.view.enemy.RocketBot.density;
_local5 = com.mygame.robotterritories.view.enemy.RocketBot.amountArray;
_local2 = rocketBotCounter;
rocketBotCounter++;
break;
case com.mygame.robotterritories.view.enemy.RocketCruiser.LINK :
attachClip = rocketCruiserClip;
_local4 = com.mygame.robotterritories.view.enemy.RocketCruiser.density;
_local5 = com.mygame.robotterritories.view.enemy.RocketCruiser.amountArray;
_local2 = rocketCruiserCounter;
rocketCruiserCounter++;
break;
case com.mygame.robotterritories.view.enemy.UltraTank.LINK :
attachClip = ultraTankClip;
_local4 = com.mygame.robotterritories.view.enemy.UltraTank.density;
_local5 = com.mygame.robotterritories.view.enemy.UltraTank.amountArray;
_local2 = ultraTankCounter;
ultraTankCounter++;
break;
case com.mygame.robotterritories.view.enemy.MechJeep.LINK :
attachClip = mechJeepClip;
_local4 = com.mygame.robotterritories.view.enemy.MechJeep.density;
_local5 = com.mygame.robotterritories.view.enemy.MechJeep.amountArray;
_local2 = mechJeepCounter;
mechJeepCounter++;
}
if (_local2 != _local5[parent.getLevel() - 1]) {
enemyDepth++;
var _local7 = com.mygame.robotterritories.util.Randomizer.getRandomNumber(_local4[parent.getLevel() - 1][0], _local4[parent.getLevel() - 1][1]);
if (_local2 == (_local5[parent.getLevel() - 1] - 1)) {
clearedEnemies++;
} else {
var _local3 = new com.mygame.robotterritories.util.TimeOut();
_local3.setTimeout(this, "startLandEnemies", _local7, enemyType);
}
_local10 = com.mygame.robotterritories.view.enemy.IEnemy(attachClip.attachMovie(enemyType, (enemyType + "_") + _local2, enemyDepth, {PARENT:this, ID:(enemyType + "_") + _local2}));
} else {
clearedEnemies++;
}
switch (enemyType) {
case com.mygame.robotterritories.view.enemy.Colossus.LINK :
colossusTimeout = _local3;
break;
case com.mygame.robotterritories.view.enemy.DiveBot.LINK :
diveBotTimeout = _local3;
break;
case com.mygame.robotterritories.view.enemy.GunCruiser.LINK :
gunCruiserTimeout = _local3;
break;
case com.mygame.robotterritories.view.enemy.GodMachine.LINK :
godMachineTimeout = _local3;
break;
case com.mygame.robotterritories.view.enemy.InfantryBot.LINK :
infantryTimeout = _local3;
break;
case com.mygame.robotterritories.view.enemy.NukeBot.LINK :
nukeBotTimeout = _local3;
break;
case com.mygame.robotterritories.view.enemy.RocketBot.LINK :
rocketBotTimeout = _local3;
break;
case com.mygame.robotterritories.view.enemy.RocketCruiser.LINK :
rocketCruiserTimeout = _local3;
break;
case com.mygame.robotterritories.view.enemy.MechJeep.LINK :
mechJeepTimeout = _local3;
break;
case com.mygame.robotterritories.view.enemy.UltraTank.LINK :
ultraTankTimeout = _local3;
}
}
function checkLevelStatus() {
if (clearedEnemies == 10) {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(LEVEL_CLEARED, this));
resetFeeder();
}
}
var enemyDepth = 2;
var colossusCounter = 0;
var diveBotCounter = 0;
var godMachineCounter = 0;
var gunCruiserCounter = 0;
var infantryBotCounter = 0;
var mechJeepCounter = 0;
var nukeBotCounter = 0;
var rocketBotCounter = 0;
var rocketCruiserCounter = 0;
var ultraTankCounter = 0;
var projectileCount = 0;
var clearedEnemies = 0;
static var LEVEL_CLEARED = "levelCleared";
}
Symbol 1220 MovieClip [__Packages.com.mygame.robotterritories.util.TimeOut] Frame 0
class com.mygame.robotterritories.util.TimeOut
{
static var allTimeouts;
var scope, func, time, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6, timeId, milliOffset;
function TimeOut () {
}
function setTimeout(p_scope, p_func, p_time, p_arg_1, p_arg_2, p_arg_3, p_arg_4, p_arg_5, p_arg_6) {
scope = p_scope;
func = p_func;
time = p_time;
arg_1 = p_arg_1;
arg_2 = p_arg_2;
arg_3 = p_arg_3;
arg_4 = p_arg_4;
arg_5 = p_arg_5;
arg_6 = p_arg_6;
_global.clearTimeout(timeId);
if (!isPaused) {
timeId = _global.setTimeout(scope, func, time, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6);
}
pushTimeout(this);
milliOffset = getTimer();
}
static function pushTimeout(t) {
if (!allTimeouts) {
allTimeouts = new Object();
}
allTimeouts[t.timeId] = t;
}
function clearTimeout() {
delete allTimeouts[timeId];
_global.clearTimeout(timeId);
}
static function pauseAllTimeouts() {
isPaused = true;
for (var _local2 in allTimeouts) {
_global.clearTimeout(allTimeouts[_local2].timeId);
allTimeouts[_local2].time = allTimeouts[_local2].time - (getTimer() - allTimeouts[_local2].milliOffset);
if (allTimeouts[_local2].time <= 0) {
delete allTimeouts[_local2];
}
}
}
static function removeAllTimeouts() {
for (var _local1 in allTimeouts) {
allTimeouts[_local1].clearTimeout();
}
isPaused = false;
}
static function restoreAllTimeouts() {
isPaused = false;
for (var _local2 in allTimeouts) {
if (allTimeouts[_local2]) {
allTimeouts[_local2].milliOffset = getTimer();
allTimeouts[_local2].timeId = _global.setTimeout(allTimeouts[_local2].scope, allTimeouts[_local2].func, allTimeouts[_local2].time, allTimeouts[_local2].arg_1, allTimeouts[_local2].arg_2, allTimeouts[_local2].arg_3, allTimeouts[_local2].arg_4, allTimeouts[_local2].arg_5, allTimeouts[_local2].arg_6);
}
}
}
static var isPaused = false;
}
Symbol 1221 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.TrailGenerator] Frame 0
class com.mygame.robotterritories.view.enemy.TrailGenerator extends com.mygame.robotterritories.event.EventDispatcher
{
static var instance;
var gunCruiserTrail, rocketCruiserTrail, godMachineTrail, ultraTankTrail, mechJeepTrail, colossusTrail, infantryBotTrail, rocketBotTrail, nukeBotTrail, diveBotTrail_1, diveBotTrail_2, feeder, level, dispatchEvent;
function TrailGenerator () {
super();
}
static function getInstance() {
if (instance == null) {
instance = new com.mygame.robotterritories.view.enemy.TrailGenerator();
}
return(instance);
}
function resetTrails() {
gunCruiserTrail = null;
rocketCruiserTrail = null;
godMachineTrail = null;
ultraTankTrail = null;
mechJeepTrail = null;
colossusTrail = null;
infantryBotTrail = null;
rocketBotTrail = null;
nukeBotTrail = null;
diveBotTrail_1 = null;
diveBotTrail_2 = null;
}
function setTrails(p_level, p_feeder) {
feeder = p_feeder;
level = p_level;
setColossusTrail();
setGunCruiserTrail();
setInfantryBotTrail();
setMechJeepTrail();
setRocketCruiserTrail();
}
function setColossusTrail() {
if ((com.mygame.robotterritories.view.enemy.Colossus.amountArray[level - 1] != 0) || (com.mygame.robotterritories.view.enemy.GodMachine.amountArray[level - 1] != 0)) {
colossusTrail = new Array();
colossusTimeout();
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(COLOSSUS_READY, this));
}
}
function colossusTimeout() {
if (feeder.colossusCourse._framesloaded) {
while (feeder.colossusCourse._currentframe < feeder.colossusCourse._totalframes) {
feeder.colossusCourse.gotoAndStop(feeder.colossusCourse._currentframe + 1);
colossusTrail.push({x:feeder.colossusCourse.guidedClip._x - feeder._x, y:feeder.colossusCourse.guidedClip._y, r:feeder.colossusCourse.guidedClip._rotation});
}
dispatchEvent(new com.mygame.robotterritories.event.EventObject(COLOSSUS_READY, this));
} else {
_global.setTimeout(this, "colossusTimeout", 5);
}
}
function setMechJeepTrail() {
if (((com.mygame.robotterritories.view.enemy.MechJeep.amountArray[level - 1] != 0) || (com.mygame.robotterritories.view.enemy.UltraTank.amountArray[level - 1] != 0)) || (com.mygame.robotterritories.view.enemy.NukeBot.amountArray[level - 1] != 0)) {
mechJeepTrail = new Array();
mechJeepTimeout();
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(MECHJEEP_READY, this));
}
}
function mechJeepTimeout() {
if (feeder.mechJeepCourse._framesloaded) {
while (feeder.mechJeepCourse._currentframe < feeder.mechJeepCourse._totalframes) {
feeder.mechJeepCourse.gotoAndStop(feeder.mechJeepCourse._currentframe + 1);
mechJeepTrail.push({x:feeder.mechJeepCourse.guidedClip._x - feeder._x, y:feeder.mechJeepCourse.guidedClip._y, r:feeder.mechJeepCourse.guidedClip._rotation});
}
dispatchEvent(new com.mygame.robotterritories.event.EventObject(MECHJEEP_READY, this));
} else {
_global.setTimeout(this, "mechJeepTimeout", 5);
}
}
function setUltraTankTrail() {
if (com.mygame.robotterritories.view.enemy.UltraTank.amountArray[level - 1] != 0) {
ultraTankTrail = new Array();
_global.setTimeout(this, "ultraTankTimeout", 5);
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ULTRATANK_READY, this));
}
}
function ultraTankTimeout() {
feeder.ultraTankCourse.gotoAndStop(feeder.ultraTankCourse._currentframe + 1);
if (feeder.ultraTankCourse._currentframe < feeder.ultraTankCourse._totalframes) {
ultraTankTrail.push({x:feeder.ultraTankCourse.guidedClip._x - feeder._x, y:feeder.ultraTankCourse.guidedClip._y, r:feeder.ultraTankCourse.guidedClip._rotation});
_global.setTimeout(this, "ultraTankTimeout", 5);
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ULTRATANK_READY, this));
}
}
function setNukeBotTrail() {
if (com.mygame.robotterritories.view.enemy.NukeBot.amountArray[level - 1] != 0) {
nukeBotTrail = new Array();
_global.setTimeout(this, "nukeBotTimeout", 5);
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(NUKEBOT_READY, this));
}
}
function nukeBotTimeout() {
feeder.nukeBotCourse.gotoAndStop(feeder.nukeBotCourse._currentframe + 1);
if (feeder.nukeBotCourse._currentframe < feeder.nukeBotCourse._totalframes) {
nukeBotTrail.push({x:feeder.nukeBotCourse.guidedClip._x - feeder._x, y:feeder.nukeBotCourse.guidedClip._y, r:feeder.nukeBotCourse.guidedClip._rotation});
_global.setTimeout(this, "nukeBotTimeout", 5);
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(NUKEBOT_READY, this));
}
}
function setGodMachineTrail() {
if (com.mygame.robotterritories.view.enemy.GodMachine.amountArray[level - 1] != 0) {
godMachineTrail = new Array();
_global.setTimeout(this, "godMachineTimeout", 5);
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(GODMACHINE_READY, this));
}
}
function godMachineTimeout() {
feeder.godMachineCourse.gotoAndStop(feeder.godMachineCourse._currentframe + 1);
if (feeder.godMachineCourse._currentframe < feeder.godMachineCourse._totalframes) {
godMachineTrail.push({x:feeder.godMachineCourse.guidedClip._x - feeder._x, y:feeder.godMachineCourse.guidedClip._y, r:feeder.godMachineCourse.guidedClip._rotation});
_global.setTimeout(this, "godMachineTimeout", 5);
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(GODMACHINE_READY, this));
}
}
function setInfantryBotTrail() {
if (((com.mygame.robotterritories.view.enemy.InfantryBot.amountArray[level - 1] != 0) || (com.mygame.robotterritories.view.enemy.RocketBot.amountArray[level - 1] != 0)) || (com.mygame.robotterritories.view.enemy.DiveBot.amountArray[level - 1] != 0)) {
infantryBotTrail = new Array();
infantryBotTimeout();
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(INFANTRYBOT_READY, this));
}
}
function infantryBotTimeout() {
if (feeder.infantryBotCourse._framesloaded) {
while (feeder.infantryBotCourse._currentframe < feeder.infantryBotCourse._totalframes) {
feeder.infantryBotCourse.gotoAndStop(feeder.infantryBotCourse._currentframe + 1);
infantryBotTrail.push({x:feeder.infantryBotCourse.guidedClip._x - feeder._x, y:feeder.infantryBotCourse.guidedClip._y, r:feeder.infantryBotCourse.guidedClip._rotation});
}
dispatchEvent(new com.mygame.robotterritories.event.EventObject(INFANTRYBOT_READY, this));
} else {
_global.setTimeout(this, "infantryBotTimeout", 5);
}
}
function setRocketBotTrail() {
if (com.mygame.robotterritories.view.enemy.RocketBot.amountArray[level - 1] != 0) {
rocketBotTrail = new Array();
_global.setTimeout(this, "rocketBotTimeout", 5);
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ROCKETBOT_READY, this));
}
}
function rocketBotTimeout() {
feeder.rocketBotCourse.gotoAndStop(feeder.rocketBotCourse._currentframe + 1);
if (feeder.rocketBotCourse._currentframe < feeder.rocketBotCourse._totalframes) {
rocketBotTrail.push({x:feeder.rocketBotCourse.guidedClip._x - feeder._x, y:feeder.rocketBotCourse.guidedClip._y, r:feeder.rocketBotCourse.guidedClip._rotation});
_global.setTimeout(this, "rocketBotTimeout", 5);
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ROCKETBOT_READY, this));
}
}
function diveBotTimeout() {
if (feeder.diveBotCourse._framesloaded) {
while (feeder.diveBotCourse._currentframe < feeder.diveBotCourse._totalframes) {
feeder.diveBotCourse.gotoAndStop(feeder.diveBotCourse._currentframe + 1);
diveBotTrail_1.push({x:feeder.diveBotCourse.guidedClip._x - feeder._x, y:feeder.diveBotCourse.guidedClip._y, r:feeder.diveBotCourse.guidedClip._rotation});
}
dispatchEvent(new com.mygame.robotterritories.event.EventObject(DIVEBOT_READY, this));
} else {
_global.setTimeout(this, "diveBotTimeout", 5);
}
}
function diveBotTimeout_2() {
feeder.diveBotCourseGround.gotoAndStop(feeder.diveBotCourseGround._currentframe + 1);
if (feeder.diveBotCourseGround._currentframe < feeder.diveBotCourseGround._totalframes) {
diveBotTrail_2.push({x:feeder.diveBotCourseGround.guidedClip._x, y:feeder.diveBotCourseGround.guidedClip._y});
_global.setTimeout(this, "diveBotTimeout_2", 10);
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(DIVEBOT_READY, this));
}
}
function setDiveBotTrail() {
if (com.mygame.robotterritories.view.enemy.DiveBot.amountArray[level - 1] != 0) {
diveBotTrail_1 = new Array();
diveBotTimeout();
diveBotTrail_2 = new Array();
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(DIVEBOT_READY, this));
}
}
function getDiveBotTrail() {
var _local4 = new Array();
var _local5 = com.mygame.robotterritories.util.Randomizer.getRandomNumber(200, 350);
var _local2 = 0;
while (_local2 < diveBotTrail_1.length) {
if (!feeder.hill.hitTest((diveBotTrail_1[_local2].x + _local5) + feeder._x, (diveBotTrail_1[_local2].y - 55) + feeder._y, true)) {
_local4.push({x:diveBotTrail_1[_local2].x + _local5, y:diveBotTrail_1[_local2].y - 55});
} else {
break;
}
_local2++;
}
var _local8 = _local4[_local4.length - 1].x;
_local4.push({run:true});
var _local3 = 0;
while (_local3 < infantryBotTrail.length) {
if (infantryBotTrail[_local3].x < _local8) {
_local4.push({x:infantryBotTrail[_local3].x, y:infantryBotTrail[_local3].y});
}
_local3++;
}
return(_local4.slice(0, _local4.length - com.mygame.robotterritories.util.Randomizer.getRandomNumber(20, 40)));
}
function setGunCruiserTrail() {
if (com.mygame.robotterritories.view.enemy.GunCruiser.amountArray[level - 1] != 0) {
gunCruiserTrail = new Array();
gunCruiserTimeout();
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(GUNCRUISER_READY, this));
}
}
function gunCruiserTimeout() {
if (feeder.gunCruiserCourse._framesloaded) {
while (feeder.gunCruiserCourse._currentframe < feeder.gunCruiserCourse._totalframes) {
feeder.gunCruiserCourse.gotoAndStop(feeder.gunCruiserCourse._currentframe + 1);
gunCruiserTrail.push({x:feeder.gunCruiserCourse.guidedClip._x - feeder._x, y:feeder.gunCruiserCourse.guidedClip._y, r:feeder.gunCruiserCourse.guidedClip._rotation});
}
dispatchEvent(new com.mygame.robotterritories.event.EventObject(GUNCRUISER_READY, this));
} else {
_global.setTimeout(this, "gunCruiserTimeout", 5);
}
}
function setRocketCruiserTrail() {
if (com.mygame.robotterritories.view.enemy.RocketCruiser.amountArray[level - 1] != 0) {
rocketCruiserTrail = new Array();
rocketCruiserTimeout();
} else {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ROCKETCRUISER_READY, this));
}
}
function rocketCruiserTimeout() {
if (feeder.rocketCruiserCourse._framesloaded) {
while (feeder.rocketCruiserCourse._currentframe < feeder.rocketCruiserCourse._totalframes) {
feeder.rocketCruiserCourse.gotoAndStop(feeder.rocketCruiserCourse._currentframe + 1);
rocketCruiserTrail.push({x:feeder.rocketCruiserCourse.guidedClip._x - feeder._x, y:feeder.rocketCruiserCourse.guidedClip._y, r:feeder.rocketCruiserCourse.guidedClip._rotation});
}
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ROCKETCRUISER_READY, this));
} else {
_global.setTimeout(this, "rocketCruiserTimeout", 5);
}
}
var typeCount = 0;
static var COLOSSUS_READY = "colossusReady";
static var DIVEBOT_READY = "divebotReady";
static var GODMACHINE_READY = "godmachineReady";
static var GUNCRUISER_READY = "guncruiserReady";
static var INFANTRYBOT_READY = "infantrybotReady";
static var MECHJEEP_READY = "mechjeepReady";
static var NUKEBOT_READY = "nukebotReady";
static var ROCKETBOT_READY = "rocketbotReady";
static var ROCKETCRUISER_READY = "rocketcruiserReady";
static var ULTRATANK_READY = "ultratankReady";
}
Symbol 1222 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.IEnemy] Frame 0
interface com.mygame.robotterritories.view.enemy.IEnemy
{
}
Symbol 1223 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.Enemy] Frame 0
class com.mygame.robotterritories.view.enemy.Enemy extends com.mygame.robotterritories.view.ExtendedMovieClip implements com.mygame.robotterritories.view.enemy.IEnemy
{
var trailPoints, _xscale, _yscale, fireTimeout, advanceTimeout, hitarea, ID, lockTarget, localToGlobal, _y, _x, _height, _width, damage, type, oldProj, health, Y_SPEED, X_SPEED, removeEventListener, addEventListener, gotoAndStop, PARENT, gotoAndPlay, lastAdvanceFrame, _currentframe, _rotation, stop;
function Enemy () {
super();
trailPoints = new Array();
}
function onLoad() {
_xscale = 75;
_yscale = 75;
fireTimeout = new com.mygame.robotterritories.util.TimeOut();
advanceTimeout = new com.mygame.robotterritories.util.TimeOut();
hitarea._visible = false;
setup();
}
function setup() {
}
function getId() {
return(ID);
}
function lockOnTarget(b) {
lockTarget._visible = b;
}
function getGlobalLeft() {
var _local2 = {x:0, y:0};
localToGlobal(_local2);
return(_local2.x);
}
function getGlobalTop() {
var _local2 = {x:0, y:0};
localToGlobal(_local2);
return(_local2.y);
}
function getTop() {
return(_y);
}
function getLeft() {
return(_x);
}
function getHeight() {
return(_height);
}
function getWidth() {
return(_width);
}
function getHitarea() {
return(hitarea);
}
function heroImpactHandler() {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().registerHeroHit(this);
}
function getDamage() {
return(damage);
}
function setDestroyed(b) {
destroyed = b;
}
function getSection() {
return(section);
}
function setSection(sec) {
section = sec;
}
function isDestroyed() {
return(destroyed);
}
function isRemoved() {
return(removed);
}
function isLockable() {
return(lockable);
}
function setLockable(b) {
lockable = b;
}
function isPointable() {
return(pointable);
}
function setPointable(b) {
pointable = b;
}
function getType() {
return(type);
}
function removeAdvanceSound() {
}
function setBossExplotion() {
}
function onImpact(proj) {
if (oldProj != proj) {
health = health - proj.damage;
}
oldProj = proj;
if (health <= 0) {
if (firstHit) {
if ((type != "RocketBot") && (type != "InfantryBot")) {
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_missile_impact", com.mygame.robotterritories.util.Randomizer.getRandomNumber(50, 70));
}
}
removeAdvanceSound();
firstHit = false;
}
com.mygame.robotterritories.PointModel.getInstance().increaseTotalPoints(this, proj.damage);
comboMode = true;
Y_SPEED = -5;
X_SPEED = 1;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "bounce");
gotoAndStop("inAir");
fireTimeout.clearTimeout();
advanceTimeout.clearTimeout();
setBossExplotion();
hitCount++;
if (comboTimes >= 25) {
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_missile_impact", com.mygame.robotterritories.util.Randomizer.getRandomNumber(50, 70));
}
gotoAndStop("bigExplotion");
Y_SPEED = -6;
_y = _y - 4;
remove();
}
}
}
function remove() {
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
removed = true;
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().destroyEnemy(this);
var _local3 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 1, true);
_global.setTimeout(this, "removeMovieClip", 500);
}
function bounce() {
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().changeSection(this);
}
if (!PARENT.hill.hitTest(_x + PARENT._x, (_y - 2) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -0.3;
} else {
if ((type != "RocketBot") && (type != "InfantryBot")) {
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_missile_impact", 50);
}
}
gotoAndStop("smallExplotion");
comboMode = false;
remove();
}
var _local2 = {x:0, y:0};
localToGlobal(_local2);
if (((_local2.x < 0) || (_local2.x > 560)) || (_local2.y > 320)) {
remove();
}
}
function register() {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().registerEnemy(this);
}
function start() {
}
function continueAdvance() {
if (health > 0) {
gotoAndPlay(1);
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
}
}
function advance() {
if (_currentframe >= lastAdvanceFrame) {
gotoAndPlay(1);
}
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().changeSection(this);
}
if (trailIndex != trailPoints.length) {
_x = trailPoints[trailIndex].x;
_y = trailPoints[trailIndex].y;
if (trailPoints[trailIndex].r != undefined) {
_rotation = trailPoints[trailIndex].r;
}
trailIndex++;
} else {
stop();
}
}
static var HERO_HIT = "heroHit";
var comboMode = false;
var comboTimes = 0;
var trailIndex = 0;
var hitCount = 0;
var destroyed = false;
var removed = false;
var section = 11;
var lockable = true;
var pointable = true;
var firstHit = true;
}
Symbol 1224 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.EnemyModel] Frame 0
class com.mygame.robotterritories.view.enemy.EnemyModel extends com.mygame.robotterritories.event.EventDispatcher
{
var enemyCollection, sectionCollection, dispatchEvent;
function EnemyModel () {
super();
enemyCollection = new Object();
sectionCollection = new Array({}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {});
}
function resetModel() {
for (var _local2 in enemyCollection) {
enemyCollection[_local2].removeMovieClip();
}
enemyTypeTicker = 0;
enemyCount = 0;
enemyCollection = new Object();
sectionCollection = new Array({}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {});
}
function updateEnemyCount(nbr) {
enemyTypeTicker++;
enemyCount = enemyCount + nbr;
if (enemyTypeTicker == 10) {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ENEMY_COUNT_UPDATED, this));
}
}
function getEnemyCount() {
return(enemyCount);
}
static function getInstance() {
if (instance == null) {
instance = new com.mygame.robotterritories.view.enemy.EnemyModel();
}
return(instance);
}
function registerEnemy(enemy) {
enemyCollection[enemy.getId()] = enemy;
sectionCollection[Math.floor(enemy.getGlobalLeft() / 50)][enemy.getId()] = enemy;
}
function changeSection(en) {
sectionCollection[en.getSection()][en.getId()] = null;
if (en.getType() == "GodMachine") {
sectionCollection[en.getSection() - 1][en.getId()] = null;
sectionCollection[en.getSection() + 1][en.getId()] = null;
}
en.setSection(Math.floor(en.getGlobalLeft() / 50));
sectionCollection[en.getSection()][en.getId()] = en;
if (en.getType() == "GodMachine") {
sectionCollection[en.getSection() - 1][en.getId()] = en;
sectionCollection[en.getSection() + 1][en.getId()] = en;
}
}
function getEnemies() {
return(enemyCollection);
}
function getEnemySection(sec) {
return(sectionCollection[sec]);
}
function destroyEnemy(en) {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(LEAVE_CRATER, en));
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ENEMY_DESTROYED_UPDATED, this));
delete enemyCollection[en.getId()];
delete sectionCollection[en.getSection()][en.getId()];
if (allEnemiesDestroyed()) {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(ALL_ENEMIES_DESTROYED, this));
}
}
function allEnemiesDestroyed() {
var _local2 = true;
for (var _local3 in enemyCollection) {
if (enemyCollection[_local3]) {
_local2 = false;
break;
}
}
return(_local2);
}
function registerHeroHit(en) {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(HERO_HIT, en));
}
static var instance = null;
var enemyCount = 0;
var enemyTypeTicker = 0;
static var ALL_ENEMIES_DESTROYED = "allEnemiesDestroyed";
static var LEAVE_CRATER = "leaveCrater";
static var HERO_HIT = "heroHit";
static var ENEMY_COUNT_UPDATED = "enemyCountUpdated";
static var ENEMY_DESTROYED_UPDATED = "enemyDestroyedUpdated";
}
Symbol 1225 MovieClip [__Packages.com.mygame.robotterritories.util.Randomizer] Frame 0
class com.mygame.robotterritories.util.Randomizer
{
function Randomizer () {
}
static function getRandomNumber(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
}
Symbol 1226 MovieClip [__Packages.com.mygame.robotterritories.PointModel] Frame 0
class com.mygame.robotterritories.PointModel extends com.mygame.robotterritories.event.EventDispatcher
{
static var instance;
var dispatchEvent;
function PointModel () {
super();
}
static function getInstance() {
if (instance == null) {
instance = new com.mygame.robotterritories.PointModel();
}
return(instance);
}
function resetPoints() {
levelPoints = 0;
totalPoints = 0;
}
function increaseTotalPoints(en, damage) {
if ((en.comboMode && (!en.isPointable())) && (damage <= 100)) {
en.comboTimes++;
totalCombo++;
totalPoints = (totalPoints + (pointsIncrease * en.comboTimes)) + 1000;
dispatchEvent(new com.mygame.robotterritories.event.EventObject(COMBO_POINTS_UPDATED, en));
} else if (en.isPointable()) {
en.setPointable(false);
totalPoints = totalPoints + pointsIncrease;
levelPoints = levelPoints + pointsIncrease;
dispatchEvent(new com.mygame.robotterritories.event.EventObject(TOTAL_POINTS_UPDATED, this));
}
}
function getTotalCombos() {
return(totalCombo);
}
function resetCombos() {
totalTotalCombo = totalTotalCombo + totalCombo;
totalCombo = 0;
}
function resetTotalPoints() {
totalPoints = 0;
}
function getLevelPoint() {
return(levelPoints);
}
function resetLevelPoints() {
totalLevelPoints = totalLevelPoints + levelPoints;
levelPoints = 0;
}
function getTotalTotalCombo() {
return(totalTotalCombo);
}
function getTotalLevelPoints() {
return(totalLevelPoints);
}
function updateHighestCombo(c) {
highestCombo = c;
if (highestCombo > totalHighestCombo) {
totalHighestCombo = highestCombo;
}
}
function getHighestCombo() {
return(highestCombo);
}
function getTotalHighestCombo() {
return(totalHighestCombo);
}
function resetHighestCombo() {
highestCombo = 0;
}
function resetTotalHighestCombo() {
totalHighestCombo = 0;
}
function resetTotalTotal() {
totalTotalCombo = 0;
totalLevelPoints = 0;
totalHighestCombo = 0;
}
function getTotalPoint() {
return(totalPoints);
}
static var totalComboReqs = [5, 20, 25, 20, 30, 40, 100, 40, 20, 200, 40, 40, 20, 40, 50, 10, 40, 0, 70, 100];
static var highestComboReqs = [0, 6, 3, 3, 4, 5, 7, 5, 4, 10, 5, 5, 3, 7, 10, 4, 5, 0, 9, 10];
static var COMBO_POINTS_UPDATED = "comboPointsUpdated";
static var TOTAL_POINTS_UPDATED = "totalPointsUpdated";
var pointsIncrease = 100;
var levelPoints = 0;
var totalLevelPoints = 0;
var totalPoints = 0;
var totalCombo = 0;
var highestCombo = 0;
var totalHighestCombo = 0;
var totalTotalCombo = 0;
}
Symbol 1227 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 1228 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.Colossus] Frame 0
class com.mygame.robotterritories.view.enemy.Colossus extends com.mygame.robotterritories.view.enemy.Enemy implements com.mygame.robotterritories.view.enemy.IEnemy
{
var damage, Y_SPEED, health, startHealth, lastAdvanceFrame, register, trailPoints, randomInterval, continueAdvance, fireTimeout, PARENT, _x, _y, X_SPEED, comboMode, removeEventListener, trailIndex, addEventListener, bulletY, getGlobalTop, gotoAndPlay, advanceTimeout, removed, getGlobalLeft, gotoAndStop;
function Colossus () {
super();
}
function setup() {
damage = 75;
Y_SPEED = -5;
health = 5000;
startHealth = health;
lastAdvanceFrame = 93;
start();
}
function start() {
register();
trailPoints = com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().colossusTrail;
trailPoints = trailPoints.slice(0, trailPoints.length - com.mygame.robotterritories.util.Randomizer.getRandomNumber(20, 40));
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(10000, 11000);
continueAdvance();
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_colossus", 30, true);
}
}
function removeAdvanceSound() {
com.midasplayer.fx.SoundManager.stop("snd_colossus");
var _local2 = new com.mygame.robotterritories.util.TimeOut();
_local2.setTimeout(this, "explode", 600);
}
function explode() {
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_hero_explode", 70);
}
}
function bounceButAlive() {
if (!PARENT.hill.hitTest(_x + PARENT._x, (_y - 2) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -0.3;
} else {
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
trailIndex = trailIndex - 15;
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
}
}
function stopAndShoot() {
if ((health > 0) && (!comboMode)) {
if (PARENT.projectileCount < 30) {
PARENT.projectileCount++;
bulletY = getGlobalTop() - 58;
gotoAndPlay("prepareShoot");
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
if (health > 0) {
fireTimeout.setTimeout(this, "fire", 1500);
if (trailIndex != trailPoints.length) {
advanceTimeout.setTimeout(this, "continueAdvance", 3500);
} else {
advanceTimeout.setTimeout(this, "gotoAndPlay", 3500, "lowerGun");
}
}
} else {
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(7000, 9000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
}
}
function setBossExplotion() {
removed = true;
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().destroyEnemy(this);
_global.setTimeout(this, "removeMovieClip", 3000);
}
function fire() {
if (health > 0) {
gotoAndPlay("shoot");
var _local2 = com.mygame.robotterritories.view.enemy.projectiles.BigBullets(PARENT.projectileClip.attachMovie("BigBullets", "BigBullets_" + PARENT.enemyDepth, PARENT.enemyDepth, {HERO:PARENT.parent.hero, IMPACT_GROUND:PARENT.parent.hill, ENEMY:this}));
_local2.addEventListener(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this, "heroImpactHandler");
_local2._x = getGlobalLeft();
_local2._y = bulletY;
PARENT.enemyDepth++;
if (bulletCount < 3) {
fireTimeout.setTimeout(this, "fire", 200);
bulletY = bulletY + 3;
bulletCount++;
} else {
gotoAndStop("reload");
bulletCount = 0;
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(7000, 9000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
}
}
static var LINK = "Colossus";
static var amountArray = [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 5, 0, 0];
static var density = [[10000, 15000], [10000, 15000], [10000, 15000], [10000, 15000], [10000, 15000], [10000, 15000], [10000, 15000], [10000, 15000], [10000, 15000], [10000, 15000], [10000, 15000], [10000, 15000], [40000, 41000], [10000, 15000], [10000, 15000], [10000, 15000], [10000, 15000], [20000, 21000], [10000, 15000], [10000, 15000]];
static var startTime = [0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 1, 0, 0];
var bulletCount = 0;
}
Symbol 1229 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.projectiles.BigBullets] Frame 0
class com.mygame.robotterritories.view.enemy.projectiles.BigBullets extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var ENEMY, addEventListener, heroPoint, HERO, localToGlobal, randomMargin, enemyPoint, _rotation, X_SPEED, Y_SPEED, smokeSet, inAir, rocketPoint, _x, _y, dispatchEvent, removeEventListener, IMPACT_GROUND, hitTest, play;
function BigBullets () {
super();
}
function getId() {
return(ENEMY.getId());
}
function onLoad() {
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "shotFiredHandler");
heroPoint = {x:-HERO._x, y:-HERO._y};
localToGlobal(heroPoint);
randomMargin = com.mygame.robotterritories.util.Randomizer.getRandomNumber(-4, 5);
enemyPoint = {x:0, y:0};
localToGlobal(enemyPoint);
var _local2 = enemyPoint.x - HERO._x;
var _local3 = enemyPoint.y - HERO._y;
var _local5 = Math.atan2(_local3, _local2);
var _local4 = convert(_local5);
_rotation = Math.round(_local4);
enemyPoint = {x:0, y:0};
ENEMY.localToGlobal(enemyPoint);
X_SPEED = (heroPoint.x / ((enemyPoint.x - HERO._x) / 15)) + (randomMargin / 10);
Y_SPEED = (heroPoint.y / ((enemyPoint.x - HERO._x) / 15)) + (randomMargin / 10);
smokeSet = new com.mygame.robotterritories.view.SmokeSet(this, ENEMY.PARENT.parent.smokeAttatchClip, 2, _rotation + 90, false, "flare_3");
smokeSet.start();
ENEMY.PARENT.projectileArray.push(this);
}
function removeMovieClip() {
smokeSet.stop();
super.removeMovieClip();
}
function isInAir() {
return(inAir);
}
function shotFiredHandler() {
rocketPoint = {x:0, y:0};
localToGlobal(rocketPoint);
_x = _x - X_SPEED;
_y = _y - Y_SPEED;
inAir = true;
if (rocketPoint.x < 160) {
if (HERO.hitTest(rocketPoint.x, rocketPoint.y, true)) {
inAir = false;
dispatchEvent(new com.mygame.robotterritories.event.EventObject(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this));
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
onImpact();
}
}
if (IMPACT_GROUND.hitTest(rocketPoint.x, rocketPoint.y, true)) {
inAir = false;
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
}
var _local2 = com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().getProjectileSection(Math.floor(rocketPoint.x / 50));
for (var _local3 in _local2) {
if (hitTest(_local2[_local3]) && (_local2[_local3].isHitable())) {
_local2[_local3].onImpact();
inAir = false;
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
removeMovieClip;
}
}
if ((((rocketPoint.x < 0) || (rocketPoint.x > 740)) || (rocketPoint.y < 0)) || (rocketPoint.y > 420)) {
inAir = false;
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
}
}
function convert(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
function onImpact() {
ENEMY.PARENT.projectileCount--;
smokeSet.stop();
play();
var _local3 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 0.5, true);
var _local2 = new com.mygame.robotterritories.util.TimeOut();
_local2.setTimeout(this, "removeMovieClip", 500);
}
}
Symbol 1230 MovieClip [__Packages.com.mygame.robotterritories.view.SmokeSet] Frame 0
class com.mygame.robotterritories.view.SmokeSet
{
var link, rotSpeed, isRotate, orbitCords, projectile, container, density, startAngle, flare_1, flare_2, flare_3, flare_4, flare_5, flare_6, flare_7, intervalId;
function SmokeSet (p_projectile, p_container, p_density, p_startAngle, p_isRotate, p_link, p_rotSpeed) {
link = p_link;
rotSpeed = p_rotSpeed;
isRotate = p_isRotate;
orbitCords = new Array();
projectile = p_projectile;
container = p_container;
density = p_density;
startAngle = p_startAngle;
flare_1 = com.mygame.robotterritories.view.ExtendedMovieClip(container.attachMovie(link, container.getNextHighestDepth() + projectile.getId(), container.getNextHighestDepth()));
flare_2 = com.mygame.robotterritories.view.ExtendedMovieClip(container.attachMovie(link, container.getNextHighestDepth() + projectile.getId(), container.getNextHighestDepth()));
flare_3 = com.mygame.robotterritories.view.ExtendedMovieClip(container.attachMovie(link, container.getNextHighestDepth() + projectile.getId(), container.getNextHighestDepth()));
flare_4 = com.mygame.robotterritories.view.ExtendedMovieClip(container.attachMovie(link, container.getNextHighestDepth() + projectile.getId(), container.getNextHighestDepth()));
flare_5 = com.mygame.robotterritories.view.ExtendedMovieClip(container.attachMovie(link, container.getNextHighestDepth() + projectile.getId(), container.getNextHighestDepth()));
flare_6 = com.mygame.robotterritories.view.ExtendedMovieClip(container.attachMovie(link, container.getNextHighestDepth() + projectile.getId(), container.getNextHighestDepth()));
flare_7 = com.mygame.robotterritories.view.ExtendedMovieClip(container.attachMovie(link, container.getNextHighestDepth() + projectile.getId(), container.getNextHighestDepth()));
if (link == "flare_6") {
flare_1._visible = false;
}
flare_2._visible = false;
flare_3._visible = false;
flare_4._visible = false;
flare_5._visible = false;
flare_6._visible = false;
flare_7._visible = false;
flare_1._rotation = startAngle + 90;
flare_2._rotation = startAngle + 90;
flare_3._rotation = startAngle + 90;
flare_4._rotation = startAngle + 90;
flare_5._rotation = startAngle + 90;
flare_6._rotation = startAngle + 90;
flare_7._rotation = startAngle + 90;
flare_1._y = -5;
flare_2._y = -5;
flare_3._y = -5;
flare_4._y = -5;
flare_5._y = -5;
flare_6._y = -5;
flare_7._y = -5;
}
function start() {
flare_7.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "update");
flare_1._alpha = 90;
flare_2._alpha = 80;
flare_3._alpha = 65;
flare_4._alpha = 40;
flare_5._alpha = 30;
flare_6._alpha = 15;
flare_7._alpha = 8;
_global.setTimeout(this, "pause", 500);
}
function pause() {
flare_4.onEnterFrame = undefined;
_global.clearInterval(intervalId);
}
function stop() {
flare_7.removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
var _local9 = new mx.transitions.Tween(flare_1, "_alpha", mx.transitions.easing.None.easeOut, 90, 0, 0.2, true);
var _local8 = new mx.transitions.Tween(flare_2, "_alpha", mx.transitions.easing.None.easeOut, 80, 0, 0.2, true);
var _local7 = new mx.transitions.Tween(flare_3, "_alpha", mx.transitions.easing.None.easeOut, 65, 0, 0.2, true);
var _local6 = new mx.transitions.Tween(flare_4, "_alpha", mx.transitions.easing.None.easeOut, 40, 0, 0.2, true);
var _local5 = new mx.transitions.Tween(flare_5, "_alpha", mx.transitions.easing.None.easeOut, 30, 0, 0.2, true);
var _local4 = new mx.transitions.Tween(flare_6, "_alpha", mx.transitions.easing.None.easeOut, 15, 0, 0.2, true);
var _local3 = new mx.transitions.Tween(flare_7, "_alpha", mx.transitions.easing.None.easeOut, 8, 0, 0.2, true);
_global.setTimeout(this, "remove", 200);
}
function remove() {
flare_1.removeMovieClip();
flare_2.removeMovieClip();
flare_3.removeMovieClip();
flare_4.removeMovieClip();
flare_5.removeMovieClip();
flare_6.removeMovieClip();
flare_7.removeMovieClip();
}
function getRotation(x, y) {
var _local3 = Math.atan2(y, x);
var _local2 = convert(_local3);
return(_local2);
}
function convert(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
function update() {
orbitCords.push({x:projectile._x, y:projectile._y});
flare_1._x = orbitCords[index].x;
flare_1._y = orbitCords[index].y;
flare_1._visible = true;
if (orbitCords.length > (1 * density)) {
flare_2._x = orbitCords[index - (1 * density)].x;
flare_2._y = orbitCords[index - (1 * density)].y;
flare_2._visible = true;
flare_1._rotation = (isRotate ? (getRotation(flare_1._x - flare_2._x, flare_1._y - flare_2._y)) : (startAngle + 90));
if (orbitCords.length > (2 * density)) {
flare_3._x = orbitCords[index - (2 * density)].x;
flare_3._y = orbitCords[index - (2 * density)].y;
flare_3._visible = true;
flare_2._rotation = (isRotate ? (getRotation(flare_2._x - flare_3._x, flare_2._y - flare_3._y)) : (startAngle + 90));
if (orbitCords.length > (3 * density)) {
flare_4._x = orbitCords[index - (3 * density)].x;
flare_4._y = orbitCords[index - (3 * density)].y;
flare_4._visible = true;
flare_3._rotation = (isRotate ? (getRotation(flare_3._x - flare_4._x, flare_3._y - flare_4._y)) : (startAngle + 90));
if (orbitCords.length > (4 * density)) {
flare_5._x = orbitCords[index - (4 * density)].x;
flare_5._y = orbitCords[index - (4 * density)].y;
flare_5._visible = true;
flare_4._rotation = (isRotate ? (getRotation(flare_4._x - flare_5._x, flare_4._y - flare_5._y)) : (startAngle + 90));
if (orbitCords.length > (5 * density)) {
flare_6._x = orbitCords[index - (5 * density)].x;
flare_6._y = orbitCords[index - (5 * density)].y;
flare_6._visible = true;
flare_5._rotation = (isRotate ? (getRotation(flare_5._x - flare_6._x, flare_5._y - flare_6._y)) : (startAngle + 90));
if (orbitCords.length > (6 * density)) {
flare_7._x = orbitCords[index - (6 * density)].x;
flare_7._y = orbitCords[index - (6 * density)].y;
flare_7._visible = true;
flare_6._rotation = (isRotate ? (getRotation(flare_6._x - flare_7._x, flare_6._y - flare_7._y)) : (startAngle + 90));
flare_7._rotation = (isRotate ? (flare_6._rotation) : (startAngle + 90));
}
}
}
}
}
}
index++;
}
var index = 0;
var loadTicker = 0;
}
Symbol 1231 MovieClip [__Packages.com.mygame.robotterritories.view.hero.HeroProjectileModel] Frame 0
class com.mygame.robotterritories.view.hero.HeroProjectileModel extends com.mygame.robotterritories.event.EventDispatcher
{
static var instance;
var projCollection, sectionCollection;
function HeroProjectileModel () {
super();
projCollection = new Object();
sectionCollection = new Array({}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {});
}
static function getInstance() {
if (instance == null) {
instance = new com.mygame.robotterritories.view.hero.HeroProjectileModel();
}
return(instance);
}
function resetModel() {
for (var _local2 in projCollection) {
projCollection[_local2].removeMovieClip();
}
projCollection = new Object();
sectionCollection = new Array({}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {});
}
function getProjectileSection(sec) {
return(sectionCollection[sec]);
}
function changeSection(proj) {
sectionCollection[proj.getSection()][proj.getId()] = null;
proj.setSection(Math.floor(proj.getGlobalLeft() / 50));
sectionCollection[proj.getSection()][proj.getId()] = proj;
}
function registerRocket(proj) {
projCollection[proj.getId()] = proj;
sectionCollection[Math.floor(proj.getGlobalLeft() / 50)][proj.getId()] = proj;
}
function destroyProjectile(proj) {
delete projCollection[proj.getId()];
delete sectionCollection[proj.getSection()][proj.getId()];
}
function getProjectiles() {
return(projCollection);
}
static var LEAVE_CRATER = "leaveCrater";
}
Symbol 1232 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.GodMachine] Frame 0
class com.mygame.robotterritories.view.enemy.GodMachine extends com.mygame.robotterritories.view.enemy.Enemy implements com.mygame.robotterritories.view.enemy.IEnemy
{
var damage, Y_SPEED, health, type, startHealth, lastAdvanceFrame, register, trailPoints, randomInterval, continueAdvance, fireTimeout, PARENT, _x, _y, X_SPEED, comboMode, removeEventListener, trailIndex, addEventListener, bulletY, gotoAndPlay, advanceTimeout, removed, getGlobalLeft, getGlobalTop;
function GodMachine () {
super();
}
function setup() {
damage = 200;
Y_SPEED = -5;
health = 5000;
type = "GodMachine";
startHealth = health;
lastAdvanceFrame = 57;
start();
}
function start() {
register();
trailPoints = com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().colossusTrail;
trailPoints = trailPoints.slice(0, trailPoints.length - com.mygame.robotterritories.util.Randomizer.getRandomNumber(45, 70));
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(9000, 10000);
continueAdvance();
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
function bounceButAlive() {
if (!PARENT.hill.hitTest(_x + PARENT._x, (_y - 2) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -0.3;
} else {
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
trailIndex = trailIndex - 15;
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
}
}
function stopAndShoot() {
if ((health > 0) && (!comboMode)) {
if (PARENT.projectileCount < 30) {
PARENT.projectileCount++;
bulletY = _y - 63;
gotoAndPlay("prepareShoot");
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
fireTimeout.setTimeout(this, "fire", 1000);
if (trailIndex != trailPoints.length) {
advanceTimeout.setTimeout(this, "continueAdvance", 2000);
} else {
advanceTimeout.setTimeout(this, "gotoAndPlay", 2000, "lowerGun");
}
} else {
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(5000, 9000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
}
}
function removeAdvanceSound() {
var _local2 = new com.mygame.robotterritories.util.TimeOut();
_local2.setTimeout(this, "explode", 1600);
}
function explode() {
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_hero_explode", 70);
}
}
function setBossExplotion() {
removed = true;
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().destroyEnemy(this);
_global.setTimeout(this, "removeMovieClip", 3000);
}
function fire() {
gotoAndPlay("shoot");
var _local2 = com.mygame.robotterritories.view.enemy.projectiles.BigMissiles(PARENT.projectileClip.attachMovie("BigMissiles", "BigMissiles_" + PARENT.enemyDepth, PARENT.enemyDepth, {HERO:PARENT.parent.hero, IMPACT_GROUND:PARENT.parent.hill, ENEMY:this}));
_local2.addEventListener(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this, "heroImpactHandler");
_local2._x = getGlobalLeft() - 10;
_local2._y = getGlobalTop() - 80;
if (bulletCount < 2) {
fireTimeout.setTimeout(this, "fire", 200);
bulletCount++;
} else {
bulletCount = 0;
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(3000, 6000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
PARENT.enemyDepth++;
}
static var LINK = "GodMachine";
static var amountArray = [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 4];
static var density = [[15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [15000, 20000], [79000, 80000], [15000, 20000], [15000, 20000], [40000, 50000]];
static var startTime = [0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 10, 45, 0, 10];
var bulletCount = 0;
}
Symbol 1233 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.projectiles.BigMissiles] Frame 0
class com.mygame.robotterritories.view.enemy.projectiles.BigMissiles extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var ENEMY, addEventListener, heroPoint, HERO, localToGlobal, randomMargin, enemyPoint, _rotation, X_SPEED, Y_SPEED, smokeSet, inAir, rocketPoint, _x, _y, dispatchEvent, removeEventListener, IMPACT_GROUND, hitTest, play;
function BigMissiles () {
super();
}
function getId() {
return(ENEMY.getId());
}
function onLoad() {
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "shotFiredHandler");
heroPoint = {x:-HERO._x, y:-HERO._y};
localToGlobal(heroPoint);
randomMargin = com.mygame.robotterritories.util.Randomizer.getRandomNumber(-2, 4);
enemyPoint = {x:0, y:0};
localToGlobal(enemyPoint);
var _local2 = enemyPoint.x - HERO._x;
var _local3 = enemyPoint.y - HERO._y;
var _local5 = Math.atan2(_local3, _local2);
var _local4 = convert(_local5);
_rotation = Math.round(_local4);
enemyPoint = {x:0, y:0};
ENEMY.localToGlobal(enemyPoint);
X_SPEED = (heroPoint.x / ((enemyPoint.x - HERO._x) / 20)) + (randomMargin / 10);
Y_SPEED = (heroPoint.y / ((enemyPoint.x - HERO._x) / 20)) + (randomMargin / 10);
smokeSet = new com.mygame.robotterritories.view.SmokeSet(this, ENEMY.PARENT.parent.smokeAttatchClip, 2, _rotation + 90, false, "flare_6");
smokeSet.start();
ENEMY.PARENT.projectileArray.push(this);
}
function removeMovieClip() {
smokeSet.stop();
super.removeMovieClip();
}
function isInAir() {
return(inAir);
}
function shotFiredHandler() {
rocketPoint = {x:0, y:0};
localToGlobal(rocketPoint);
_x = _x - X_SPEED;
_y = _y - Y_SPEED;
inAir = true;
if (rocketPoint.x < 160) {
if (HERO.hitTest(rocketPoint.x, rocketPoint.y, true)) {
inAir = false;
dispatchEvent(new com.mygame.robotterritories.event.EventObject(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this));
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
onImpact();
}
}
if (IMPACT_GROUND.hitTest(rocketPoint.x, rocketPoint.y, true)) {
inAir = false;
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
}
var _local2 = com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().getProjectileSection(Math.floor(rocketPoint.x / 50));
for (var _local3 in _local2) {
if (hitTest(_local2[_local3]) && (_local2[_local3].isHitable())) {
_local2[_local3].onImpact();
inAir = false;
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
removeMovieClip;
}
}
if ((((rocketPoint.x < 0) || (rocketPoint.x > 740)) || (rocketPoint.y < 0)) || (rocketPoint.y > 420)) {
inAir = false;
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
}
}
function convert(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
function onImpact() {
ENEMY.PARENT.projectileCount--;
smokeSet.stop();
play();
var _local3 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 0.8, true);
var _local2 = new com.mygame.robotterritories.util.TimeOut();
_local2.setTimeout(this, "removeMovieClip", 800);
}
}
Symbol 1234 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.MechJeep] Frame 0
class com.mygame.robotterritories.view.enemy.MechJeep extends com.mygame.robotterritories.view.enemy.Enemy implements com.mygame.robotterritories.view.enemy.IEnemy
{
var damage, Y_SPEED, health, startHealth, lastAdvanceFrame, register, trailPoints, randomInterval, continueAdvance, fireTimeout, PARENT, _x, _y, X_SPEED, comboMode, removeEventListener, trailIndex, addEventListener, section, getGlobalLeft, localToGlobal, _rotation, barrel, _currentframe, gotoAndPlay, stop, gotoAndStop, advanceTimeout, getGlobalTop;
function MechJeep () {
super();
}
function setup() {
damage = 10;
Y_SPEED = -5;
health = 500;
startHealth = health;
lastAdvanceFrame = 12;
start();
}
function start() {
register();
trailPoints = com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().mechJeepTrail;
trailPoints = trailPoints.slice(0, trailPoints.length - com.mygame.robotterritories.util.Randomizer.getRandomNumber(20, 40));
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(2500, 7000);
continueAdvance();
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
function bounceButAlive() {
if (!PARENT.hill.hitTest(_x + PARENT._x, (_y - 2) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -0.3;
} else {
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
trailIndex = trailIndex - 15;
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
}
}
function advance() {
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().changeSection(this);
}
var _local2 = {x:0, y:0};
localToGlobal(_local2);
var _local3 = PARENT.parent.hero._x - _local2.x;
var _local4 = PARENT.parent.hero._y - _local2.y;
var _local6 = Math.atan2(_local4, _local3);
var _local5 = convert(_local6);
barrel._rotation = (Math.round(_local5) - _rotation) + 10;
if (_currentframe >= lastAdvanceFrame) {
gotoAndPlay(1);
}
if (trailIndex != trailPoints.length) {
_x = trailPoints[trailIndex].x;
_y = trailPoints[trailIndex].y;
if (trailPoints[trailIndex].r != undefined) {
_rotation = trailPoints[trailIndex].r;
}
trailIndex++;
} else {
stop();
}
}
function convert(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
function removeAdvanceSound() {
PARENT.parent.setParticleExplotion(this);
}
function stopAndShoot() {
if ((health > 0) && (!comboMode)) {
if (PARENT.projectileCount < 30) {
PARENT.projectileCount++;
gotoAndStop("prepareShoot");
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
fireTimeout.setTimeout(this, "fire", 1000);
advanceTimeout.setTimeout(this, "continueAdvance", 2000);
} else {
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(5000, 9000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
}
}
function fire() {
barrel.play();
gotoAndPlay("shoot");
var _local2 = com.mygame.robotterritories.view.enemy.projectiles.Gun(PARENT.projectileClip.attachMovie("Gun", "Gun_" + PARENT.enemyDepth, PARENT.enemyDepth, {HERO:PARENT.parent.hero, IMPACT_GROUND:PARENT.parent.hill, ENEMY:this}));
_local2.addEventListener(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this, "heroImpactHandler");
_local2._x = getGlobalLeft() - 1;
_local2._y = getGlobalTop() - 5;
PARENT.enemyDepth++;
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(2500, 7000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
static var LINK = "MechJeep";
static var amountArray = [4, 8, 5, 8, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 15, 0, 20, 0, 0, 16];
static var density = [[6000, 9000], [6000, 9000], [5000, 9000], [5000, 9000], [0, 10], [7000, 15000], [7000, 15000], [7000, 15000], [7000, 15000], [7000, 15000], [8000, 14000], [10000, 14000], [7000, 15000], [7000, 15000], [8000, 10000], [7000, 15000], [5000, 7000], [7000, 15000], [7000, 15000], [12000, 14000]];
static var startTime = [50, 40, 10, 50, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 10, 5, 10, 10, 5];
}
Symbol 1235 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.projectiles.Gun] Frame 0
class com.mygame.robotterritories.view.enemy.projectiles.Gun extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var addEventListener, heroPoint, HERO, localToGlobal, enemyPoint, ENEMY, randomMargin, cacheAsBitmap, inAir, rocketPoint, _x, _y, removeEventListener, dispatchEvent, IMPACT_GROUND, play;
function Gun () {
super();
}
function onLoad() {
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "shotFiredHandler");
heroPoint = {x:-HERO._x, y:-HERO._y};
localToGlobal(heroPoint);
enemyPoint = {x:0, y:0};
ENEMY.localToGlobal(enemyPoint);
randomMargin = com.mygame.robotterritories.util.Randomizer.getRandomNumber(-2, 4);
X_SPEED = (heroPoint.x / ((enemyPoint.x - HERO._x) / 10)) + (randomMargin / 10);
Y_SPEED = (heroPoint.y / ((enemyPoint.x - HERO._x) / 10)) + (randomMargin / 10);
GRAVITY = GRAVITY / (heroPoint.y / (enemyPoint.x - HERO._x));
cacheAsBitmap = true;
ENEMY.PARENT.projectileArray.push(this);
}
function removeMovieClip() {
super.removeMovieClip();
}
function isInAir() {
return(inAir);
}
function shotFiredHandler() {
rocketPoint = {x:0, y:0};
localToGlobal(rocketPoint);
_x = _x - X_SPEED;
_y = _y - Y_SPEED;
inAir = true;
if (rocketPoint.x < 160) {
if (HERO.hitTest(rocketPoint.x, rocketPoint.y, true)) {
inAir = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
dispatchEvent(new com.mygame.robotterritories.event.EventObject(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this));
onImpact();
}
}
if (IMPACT_GROUND.hitTest(rocketPoint.x, rocketPoint.y, true)) {
inAir = false;
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
}
if ((((rocketPoint.x < 0) || (rocketPoint.x > 740)) || (rocketPoint.y < 0)) || (rocketPoint.y > 420)) {
inAir = false;
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
}
}
function onImpact() {
ENEMY.PARENT.projectileCount--;
play();
var _local3 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 0.5, true);
var _local2 = new com.mygame.robotterritories.util.TimeOut();
_local2.setTimeout(this, "removeMovieClip", 500);
}
var Y_SPEED = 0;
var X_SPEED = 0;
var GRAVITY = 0.08;
var FRICTION = 0.995;
}
Symbol 1236 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.UltraTank] Frame 0
class com.mygame.robotterritories.view.enemy.UltraTank extends com.mygame.robotterritories.view.enemy.Enemy implements com.mygame.robotterritories.view.enemy.IEnemy
{
var _xscale, _yscale, damage, Y_SPEED, health, startHealth, lastAdvanceFrame, register, trailPoints, randomInterval, continueAdvance, fireTimeout, PARENT, _x, _y, X_SPEED, comboMode, removeEventListener, trailIndex, addEventListener, gotoAndStop, advanceTimeout, section, getGlobalLeft, localToGlobal, _rotation, barrel, _currentframe, gotoAndPlay, stop, rocketOffset, getGlobalTop;
function UltraTank () {
super();
}
function setup() {
_xscale = 60;
_yscale = 60;
damage = 20;
Y_SPEED = -5;
health = 800;
startHealth = health;
lastAdvanceFrame = 12;
start();
}
function start() {
register();
trailPoints = com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().mechJeepTrail;
trailPoints = trailPoints.slice(0, trailPoints.length - com.mygame.robotterritories.util.Randomizer.getRandomNumber(20, 40));
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(2500, 7000);
continueAdvance();
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
function bounceButAlive() {
if (!PARENT.hill.hitTest(_x + PARENT._x, (_y - 2) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -0.3;
} else {
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
trailIndex = trailIndex - 15;
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
}
}
function removeAdvanceSound() {
PARENT.parent.setParticleExplotion(this);
}
function stopAndShoot() {
if ((health > 0) && (!comboMode)) {
if (PARENT.projectileCount < 30) {
PARENT.projectileCount++;
gotoAndStop("prepareShoot");
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
fireTimeout.setTimeout(this, "fire", 1000);
advanceTimeout.setTimeout(this, "continueAdvance", 2000);
} else {
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(5000, 9000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
}
}
function advance() {
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().changeSection(this);
}
var _local2 = {x:0, y:0};
localToGlobal(_local2);
var _local3 = PARENT.parent.hero._x - _local2.x;
var _local4 = PARENT.parent.hero._y - _local2.y;
var _local6 = Math.atan2(_local4, _local3);
var _local5 = convert(_local6);
barrel._rotation = (Math.round(_local5) - _rotation) + 10;
if (_currentframe >= lastAdvanceFrame) {
gotoAndPlay(1);
}
if (trailIndex != trailPoints.length) {
_x = trailPoints[trailIndex].x;
_y = trailPoints[trailIndex].y;
if (trailPoints[trailIndex].r != undefined) {
_rotation = trailPoints[trailIndex].r;
}
trailIndex++;
} else {
stop();
}
}
function convert(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
function fire() {
gotoAndPlay("shoot");
barrel.play();
var _local2 = com.mygame.robotterritories.view.enemy.projectiles.Missile(PARENT.projectileClip.attachMovie("Missile", "Missile_" + PARENT.enemyDepth, PARENT.enemyDepth, {HERO:PARENT.parent.hero, IMPACT_GROUND:PARENT.parent.hill, ENEMY:this}));
_local2.addEventListener(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this, "heroImpactHandler");
_local2._x = getGlobalLeft() + rocketOffset._x;
_local2._y = getGlobalTop() + rocketOffset._y;
PARENT.enemyDepth++;
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(2500, 7000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
static var LINK = "UltraTank";
static var amountArray = [0, 2, 5, 0, 10, 0, 7, 0, 0, 12, 0, 11, 0, 8, 0, 20, 0, 0, 0, 35];
static var density = [[1000, 3000], [30000, 32000], [17000, 20000], [1000, 3000], [16000, 18000], [1000, 3000], [17000, 20000], [1000, 3000], [1000, 3000], [15000, 17000], [1000, 3000], [14000, 16000], [1000, 3000], [12000, 15000], [1000, 3000], [5000, 7000], [1000, 3000], [1000, 3000], [1000, 3000], [6000, 7000]];
static var startTime = [20, 60, 30, 0, 5, 0, 30, 0, 20, 5, 20, 20, 20, 20, 0, 1, 20, 20, 20, 1];
}
Symbol 1237 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.projectiles.Missile] Frame 0
class com.mygame.robotterritories.view.enemy.projectiles.Missile extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var ENEMY, addEventListener, heroPoint, HERO, localToGlobal, randomMargin, enemyPoint, _rotation, X_SPEED, Y_SPEED, cacheAsBitmap, smokeSet, hitarea, inAir, rocketPoint, _x, _y, check, dispatchEvent, removeEventListener, IMPACT_GROUND, play;
function Missile () {
super();
}
function getId() {
return(ENEMY.getId());
}
function onLoad() {
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "shotFiredHandler");
heroPoint = {x:-HERO._x, y:-HERO._y};
localToGlobal(heroPoint);
randomMargin = com.mygame.robotterritories.util.Randomizer.getRandomNumber(-2, 4);
enemyPoint = {x:0, y:0};
ENEMY.localToGlobal(enemyPoint);
var _local2 = enemyPoint.x - HERO._x;
var _local3 = enemyPoint.y - HERO._y;
var _local5 = Math.atan2(_local3, _local2);
var _local4 = convert(_local5);
_rotation = Math.round(_local4);
enemyPoint = {x:0, y:0};
ENEMY.localToGlobal(enemyPoint);
X_SPEED = (heroPoint.x / ((enemyPoint.x - HERO._x) / 7)) + (randomMargin / 10);
Y_SPEED = (heroPoint.y / ((enemyPoint.x - HERO._x) / 7)) + (randomMargin / 10);
cacheAsBitmap = true;
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_missile", 70);
}
smokeSet = new com.mygame.robotterritories.view.SmokeSet(this, ENEMY.PARENT.parent.smokeAttatchClip, 2, _rotation + 90, false, "flare");
smokeSet.start();
ENEMY.PARENT.projectileArray.push(this);
hitarea._visible = false;
}
function removeMovieClip() {
smokeSet.stop();
super.removeMovieClip();
}
function isInAir() {
return(inAir);
}
function shotFiredHandler() {
rocketPoint = {x:0, y:0};
localToGlobal(rocketPoint);
_x = _x - X_SPEED;
_y = _y - Y_SPEED;
inAir = true;
if (check) {
if (rocketPoint.x < 160) {
if (HERO.hitTest(rocketPoint.x, rocketPoint.y, true)) {
inAir = false;
dispatchEvent(new com.mygame.robotterritories.event.EventObject(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this));
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
onImpact();
}
}
if (IMPACT_GROUND.hitTest(rocketPoint.x, rocketPoint.y, true)) {
inAir = false;
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
}
var _local2 = com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().getProjectileSection(Math.floor(rocketPoint.x / 50));
for (var _local3 in _local2) {
if (hitarea.hitTest(_local2[_local3]) && (_local2[_local3].isHitable())) {
_local2[_local3].onImpact();
inAir = false;
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
removeMovieClip;
}
}
if ((((rocketPoint.x < 0) || (rocketPoint.x > 740)) || (rocketPoint.y < 0)) || (rocketPoint.y > 420)) {
inAir = false;
onImpact();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
}
check = false;
} else {
check = true;
}
}
function convert(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
function onImpact() {
ENEMY.PARENT.projectileCount--;
smokeSet.stop();
play();
var _local3 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 0.5, true);
var _local2 = new com.mygame.robotterritories.util.TimeOut();
_local2.setTimeout(this, "removeMovieClip", 500);
}
}
Symbol 1238 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.NukeBot] Frame 0
class com.mygame.robotterritories.view.enemy.NukeBot extends com.mygame.robotterritories.view.enemy.Enemy implements com.mygame.robotterritories.view.enemy.IEnemy
{
var damage, Y_SPEED, health, lastAdvanceFrame, startHealth, PARENT, register, trailPoints, randomInterval, continueAdvance, jumpTimeout, _x, _y, X_SPEED, comboMode, removeEventListener, trailIndex, addEventListener, getGlobalLeft, getGlobalTop, nukeBotPoint, localToGlobal, section, armed, gotoAndPlay, heroImpactHandler, _currentframe;
function NukeBot () {
super();
}
function setup() {
damage = 100;
Y_SPEED = -5;
health = 250;
lastAdvanceFrame = 15;
startHealth = health;
start();
}
function removeAdvanceSound() {
PARENT.parent.setParticleExplotion(this);
}
function start() {
register();
trailPoints = com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().mechJeepTrail;
trailPoints = trailPoints.slice(0, trailPoints.length - com.mygame.robotterritories.util.Randomizer.getRandomNumber(20, 40));
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(2000, 5000);
continueAdvance();
jumpTimeout = new com.mygame.robotterritories.util.TimeOut();
if (_x > 300) {
jumpTimeout.setTimeout(this, "jump", randomInterval);
}
}
function bounceButAlive() {
if (!PARENT.hill.hitTest(_x + PARENT._x, (_y - 2) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -0.3;
} else {
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
trailIndex = trailIndex - 15;
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
}
}
function bigBounce() {
if ((getGlobalLeft() < 0) || (getGlobalTop() > 500)) {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().destroyEnemy(this);
_global.setTimeout(this, "removeMovieClip", 1000);
}
nukeBotPoint = {x:0, y:0};
localToGlobal(nukeBotPoint);
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().changeSection(this);
}
if (armed && (PARENT.parent.hero.hitTest(getGlobalLeft(), getGlobalTop(), true))) {
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
gotoAndPlay("bigExplotion");
jumpTimeout.clearTimeout();
heroImpactHandler();
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().destroyEnemy(this);
var _local4 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 1, true);
_global.setTimeout(this, "removeMovieClip", 1000);
} else if (!PARENT.hill.hitTest(_x + PARENT._x, (_y - 10) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -1;
if (_currentframe >= 28) {
gotoAndPlay("roll");
}
} else {
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
X_SPEED = 0;
if (_x < 300) {
jumpTimeout.clearTimeout();
}
gotoAndPlay(1);
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
var _local3 = 0;
while (_local3 < trailPoints.length) {
if ((Math.round(trailPoints[_local3].x) > (Math.round(_x) - 3)) && (Math.round(trailPoints[_local3].x) < Math.round(_x))) {
trailIndex = _local3;
}
_local3++;
}
}
}
function advance() {
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().changeSection(this);
}
if (_currentframe >= lastAdvanceFrame) {
gotoAndPlay(1);
}
if (trailIndex != trailPoints.length) {
_x = trailPoints[trailIndex].x;
_y = trailPoints[trailIndex].y;
trailIndex++;
} else {
jump();
armed = true;
}
}
function jump() {
gotoAndPlay("jump");
Y_SPEED = -7;
X_SPEED = -3;
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(2500, 5000);
if (_x > 300) {
jumpTimeout.setTimeout(this, "jump", randomInterval);
}
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "bigBounce");
}
static var LINK = "Nukebot";
static var amountArray = [0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 15, 0, 0, 0, 15, 0, 16, 0, 0, 0];
static var density = [[1000, 5000], [1000, 5000], [1000, 5000], [1000, 5000], [1000, 5000], [6000, 8000], [1000, 5000], [1000, 5000], [1000, 5000], [1000, 5000], [6000, 8000], [1000, 5000], [1000, 5000], [1000, 5000], [7000, 10000], [1000, 5000], [6000, 8000], [1000, 5000], [1000, 5000], [1000, 5000]];
static var startTime = [0, 0, 0, 0, 0, 50, 0, 0, 15, 15, 30, 15, 15, 15, 20, 15, 20, 1, 15, 15];
}
Symbol 1239 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.InfantryBot] Frame 0
class com.mygame.robotterritories.view.enemy.InfantryBot extends com.mygame.robotterritories.view.enemy.Enemy implements com.mygame.robotterritories.view.enemy.IEnemy
{
var type, damage, _xscale, _yscale, Y_SPEED, health, startHealth, lastAdvanceFrame, register, trailPoints, randomInterval, continueAdvance, fireTimeout, PARENT, _x, _y, X_SPEED, comboMode, removeEventListener, trailIndex, addEventListener, gotoAndStop, advanceTimeout, gotoAndPlay, getGlobalLeft, getGlobalTop;
function InfantryBot () {
super();
}
function setup() {
type = "InfantryBot";
damage = 10;
_xscale = 100;
_yscale = 100;
Y_SPEED = -5;
health = 50;
startHealth = health;
lastAdvanceFrame = 12;
start();
}
function start() {
register();
trailPoints = com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().infantryBotTrail;
trailPoints = trailPoints.slice(0, trailPoints.length - com.mygame.robotterritories.util.Randomizer.getRandomNumber(20, 40));
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(5000, 10000);
continueAdvance();
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
function bounceButAlive() {
if (!PARENT.hill.hitTest(_x + PARENT._x, (_y - 2) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -0.3;
} else {
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
trailIndex = trailIndex - 15;
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
}
}
function stopAndShoot() {
if ((health > 0) && (!comboMode)) {
if (PARENT.projectileCount < 30) {
PARENT.projectileCount++;
gotoAndStop("prepareShoot");
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
fireTimeout.setTimeout(this, "fire", 1000);
advanceTimeout.setTimeout(this, "continueAdvance", 2000);
} else {
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(5000, 9000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
}
}
function fire() {
gotoAndPlay("shoot");
var _local2 = com.mygame.robotterritories.view.enemy.projectiles.Gun(PARENT.projectileClip.attachMovie("Gun", "Gun_" + PARENT.enemyDepth, PARENT.enemyDepth, {HERO:PARENT.parent.hero, IMPACT_GROUND:PARENT.parent.hill, ENEMY:this}));
_local2.addEventListener(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this, "heroImpactHandler");
_local2._x = getGlobalLeft() - 3;
_local2._y = getGlobalTop() - 3;
PARENT.enemyDepth++;
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(5000, 10000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
static var LINK = "InfantryBot";
static var amountArray = [35, 40, 40, 30, 30, 30, 35, 38, 1, 40, 15, 10, 0, 15, 25, 0, 1, 0, 1, 0];
static var density = [[2000, 3000], [2000, 3000], [2000, 3000], [3000, 5000], [4000, 6000], [3000, 6000], [3000, 5000], [3000, 6000], [1000, 3000], [4000, 6000], [6000, 8000], [15000, 17000], [1000, 3000], [6000, 8000], [5000, 7000], [1000, 3000], [4000, 6000], [1000, 3000], [5000, 7000], [1000, 3000]];
static var startTime = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1];
}
Symbol 1240 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.RocketBot] Frame 0
class com.mygame.robotterritories.view.enemy.RocketBot extends com.mygame.robotterritories.view.enemy.Enemy implements com.mygame.robotterritories.view.enemy.IEnemy
{
var type, damage, Y_SPEED, _xscale, _yscale, health, startHealth, lastAdvanceFrame, register, trailPoints, randomInterval, continueAdvance, fireTimeout, PARENT, _x, _y, X_SPEED, comboMode, removeEventListener, trailIndex, addEventListener, gotoAndStop, advanceTimeout, gotoAndPlay, getGlobalLeft, getGlobalTop;
function RocketBot () {
super();
}
function setup() {
type = "RocketBot";
damage = 20;
Y_SPEED = -5;
_xscale = 100;
_yscale = 100;
health = 100;
startHealth = health;
lastAdvanceFrame = 12;
start();
}
function start() {
register();
trailPoints = com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().infantryBotTrail;
trailPoints = trailPoints.slice(0, trailPoints.length - com.mygame.robotterritories.util.Randomizer.getRandomNumber(20, 40));
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(2500, 7000);
continueAdvance();
fireTimeout = new com.mygame.robotterritories.util.TimeOut();
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
function bounceButAlive() {
if (!PARENT.hill.hitTest(_x + PARENT._x, (_y - 2) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -0.3;
} else {
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
trailIndex = trailIndex - 15;
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
}
}
function stopAndShoot() {
if ((health > 0) && (!comboMode)) {
if (PARENT.projectileCount < 30) {
PARENT.projectileCount++;
gotoAndStop("prepareShoot");
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
fireTimeout.setTimeout(this, "fire", 1000);
advanceTimeout.setTimeout(this, "continueAdvance", 2000);
} else {
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(5000, 9000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
}
}
function fire() {
gotoAndPlay("shoot");
var _local2 = com.mygame.robotterritories.view.enemy.projectiles.Missile(PARENT.projectileClip.attachMovie("Missile", "Missile_" + PARENT.enemyDepth, PARENT.enemyDepth, {HERO:PARENT.parent.hero, IMPACT_GROUND:PARENT.parent.hill, ENEMY:this}));
_local2.addEventListener(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this, "heroImpactHandler");
_local2._x = getGlobalLeft() - 3;
_local2._y = getGlobalTop() - 6;
PARENT.enemyDepth++;
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(2500, 7000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
static var LINK = "RocketBot";
static var amountArray = [5, 10, 10, 10, 15, 20, 20, 17, 20, 35, 9, 15, 0, 10, 15, 0, 20, 0, 25, 0];
static var density = [[3000, 6000], [4000, 6000], [4000, 6000], [5000, 7000], [6000, 8000], [5000, 7000], [5000, 7000], [8000, 10000], [5000, 6000], [5000, 7000], [10000, 12000], [10000, 12000], [1000, 3000], [10000, 12000], [8000, 10000], [1000, 3000], [5000, 7000], [1000, 3000], [7000, 9000], [1000, 3000]];
static var startTime = [30, 20, 20, 10, 10, 1, 10, 10, 10, 1, 10, 10, 1, 20, 10, 10, 10, 1, 1, 5];
}
Symbol 1241 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.DiveBot] Frame 0
class com.mygame.robotterritories.view.enemy.DiveBot extends com.mygame.robotterritories.view.enemy.Enemy implements com.mygame.robotterritories.view.enemy.IEnemy
{
var damage, Y_SPEED, health, startHealth, lastAdvanceFrame, PARENT, register, trailPoints, randomInterval, continueAdvance, fireTimeout, _x, _y, X_SPEED, comboMode, removeEventListener, trailIndex, addEventListener, section, getGlobalLeft, gotoAndPlay, _currentframe, gotoAndStop, stop, advanceTimeout, getGlobalTop;
function DiveBot () {
super();
}
function setup() {
damage = 20;
Y_SPEED = -5;
health = 250;
startHealth = health;
lastAdvanceFrame = 9;
start();
}
function removeAdvanceSound() {
PARENT.parent.setParticleExplotion(this);
}
function start() {
register();
trailPoints = com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().getDiveBotTrail();
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(4000, 6000);
continueAdvance();
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
function bounceButAlive() {
if (!PARENT.hill.hitTest(_x + PARENT._x, (_y - 2) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -0.3;
} else {
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
trailIndex = trailIndex - 15;
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
}
}
function advance() {
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().changeSection(this);
}
if (trailPoints[trailIndex].run) {
if (!stopShoot) {
gotoAndPlay(1);
fireTimeout.clearTimeout();
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(3000, 5000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
stopShoot = true;
}
}
if (stopShoot) {
if (_currentframe >= lastAdvanceFrame) {
gotoAndPlay(1);
}
} else {
gotoAndStop("fly");
}
if (trailIndex != trailPoints.length) {
_x = trailPoints[trailIndex].x;
_y = trailPoints[trailIndex].y;
trailIndex++;
} else {
stop();
}
}
function stopAndShoot() {
if ((health > 0) && (!comboMode)) {
if (PARENT.projectileCount < 30) {
PARENT.projectileCount++;
if (stopShoot) {
gotoAndStop("prepareShoot");
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
advanceTimeout.setTimeout(this, "continueAdvance", 1500);
}
fireTimeout.setTimeout(this, "fire", 1000);
} else {
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(3000, 5000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
}
}
function fire() {
if (stopShoot) {
gotoAndPlay("shoot");
} else {
gotoAndPlay("shootAir");
}
var _local2 = com.mygame.robotterritories.view.enemy.projectiles.Gun(PARENT.projectileClip.attachMovie("Gun", "Gun_" + PARENT.enemyDepth, PARENT.enemyDepth, {HERO:PARENT.parent.hero, IMPACT_GROUND:PARENT.parent.hill, ENEMY:this}));
_local2.addEventListener(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this, "heroImpactHandler");
_local2._x = getGlobalLeft() - 8;
_local2._y = getGlobalTop() - 5;
PARENT.enemyDepth++;
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(3000, 5000);
fireTimeout.setTimeout(this, "stopAndShoot", randomInterval);
}
static var LINK = "DiveBot";
static var startTime = [0, 0, 0, 0, 55, 0, 10, 10, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 15, 0];
static var amountArray = [0, 0, 0, 0, 10, 0, 15, 18, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 20, 0];
static var density = [[2000, 9000], [2000, 9000], [2000, 9000], [2000, 9000], [8000, 10000], [2000, 9000], [8000, 12000], [7000, 10000], [2000, 9000], [2000, 9000], [2000, 9000], [11000, 13000], [2000, 9000], [2000, 9000], [2000, 9000], [2000, 9000], [2000, 9000], [2000, 9000], [8000, 10000], [2000, 9000]];
var stopShoot = false;
}
Symbol 1242 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.GunCruiser] Frame 0
class com.mygame.robotterritories.view.enemy.GunCruiser extends com.mygame.robotterritories.view.enemy.Enemy implements com.mygame.robotterritories.view.enemy.IEnemy
{
var damage, Y_SPEED, X_SPEED, health, _xscale, _yscale, lastAdvanceFrame, PARENT, _currentframe, gotoAndPlay, section, getGlobalLeft, trailPoints, trailIndex, _x, _y, _rotation, removeMovieClip, register, randomInterval, continueAdvance, fireTimeout, comboMode, removeEventListener, addEventListener, getGlobalTop;
function GunCruiser () {
super();
}
function setup() {
damage = 40;
Y_SPEED = -3;
X_SPEED = 1;
health = 450;
_xscale = 100;
_yscale = 100;
lastAdvanceFrame = 12;
var _local2 = 0;
var _local4 = 0;
var _local5 = false;
var _local3 = Math.abs((_local2 - PARENT.gunCruiserCourse._width) + PARENT.boundsClip._width) * 2;
start();
}
function advance() {
if (_currentframe >= lastAdvanceFrame) {
gotoAndPlay(1);
}
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().changeSection(this);
}
if (trailIndex != trailPoints.length) {
_x = trailPoints[trailIndex].x;
_y = trailPoints[trailIndex].y;
if (trailPoints[trailIndex].r != undefined) {
_rotation = trailPoints[trailIndex].r;
}
trailIndex++;
} else {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().destroyEnemy(this);
removeMovieClip();
}
}
function removeAdvanceSound() {
PARENT.parent.setParticleExplotion(this);
}
function start() {
register();
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_fly", 50, true);
}
trailPoints = com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().gunCruiserTrail;
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(2000, 5000);
continueAdvance();
fireTimeout.setTimeout(this, "fire", randomInterval);
}
function bounceButAlive() {
if (!PARENT.gunCruiserCourse.hitTest(_x + PARENT._x, (_y - 2) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -0.3;
} else {
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
trailIndex = trailIndex - 15;
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
}
}
function remove() {
com.midasplayer.fx.SoundManager.stop("snd_fly");
super.remove();
}
function fire() {
if (PARENT.projectileCount < 100) {
PARENT.projectileCount++;
var _local2 = com.mygame.robotterritories.view.enemy.projectiles.Missile(PARENT.projectileClip.attachMovie("Missile", "Missile_" + PARENT.enemyDepth, PARENT.enemyDepth, {HERO:PARENT.parent.hero, IMPACT_GROUND:PARENT.parent.hill, ENEMY:this}));
_local2.addEventListener(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this, "heroImpactHandler");
_local2._x = getGlobalLeft() - 3;
_local2._y = getGlobalTop() + 2;
PARENT.enemyDepth++;
}
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(2000, 5000);
fireTimeout.setTimeout(this, "fire", randomInterval);
}
static var LINK = "GunCruiser";
static var amountArray = [0, 0, 3, 0, 0, 0, 0, 0, 10, 0, 9, 0, 14, 7, 6, 12, 0, 0, 18, 0];
static var density = [[5000, 7000], [5000, 7000], [15000, 17000], [5000, 7000], [5000, 7000], [5000, 7000], [5000, 7000], [5000, 7000], [9000, 11000], [5000, 7000], [13000, 15000], [5000, 7000], [4000, 6000], [12000, 15000], [12000, 15000], [8000, 10000], [5000, 7000], [5000, 7000], [9000, 11000], [5000, 7000]];
static var startTime = [0, 0, 35, 0, 0, 0, 0, 0, 20, 0, 20, 0, 1, 30, 40, 1, 0, 0, 1, 0];
var FRICTION = 0.95;
var holdTicks = 0;
}
Symbol 1243 MovieClip [__Packages.com.mygame.robotterritories.view.enemy.RocketCruiser] Frame 0
class com.mygame.robotterritories.view.enemy.RocketCruiser extends com.mygame.robotterritories.view.enemy.Enemy implements com.mygame.robotterritories.view.enemy.IEnemy
{
var damage, Y_SPEED, health, _xscale, _yscale, lastAdvanceFrame, register, trailPoints, randomInterval, continueAdvance, fireTimeout, _currentframe, gotoAndPlay, section, getGlobalLeft, trailIndex, _x, _y, _rotation, removeMovieClip, PARENT, X_SPEED, comboMode, removeEventListener, addEventListener, getGlobalTop;
function RocketCruiser () {
super();
}
function setup() {
damage = 60;
Y_SPEED = -5;
health = 350;
_xscale = 100;
_yscale = 100;
lastAdvanceFrame = 12;
start();
}
function start(trail) {
register();
trailPoints = com.mygame.robotterritories.view.enemy.TrailGenerator.getInstance().rocketCruiserTrail;
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(3000, 6000);
continueAdvance();
fireTimeout.setTimeout(this, "fire", randomInterval);
}
function advance() {
if (_currentframe >= lastAdvanceFrame) {
gotoAndPlay(1);
}
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().changeSection(this);
}
if (trailIndex != trailPoints.length) {
_x = trailPoints[trailIndex].x;
_y = trailPoints[trailIndex].y;
if (trailPoints[trailIndex].r != undefined) {
_rotation = trailPoints[trailIndex].r;
}
trailIndex++;
} else {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().destroyEnemy(this);
removeMovieClip();
}
}
function bounceButAlive() {
if (!PARENT.gunCruiserCourse.hitTest(_x + PARENT._x, (_y - 2) + PARENT._y, true)) {
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + 0.3;
_x = _x + X_SPEED;
X_SPEED + -0.3;
} else {
comboMode = false;
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
trailIndex = trailIndex - 15;
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "advance");
}
}
function removeAdvanceSound() {
PARENT.parent.setParticleExplotion(this);
}
function fire() {
if (PARENT.projectileCount < 30) {
PARENT.projectileCount++;
var _local2 = com.mygame.robotterritories.view.enemy.projectiles.Missile(PARENT.projectileClip.attachMovie("Missile", "Missile_" + PARENT.enemyDepth, PARENT.enemyDepth, {HERO:PARENT.parent.hero, IMPACT_GROUND:PARENT.parent.hill, ENEMY:this}));
_local2.addEventListener(com.mygame.robotterritories.view.enemy.Enemy.HERO_HIT, this, "heroImpactHandler");
_local2._x = getGlobalLeft() - 1;
_local2._y = getGlobalTop() + 5;
PARENT.enemyDepth++;
}
randomInterval = com.mygame.robotterritories.util.Randomizer.getRandomNumber(3000, 6000);
fireTimeout.setTimeout(this, "fire", randomInterval);
}
static var LINK = "RocketCruiser";
static var amountArray = [0, 0, 0, 0, 0, 0, 0, 4, 0, 10, 0, 0, 7, 5, 0, 8, 8, 0, 10, 10];
static var density = [[3000, 7000], [3000, 7000], [3000, 7000], [3000, 7000], [3000, 7000], [3000, 7000], [3000, 7000], [13000, 15000], [3000, 7000], [17000, 19000], [3000, 7000], [3000, 7000], [10000, 7000], [15000, 17000], [3000, 7000], [11000, 13000], [9000, 11000], [3000, 7000], [12000, 14000], [14000, 16000]];
static var startTime = [20, 20, 20, 20, 20, 20, 20, 60, 20, 30, 20, 20, 20, 60, 20, 20, 20, 20, 20, 20];
}
Symbol 1244 MovieClip [__Packages.com.mygame.robotterritories.LevelClearedSign] Frame 0
class com.mygame.robotterritories.LevelClearedSign extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var _visible, nextLevelBtn, playAgainBtn, submitBtn, playMoreGamesBtn, bg, level, nameInput, dispatchEvent, getURL, signTxt, levelTicker, comboTicker, highestTicker, totalTicker, levelPoints, totalCombo, highestCombo, useHandCursor, totalPoints, highestTxt, highestNbr, highestBox, totalTxt, totalNbr, totalBox, levelBox, headerTxt, inputFrame, endTextHighest, endTextTotal, addEventListener, removeEventListener, levelScoreNbr, totalScoreNbr;
function LevelClearedSign () {
super();
}
function onLoad() {
_visible = false;
nextLevelBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "nextLevelHandler");
nextLevelBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onOut");
nextLevelBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onOver");
playAgainBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "playAgainHandler");
playAgainBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onOut");
playAgainBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onOver");
submitBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onSubmit");
submitBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onOut");
submitBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onOver");
playMoreGamesBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "moreGamesHandler");
playMoreGamesBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onOut");
playMoreGamesBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onOver");
bg.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "cover");
bg.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.PRESS, this, "cover");
bg.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "cover");
bg.useHandCursor = false;
}
function onOut(evt) {
evt.target.gotoAndStop("out");
}
function onOver(evt) {
evt.target.gotoAndStop("over");
}
function onSubmit() {
if (_global.KONGREGATE_MODE == true) {
_root.kongregateScores.submit(com.mygame.robotterritories.PointModel.getInstance().getTotalPoint());
} else {
var _local6 = new LoadVars();
_local6.onLoad = function (success) {
if (success) {
_root.getURL(("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _root._url) + "&typ=highscores&redirect=/game/robot-territories/highscores", "_blank");
} else {
_root.app.ib.text = "Error connecting to server.";
}
};
var _local4 = new LoadVars();
_local4.level = level;
_local4.username = nameInput.text;
_local4.points = com.mygame.robotterritories.PointModel.getInstance().getTotalPoint();
_local4.url = "robot-territories";
_local4.action = "gameover";
_local4.sendAndLoad("http://www.mygame.com/servlet/WebGameServlet", _local6, "GET");
var _local5 = SharedObject.getLocal("nameSaveRobotTerritories");
_local5.data.playerName = nameInput.text;
_local5.flush();
}
com.mygame.robotterritories.PointModel.getInstance().resetLevelPoints();
com.mygame.robotterritories.PointModel.getInstance().resetCombos();
com.mygame.robotterritories.PointModel.getInstance().resetTotalPoints();
com.mygame.robotterritories.PointModel.getInstance().resetTotalTotal();
dispatchEvent(new com.mygame.robotterritories.event.EventObject(SUBMIT_DONE, this));
_visible = false;
}
function moreGamesHandler() {
getURL(("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _root._url) + "&typ=other_games", "_blank");
}
function nextLevelHandler() {
com.mygame.robotterritories.PointModel.getInstance().resetLevelPoints();
com.mygame.robotterritories.PointModel.getInstance().resetCombos();
com.mygame.robotterritories.PointModel.getInstance().resetHighestCombo();
_visible = false;
dispatchEvent(new com.mygame.robotterritories.event.EventObject(NEXT_LEVEL, this));
}
function playAgainHandler() {
com.mygame.robotterritories.PointModel.getInstance().resetLevelPoints();
com.mygame.robotterritories.PointModel.getInstance().resetCombos();
com.mygame.robotterritories.PointModel.getInstance().resetHighestCombo();
com.mygame.robotterritories.PointModel.getInstance().resetTotalPoints();
com.mygame.robotterritories.PointModel.getInstance().resetTotalTotal();
dispatchEvent(new com.mygame.robotterritories.event.EventObject(PLAY_AGAIN, this));
_visible = false;
}
function cover() {
}
function init(text, showNextBtn, p_level) {
com.mygame.robotterritories.util.TimeOut.pauseAllTimeouts();
com.mygame.robotterritories.view.ExtendedMovieClip.pauseAllFrame();
level = p_level;
signTxt = text;
levelTicker = 0;
comboTicker = 0;
highestTicker = 0;
var _local6 = false;
var _local8 = false;
var _local5 = false;
if (text == "GAME CLEARED, GOOD WORK!!!") {
totalTicker = 0;
levelPoints = com.mygame.robotterritories.PointModel.getInstance().getTotalLevelPoints();
totalCombo = com.mygame.robotterritories.PointModel.getInstance().getTotalTotalCombo();
highestCombo = com.mygame.robotterritories.PointModel.getInstance().getTotalHighestCombo();
} else {
totalTicker = 0;
levelPoints = com.mygame.robotterritories.PointModel.getInstance().getLevelPoint();
totalCombo = com.mygame.robotterritories.PointModel.getInstance().getTotalCombos();
highestCombo = com.mygame.robotterritories.PointModel.getInstance().getHighestCombo();
}
useHandCursor = false;
totalPoints = com.mygame.robotterritories.PointModel.getInstance().getTotalPoint();
if (com.mygame.robotterritories.PointModel.highestComboReqs[level - 1] != 0) {
highestTxt._visible = true;
highestNbr._visible = true;
highestBox._visible = true;
if (com.mygame.robotterritories.PointModel.getInstance().getHighestCombo() >= com.mygame.robotterritories.PointModel.highestComboReqs[level - 1]) {
highestBox.gotoAndStop("done");
_local6 = true;
} else {
highestBox.gotoAndStop("fail");
}
} else {
highestTxt._visible = false;
highestNbr._visible = false;
highestBox._visible = false;
_local6 = true;
}
if (com.mygame.robotterritories.PointModel.totalComboReqs[level - 1] != 0) {
totalTxt._visible = true;
totalNbr._visible = true;
totalBox._visible = true;
totalTxt._y = (highestTxt._visible ? 118 : 103);
totalNbr._y = (highestTxt._visible ? 118 : 103);
totalBox._y = (highestTxt._visible ? 123 : 108);
if (com.mygame.robotterritories.PointModel.getInstance().getTotalCombos() >= com.mygame.robotterritories.PointModel.totalComboReqs[level - 1]) {
totalBox.gotoAndStop("done");
_local5 = true;
} else {
totalBox.gotoAndStop("fail");
}
} else {
totalTxt._visible = false;
totalNbr._visible = false;
totalBox._visible = false;
_local5 = true;
}
if (text == "GAME OVER") {
levelBox.gotoAndStop("fail");
} else {
_local8 = true;
levelBox.gotoAndStop("done");
}
if ((_local6 && (_local8)) && (_local5)) {
headerTxt.text = "LEVEL CLEARED";
nextLevelBtn._visible = true;
playAgainBtn._visible = false;
submitBtn._visible = false;
nameInput._visible = false;
inputFrame._visible = false;
playMoreGamesBtn._visible = false;
dispatchEvent(new com.mygame.robotterritories.event.EventObject(UNLOCK_LEVEL, this));
com.midasplayer.fx.SoundManager.stopAll();
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_level_complete", 40);
}
} else {
if (text == "GAME CLEARED, GOOD WORK!!!") {
headerTxt.text = text;
com.midasplayer.fx.SoundManager.stopAll();
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_game_cleared", 50);
}
if (_global.KONGREGATE_MODE == true) {
_root.kongregateStats.submit("GameComplete", 1);
}
} else {
headerTxt.text = "LEVEL FAILED";
com.midasplayer.fx.SoundManager.stopAll();
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_gameover", 40);
}
if (_global.KONGREGATE_MODE == true) {
_root.kongregateStats.submit("HighScore", com.mygame.robotterritories.PointModel.getInstance().getTotalPoint());
}
}
nextLevelBtn._visible = false;
playAgainBtn._visible = true;
submitBtn._visible = true;
playMoreGamesBtn._visible = true;
if (_global.KONGREGATE_MODE == true) {
nameInput._visible = false;
inputFrame._visible = false;
submitBtn._y = 177;
playAgainBtn._y = 199;
playMoreGamesBtn._y = 221;
} else {
nameInput._visible = true;
inputFrame._visible = true;
submitBtn._y = 216;
playAgainBtn._y = 238;
playMoreGamesBtn._y = 260;
}
}
if (text == "GAME CLEARED, GOOD WORK!!!") {
highestBox._visible = false;
totalBox._visible = false;
levelBox._visible = false;
endTextHighest = "";
endTextTotal = "";
} else {
endTextHighest = (" (target: x" + com.mygame.robotterritories.PointModel.highestComboReqs[level - 1]) + ")";
endTextTotal = (" (target: " + com.mygame.robotterritories.PointModel.totalComboReqs[level - 1]) + ")";
}
var _local7 = SharedObject.getLocal("nameSaveRobotTerritories");
if (_local7.data.playerName == null) {
nameInput.text = "Player";
} else {
nameInput.text = _local7.data.playerName;
}
_visible = true;
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "razzlePoints");
var _local12 = new mx.transitions.Tween(this, "levelTicker", mx.transitions.easing.None.easeNone, 0, levelPoints, 1, true);
var _local10 = new mx.transitions.Tween(this, "totalTicker", mx.transitions.easing.None.easeNone, 0, totalPoints, 1, true);
var _local11 = new mx.transitions.Tween(this, "comboTicker", mx.transitions.easing.None.easeNone, 0, totalCombo, 1, true);
var _local9 = new mx.transitions.Tween(this, "highestTicker", mx.transitions.easing.None.easeNone, 0, highestCombo, 1, true);
_global.setTimeout(this, "endRazzle", 1200);
}
function endRazzle() {
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
}
function razzlePoints() {
levelScoreNbr.text = "";
totalScoreNbr.text = "" + Math.round(totalTicker);
totalNbr.text = ("" + Math.round(comboTicker)) + endTextTotal;
highestNbr.text = ("x" + Math.round(highestTicker)) + endTextHighest;
}
static var NEXT_LEVEL = "nextLevel";
static var PLAY_AGAIN = "playAgain";
static var UNLOCK_LEVEL = "unlockLevel";
static var SUBMIT_DONE = "submitDone";
}
Symbol 1245 MovieClip [__Packages.com.mygame.robotterritories.view.InGameGUI] Frame 0
class com.mygame.robotterritories.view.InGameGUI extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var pointsHolder, sndBtn, qualityHiBtn, qualityLoBtn, menuBtn, dispatchEvent, parent, health, lifeMask, removeEventListener;
function InGameGUI () {
super();
}
function onLoad() {
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.EnemyModel.HERO_HIT, this, "onHeroImpact");
pointsHolder.addEventListener(com.mygame.robotterritories.PointModel.COMBO_POINTS_UPDATED, this, "updateComboSigns");
sndBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "soundHandler");
qualityHiBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "qualityHiHandler");
qualityLoBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "qualityLoHandler");
menuBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "menuHandler");
sndBtn.gotoAndStop("notMute");
}
function menuHandler() {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(SHOW_MENU, this));
}
function qualityHiHandler() {
if ((_root._quality = "LOW")) {
_root._quality = "HIGH";
qualityHiBtn.gotoAndStop("on");
qualityLoBtn.gotoAndStop("off");
}
}
function qualityLoHandler() {
if ((_root._quality = "HIGH")) {
_root._quality = "LOW";
qualityHiBtn.gotoAndStop("off");
qualityLoBtn.gotoAndStop("on");
}
}
function soundHandler() {
if (mute) {
mute = false;
sndBtn.gotoAndStop("notMute");
com.midasplayer.fx.SoundManager.restoreMuteAll();
com.midasplayer.fx.SoundManager.hackIsMuted = false;
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("loop", 30, true);
}
} else {
mute = true;
sndBtn.gotoAndStop("mute");
com.midasplayer.fx.SoundManager.muteAll();
com.midasplayer.fx.SoundManager.hackIsMuted = true;
}
}
function updateComboSigns(evt) {
var _local3 = com.mygame.robotterritories.view.enemy.Enemy(evt.target);
var _local4;
if (_local3.comboTimes == 1) {
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_combo_1", 30);
}
_local4 = parent.comboClip.attachMovie("sign_combo", "s_" + com.mygame.robotterritories.util.Randomizer.getRandomNumber(1, 1000), parent.comboClip.getNextHighestDepth());
} else if (_local3.comboTimes <= 25) {
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_combo_2", 30);
}
_local4 = parent.comboClip.attachMovie("sign_" + _local3.comboTimes, "s_" + com.mygame.robotterritories.util.Randomizer.getRandomNumber(1, 1000), parent.comboClip.getNextHighestDepth());
}
var _local5 = {x:0, y:0};
_local3.localToGlobal(_local5);
_local4._x = _local5.x + (_local3._width / 2);
_local4._y = _local5.y;
_global.setTimeout(_local4, "removeMovieClip", 700);
}
function init(p) {
parent = p;
health = 500;
pointsHolder.updateLevel(parent.getLevel());
lifeMask._xscale = 100;
}
function onHeroImpact(evt) {
parent.hero.redHit.play();
lifeMask._xscale = ((health <= 0) ? 0 : ((health / 500) * 100));
var _local3 = com.mygame.robotterritories.view.enemy.IEnemy(evt.target);
health = health - _local3.getDamage();
var _local2 = (health / 500) * 100;
var _local4 = new mx.transitions.Tween(lifeMask, "_xscale", mx.transitions.easing.Regular.easeOut, lifeMask._xscale, ((_local2 <= 0) ? 0 : (_local2)), 0.3, true);
if (health <= 0) {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(GAME_OVER, this));
}
}
function endRazzle() {
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
}
static var SHOW_MENU = "showMenu";
var mute = false;
static var GAME_OVER = "gameOver";
}
Symbol 1246 MovieClip [__Packages.com.mygame.robotterritories.view.PointsHolder] Frame 0
class com.mygame.robotterritories.view.PointsHolder extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var tmpTotalPoints, addEventListener, razzleTimeout, removeEventListener, totalEnemies, enemyCounter, scoreTxt, level, combosTxt, levelTxt, highestComboTxt, dispatchEvent;
function PointsHolder () {
super();
com.mygame.robotterritories.PointModel.getInstance().addEventListener(com.mygame.robotterritories.PointModel.TOTAL_POINTS_UPDATED, this, "updateTotalPoints");
com.mygame.robotterritories.PointModel.getInstance().addEventListener(com.mygame.robotterritories.PointModel.COMBO_POINTS_UPDATED, this, "updateComboPoints");
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.EnemyModel.ENEMY_DESTROYED_UPDATED, this, "tickEnemyCounter");
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.EnemyModel.ENEMY_COUNT_UPDATED, this, "initEnemyCounter");
}
function updateTotalPoints() {
tmpTotalPoints = com.mygame.robotterritories.PointModel.getInstance().getTotalPoint();
totalticker = totalPoints;
totalPoints = tmpTotalPoints;
endRazzle();
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "razzlePoints");
var _local3 = new mx.transitions.Tween(this, "totalticker", mx.transitions.easing.None.easeNone, totalticker, totalPoints, 1, true);
_global.clearTimeout(razzleTimeout);
razzleTimeout = _global.setTimeout(this, "endRazzle", 1100);
}
function endRazzle() {
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this);
}
function tickEnemyCounter() {
enemiesDestroyed++;
var _local2 = Math.round((enemiesDestroyed / totalEnemies) * 100);
enemyCounter.gotoAndStop(_local2);
}
function resetPoints() {
scoreTxt.text = "0";
totalCombo = 0;
combosTxt.text = (("" + totalCombo) + "/") + com.mygame.robotterritories.PointModel.totalComboReqs[level - 1];
}
function resetCombo() {
totalCombo = 0;
combosTxt.text = "" + totalCombo;
}
function updateLevel(l) {
level = l;
levelTxt.text = "" + level;
highestCombo = 0;
highestComboTxt.text = (("x" + highestCombo) + "/x") + com.mygame.robotterritories.PointModel.highestComboReqs[level - 1];
totalCombo = 0;
combosTxt.text = (("" + totalCombo) + "/") + com.mygame.robotterritories.PointModel.totalComboReqs[level - 1];
enemiesDestroyed = 0;
}
function initEnemyCounter() {
totalEnemies = com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().getEnemyCount();
enemyCounter.gotoAndStop(1);
}
function updateComboPoints(evt) {
var _local4 = com.mygame.robotterritories.view.enemy.Enemy(evt.target);
if (_local4.comboTimes > 0) {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(com.mygame.robotterritories.PointModel.COMBO_POINTS_UPDATED, _local4));
}
totalCombo = com.mygame.robotterritories.PointModel.getInstance().getTotalCombos();
if (_global.KONGREGATE_MODE == true) {
_root.kongregateStats.submit("TotalCombo", totalCombo);
}
combosTxt.text = (("" + totalCombo) + "/") + com.mygame.robotterritories.PointModel.totalComboReqs[level - 1];
if (_local4.comboTimes > highestCombo) {
highestCombo = _local4.comboTimes;
com.mygame.robotterritories.PointModel.getInstance().updateHighestCombo(highestCombo);
highestComboTxt.text = (("x" + highestCombo) + "/x") + com.mygame.robotterritories.PointModel.highestComboReqs[level - 1];
if (_global.KONGREGATE_MODE == true) {
_root.kongregateStats.submit("HighestCombo", highestCombo);
}
}
updateTotalPoints();
}
function razzlePoints() {
scoreTxt.text = "" + Math.round(totalticker);
}
var totalCombo = 0;
var highestCombo = 0;
var enemiesDestroyed = 0;
var totalPoints = 0;
var totalticker = 0;
}
Symbol 1247 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 1248 MovieClip [__Packages.com.mygame.robotterritories.view.MenuView] Frame 0
class com.mygame.robotterritories.view.MenuView extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var continueBtn, playBtn, addToWebsiteBtn, instrBtn, instrBackBtn, highScoresBtn, moreGamesBtn, logoBtnMenu, mapView, robotSign, instructionSign, _visible, dispatchEvent, getURL;
function MenuView () {
super();
}
function onLoad() {
continueBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onContinueBtn");
playBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onMapHandler");
addToWebsiteBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onAddToWebsite");
instrBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onInstrHandler");
instrBackBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onBackHandler");
highScoresBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onHighScoreHandler");
moreGamesBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onMoreGamesHandler");
logoBtnMenu.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onLogoMenuHandler");
mapView.addEventListener(com.mygame.robotterritories.view.MapView.LEVEL_SELECTED, this, "onLevelSelectedHandler");
playBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onBtnOver");
addToWebsiteBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onBtnOver");
instrBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onBtnOver");
instrBackBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onBtnOver");
highScoresBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onBtnOver");
moreGamesBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onBtnOver");
continueBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onBtnOver");
playBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onBtnOut");
addToWebsiteBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onBtnOut");
instrBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onBtnOut");
instrBackBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onBtnOut");
highScoresBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onBtnOut");
moreGamesBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onBtnOut");
continueBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onBtnOut");
robotSign._visible = true;
instructionSign._visible = false;
instrBackBtn._visible = false;
}
function onBtnOver(evt) {
evt.target.gotoAndStop("over");
}
function onBtnOut(evt) {
evt.target.gotoAndStop("out");
}
function init(p_level) {
_visible = false;
mapView._visible = false;
playBtn._visible = true;
continueBtn._visible = false;
continueBtnActive = false;
}
function unLockLevel(p_level) {
mapView.unLockLevel(p_level);
}
function onLevelSelectedHandler() {
com.mygame.robotterritories.PointModel.getInstance().resetLevelPoints();
com.mygame.robotterritories.PointModel.getInstance().resetCombos();
com.mygame.robotterritories.PointModel.getInstance().resetHighestCombo();
com.mygame.robotterritories.PointModel.getInstance().resetTotalPoints();
com.mygame.robotterritories.PointModel.getInstance().resetTotalTotal();
dispatchEvent(new com.mygame.robotterritories.event.EventObject(START_GAME, this));
_visible = false;
}
function setContinue() {
pause();
continueBtn._visible = true;
continueBtnActive = true;
}
function pause() {
com.mygame.robotterritories.util.TimeOut.pauseAllTimeouts();
com.mygame.robotterritories.view.ExtendedMovieClip.pauseAllFrame();
}
function unPause() {
com.mygame.robotterritories.util.TimeOut.restoreAllTimeouts();
com.mygame.robotterritories.view.ExtendedMovieClip.restorePauseAllFrame();
}
function onContinueBtn() {
unPause();
dispatchEvent(new com.mygame.robotterritories.event.EventObject(CONTINUE_PLAY, this));
_visible = false;
}
function onPlayHandler() {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(START_GAME, this));
_visible = false;
}
function onMapHandler() {
mapView._visible = true;
}
function onInstrHandler() {
robotSign._visible = false;
instructionSign._visible = true;
instrBackBtn._visible = true;
playBtn._visible = false;
if (continueBtnActive) {
continueBtn._visible = false;
}
addToWebsiteBtn._visible = false;
instrBtn._visible = false;
highScoresBtn._visible = false;
logoBtnMenu._visible = false;
moreGamesBtn._visible = false;
}
function onBackHandler() {
robotSign._visible = true;
instructionSign._visible = false;
instrBackBtn._visible = false;
playBtn._visible = true;
if (continueBtnActive) {
continueBtn._visible = true;
}
addToWebsiteBtn._visible = true;
instrBtn._visible = true;
highScoresBtn._visible = true;
logoBtnMenu._visible = true;
moreGamesBtn._visible = true;
}
function onLogoMenuHandler() {
getURL(("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _root._url) + "&typ=sign", "_blank");
}
function onHighScoreHandler() {
getURL(("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _root._url) + "&typ=highscores&redirect=/game/robot-territories/highscores", "_blank");
}
function onMoreGamesHandler() {
getURL(("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _root._url) + "&typ=other_games", "_blank");
}
function onAddToWebsite() {
getURL(("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _root._url) + "&typ=add_game&redirect=/freecontent.jsp", "_blank");
}
static var START_FROM_LEVEL = "startFromLevel";
static var START_GAME = "StartGame";
static var CONTINUE_PLAY = "continuePlay";
var continueBtnActive = false;
}
Symbol 1249 MovieClip [__Packages.com.mygame.robotterritories.view.MapView] Frame 0
class com.mygame.robotterritories.view.MapView extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var logoBtnMap, getURL, bg, sharedObj, topLevel, menuBtn, _visible, dispatchEvent;
function MapView () {
super();
}
function onLoad() {
logoBtnMap.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onLogoBtn");
init();
}
function onLogoBtn() {
getURL(("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _root._url) + "&typ=sign", "_blank");
}
function cover() {
bg.useHandCursor = false;
}
function init() {
bg.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "cover");
bg.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "cover");
bg.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "cover");
bg.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.PRESS, this, "cover");
sharedObj = SharedObject.getLocal("levelSaveRobotTerritories");
if (sharedObj.data.topLevel == null) {
topLevel = 1;
sharedObj.data.topLevel = 1;
sharedObj.flush();
} else {
topLevel = sharedObj.data.topLevel;
level = topLevel;
}
menuBtn.gotoAndStop("out");
menuBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onCloseMapView");
menuBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "onBtnOut");
menuBtn.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "onBtnOver");
resetButtons();
var _local2 = 1;
while (_local2 < 21) {
this["level_" + _local2].level = _local2;
if (_local2 <= topLevel) {
this["level_" + _local2].addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this["level_" + _local2], "over");
this["level_" + _local2].addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this["level_" + _local2], "out");
this["level_" + _local2].addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onLevelSelected");
this["level_" + _local2].setDisabled(false);
}
_local2++;
}
}
function onBtnOut() {
menuBtn.gotoAndStop("out");
}
function onBtnOver() {
menuBtn.gotoAndStop("over");
}
function onCloseMapView() {
_visible = false;
}
function unLockLevel(p_level) {
if (p_level < 21) {
level = p_level;
if (level > sharedObj.data.topLevel) {
sharedObj.data.topLevel = level;
sharedObj.flush();
if (_global.KONGREGATE_MODE == true) {
_root.kongregateStats.submit("UnlockedLevels", level);
}
}
this["level_" + p_level].setDisabled(false);
this["level_" + p_level].addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "onLevelSelected");
this["level_" + p_level].addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this["level_" + p_level], "over");
this["level_" + p_level].addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this["level_" + p_level], "out");
}
}
function resetButtons() {
var _local2 = 1;
while (_local2 < 21) {
this["level_" + _local2].level = _local2;
this["level_" + _local2].gotoAndStop(_local2);
this["level_" + _local2].removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this["level_" + _local2], "over");
this["level_" + _local2].removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this["level_" + _local2], "out");
this["level_" + _local2].removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this);
this["level_" + _local2].setDisabled(true);
_local2++;
}
}
function onLevelSelected(evt) {
var _local2 = com.mygame.robotterritories.view.MapBtn(evt.target);
level = _local2.level;
dispatchEvent(new com.mygame.robotterritories.event.EventObject(LEVEL_SELECTED, this));
_visible = false;
}
static var LEVEL_SELECTED = "levelSelected";
var level = 1;
}
Symbol 1250 MovieClip [__Packages.com.mygame.robotterritories.view.MapBtn] Frame 0
class com.mygame.robotterritories.view.MapBtn extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var disableClip, overClip, useHandCursor;
function MapBtn () {
super();
}
function onLoad() {
disableClip.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.RELEASE, this, "cover");
disableClip.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOVER, this, "cover");
disableClip.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ROLLOUT, this, "cover");
disableClip.addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.PRESS, this, "cover");
overClip._visible = false;
}
function cover() {
}
function over() {
overClip._visible = true;
}
function out() {
overClip._visible = false;
}
function setDisabled(b) {
disabled = b;
disableClip._visible = b;
useHandCursor = !b;
}
var disabled = false;
}
Symbol 1251 MovieClip [__Packages.com.mygame.robotterritories.view.ParticleSet] Frame 0
class com.mygame.robotterritories.view.ParticleSet
{
var parent;
function ParticleSet (p_parent) {
parent = p_parent;
}
function create(p_x, p_y, p_links, p_hasSmoke, p_randXLow, p_randXHigh, p_randYLow, p_randYHigh, p_gravity, p_friction) {
var _local7;
var _local5 = parent.createEmptyMovieClip("holder" + counter, parent.getNextHighestDepth());
_local5._x = p_x;
_local5._y = p_y;
var _local2 = 0;
var _local6 = com.mygame.robotterritories.util.Randomizer.getRandomNumber(5, p_links.length * 2);
var _local3 = 0;
while (_local3 < _local6) {
if (_local2 < p_links.length) {
_local7 = new com.mygame.robotterritories.view.Particle(_local5, p_links[_local2], p_hasSmoke, p_randXLow, p_randXHigh, p_randYLow, p_randYHigh, p_gravity, p_friction);
_local2++;
} else {
_local2 = 0;
}
_local3++;
}
counter++;
}
var counter = 0;
}
Symbol 1252 MovieClip [__Packages.com.mygame.robotterritories.view.Particle] Frame 0
class com.mygame.robotterritories.view.Particle
{
var parent, gravity, friction, particle, smokeSet, dir, randX, randY;
function Particle (p_parent, p_link, p_hasSmoke, p_randXLow, p_randXHigh, p_randYLow, p_randYHigh, p_gravity, p_friction) {
parent = p_parent;
gravity = p_gravity;
friction = p_friction;
particle = parent.attachMovie(p_link, "p", parent.getNextHighestDepth());
particle.onEnterFrame = mx.utils.Delegate.create(this, render);
if (p_hasSmoke) {
smokeSet = new com.mygame.robotterritories.view.SmokeSet(particle, parent, 1, 0, true, "flare_5", 0);
smokeSet.start();
}
dir = com.mygame.robotterritories.util.Randomizer.getRandomNumber(0, 1);
randX = ((dir == 0) ? (-com.mygame.robotterritories.util.Randomizer.getRandomNumber(p_randXLow, p_randXHigh)) : (com.mygame.robotterritories.util.Randomizer.getRandomNumber(p_randXLow, p_randXHigh)));
randY = -com.mygame.robotterritories.util.Randomizer.getRandomNumber(p_randYLow, p_randYHigh);
_global.setTimeout(this, "remove", 1000);
var _local4 = new mx.transitions.Tween(parent, "_alpha", mx.transitions.easing.None.easeNone, 100, 0, 1, true);
}
function render() {
particle._x = (particle._x + randX) * friction;
particle._y = particle._y + randY;
randY = randY + gravity;
}
function remove() {
parent.removeMovieClip();
smokeSet.stop();
}
}
Symbol 1253 MovieClip [__Packages.com.mygame.robotterritories.view.SubmitView] Frame 0
class com.mygame.robotterritories.view.SubmitView extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var _visible, nameInput, dispatchEvent;
function SubmitView () {
super();
}
function onLoad() {
_visible = false;
}
function onOut(evt) {
evt.target.gotoAndStop("out");
}
function onOver(evt) {
evt.target.gotoAndStop("over");
}
function onSubmit() {
var _local5 = new LoadVars();
_local5.onLoad = function (success) {
if (success) {
_root.getURL(("http://www.mygame.com/bounce.jsp?game=robot-territories&from=" + _root._url) + "&typ=highscores&redirect=/game/robot-territories/highscores", "_blank");
} else {
_root.app.ib.text = "Error connecting to server.";
}
};
var _local3 = new LoadVars();
_local3.username = nameInput.text;
_local3.points = com.mygame.robotterritories.PointModel.getInstance().getTotalPoint();
_local3.url = "robot-territories";
_local3.action = "gameover";
_local3.sendAndLoad("http://www.mygame.com/servlet/WebGameServlet", _local5, "GET");
com.mygame.robotterritories.PointModel.getInstance().resetLevelPoints();
com.mygame.robotterritories.PointModel.getInstance().resetCombos();
com.mygame.robotterritories.PointModel.getInstance().resetTotalPoints();
com.mygame.robotterritories.PointModel.getInstance().resetTotalTotal();
dispatchEvent(new com.mygame.robotterritories.event.EventObject(SUBMIT_DONE, this));
var _local4 = SharedObject.getLocal("nameSaveRobotTerritories");
_local4.data.playerName = nameInput.text;
_local4.flush();
_visible = false;
}
function onBack() {
com.mygame.robotterritories.util.TimeOut.pauseAllTimeouts();
com.mygame.robotterritories.view.ExtendedMovieClip.pauseAllFrame();
com.mygame.robotterritories.PointModel.getInstance().resetLevelPoints();
com.mygame.robotterritories.PointModel.getInstance().resetCombos();
com.mygame.robotterritories.PointModel.getInstance().resetTotalPoints();
com.mygame.robotterritories.PointModel.getInstance().resetTotalTotal();
dispatchEvent(new com.mygame.robotterritories.event.EventObject(SUBMIT_DONE, this));
_visible = false;
}
function init() {
var _local2 = SharedObject.getLocal("nameSaveRobotTerritories");
if (_local2.data.playerName == null) {
nameInput.text = "Player";
} else {
nameInput.text = _local2.data.playerName;
}
_visible = true;
}
static var SUBMIT_DONE = "submitDone";
}
Symbol 1254 MovieClip [__Packages.com.mygame.robotterritories.view.RequireClip] Frame 0
class com.mygame.robotterritories.view.RequireClip extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var _visible, highestComboReq, totalComboReq, highestBox, totalBox, highestComboTxt, totalComboTxt, _alpha;
function RequireClip () {
super();
}
function onLoad() {
_visible = false;
}
function init(level) {
var _local3 = com.mygame.robotterritories.PointModel.highestComboReqs[level - 1];
var _local4 = com.mygame.robotterritories.PointModel.totalComboReqs[level - 1];
highestComboReq.text = ((_local3 != 0) ? ("x" + _local3) : "");
totalComboReq.text = ((_local4 != 0) ? (_local4 + "") : "");
highestBox._visible = _local3 != 0;
totalBox._visible = _local4 != 0;
highestComboTxt._visible = _local3 != 0;
totalComboTxt._visible = _local4 != 0;
totalComboReq._y = ((_local3 != 0) ? (secondY) : (firstY));
totalBox._y = ((_local3 != 0) ? (secondY + 6) : (firstY + 6));
totalComboTxt._y = ((_local3 != 0) ? (secondY) : (firstY));
_alpha = 0;
_visible = true;
var _local5 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.Regular.easeIn, 0, 100, 0.5, true);
_global.setTimeout(this, "tweenOut", 5000);
}
function tweenOut() {
var _local3 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.Regular.easeOut, 100, 0, 1, true);
_global.setTimeout(this, "hide", 1000);
}
function hide() {
_visible = false;
}
var firstY = 68;
var secondY = 88;
}
Symbol 1255 MovieClip [__Packages.com.mygame.robotterritories.view.hero.HealthMeter] Frame 0
class com.mygame.robotterritories.view.hero.HealthMeter extends com.mygame.robotterritories.view.ExtendedMovieClip
{
var health, bar, dispatchEvent;
function HealthMeter () {
super();
com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().addEventListener(com.mygame.robotterritories.view.enemy.EnemyModel.HERO_HIT, this, "onHeroImpact");
}
function onLoad() {
init();
}
function init() {
health = 500;
bar._xscale = 100;
}
function onHeroImpact(evt) {
bar._xscale = ((health <= 0) ? 0 : ((health / 500) * 100));
var _local3 = com.mygame.robotterritories.view.enemy.IEnemy(evt.target);
health = health - _local3.getDamage();
var _local2 = (health / 500) * 100;
var _local4 = new mx.transitions.Tween(bar, "_xscale", mx.transitions.easing.Regular.easeOut, bar._xscale, ((_local2 <= 0) ? 0 : (_local2)), 0.3, true);
if (health <= 0) {
dispatchEvent(new com.mygame.robotterritories.event.EventObject(GAME_OVER, this));
}
}
static var GAME_OVER = "gameOver";
}
Symbol 1256 MovieClip [__Packages.com.mygame.robotterritories.view.projectiles.Rocket] Frame 0
class com.mygame.robotterritories.view.projectiles.Rocket extends com.mygame.robotterritories.view.projectiles.HeroProjectile
{
var damage, GRAVITY, FRICTION, PARENT, _rotation, Y_SPEED, X_SPEED, smokeSet, _x, _y, checkImpact, removeEventListener, dispatchEvent;
function Rocket () {
super();
}
function setup() {
damage = 80;
GRAVITY = 0.12;
FRICTION = 0.99;
var _local2 = (PARENT.canon.barel._rotation / 180) * 100;
_rotation = PARENT.canon.barel._rotation - 90;
Y_SPEED = (40 * (_local2 / 100)) - 20;
X_SPEED = ((_local2 > 50) ? (40 - (40 * (_local2 / 100))) : (40 * (_local2 / 100)));
X_SPEED = X_SPEED + (com.mygame.robotterritories.util.Randomizer.getRandomNumber(-100, 100) / 100);
smokeSet = new com.mygame.robotterritories.view.SmokeSet(this, PARENT.parent.smokeAttatchClip, 1, PARENT.canon.barel._rotation, true, "flare", 0.5);
start();
}
function start() {
super.start();
smokeSet.start();
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_rocket", com.mygame.robotterritories.util.Randomizer.getRandomNumber(50, 70));
}
}
function shotFiredHandler() {
_x = (_x + X_SPEED) * FRICTION;
_y = _y + Y_SPEED;
_rotation = _rotation + 0.5;
Y_SPEED = Y_SPEED + GRAVITY;
checkImpact();
}
function onImpact() {
smokeSet.stop();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME);
super.onImpact();
dispatchEvent(new com.mygame.robotterritories.event.EventObject("rocketParticle", this));
}
static var LINK = "rocket";
}
Symbol 1257 MovieClip [__Packages.com.mygame.robotterritories.view.projectiles.SuperRocket] Frame 0
class com.mygame.robotterritories.view.projectiles.SuperRocket extends com.mygame.robotterritories.view.projectiles.HeroProjectile
{
var type, damage, GRAVITY, FRICTION, hitarea, hitable, PARENT, Y_SPEED, X_SPEED, clip, smokeSet, _x, _y, section, getGlobalLeft, hitTest, localToGlobal, getGlobalTop, removeEventListener, addEventListener, play;
function SuperRocket () {
super();
}
function setup() {
type = "SuperRocket";
damage = 220;
GRAVITY = 0.7;
FRICTION = 0.98;
hitarea._visible = false;
hitable = false;
var _local2 = (PARENT.canon.barel._rotation / 180) * 100;
Y_SPEED = (60 * (_local2 / 100)) - 30;
X_SPEED = ((_local2 > 50) ? (40 - (40 * (_local2 / 100))) : (40 * (_local2 / 100)));
clip._rotation = PARENT.canon.barel._rotation;
smokeSet = new com.mygame.robotterritories.view.SmokeSet(this, PARENT.parentSuperClip, 1, PARENT.canon.barel._rotation, true, "flare_4", 2);
start();
}
function start() {
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_super", 70);
}
super.start();
smokeSet.start();
}
function shotFiredHandler() {
clip._rotation = clip._rotation + 2.5;
_x = (_x + X_SPEED) * FRICTION;
_y = _y + Y_SPEED;
Y_SPEED = Y_SPEED + GRAVITY;
checkImpact();
}
function checkImpact() {
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().changeSection(this);
}
if (PARENT.impactGround.hitTest(_x + PARENT.parentSuperClip._x, _y + PARENT.parentSuperClip._y, true)) {
onImpact();
}
var _local3 = 0;
while (_local3 < PARENT.objectArray.length) {
if (hitarea.hitTest(PARENT.objectArray[_local3].hitarea)) {
PARENT.objectArray[_local3].onImpact();
onImpact(this);
}
_local3++;
}
var _local5 = com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().getEnemySection(Math.floor(getGlobalLeft() / 50));
for (var _local6 in _local5) {
var _local4 = com.mygame.robotterritories.view.enemy.IEnemy(_local5[_local6]);
if (hitTest(_local4.getHitarea())) {
_local4.onImpact(this);
onImpact();
}
}
var _local7 = {x:0, y:0};
localToGlobal(_local7);
if (((getGlobalLeft() < 0) || (getGlobalLeft() > 570)) || (getGlobalTop() > 420)) {
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME);
com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().destroyProjectile(this);
_global.setTimeout(this, "removeMovieClip", 200);
}
}
function checkImpact2() {
var _local3 = com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().getEnemies();
for (var _local4 in _local3) {
var _local2 = com.mygame.robotterritories.view.enemy.IEnemy(_local3[_local4]);
if (hitarea.hitTest(_local2.getHitarea())) {
_local2.onImpact(this);
}
}
}
function onImpact() {
smokeSet.stop();
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME);
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "checkImpact2");
com.midasplayer.fx.SoundManager.stop("snd_super");
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_super_impact", 90);
}
play();
com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().destroyProjectile(this);
var _local3 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 2, true);
_global.setTimeout(this, "removeMovieClip", 2000);
_global.setTimeout(this, "leaveCrater", 200);
}
function leaveCrater() {
PARENT.parent.leaveHeroProjCraterHandler(this);
}
static var LINK = "superRocket";
}
Symbol 1258 MovieClip [__Packages.com.mygame.robotterritories.view.projectiles.SuperDuperRocket] Frame 0
class com.mygame.robotterritories.view.projectiles.SuperDuperRocket extends com.mygame.robotterritories.view.projectiles.HeroProjectile
{
var type, hitable, damage, GRAVITY, FRICTION, hitarea, PARENT, clip, X_SPEED, LOCKED_TARGET, Y_SPEED, start, enemyPoint, _x, _y, section, getGlobalLeft, hitTest, localToGlobal, getGlobalTop, removeEventListener, addEventListener, play;
function SuperDuperRocket () {
super();
}
function setup() {
type = "SuperDuperRocket";
hitable = false;
damage = 500;
GRAVITY = 0.05;
FRICTION = 1.02;
hitarea._visible = false;
clip._rotation = PARENT.getProjRotation() + 90;
X_SPEED = Math.round((LOCKED_TARGET._x - PARENT.parentDuperClip._x) / (LOCKED_TARGET._x / 50));
Y_SPEED = Math.round((LOCKED_TARGET._y - PARENT.parentDuperClip._y) / (LOCKED_TARGET._x / 50));
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_duper", com.mygame.robotterritories.util.Randomizer.getRandomNumber(10, 70));
}
start();
}
function shotFiredHandler() {
enemyPoint = {x:0, y:0};
LOCKED_TARGET.localToGlobal(enemyPoint);
_x = _x + X_SPEED;
_y = _y + Y_SPEED;
checkImpact();
}
function checkImpact() {
if (Math.floor(getGlobalLeft() / 50) != section) {
com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().changeSection(this);
}
if (PARENT.impactGround.hitTest(_x + PARENT.parentDuperClip._x, _y + PARENT.parentDuperClip._y, true)) {
onImpact();
}
var _local3 = 0;
while (_local3 < PARENT.objectArray.length) {
if (hitarea.hitTest(PARENT.objectArray[_local3].hitarea)) {
PARENT.objectArray[_local3].onImpact(this);
onImpact();
}
_local3++;
}
var _local5 = com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().getEnemySection(Math.floor(getGlobalLeft() / 50));
for (var _local6 in _local5) {
var _local4 = com.mygame.robotterritories.view.enemy.IEnemy(_local5[_local6]);
if (hitTest(_local4.getHitarea())) {
onImpact();
}
}
var _local7 = {x:0, y:0};
localToGlobal(_local7);
if (((getGlobalLeft() < 0) || (getGlobalLeft() > 560)) || (getGlobalTop() > 420)) {
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME);
com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().destroyProjectile(this);
_global.setTimeout(this, "removeMovieClip", 200);
}
}
function checkImpact2() {
var _local3 = com.mygame.robotterritories.view.enemy.EnemyModel.getInstance().getEnemies();
for (var _local4 in _local3) {
var _local2 = com.mygame.robotterritories.view.enemy.IEnemy(_local3[_local4]);
if (hitarea.hitTest(_local2.getHitarea())) {
_local2.onImpact(this);
}
}
}
function onImpact() {
removeEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME);
addEventListener(com.mygame.robotterritories.view.ExtendedMovieClip.ENTER_FRAME, this, "checkImpact2");
play();
com.midasplayer.fx.SoundManager.stop("snd_duper");
if (!com.midasplayer.fx.SoundManager.hackIsMuted) {
com.midasplayer.fx.SoundManager.play("snd_duper_impact", 90);
}
PARENT.parent.play();
var _local3 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 2, true);
_global.setTimeout(this, "removeMovieClip", 2000);
com.mygame.robotterritories.view.hero.HeroProjectileModel.getInstance().destroyProjectile(this);
_global.setTimeout(this, "leaveCrater", 200);
}
function leaveCrater() {
PARENT.parent.leaveHeroProjCraterHandler(this);
}
static var LINK = "superDuperRocket";
}