Frame 1
var loaded = 0;
_root.onEnterFrame = function () {
if (loaded < 100) {
loaded = Math.round((this.getBytesLoaded() / this.getBytesTotal()) * 100);
this.loadingbar._yscale = loaded;
this.percent.text = loaded + "% loaded";
stop();
} else {
this.onEnterFrame = undefined;
play();
}
};
stop();
fscommand ("showmenu", false);
fscommand ("allowscale", false);
Frame 104
_global.root = this;
if (!_global.theme) {
_global.theme = new Sound(this);
_global.theme.attachSound("Rail of war.mp3");
_global.theme.start(0, 100);
}
var soSuperLevel = SharedObject.getLocal("superlevel");
if (soSuperLevel.data.levelid == undefined) {
soSuperLevel.data.levelid = 1;
soSuperLevel.flush();
}
_global.superlevel = soSuperLevel.data.levelid;
stop();
Frame 114
_global.theme.stop();
delete _global.theme;
stop();
Frame 124
_global.theme.stop();
delete _global.theme;
stop();
Frame 134
_global.theme.stop();
delete _global.theme;
stop();
Frame 144
stop();
Frame 154
_global.theme.stop();
delete _global.theme;
stop();
Frame 164
stop();
Symbol 34 MovieClip Frame 64
stop();
Symbol 3274 MovieClip [__Packages.rr.BaseClip] Frame 0
class rr.BaseClip extends MovieClip
{
var events;
function BaseClip () {
super();
}
function init() {
}
function addEventListener(evt, listener) {
if (events == undefined) {
events = new mx.events.EventDispatcher();
}
events.addEventListener(evt, listener);
}
function removeEventListener(evt, listener) {
events.removeEventListener(evt, listener);
}
}
Symbol 3275 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 3276 MovieClip [__Packages.rr.control.TabCard] Frame 0
class rr.control.TabCard extends rr.BaseClip
{
var locked_mc, alevel, _linkId, _parent, enabled, _alpha, onPress;
function TabCard () {
super();
init();
}
function init() {
locked_mc._visible = false;
alevel = rr.conf.Config.getObjectValue(_linkId, "availabilityLevel");
if (_parent != _global.levelresult.items_mc) {
checkEnabled();
_global.trainbuild.addEventListener("onUpdateBuild", this);
}
}
function get linkId() {
return(_linkId);
}
function set linkId(value) {
_linkId = value;
//return(linkId);
}
function onUpdateBuild() {
checkEnabled();
}
function checkEnabled() {
if ((alevel > _global.game.levelId) || (alevel > 2)) {
enabled = false;
locked_mc._visible = true;
}
}
function processEnabled() {
if (rr.conf.Config.testSettings()) {
enabled = true;
}
if (enabled) {
_alpha = 100;
onPress = rr.utils.Delegate.create(_global.trainbuild, _global.trainbuild.onCardSelect, this);
} else {
_alpha = 50;
delete onPress;
}
}
}
Symbol 3277 MovieClip [__Packages.rr.conf.Config] Frame 0
class rr.conf.Config
{
function Config () {
}
static function testSettings() {
return(false);
}
static function getGameConf(levelId) {
switch (levelId) {
case 1 :
return(new rr.conf.level.ConfLevel1());
case 2 :
return(new rr.conf.level.ConfLevel2());
}
}
static function addMapValues() {
var _local2 = _global.gameconf.map.mapid;
_global.gameconf.map.cols = getMapValue(_local2, "cols");
_global.gameconf.map.rows = getMapValue(_local2, "rows");
_global.gameconf.map.startcol = getMapValue(_local2, "startcol");
_global.gameconf.map.startrow = getMapValue(_local2, "startrow");
_global.gameconf.map.maptype = getMapValue(_local2, "maptype");
_global.gameconf.map.foreground = getMapValue(_local2, "foreground");
_global.gameconf.map.firstrail = getMapValue(_local2, "firstrail");
_global.gameconf.map.lastrail = getMapValue(_local2, "lastrail");
_global.gameconf.map.collapsepoints = getMapValue(_local2, "collapsepoints");
}
static function getMapValue(mapId, key) {
switch (mapId) {
case 1 :
return(rr.conf.map.ConfMapValues1.getValue(key));
case 2 :
return(rr.conf.map.ConfMapValues2.getValue(key));
}
}
static function getObjectValue(linkId, key) {
switch (linkId) {
case "SaddleTank" :
return(rr.conf.train.ConfSaddleTank.getValue(key));
case "BulpFrog" :
return(rr.conf.train.ConfBulpFrog.getValue(key));
case "Rhino" :
return(rr.conf.train.ConfRhino.getValue(key));
case "SuperChief" :
return(rr.conf.train.ConfSuperChief.getValue(key));
case "SuperChiefWagon" :
return(rr.conf.train.ConfSuperChiefWagon.getValue(key));
case "ICE" :
return(rr.conf.train.ConfICE.getValue(key));
case "ICEWagon" :
return(rr.conf.train.ConfICEWagon.getValue(key));
case "Dragon" :
return(rr.conf.train.ConfDragon.getValue(key));
case "Loewy" :
return(rr.conf.train.ConfLoewy.getValue(key));
case "Pennsylvania" :
return(rr.conf.train.ConfPennsylvania.getValue(key));
case "SmallCannon" :
return(rr.conf.train.ConfSmallCannon.getValue(key));
case "MediumCannon" :
return(rr.conf.train.ConfMediumCannon.getValue(key));
case "LargeCannon" :
return(rr.conf.train.ConfLargeCannon.getValue(key));
case "HugeCannon" :
return(rr.conf.train.ConfHugeCannon.getValue(key));
case "Heatseeker" :
return(rr.conf.train.ConfHeatseeker.getValue(key));
case "BunkerBuster" :
return(rr.conf.train.ConfBunkerBuster.getValue(key));
case "RailRockets" :
return(rr.conf.train.ConfRailRockets.getValue(key));
case "EMP" :
return(rr.conf.train.ConfEMP.getValue(key));
case "SmallFastCannon" :
return(rr.conf.train.ConfSmallFastCannon.getValue(key));
case "RocketLauncher" :
return(rr.conf.train.ConfRocketLauncher.getValue(key));
case "Wagon1" :
return(rr.conf.train.ConfWagon1.getValue(key));
case "Wagon2" :
return(rr.conf.train.ConfWagon2.getValue(key));
case "Wagon3" :
return(rr.conf.train.ConfWagon3.getValue(key));
case "Wagon4" :
return(rr.conf.train.ConfWagon4.getValue(key));
case "OilTank" :
return(rr.conf.train.ConfOilTank.getValue(key));
case "ColeCart" :
return(rr.conf.train.ConfColeCart.getValue(key));
case "PowerGenerator" :
return(rr.conf.train.ConfPowerGenerator.getValue(key));
case "AirCrane" :
return(rr.conf.train.ConfAirCrane.getValue(key));
case "FuelTank" :
return(rr.conf.train.ConfFuelTank.getValue(key));
case "Passenger" :
return(rr.conf.train.ConfPassenger.getValue(key));
case "PassengerArmored" :
return(rr.conf.train.ConfPassengerArmored.getValue(key));
case "TankTrailer" :
return(rr.conf.train.ConfTankTrailer.getValue(key));
case "ABomb" :
return(rr.conf.train.ConfABomb.getValue(key));
case "Compound" :
return(rr.conf.train.ConfCompound.getValue(key));
case "Basilisk" :
return(rr.conf.enemy.ConfBasilisk.getValue(key));
case "PotTank" :
return(rr.conf.enemy.ConfPotTank.getValue(key));
case "Abrahams" :
return(rr.conf.enemy.ConfAbrahams.getValue(key));
case "Elephant" :
return(rr.conf.enemy.ConfElephant.getValue(key));
case "OldJeep" :
return(rr.conf.enemy.ConfOldJeep.getValue(key));
case "GunTruck" :
return(rr.conf.enemy.ConfGunTruck.getValue(key));
case "ArmoredJeep" :
return(rr.conf.enemy.ConfArmoredJeep.getValue(key));
case "Panther" :
return(rr.conf.enemy.ConfPanther.getValue(key));
case "BullDozer" :
return(rr.conf.enemy.ConfBullDozer.getValue(key));
case "Bunker" :
return(rr.conf.enemy.ConfBunker.getValue(key));
case "GatlingSingle" :
return(rr.conf.enemy.ConfGatlingSingle.getValue(key));
case "GatlingDouble" :
return(rr.conf.enemy.ConfGatlingDouble.getValue(key));
case "Rocketeer" :
return(rr.conf.enemy.ConfRocketeer.getValue(key));
case "RocketBase" :
return(rr.conf.enemy.ConfRocketBase.getValue(key));
case "Rocket" :
return(rr.conf.enemy.ConfRocket.getValue(key));
case "AirField" :
return(rr.conf.enemy.ConfAirField.getValue(key));
case "FockeWolf" :
return(rr.conf.enemy.ConfFockeWolf.getValue(key));
case "MesserSchmidt" :
return(rr.conf.enemy.ConfMesserSchmidt.getValue(key));
case "WartHog" :
return(rr.conf.enemy.ConfWartHog.getValue(key));
case "C47" :
return(rr.conf.enemy.ConfC47.getValue(key));
case "B2" :
return(rr.conf.enemy.ConfB2.getValue(key));
case "BellHuey" :
return(rr.conf.enemy.ConfBellHuey.getValue(key));
case "Apache" :
return(rr.conf.enemy.ConfApache.getValue(key));
}
}
static function translateEnemyCodes(codes) {
var _local3 = [];
var _local1 = 0;
while (_local1 < codes.length) {
if (codes[_local1] == "bl") {
_local3.push("Basilisk");
}
if (codes[_local1] == "pt") {
_local3.push("PotTank");
}
if (codes[_local1] == "ah") {
_local3.push("Abrahams");
}
if (codes[_local1] == "el") {
_local3.push("Elephant");
}
if (codes[_local1] == "oj") {
_local3.push("OldJeep");
}
if (codes[_local1] == "gt") {
_local3.push("GunTruck");
}
if (codes[_local1] == "aj") {
_local3.push("ArmoredJeep");
}
if (codes[_local1] == "pn") {
_local3.push("Panther");
}
if (codes[_local1] == "bd") {
_local3.push("BullDozer");
}
if (codes[_local1] == "bk") {
_local3.push("Bunker");
}
if (codes[_local1] == "gs") {
_local3.push("GatlingSingle");
}
if (codes[_local1] == "gd") {
_local3.push("GatlingDouble");
}
if (codes[_local1] == "rt") {
_local3.push("Rocketeer");
}
if (codes[_local1] == "af") {
_local3.push("AirField");
}
if (codes[_local1] == "rb") {
_local3.push("RocketBase");
}
if (codes[_local1] == "fw") {
_local3.push("FockeWolf");
}
if (codes[_local1] == "ms") {
_local3.push("MesserSchmidt");
}
if (codes[_local1] == "wh") {
_local3.push("WartHog");
}
if (codes[_local1] == "c47") {
_local3.push("C47");
}
if (codes[_local1] == "b2") {
_local3.push("B2");
}
if (codes[_local1] == "bh") {
_local3.push("BellHuey");
}
if (codes[_local1] == "ap") {
_local3.push("Apache");
}
_local1++;
}
return(_local3);
}
static function translateDropCode(code) {
if (code == "f") {
return("FuelTank");
}
if (code == "p") {
return("Passenger");
}
if (code == "a") {
return("PassengerArmored");
}
if (code == "t") {
return("TankTrailer");
}
if (code == "b") {
return("ABomb");
}
}
}
Symbol 3278 MovieClip [__Packages.rr.conf.level.ConfLevel1] Frame 0
class rr.conf.level.ConfLevel1
{
var title, missiontext, map, nightmap, startcash, levelpoints, ea, af, bk, rb, bs, dp;
function ConfLevel1 () {
title = "Grass Rage";
missiontext = "1. Drop off Passenger wagon near start position\r2. Pick up Fuel tank at train depot east of map";
map = new rr.conf.map.ConfMap1();
nightmap = false;
startcash = 5500;
levelpoints = 6500;
ea = [{x:2559, y:178, w:85, h:85, e:["bl"]}, {x:2945, y:144, w:168, h:268, e:["pt", "oj", "oj"]}, {x:2619, y:298, w:292, h:162, e:["bd"]}, {x:1958, y:302, w:85, h:85, e:["gs"]}, {x:1333, y:107, w:194, h:300, e:["aj", "aj", "gt", "oj", "oj"]}, {x:715, y:313, w:232, h:163, e:["oj", "oj", "aj", "oj"]}, {x:1027, y:361, w:267, h:108, e:["aj", "oj"]}, {x:2040, y:47, w:85, h:85, e:["gs"]}, {x:2168, y:278, w:102, h:189, e:["gt", "gt"]}, {x:2872, y:12, w:463, h:101, e:["oj", "oj", "aj", "oj"]}, {x:3383, y:63, w:164, h:162, e:["bd", "bd"]}, {x:4228, y:31, w:85, h:85, e:["gd"]}, {x:4324, y:383, w:85, h:85, e:["gd"]}, {x:4755, y:375, w:85, h:85, e:["gs"]}, {x:5113, y:64, w:235, h:393, e:["bd", "el", "pt", "pt", "aj", "oj", "oj"]}, {x:5509, y:296, w:85, h:85, e:["bl"]}, {x:3845, y:8, w:260, h:151, e:["oj", "oj"]}, {x:3571, y:306, w:161, h:149, e:["oj", "oj"]}, {x:1619, y:143, w:308, h:312, e:["oj", "oj", "oj", "aj", "aj", "gt"]}, {e:["oj", "oj", "oj"], a:[{x:1110, y:46, w:188, h:95}, {x:967, y:176, w:274, h:158}]}, {e:["pt", "gt", "aj", "el"], a:[{x:3782, y:355, w:395, h:105}, {x:3853, y:186, w:308, h:129}]}, {e:["gt", "pt", "aj", "aj", "pt"], a:[{x:4446, y:263, w:188, h:185}, {x:4588, y:18, w:249, h:138}, {x:4356, y:28, w:195, h:208}]}, {e:["gt", "gt", "aj", "pt"], a:[{x:5644, y:70, w:249, h:177}, {x:5685, y:287, w:588, h:148}]}, {e:["aj", "aj", "aj", "oj", "oj"], a:[{x:4892, y:322, w:191, h:148}, {x:4879, y:13, w:187, h:124}]}];
af = [{x:4280, y:305, r:171, e:["fw", "fw", "fw", "fw"]}];
bk = [{x:3227, y:287, r:-130, s:100}, {x:3324, y:262, r:-63, s:96}, {x:3369, y:341, r:-23, s:100}, {x:3660, y:141, r:116, s:100}, {x:3764, y:135, r:55, s:90}, {x:3713, y:81, r:95, s:100}];
rb = [];
bs = [{x:6144, y:378, t:"m", c:500}, {x:5801, y:448, t:"e"}, {x:3428, y:106, t:"r"}, {x:1556, y:278, t:"e"}, {x:2674, y:54, t:"m", c:250}, {x:4572, y:71, t:"r"}, {x:5095, y:443, t:"r"}];
dp = [{x:624, y:374, t:"p", m:"d"}, {x:6282, y:381, t:"f", m:"p"}];
}
}
Symbol 3279 MovieClip [__Packages.rr.conf.map.ConfMap1] Frame 0
class rr.conf.map.ConfMap1
{
var mapid, title, rc, rs, cp;
function ConfMap1 () {
mapid = 1;
title = "default";
rc = [{id:1, x:20, y:196, a:0}, {id:2, x:320, y:196, a:0}, {id:9999, x:6180, y:139, a:-180}, {id:10000, x:6280, y:139, a:-180}, {id:3, x:456, y:196, a:0}, {id:4, x:603, y:149, a:-325}, {id:5, x:732, y:108, a:-360}, {id:6, x:1011, y:108, a:-360, s:{x:1009, y:74, p:[-1, -1, 16, -1, 18, -1, -1, -1]}}, {id:17, x:1287, y:108, a:-360}, {id:19, x:935, y:273, a:-229}, {id:23, x:662, y:252, a:-140}, {id:24, x:736, y:459, a:0}, {id:25, x:1165, y:459, a:0}, {id:27, x:1385, y:186, a:-77}, {id:28, x:1286, y:459, a:0}, {id:29, x:1385, y:369, a:-276}, {id:30, x:1497, y:268, a:-360}, {id:33, x:1661, y:350, a:-53}, {id:34, x:1765, y:402, a:0, s:{x:1759, y:364, p:[-1, 38, 35, -1, -1, -1, -1, -1]}}, {id:36, x:2281, y:402, a:0}, {id:38, x:2706, y:402, a:0}, {id:39, x:1970, y:248, a:-286}, {id:40, x:2065, y:161, a:-349}, {id:41, x:2586, y:60, a:-349}, {id:42, x:2636, y:55, a:0}, {id:43, x:3058, y:55, a:0}, {id:44, x:2813, y:402, a:0}, {id:45, x:2952, y:291, a:-283}, {id:46, x:3244, y:55, a:-359}, {id:49, x:3538, y:235, a:-64, s:{x:3579, y:230, p:[-1, -1, 50, 49, -1, -1, -1, -1]}}, {id:50, x:3827, y:417, a:0}, {id:51, x:3665, y:314, a:-360}, {id:52, x:3765, y:314, a:-360}, {id:53, x:3935, y:229, a:-307}, {id:54, x:4122, y:135, a:-360}, {id:55, x:4220, y:417, a:0}, {id:56, x:4222, y:135, a:-360}, {id:57, x:4373, y:98, a:-332}, {id:58, x:4453, y:78, a:0}, {id:59, x:4786, y:78, a:0}, {id:61, x:4303, y:396, a:-331}, {id:62, x:4454, y:357, a:0}, {id:63, x:4637, y:357, a:0}, {id:64, x:5030, y:78, a:0}, {id:65, x:5185, y:182, a:-68}, {id:66, x:4767, y:357, a:0}, {id:67, x:4851, y:403, a:-57}, {id:68, x:4947, y:455, a:0}, {id:69, x:5070, y:455, a:0}, {id:70, x:5188, y:354, a:-279}, {id:73, x:5292, y:254, a:-360}, {id:74, x:5507, y:254, a:-360, s:{x:5507, y:214, p:[-1, 75, -1, 80, -1, -1, -1, -1]}}, {id:76, x:5655, y:197, a:-318}, {id:79, x:5810, y:137, a:-360}, {id:80, x:5647, y:356, a:-72}, {id:81, x:5781, y:453, a:-360, s:{x:5781, y:413, p:[-1, 105, 90, -1, -1, -1, -1, -1]}}, {id:90, x:5881, y:453, a:-360, s:{x:5903, y:417, p:[-1, 91, 94, -1, -1, -1, -1, -1]}}, {id:91, x:5929, y:441, a:-331}, {id:92, x:5977, y:428, a:-360, s:{x:5976, y:394, p:[-1, 97, 93, -1, -1, -1, -1, -1]}}, {id:93, x:6356, y:428, a:-360}, {id:94, x:5981, y:453, a:-360}, {id:95, x:6356, y:453, a:-360}, {id:97, x:6041, y:404, a:-320, s:{x:6034, y:356, p:[-1, 102, 98, -1, -1, -1, -1, -1]}}, {id:98, x:6105, y:381, a:0}, {id:100, x:6357, y:381, a:0}, {id:102, x:6062, y:380, a:-302}, {id:103, x:6148, y:333, a:0}, {id:104, x:6355, y:333, a:0}, {id:105, x:5878, y:379, a:-285}, {id:106, x:5975, y:305, a:0}, {id:107, x:6357, y:305, a:0}];
rs = [{id:1, s:1, e:2}, {id:10000, s:10000, e:9999}, {id:2, s:2, e:3}, {id:3, s:3, e:4, r:254, d:1, l:157}, {id:4, s:4, e:5, r:229, d:-1, l:138}, {id:5, s:5, e:6}, {id:16, s:6, e:17}, {id:18, s:6, e:19, r:100, d:-1, l:400}, {id:22, s:19, e:23, r:195, d:1, l:304}, {id:23, s:23, e:24, r:117, d:1, l:285}, {id:24, s:24, e:25}, {id:26, s:17, e:27, r:100, d:-1, l:135}, {id:27, s:25, e:28}, {id:28, s:28, e:29, r:100, d:1, l:147}, {id:29, s:29, e:30, r:113, d:-1, l:165}, {id:30, s:27, e:30, r:106, d:1, l:149}, {id:32, s:30, e:33, r:206, d:-1, l:190}, {id:33, s:33, e:34, r:131, d:1, l:121}, {id:35, s:34, e:36}, {id:37, s:36, e:38}, {id:38, s:34, e:39, r:213, d:1, l:275}, {id:39, s:39, e:40, r:123, d:-1, l:135}, {id:40, s:40, e:41}, {id:41, s:41, e:42, r:254, d:-1, l:50}, {id:42, s:42, e:43}, {id:43, s:38, e:44}, {id:44, s:44, e:45, r:143, d:1, l:192}, {id:45, s:45, e:46, r:304, d:-1, l:404}, {id:46, s:43, e:46}, {id:48, s:46, e:49, r:322, d:-1, l:364}, {id:49, s:49, e:50, r:324, d:1, l:360}, {id:50, s:49, e:51, r:140, d:1, l:157}, {id:51, s:51, e:52}, {id:52, s:52, e:53, r:211, d:1, l:197}, {id:53, s:53, e:54, r:236, d:-1, l:217}, {id:54, s:50, e:55}, {id:55, s:54, e:56}, {id:56, s:56, e:57, r:326, d:1, l:157}, {id:57, s:57, e:58, r:169, d:-1, l:83}, {id:58, s:58, e:59}, {id:60, s:55, e:61, r:174, d:1, l:87}, {id:61, s:61, e:62, r:308, d:-1, l:157}, {id:62, s:62, e:63}, {id:63, s:59, e:64}, {id:64, s:64, e:65, r:168, d:-1, l:198}, {id:65, s:63, e:66}, {id:66, s:66, e:67, r:100, d:-1, l:100}, {id:67, s:67, e:68, r:115, d:1, l:114}, {id:68, s:68, e:69}, {id:69, s:69, e:70, r:119, d:1, l:169}, {id:72, s:65, e:73, r:115, d:1, l:137}, {id:73, s:73, e:74}, {id:74, s:70, e:73, r:117, d:-1, l:157}, {id:75, s:74, e:76, r:220, d:1, l:162}, {id:78, s:76, e:79, r:234, d:-1, l:170}, {id:79, s:79, e:9999, eo:1}, {id:80, s:74, e:80, r:147, d:-1, l:185}, {id:81, s:80, e:81, r:140, d:1, l:177}, {id:90, s:81, e:90}, {id:91, s:90, e:91, r:100, d:1, l:50}, {id:92, s:91, e:92, r:100, d:-1, l:50}, {id:93, s:92, e:93}, {id:94, s:90, e:94}, {id:95, s:94, e:95}, {id:97, s:92, e:97, r:100, d:1, l:70}, {id:98, s:97, e:98, r:100, d:-1, l:70}, {id:100, s:98, e:100}, {id:102, s:97, e:102, r:100, d:1, l:32}, {id:103, s:102, e:103, r:100, d:-1, l:102}, {id:104, s:103, e:104}, {id:105, s:81, e:105, r:100, d:1, l:131}, {id:106, s:105, e:106, r:100, d:-1, l:131}, {id:107, s:106, e:107}];
cp = [{x:2111, y:390, rot:0}, {x:2792, y:68, rot:180}, {x:4169, y:123, rot:0}, {x:4697, y:369, rot:180}, {x:5409, y:240, rot:0}];
}
}
Symbol 3280 MovieClip [__Packages.rr.conf.level.ConfLevel2] Frame 0
class rr.conf.level.ConfLevel2
{
var title, missiontext, map, nightmap, startcash, levelpoints, ea, af, bk, rb, bs, dp;
function ConfLevel2 () {
title = "Desert Rage";
missiontext = "1. Drop off Passenger wagon and Fuel tank at train depot south of start position\r2. Drop off Tank trailer north of map\r3. Pick up Armed Passenger wagon at oasis\r4. Pick up two Fuel tanks at train depot on the east";
map = new rr.conf.map.ConfMap2();
nightmap = false;
startcash = 6250;
levelpoints = 10500;
ea = [{x:2536, y:2084, w:381, h:280, e:["pt", "pt", "gt", "gt", "aj", "el", "oj", "oj", "aj"]}, {x:71, y:1591, w:512, h:415, e:["bd", "bd", "gt", "gt", "aj", "aj", "el", "pt", "pt", "pt", "oj", "oj"]}, {x:551, y:1120, w:347, h:258, e:["oj", "oj", "oj", "oj", "aj", "aj", "gt", "oj"]}, {x:1274, y:1009, w:85, h:85, e:["gs"]}, {x:1279, y:1264, w:85, h:85, e:["gs"]}, {x:1876, y:351, w:181, h:385, e:["pt", "gt", "gt", "aj"]}, {x:2325, y:229, w:85, h:85, e:["gs"]}, {x:3213, y:1117, w:85, h:85, e:["bl"]}, {x:3579, y:1111, w:402, h:334, e:["el", "aj", "oj", "oj", "pt", "ah", "bd", "aj", "aj", "gt", "gt"]}, {x:3323, y:1716, w:292, h:206, e:["el", "el", "gt", "gt", "aj", "aj", "aj"]}, {x:3273, y:2237, w:85, h:85, e:["gd"]}, {x:2943, y:2238, w:85, h:85, e:["gd"]}, {x:4218, y:2097, w:327, h:245, e:["pt", "pt", "pt", "el", "oj", "oj"]}, {x:4261, y:1728, w:85, h:85, e:["bl"]}, {x:671, y:1919, w:405, h:322, e:["oj", "oj", "aj", "aj", "gt", "gt", "oj", "oj", "oj"]}, {x:4066, y:933, w:343, h:201, e:["ah", "oj", "oj", "aj", "aj"]}, {x:3014, y:686, w:186, h:93, e:["aj", "aj"]}, {e:["aj", "aj", "oj", "oj", "pt", "pt", "oj", "oj", "oj", "gt", "gt", "gt"], a:[{x:3177, y:1242, w:322, h:313}, {x:2661, y:1467, w:479, h:149}]}, {e:["el", "gt", "gt", "gt", "aj", "aj", "oj", "oj", "pt", "pt", "aj", "aj", "gt", "gt", "pt"], a:[{x:2894, y:311, w:150, h:215}, {x:2568, y:26, w:743, h:278}]}, {e:["gt", "gt", "gt", "aj", "aj", "aj", "oj", "oj", "oj", "ah", "pt", "el", "gt", "pt"], a:[{x:790, y:1480, w:319, h:288}, {x:1054, y:1120, w:217, h:179}]}, {e:["gt", "gt", "aj", "aj", "pt", "pt", "el", "oj"], a:[{x:2120, y:1588, w:317, h:307}, {x:2030, y:1293, w:232, h:246}]}, {e:["bd", "pt", "pt", "el", "gt", "gt", "aj", "oj", "oj"], a:[{x:1764, y:759, w:286, h:185}, {x:1768, y:1067, w:243, h:290}]}, {e:["pt", "pt", "el", "gt", "bd", "bd", "bd"], a:[{x:3390, y:2214, w:147, h:160}, {x:3665, y:2227, w:461, h:158}]}, {e:["bd", "bd", "pt", "pt", "pn", "gt", "gt", "aj", "aj"], a:[{x:5007, y:1444, w:106, h:173}, {x:4548, y:1637, w:388, h:208}]}, {e:["oj", "oj", "oj", "aj", "aj", "ah", "pt", "pt", "pt", "el"], a:[{x:4110, y:1373, w:211, h:215}, {x:4019, y:1151, w:268, h:195}]}, {e:["bd", "bd", "oj", "oj", "oj"], a:[{x:2697, y:726, w:192, h:109}, {x:2470, y:835, w:158, h:127}]}];
af = [{x:3147, y:2244, r:32, e:["fw", "fw", "fw", "fw", "bh", "bh", "bh", "bh", "fw", "c47", "c47"]}];
bk = [{x:3020, y:818, r:-102, s:100}, {x:2891, y:659, r:83, s:100}, {x:2755, y:909, r:-107, s:100}, {x:2656, y:695, r:96, s:100}, {x:2427, y:840, r:50, s:94}, {x:2584, y:1047, r:-132, s:100}, {x:2276, y:1026, r:33, s:100}, {x:2386, y:1490, r:88, s:100}];
rb = [];
bs = [{x:1971, y:746, t:"e"}, {x:2991, y:2022, t:"m", c:1600}, {x:531, y:1988, t:"m", c:700}, {x:2662, y:834, t:"m", c:1000}, {x:2317, y:1203, t:"r"}, {x:4901, y:1622, t:"m", c:700}, {x:94, y:1772, t:"r"}, {x:3702, y:1282, t:"r"}, {x:2801, y:118, t:"r"}];
dp = [{x:163, y:1887, t:"f", m:"d"}, {x:366, y:1882, t:"p", m:"d"}, {x:3073, y:162, t:"t", m:"d"}, {x:3351, y:1167, t:"a", m:"p"}, {x:4842, y:1537, t:"f", m:"p"}, {x:4981, y:1536, t:"f", m:"p"}];
}
}
Symbol 3281 MovieClip [__Packages.rr.conf.map.ConfMap2] Frame 0
class rr.conf.map.ConfMap2
{
var mapid, title, rc, rs, cp;
function ConfMap2 () {
mapid = 2;
title = "default";
rc = [{id:1, x:20, y:1095, a:0}, {id:2, x:320, y:1095, a:0}, {id:9999, x:4890, y:1228, a:-180}, {id:10000, x:5090, y:1228, a:-180}, {id:3, x:607, y:1095, a:0}, {id:5, x:740, y:1167, a:-57, s:{x:776, y:1147, p:[-1, -1, 53, -1, 5, -1, -1, -1]}}, {id:6, x:597, y:1428, a:-180, s:{x:587, y:1393, p:[-1, -1, -1, -1, 17, -1, 6, -1]}}, {id:7, x:497, y:1428, a:-180, s:{x:497, y:1394, p:[-1, -1, -1, -1, 16, -1, 7, -1]}}, {id:8, x:397, y:1428, a:-180, s:{x:396, y:1394, p:[-1, -1, -1, -1, 15, -1, 8, -1]}}, {id:9, x:297, y:1428, a:-180, s:{x:295, y:1395, p:[-1, -1, -1, -1, 14, -1, 10, -1]}}, {id:11, x:197, y:1428, a:-180}, {id:14, x:97, y:1528, a:-90}, {id:15, x:197, y:1528, a:-90}, {id:16, x:297, y:1528, a:-90}, {id:17, x:397, y:1528, a:-90}, {id:18, x:497, y:1528, a:-90}, {id:19, x:497, y:1628, a:-90, s:{x:537, y:1628, p:[-1, -1, -1, 27, -1, 32, -1, -1]}}, {id:20, x:397, y:1628, a:-90, s:{x:437, y:1628, p:[-1, -1, -1, 26, -1, 31, -1, -1]}}, {id:21, x:297, y:1628, a:-90, s:{x:337, y:1628, p:[-1, -1, -1, 25, -1, 30, -1, -1]}}, {id:22, x:197, y:1628, a:-90, s:{x:237, y:1628, p:[-1, -1, -1, 23, -1, 29, -1, -1]}}, {id:23, x:97, y:2054, a:-90}, {id:24, x:214, y:1684, a:-56}, {id:25, x:231, y:1741, a:-90}, {id:26, x:314, y:1684, a:-56}, {id:27, x:414, y:1684, a:-56}, {id:28, x:514, y:1684, a:-56}, {id:29, x:231, y:2176, a:-90}, {id:30, x:180, y:1684, a:-124}, {id:31, x:280, y:1684, a:-124}, {id:32, x:380, y:1684, a:-124}, {id:33, x:480, y:1684, a:-124}, {id:34, x:163, y:1741, a:-90}, {id:35, x:163, y:2041, a:-90}, {id:37, x:263, y:1741, a:-90}, {id:38, x:263, y:2041, a:-90}, {id:39, x:331, y:1741, a:-90}, {id:40, x:331, y:2176, a:-90}, {id:41, x:363, y:1741, a:-90}, {id:42, x:363, y:2041, a:-90}, {id:43, x:431, y:1741, a:-90}, {id:44, x:431, y:2041, a:-90}, {id:45, x:463, y:1741, a:-90}, {id:46, x:463, y:2041, a:-90}, {id:47, x:531, y:1741, a:-90}, {id:48, x:531, y:2176, a:-90}, {id:50, x:97, y:2133, a:-90}, {id:51, x:197, y:2233, a:0}, {id:52, x:554, y:2233, a:0}, {id:53, x:827, y:1958, a:-270}, {id:54, x:888, y:1248, a:0}, {id:57, x:827, y:1688, a:-270}, {id:58, x:927, y:1588, a:-360}, {id:59, x:1027, y:1488, a:-270}, {id:60, x:1027, y:1347, a:-270}, {id:61, x:1127, y:1247, a:-360}, {id:64, x:1227, y:1247, a:-360, s:{x:1231, y:1208, p:[64, -1, 67, -1, -1, -1, -1, -1]}}, {id:65, x:1323, y:1176, a:-287}, {id:66, x:1430, y:1084, a:-352}, {id:67, x:1687, y:1048, a:-352}, {id:68, x:1682, y:1247, a:-360}, {id:69, x:1797, y:949, a:-284}, {id:71, x:1782, y:1247, a:-360, s:{x:1782, y:1207, p:[71, -1, 90, -1, -1, -1, -1, -1]}}, {id:72, x:1882, y:1147, a:-270}, {id:73, x:1882, y:887, a:-270}, {id:76, x:1967, y:754, a:-335}, {id:77, x:2010, y:593, a:-235}, {id:78, x:2233, y:330, a:-26}, {id:79, x:2513, y:209, a:-287}, {id:80, x:2631, y:122, a:0}, {id:81, x:2993, y:122, a:0}, {id:82, x:3096, y:230, a:-93}, {id:83, x:3077, y:601, a:-93}, {id:84, x:2983, y:724, a:-162}, {id:85, x:2739, y:803, a:-162}, {id:86, x:2482, y:993, a:-125}, {id:88, x:2379, y:1140, a:-125}, {id:89, x:2257, y:1247, a:-152}, {id:90, x:2150, y:1412, a:-94}, {id:91, x:1991, y:1247, a:-360}, {id:93, x:2143, y:1512, a:-94}, {id:94, x:2402, y:1696, a:-337}, {id:95, x:2757, y:1545, a:-337}, {id:96, x:2927, y:1532, a:-14}, {id:97, x:3307, y:1248, a:-272}, {id:99, x:3409, y:1150, a:0}, {id:100, x:3598, y:1150, a:0}, {id:102, x:3698, y:1250, a:-90}, {id:103, x:3698, y:1350, a:-90}, {id:107, x:3739, y:1480, a:-55}, {id:108, x:3615, y:1829, a:-164}, {id:112, x:3094, y:1978, a:-164}, {id:113, x:2952, y:2043, a:-147}, {id:114, x:2825, y:2126, a:-147}, {id:115, x:2796, y:2264, a:-57}, {id:116, x:2928, y:2336, a:0}, {id:117, x:3253, y:2336, a:0}, {id:118, x:3759, y:2336, a:0}, {id:119, x:4149, y:2336, a:0}, {id:120, x:4249, y:2236, a:-270}, {id:121, x:4249, y:1926, a:-270, s:{x:4209, y:1926, p:[122, -1, 121, -1, -1, -1, -1, -1]}}, {id:122, x:4349, y:1826, a:-360}, {id:123, x:4249, y:1535, a:-270}, {id:124, x:4165, y:1355, a:-220}, {id:125, x:4236, y:1179, a:-4}, {id:126, x:4599, y:1826, a:-360, s:{x:4594, y:1858, p:[126, -1, 127, -1, -1, -1, -1, -1]}}, {id:127, x:4720, y:1741, a:-290, s:{x:4764, y:1736, p:[133, 134, -1, -1, -1, -1, -1, -1]}}, {id:128, x:4739, y:1826, a:-360, s:{x:4738, y:1857, p:[128, -1, 129, -1, -1, -1, -1, -1]}}, {id:129, x:4860, y:1741, a:-290, s:{x:4904, y:1735, p:[132, 138, -1, -1, -1, -1, -1, -1]}}, {id:130, x:4879, y:1826, a:-360}, {id:131, x:5000, y:1741, a:-290}, {id:132, x:5034, y:1647, a:-290}, {id:133, x:4894, y:1647, a:-290}, {id:134, x:4754, y:1647, a:-290}, {id:135, x:4764, y:1689, a:-330}, {id:136, x:4808, y:1636, a:-290}, {id:137, x:4869, y:1469, a:-290}, {id:138, x:4819, y:1468, a:-290}, {id:139, x:4904, y:1689, a:-330}, {id:140, x:4948, y:1636, a:-290}, {id:141, x:5006, y:1476, a:-290}, {id:142, x:4956, y:1478, a:-290}, {id:143, x:5063, y:1568, a:-290}, {id:144, x:5022, y:1449, a:-212}, {id:146, x:4945, y:1427, a:-180}, {id:148, x:4845, y:1427, a:-180}, {id:150, x:4728, y:1515, a:-106}, {id:151, x:4683, y:1673, a:-106}, {id:152, x:4566, y:1761, a:-180}, {id:153, x:4460, y:1761, a:-180}, {id:156, x:4656, y:1208, a:-4}, {id:157, x:4713, y:1221, a:-22}, {id:158, x:4750, y:1228, a:0}];
rs = [{id:1, s:1, e:2}, {id:10000, s:10000, e:9999}, {id:2, s:2, e:3}, {id:4, s:3, e:5, r:159, d:-1, l:158}, {id:5, s:5, e:6, r:169, d:-1, l:364}, {id:6, s:6, e:7}, {id:7, s:7, e:8}, {id:8, s:8, e:9}, {id:10, s:9, e:11}, {id:13, s:11, e:14, r:100, d:1, l:157}, {id:14, s:9, e:15, r:100, d:1, l:157}, {id:15, s:8, e:16, r:100, d:1, l:157}, {id:16, s:7, e:17, r:100, d:1, l:157}, {id:17, s:6, e:18, r:100, d:1, l:157}, {id:18, s:18, e:19}, {id:19, s:17, e:20}, {id:20, s:16, e:21}, {id:21, s:15, e:22}, {id:22, s:14, e:23}, {id:23, s:22, e:24, r:100, d:1, l:60}, {id:24, s:24, e:25, r:100, d:-1, l:60}, {id:25, s:21, e:26, r:100, d:1, l:60}, {id:26, s:20, e:27, r:100, d:1, l:60}, {id:27, s:19, e:28, r:100, d:1, l:60}, {id:28, s:25, e:29}, {id:29, s:22, e:30, r:100, d:-1, l:60}, {id:30, s:21, e:31, r:100, d:-1, l:60}, {id:31, s:20, e:32, r:100, d:-1, l:60}, {id:32, s:19, e:33, r:100, d:-1, l:60}, {id:33, s:30, e:34, r:100, d:1, l:60}, {id:34, s:34, e:35}, {id:36, s:31, e:37, r:100, d:1, l:60}, {id:37, s:37, e:38}, {id:38, s:26, e:39, r:100, d:-1, l:60}, {id:39, s:39, e:40}, {id:40, s:32, e:41, r:100, d:1, l:60}, {id:41, s:41, e:42}, {id:42, s:27, e:43, r:100, d:-1, l:60}, {id:43, s:43, e:44}, {id:44, s:33, e:45, r:100, d:1, l:60}, {id:45, s:45, e:46}, {id:46, s:28, e:47, r:100, d:-1, l:60}, {id:47, s:47, e:48}, {id:49, s:23, e:50}, {id:50, s:50, e:51, r:100, d:1, l:157}, {id:51, s:51, e:52}, {id:52, s:52, e:53, r:273, d:1, l:431}, {id:53, s:5, e:54, r:177, d:1, l:176}, {id:54, s:54, e:61}, {id:56, s:53, e:57}, {id:57, s:57, e:58, r:100, d:-1, l:157}, {id:58, s:58, e:59, r:100, d:1, l:157}, {id:59, s:59, e:60}, {id:60, s:60, e:61, r:100, d:-1, l:157}, {id:63, s:61, e:64}, {id:64, s:64, e:65, r:100, d:1, l:128}, {id:65, s:65, e:66, r:132, d:-1, l:149}, {id:66, s:66, e:67}, {id:67, s:64, e:68}, {id:68, s:67, e:69, r:132, d:1, l:157}, {id:69, s:69, e:76, r:286, d:-1, l:266}, {id:70, s:68, e:71}, {id:71, s:71, e:72, r:100, d:1, l:157}, {id:72, s:72, e:73}, {id:75, s:73, e:76, r:147, d:-1, l:167}, {id:76, s:76, e:77, r:109, d:1, l:190}, {id:77, s:77, e:78, r:178, d:-1, l:468}, {id:78, s:78, e:79, r:201, d:1, l:346}, {id:79, s:79, e:80, r:123, d:-1, l:157}, {id:80, s:80, e:81}, {id:81, s:81, e:82, r:103, d:-1, l:167}, {id:82, s:82, e:83}, {id:83, s:83, e:84, r:137, d:-1, l:164}, {id:84, s:84, e:85}, {id:85, s:85, e:86, r:504, d:1, l:325}, {id:87, s:86, e:88}, {id:88, s:88, e:89, r:343, d:-1, l:164}, {id:89, s:89, e:90, r:203, d:1, l:205}, {id:90, s:71, e:91}, {id:91, s:91, e:90, r:159, d:-1, l:256}, {id:92, s:90, e:93}, {id:93, s:93, e:94, r:186, d:1, l:381}, {id:94, s:94, e:95}, {id:95, s:95, e:96, r:269, d:-1, l:174}, {id:96, s:96, e:97, r:306, d:1, l:543}, {id:98, s:97, e:99, r:102, d:-1, l:157}, {id:99, s:99, e:100}, {id:101, s:100, e:102, r:100, d:-1, l:157}, {id:102, s:102, e:103}, {id:106, s:103, e:107, r:227, d:1, l:139}, {id:107, s:107, e:108, r:227, d:-1, l:433}, {id:111, s:108, e:112}, {id:112, s:112, e:113, r:527, d:1, l:157}, {id:113, s:113, e:114}, {id:114, s:114, e:115, r:100, d:1, l:157}, {id:115, s:115, e:116, r:159, d:1, l:157}, {id:116, s:116, e:117}, {id:117, s:117, e:118}, {id:118, s:118, e:119}, {id:119, s:119, e:120, r:100, d:1, l:157}, {id:120, s:120, e:121}, {id:121, s:121, e:122, r:100, d:-1, l:157}, {id:122, s:121, e:123}, {id:123, s:123, e:124, r:235, d:1, l:205}, {id:124, s:124, e:125, r:100, d:-1, l:251}, {id:125, s:122, e:126}, {id:126, s:126, e:127, r:128, d:1, l:157}, {id:127, s:126, e:128}, {id:128, s:128, e:129, r:128, d:1, l:157}, {id:129, s:128, e:130}, {id:130, s:130, e:131, r:128, d:1, l:157}, {id:131, s:131, e:132}, {id:132, s:129, e:133}, {id:133, s:127, e:134}, {id:134, s:127, e:135, r:100, d:-1, l:70}, {id:135, s:135, e:136, r:100, d:1, l:70}, {id:136, s:136, e:137}, {id:137, s:134, e:138}, {id:138, s:129, e:139, r:100, d:-1, l:70}, {id:139, s:139, e:140, r:100, d:1, l:70}, {id:140, s:140, e:141}, {id:141, s:133, e:142}, {id:142, s:132, e:143}, {id:143, s:143, e:144, r:100, d:1, l:136}, {id:145, s:144, e:146, r:146, d:1, l:81}, {id:147, s:146, e:148}, {id:149, s:148, e:150, r:122, d:1, l:157}, {id:150, s:150, e:151}, {id:151, s:151, e:152, r:122, d:-1, l:157}, {id:152, s:152, e:153}, {id:153, s:153, e:123, r:212, d:-1, l:348}, {id:155, s:125, e:156}, {id:156, s:156, e:157, r:193, d:-1, l:59}, {id:157, s:157, e:158, r:100, d:1, l:38}, {id:160, s:158, e:9999, eo:1}];
cp = [{x:219, y:2102, rot:-90}, {x:344, y:2101, rot:90}, {x:519, y:2102, rot:-90}, {x:1893, y:1011, rot:90}, {x:3100, y:380, rot:93}, {x:2421, y:1058, rot:-56}, {x:3514, y:1138, rot:0}, {x:3604, y:2324, rot:0}, {x:5030, y:1695, rot:110}];
}
}
Symbol 3282 MovieClip [__Packages.rr.conf.map.ConfMapValues1] Frame 0
class rr.conf.map.ConfMapValues1
{
function ConfMapValues1 () {
}
static function getValue(key) {
if (key == "cols") {
return(10);
}
if (key == "rows") {
return(1);
}
if (key == "startcol") {
return(1);
}
if (key == "startrow") {
return(1);
}
if (key == "foreground") {
return(true);
}
if (key == "firstrail") {
return({x:20, y:196, l:300, ang:0});
}
if (key == "lastrail") {
return({x:6280, y:139, l:100, ang:-180});
}
if (key == "collapsepoints") {
return([{x:2250, y:132}, {x:2325, y:110}, {x:6138, y:138}]);
}
if (key == "maptype") {
return("grass");
}
}
}
Symbol 3283 MovieClip [__Packages.rr.conf.map.ConfMapValues2] Frame 0
class rr.conf.map.ConfMapValues2
{
function ConfMapValues2 () {
}
static function getValue(key) {
if (key == "cols") {
return(8);
}
if (key == "rows") {
return(5);
}
if (key == "startcol") {
return(1);
}
if (key == "startrow") {
return(3);
}
if (key == "foreground") {
return(true);
}
if (key == "firstrail") {
return({x:20, y:1095, l:300, ang:0});
}
if (key == "lastrail") {
return({x:5090, y:1228, l:200, ang:-180});
}
if (key == "maptype") {
return("desert");
}
if (key == "collapsepoints") {
return([{x:264, y:1095}, {x:1515, y:1070}, {x:1560, y:1070}, {x:1504, y:1240}, {x:1550, y:1240}, {x:3066, y:620}]);
}
}
}
Symbol 3284 MovieClip [__Packages.rr.conf.train.ConfSaddleTank] Frame 0
class rr.conf.train.ConfSaddleTank
{
function ConfSaddleTank () {
}
static function getValue(key) {
if (key == "name") {
return("saddle tank");
}
if (key == "availabilityLevel") {
return(1);
}
if (key == "price") {
return(700);
}
if (key == "weight") {
return(6000);
}
if (key == "maxspeed") {
return(110);
}
if (key == "minspeed") {
return(-85);
}
if (key == "maxload") {
return(10500);
}
if (key == "armor") {
return("low armor");
}
if (key == "weapon") {
return("small cannon");
}
if (key == "length") {
return(47);
}
if (key == "acceleration") {
return(0.01);
}
if (key == "accelerationfullstop") {
return(0.05);
}
if (key == "destroydelay") {
return(1000);
}
if (key == "gunsounds") {
return(["GunCannon6_short.wav"]);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "hornsound") {
return("Train 2and3 Horn.wav");
}
if (key == "buildmarginbottom") {
return(30);
}
if (key == "buildmarginleft") {
return(14);
}
if (key == "damageclip") {
return("damage_saddletank");
}
if (key == "crashfactor") {
return(10);
}
if (key == "fueltype") {
return("coal");
}
if (key == "fuel") {
return(1500);
}
if (key == "fuelconsumption") {
return(0.02);
}
if (key == "fuelprice") {
return(0.1);
}
if (key == "killlevel") {
return(1000);
}
if (key == "shootingdistance") {
return(350);
}
if (key == "shootinginterval1") {
return(400);
}
if (key == "rotationspeed1") {
return(40);
}
if (key == "rotationspeedmin") {
return(10);
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(210);
}
if (key == "ammorange") {
return(350);
}
if (key == "ammodamage") {
return(30);
}
if (key == "ammosound") {
return("Explosion06_short.wav");
}
}
}
Symbol 3285 MovieClip [__Packages.rr.conf.train.ConfBulpFrog] Frame 0
class rr.conf.train.ConfBulpFrog
{
function ConfBulpFrog () {
}
static function getValue(key) {
if (key == "name") {
return("bulp frog");
}
if (key == "availabilityLevel") {
return(2);
}
if (key == "price") {
return(900);
}
if (key == "weight") {
return(8000);
}
if (key == "maxspeed") {
return(130);
}
if (key == "minspeed") {
return(-100);
}
if (key == "maxload") {
return(14000);
}
if (key == "armor") {
return("low armor");
}
if (key == "weapon") {
return("front and back cannon");
}
if (key == "length") {
return(52);
}
if (key == "acceleration") {
return(0.02);
}
if (key == "accelerationfullstop") {
return(0.05);
}
if (key == "destroydelay") {
return(1000);
}
if (key == "gunsounds") {
return(["GunCannon4_short.wav", "GunCannon6_short.wav"]);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "hornsound") {
return("Train 2and3 Horn.wav");
}
if (key == "buildmarginbottom") {
return(38);
}
if (key == "buildmarginleft") {
return(22);
}
if (key == "damageclip") {
return("damage_bulpfrog");
}
if (key == "crashfactor") {
return(10);
}
if (key == "fueltype") {
return("oil");
}
if (key == "fuel") {
return(2000);
}
if (key == "fuelconsumption") {
return(0.01);
}
if (key == "fuelprice") {
return(0.2);
}
if (key == "killlevel") {
return(1200);
}
if (key == "shootingdistance") {
return(400);
}
if (key == "shootinginterval1") {
return(400);
}
if (key == "shootinginterval2") {
return(450);
}
if (key == "rotationspeed1") {
return(40);
}
if (key == "rotationspeed2") {
return(60);
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(210);
}
if (key == "ammorange") {
return(300);
}
if (key == "ammodamage") {
return(30);
}
if (key == "ammosound") {
return("");
}
}
}
Symbol 3286 MovieClip [__Packages.rr.conf.train.ConfRhino] Frame 0
class rr.conf.train.ConfRhino
{
function ConfRhino () {
}
static function getValue(key) {
if (key == "name") {
return("rhino industrial");
}
if (key == "availabilityLevel") {
return(3);
}
if (key == "price") {
return(1350);
}
if (key == "weight") {
return(12000);
}
if (key == "maxspeed") {
return(140);
}
if (key == "minspeed") {
return(-125);
}
if (key == "maxload") {
return(18500);
}
if (key == "armor") {
return("medium armor");
}
if (key == "weapon") {
return("2 small cannons");
}
if (key == "length") {
return(84);
}
if (key == "acceleration") {
return(0.02);
}
if (key == "accelerationfullstop") {
return(0.05);
}
if (key == "destroydelay") {
return(1000);
}
if (key == "gunsounds") {
return(["GunCannon4_short.wav", "GunCannon6_short.wav"]);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "hornsound") {
return("Train 2and3 Horn.wav");
}
if (key == "loopsound") {
return("Train 5.wav");
}
if (key == "buildmarginbottom") {
return(42);
}
if (key == "buildmarginleft") {
return(6);
}
if (key == "damageclip") {
return("damage_rhino");
}
if (key == "crashfactor") {
return(10);
}
if (key == "fueltype") {
return("electric");
}
if (key == "fuel") {
return(4000);
}
if (key == "fuelconsumption") {
return(0.02);
}
if (key == "fuelprice") {
return(0.05);
}
if (key == "killlevel") {
return(1400);
}
if (key == "shootingdistance") {
return(400);
}
if (key == "shootinginterval1") {
return(400);
}
if (key == "shootinginterval2") {
return(300);
}
if (key == "rotationspeed1") {
return(40);
}
if (key == "rotationspeed2") {
return(60);
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(210);
}
if (key == "ammorange") {
return(300);
}
if (key == "ammodamage") {
return(40);
}
if (key == "ammosound") {
return("");
}
}
}
Symbol 3287 MovieClip [__Packages.rr.conf.train.ConfSuperChief] Frame 0
class rr.conf.train.ConfSuperChief
{
function ConfSuperChief () {
}
static function getValue(key) {
if (key == "name") {
return("super chief");
}
if (key == "availabilityLevel") {
return(7);
}
if (key == "price") {
return(3000);
}
if (key == "weight") {
return(26000);
}
if (key == "maxload") {
return(20000);
}
if (key == "armor") {
return("medium armor");
}
if (key == "weapon") {
return("2 big cannons");
}
if (key == "length") {
return(82);
}
if (key == "maxspeed") {
return(210);
}
if (key == "minspeed") {
return(-180);
}
if (key == "acceleration") {
return(0.04);
}
if (key == "accelerationfullstop") {
return(0.06);
}
if (key == "destroydelay") {
return(1000);
}
if (key == "gunsounds") {
return(["GunCannon4_short.wav", "GunCannon6_short.wav"]);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "hornsound") {
return("Train 2and3 Horn.wav");
}
if (key == "buildmarginbottom") {
return(53);
}
if (key == "buildmarginleft") {
return(5);
}
if (key == "damageclip") {
return("damage_superchief");
}
if (key == "crashfactor") {
return(10);
}
if (key == "fueltype") {
return("oil");
}
if (key == "fuel") {
return(7000);
}
if (key == "fuelconsumption") {
return(0.03);
}
if (key == "fuelprice") {
return(0.05);
}
if (key == "killlevel") {
return(2000);
}
if (key == "shootingdistance") {
return(400);
}
if (key == "shootinginterval1") {
return(300);
}
if (key == "shootinginterval2") {
return(300);
}
if (key == "rotationspeed1") {
return(40);
}
if (key == "rotationspeed2") {
return(60);
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(210);
}
if (key == "ammorange") {
return(300);
}
if (key == "ammodamage") {
return(50);
}
if (key == "ammosound") {
return("");
}
}
}
Symbol 3288 MovieClip [__Packages.rr.conf.train.ConfSuperChiefWagon] Frame 0
class rr.conf.train.ConfSuperChiefWagon
{
function ConfSuperChiefWagon () {
}
static function getValue(key) {
if (key == "spaces") {
return(2);
}
if (key == "length") {
return(40);
}
if (key == "weight") {
return(0);
}
if (key == "gunsounds") {
return(["GunCannon4_short.wav", "GunCannon6_short.wav"]);
}
if (key == "shootinginterval1") {
return(300);
}
if (key == "shootinginterval2") {
return(400);
}
if (key == "rotationspeed1") {
return(40);
}
if (key == "rotationspeed2") {
return(60);
}
}
}
Symbol 3289 MovieClip [__Packages.rr.conf.train.ConfICE] Frame 0
class rr.conf.train.ConfICE
{
function ConfICE () {
}
static function getValue(key) {
if (key == "name") {
return("ice");
}
if (key == "availabilityLevel") {
return(11);
}
if (key == "price") {
return(4000);
}
if (key == "weight") {
return(22500);
}
if (key == "maxload") {
return(18000);
}
if (key == "armor") {
return("medium armor");
}
if (key == "weapon") {
return("2 big cannons");
}
if (key == "length") {
return(86);
}
if (key == "maxspeed") {
return(310);
}
if (key == "minspeed") {
return(-200);
}
if (key == "acceleration") {
return(0.06);
}
if (key == "accelerationfullstop") {
return(0.07);
}
if (key == "destroydelay") {
return(1500);
}
if (key == "gunsounds") {
return(["GunCannon4_short.wav", "GunCannon6_short.wav"]);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "hornsound") {
return("Train 2and3 Horn.wav");
}
if (key == "loopsound") {
return("Train 5.wav");
}
if (key == "buildmarginbottom") {
return(60);
}
if (key == "buildmarginleft") {
return(18);
}
if (key == "damageclip") {
return("damage_ice");
}
if (key == "crashfactor") {
return(10);
}
if (key == "fueltype") {
return("electric");
}
if (key == "fuel") {
return(8000);
}
if (key == "fuelconsumption") {
return(0.03);
}
if (key == "fuelprice") {
return(0.05);
}
if (key == "killlevel") {
return(1400);
}
if (key == "shootingdistance") {
return(500);
}
if (key == "shootinginterval1") {
return(300);
}
if (key == "rotationspeed1") {
return(40);
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(210);
}
if (key == "ammorange") {
return(300);
}
if (key == "ammodamage") {
return(30);
}
if (key == "ammosound") {
return("");
}
}
}
Symbol 3290 MovieClip [__Packages.rr.conf.train.ConfICEWagon] Frame 0
class rr.conf.train.ConfICEWagon
{
function ConfICEWagon () {
}
static function getValue(key) {
if (key == "spaces") {
return(2);
}
if (key == "length") {
return(47);
}
if (key == "weight") {
return(0);
}
if (key == "gunsounds") {
return(["GunCannon4_short.wav", "GunCannon6_short.wav"]);
}
if (key == "shootinginterval1") {
return(300);
}
if (key == "rotationspeed1") {
return(40);
}
}
}
Symbol 3291 MovieClip [__Packages.rr.conf.train.ConfDragon] Frame 0
class rr.conf.train.ConfDragon
{
function ConfDragon () {
}
static function getValue(key) {
if (key == "name") {
return("dragon");
}
if (key == "availabilityLevel") {
return(9);
}
if (key == "price") {
return(3500);
}
if (key == "weight") {
return(31500);
}
if (key == "maxspeed") {
return(180);
}
if (key == "minspeed") {
return(-150);
}
if (key == "maxload") {
return(25000);
}
if (key == "armor") {
return("medium armor");
}
if (key == "weapon") {
return("2 small cannons");
}
if (key == "length") {
return(89);
}
if (key == "acceleration") {
return(0.03);
}
if (key == "accelerationfullstop") {
return(0.05);
}
if (key == "destroydelay") {
return(1100);
}
if (key == "gunsounds") {
return(["GunCannon4_short.wav", "GunCannon6_short.wav"]);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "hornsound") {
return("Train 2and3 Horn.wav");
}
if (key == "buildmarginbottom") {
return(44);
}
if (key == "buildmarginleft") {
return(9);
}
if (key == "damageclip") {
return("damage_dragon");
}
if (key == "crashfactor") {
return(10);
}
if (key == "fueltype") {
return("oil");
}
if (key == "fuel") {
return(11000);
}
if (key == "fuelconsumption") {
return(0.04);
}
if (key == "fuelprice") {
return(0.2);
}
if (key == "killlevel") {
return(2500);
}
if (key == "shootingdistance") {
return(500);
}
if (key == "shootinginterval1") {
return(300);
}
if (key == "shootinginterval2") {
return(350);
}
if (key == "rotationspeed1") {
return(40);
}
if (key == "rotationspeed2") {
return(60);
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(210);
}
if (key == "ammorange") {
return(300);
}
if (key == "ammodamage") {
return(60);
}
if (key == "ammosound") {
return("");
}
}
}
Symbol 3292 MovieClip [__Packages.rr.conf.train.ConfLoewy] Frame 0
class rr.conf.train.ConfLoewy
{
function ConfLoewy () {
}
static function getValue(key) {
if (key == "name") {
return("loewy");
}
if (key == "availabilityLevel") {
return(4);
}
if (key == "price") {
return(1800);
}
if (key == "weight") {
return(14000);
}
if (key == "maxspeed") {
return(170);
}
if (key == "minspeed") {
return(-130);
}
if (key == "maxload") {
return(21000);
}
if (key == "armor") {
return("medium armor");
}
if (key == "weapon") {
return("2 small cannons");
}
if (key == "length") {
return(88);
}
if (key == "acceleration") {
return(0.03);
}
if (key == "accelerationfullstop") {
return(0.05);
}
if (key == "destroydelay") {
return(1000);
}
if (key == "gunsounds") {
return(["GunCannon4_short.wav", "GunCannon6_short.wav"]);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "hornsound") {
return("Train 2and3 Horn.wav");
}
if (key == "buildmarginbottom") {
return(48);
}
if (key == "buildmarginleft") {
return(24);
}
if (key == "damageclip") {
return("damage_loewy");
}
if (key == "crashfactor") {
return(10);
}
if (key == "fueltype") {
return("coal");
}
if (key == "fuel") {
return(6000);
}
if (key == "fuelconsumption") {
return(0.03);
}
if (key == "fuelprice") {
return(0.1);
}
if (key == "killlevel") {
return(1800);
}
if (key == "shootingdistance") {
return(400);
}
if (key == "shootinginterval1") {
return(300);
}
if (key == "shootinginterval2") {
return(300);
}
if (key == "rotationspeed1") {
return(40);
}
if (key == "rotationspeed2") {
return(60);
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(210);
}
if (key == "ammorange") {
return(300);
}
if (key == "ammodamage") {
return(40);
}
if (key == "ammosound") {
return("");
}
}
}
Symbol 3293 MovieClip [__Packages.rr.conf.train.ConfPennsylvania] Frame 0
class rr.conf.train.ConfPennsylvania
{
function ConfPennsylvania () {
}
static function getValue(key) {
if (key == "name") {
return("pennsylvania");
}
if (key == "availabilityLevel") {
return(5);
}
if (key == "price") {
return(2400);
}
if (key == "weight") {
return(13000);
}
if (key == "maxspeed") {
return(195);
}
if (key == "minspeed") {
return(-160);
}
if (key == "maxload") {
return(22500);
}
if (key == "armor") {
return("medium armor");
}
if (key == "weapon") {
return("2 small cannons");
}
if (key == "length") {
return(99);
}
if (key == "acceleration") {
return(0.04);
}
if (key == "accelerationfullstop") {
return(0.06);
}
if (key == "destroydelay") {
return(1000);
}
if (key == "gunsounds") {
return(["GunCannon4_short.wav", "GunCannon6_short.wav"]);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "hornsound") {
return("Train 2and3 Horn.wav");
}
if (key == "loopsound") {
return("Train 5.wav");
}
if (key == "buildmarginbottom") {
return(50);
}
if (key == "buildmarginleft") {
return(23);
}
if (key == "damageclip") {
return("damage_pennsylvania");
}
if (key == "crashfactor") {
return(10);
}
if (key == "fueltype") {
return("electric");
}
if (key == "fuel") {
return(5500);
}
if (key == "fuelconsumption") {
return(0.02);
}
if (key == "fuelprice") {
return(0.05);
}
if (key == "killlevel") {
return(1600);
}
if (key == "shootingdistance") {
return(400);
}
if (key == "shootinginterval1") {
return(300);
}
if (key == "shootinginterval2") {
return(300);
}
if (key == "rotationspeed1") {
return(40);
}
if (key == "rotationspeed2") {
return(60);
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(210);
}
if (key == "ammorange") {
return(300);
}
if (key == "ammodamage") {
return(45);
}
if (key == "ammosound") {
return("");
}
}
}
Symbol 3294 MovieClip [__Packages.rr.conf.train.ConfSmallCannon] Frame 0
class rr.conf.train.ConfSmallCannon
{
function ConfSmallCannon () {
}
static function getValue(key) {
if (key == "name") {
return("small cannon");
}
if (key == "availabilityLevel") {
return(1);
}
if (key == "price") {
return(500);
}
if (key == "spaces") {
return(1);
}
if (key == "weight") {
return(1200);
}
if (key == "barrel") {
return("single barrel");
}
if (key == "power") {
return("low power");
}
if (key == "buildmarginbottom") {
return(2);
}
if (key == "buildmarginleft") {
return(-3);
}
if (key == "mode") {
return("aim");
}
if (key == "damageclip") {
return("damage_smallcannon");
}
if (key == "feelerradius") {
return(22);
}
if (key == "barrellength") {
return(20);
}
if (key == "killlevel") {
return(900);
}
if (key == "gunsound") {
return("GunCannon11_short.wav");
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "destroydelay") {
return(1400);
}
if (key == "rotationSpeed") {
return(20);
}
if (key == "rotationspeedmin") {
return(10);
}
if (key == "shootingDistance") {
return(400);
}
if (key == "shootingDistanceMin") {
return(50);
}
if (key == "shootingInterval") {
return(600);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "ammospeed") {
return(40);
}
if (key == "ammorange") {
return(300);
}
if (key == "ammoduration") {
return(540);
}
if (key == "ammoAccuracy") {
return(20);
}
if (key == "ammodamage") {
return(25);
}
if (key == "explosionradius") {
return(30);
}
if (key == "ammosound") {
return("Explosion06_short.wav");
}
}
}
Symbol 3295 MovieClip [__Packages.rr.conf.train.ConfMediumCannon] Frame 0
class rr.conf.train.ConfMediumCannon
{
function ConfMediumCannon () {
}
static function getValue(key) {
if (key == "name") {
return("medium cannon");
}
if (key == "availabilityLevel") {
return(1);
}
if (key == "price") {
return(900);
}
if (key == "spaces") {
return(2);
}
if (key == "weight") {
return(2550);
}
if (key == "barrel") {
return("single barrel");
}
if (key == "power") {
return("medium power");
}
if (key == "buildmarginbottom") {
return(1);
}
if (key == "buildmarginleft") {
return(16);
}
if (key == "mode") {
return("aim");
}
if (key == "damageclip") {
return("damage_mediumcannon");
}
if (key == "feelerradius") {
return(22);
}
if (key == "barrellength") {
return(20);
}
if (key == "killlevel") {
return(1200);
}
if (key == "gunsound") {
return("GunCannon3_short.wav");
}
if (key == "explodesound") {
return("Explosion10_short.wav");
}
if (key == "destroydelay") {
return(1400);
}
if (key == "rotationSpeed") {
return(30);
}
if (key == "rotationspeedmin") {
return(10);
}
if (key == "shootingDistance") {
return(450);
}
if (key == "shootingInterval") {
return(1000);
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(800);
}
if (key == "ammorange") {
return(450);
}
if (key == "ammodamage") {
return(45);
}
if (key == "ammosound") {
return("Explosion06_short.wav");
}
}
}
Symbol 3296 MovieClip [__Packages.rr.conf.train.ConfLargeCannon] Frame 0
class rr.conf.train.ConfLargeCannon
{
function ConfLargeCannon () {
}
static function getValue(key) {
if (key == "name") {
return("large cannon");
}
if (key == "availabilityLevel") {
return(3);
}
if (key == "price") {
return(1500);
}
if (key == "spaces") {
return(3);
}
if (key == "weight") {
return(4500);
}
if (key == "barrel") {
return("single long barrel");
}
if (key == "power") {
return("high power - long range");
}
if (key == "buildmarginbottom") {
return(2);
}
if (key == "buildmarginleft") {
return(33);
}
if (key == "buildflip") {
return(true);
}
if (key == "mode") {
return("automatic");
}
if (key == "damageclip") {
return("damage_largecannon");
}
if (key == "feelerradius") {
return(40);
}
if (key == "barrellength") {
return(59);
}
if (key == "killlevel") {
return(1500);
}
if (key == "gunsound") {
return("GunCannon11_short.wav");
}
if (key == "explodesound") {
return("explode08_sound");
}
if (key == "destroydelay") {
return(1400);
}
if (key == "rotationSpeed") {
return(20);
}
if (key == "rotationspeedmin") {
return(10);
}
if (key == "shootingDistance") {
return(900);
}
if (key == "shootingDistanceMin") {
return(300);
}
if (key == "shootingInterval") {
return(2500);
}
if (key == "ammospeed") {
return(40);
}
if (key == "ammoduration") {
return(1100);
}
if (key == "ammoangle") {
return(5);
}
if (key == "ammoAccuracy") {
return(70);
}
if (key == "ammodamage") {
return(50);
}
if (key == "explosionradius") {
return(140);
}
if (key == "ammosound") {
return("explode06_sound");
}
if (key == "targets") {
return(["Basilisk", "AirField", "Bunker"]);
}
}
}
Symbol 3297 MovieClip [__Packages.rr.conf.train.ConfHugeCannon] Frame 0
class rr.conf.train.ConfHugeCannon
{
function ConfHugeCannon () {
}
static function getValue(key) {
if (key == "name") {
return("huge cannon");
}
if (key == "availabilityLevel") {
return(6);
}
if (key == "price") {
return(3150);
}
if (key == "spaces") {
return(2);
}
if (key == "wagonspaces") {
return(4);
}
if (key == "weight") {
return(9000);
}
if (key == "barrel") {
return("single long barrel");
}
if (key == "power") {
return("extreme power - long range");
}
if (key == "length") {
return(56);
}
if (key == "height") {
return(16);
}
if (key == "buildmargintop") {
return(83);
}
if (key == "buildmarginbottom") {
return(56);
}
if (key == "buildmarginleft") {
return(0);
}
if (key == "buildmarginright1") {
return(37);
}
if (key == "buildmarginright2") {
return(63);
}
if (key == "buildflip") {
return(true);
}
if (key == "mode") {
return("automatic");
}
if (key == "damageclip") {
return("damage_hugecannon");
}
if (key == "feelerradius") {
return(30);
}
if (key == "barrellength") {
return(46);
}
if (key == "killlevel") {
return(2000);
}
if (key == "gunsound") {
return("GunCannon11_short.wav");
}
if (key == "explodesound") {
return("explode08_sound");
}
if (key == "destroydelay") {
return(1400);
}
if (key == "rotationSpeed") {
return(20);
}
if (key == "rotationspeedmin") {
return(10);
}
if (key == "shootingDistance") {
return(1100);
}
if (key == "shootingDistanceMin") {
return(400);
}
if (key == "shootingInterval") {
return(3000);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "ammospeed") {
return(40);
}
if (key == "ammoduration") {
return(1000);
}
if (key == "ammoangle") {
return(20);
}
if (key == "ammoAccuracy") {
return(70);
}
if (key == "ammodamage") {
return(60);
}
if (key == "explosionradius") {
return(150);
}
if (key == "ammosound") {
return("explode06_sound");
}
if (key == "targets") {
return(["Basilisk", "AirField", "Bunker", "RocketBase"]);
}
}
}
Symbol 3298 MovieClip [__Packages.rr.conf.train.ConfHeatseeker] Frame 0
class rr.conf.train.ConfHeatseeker
{
function ConfHeatseeker () {
}
static function getValue(key) {
if (key == "range") {
return(2000);
}
if (key == "detectionDistance") {
return(600);
}
if (key == "minCurve") {
return(4);
}
if (key == "maxCurve") {
return(6);
}
if (key == "maxSpeed") {
return(10);
}
if (key == "acceleration") {
return(0.3);
}
if (key == "targets") {
return(["AirUnit"]);
}
if (key == "ammoduration") {
return(1040);
}
if (key == "startsound") {
return(["Missile firing3_short.wav"]);
}
if (key == "sound") {
return(["Missile3_loop.wav"]);
}
if (key == "explodesound") {
return(["Explosion07_short.wav"]);
}
if (key == "explosiondamage") {
return(40);
}
if (key == "explosionradius") {
return(130);
}
}
}
Symbol 3299 MovieClip [__Packages.rr.conf.train.ConfBunkerBuster] Frame 0
class rr.conf.train.ConfBunkerBuster
{
function ConfBunkerBuster () {
}
static function getValue(key) {
if (key == "name") {
return("bunker buster");
}
if (key == "availabilityLevel") {
return(3);
}
if (key == "price") {
return(1900);
}
if (key == "spaces") {
return(1);
}
if (key == "weight") {
return(2000);
}
if (key == "barrel") {
return("single short barrel");
}
if (key == "power") {
return("medium power - long range");
}
if (key == "buildmarginbottom") {
return(2);
}
if (key == "buildmarginleft") {
return(1);
}
if (key == "mode") {
return("automatic");
}
if (key == "damageclip") {
return("damage_bunkerbuster");
}
if (key == "feelerradius") {
return(22);
}
if (key == "barrellength") {
return(20);
}
if (key == "killlevel") {
return(1400);
}
if (key == "gunsound") {
return("GunCannon11_short.wav");
}
if (key == "explodesound") {
return("explode08_sound");
}
if (key == "destroydelay") {
return(1000);
}
if (key == "rotationSpeed") {
return(20);
}
if (key == "rotationspeedmin") {
return(10);
}
if (key == "shootingDistance") {
return(600);
}
if (key == "shootingDistanceMin") {
return(250);
}
if (key == "shootingInterval") {
return(3000);
}
if (key == "ammospeed") {
return(40);
}
if (key == "ammoduration") {
return(540);
}
if (key == "ammoAccuracy") {
return(60);
}
if (key == "ammodamage") {
return(50);
}
if (key == "explosionradius") {
return(150);
}
if (key == "ammosound") {
return("explode06_sound");
}
if (key == "targets") {
return(["Bunker", "Basilisk", "GatlingSingle", "GatlingDouble", "Elephant", "Panther"]);
}
}
}
Symbol 3300 MovieClip [__Packages.rr.conf.train.ConfRailRockets] Frame 0
class rr.conf.train.ConfRailRockets
{
function ConfRailRockets () {
}
static function getValue(key) {
if (key == "name") {
return("railrockets");
}
if (key == "availabilityLevel") {
return(4);
}
if (key == "price") {
return(2150);
}
if (key == "spaces") {
return(1);
}
if (key == "weight") {
return(1900);
}
if (key == "barrel") {
return("double barrel arms");
}
if (key == "power") {
return("high power - medium range");
}
if (key == "buildmarginbottom") {
return(14);
}
if (key == "buildmarginleft") {
return(0);
}
if (key == "mode") {
return("automatic");
}
if (key == "damageclip") {
return("damage_railrockets");
}
if (key == "feelerradius") {
return(18);
}
if (key == "killlevel") {
return(1600);
}
if (key == "explodesound") {
return("explode08_sound");
}
if (key == "shootingInterval") {
return(5000);
}
if (key == "detectionDistance") {
return(500);
}
if (key == "detectionRadius") {
return(400);
}
if (key == "ammoduration") {
return(540);
}
if (key == "ammominrange") {
return(100);
}
if (key == "ammomaxrange") {
return(500);
}
if (key == "ammomaxSpeed") {
return(15);
}
if (key == "ammominCurve") {
return(0.1);
}
if (key == "ammomaxCurve") {
return(0.5);
}
if (key == "ammoacceleration") {
return(0.8);
}
if (key == "ammostartsound") {
return(["Missile firing3_short.wav"]);
}
if (key == "ammosound") {
return(["Missile3_loop.wav"]);
}
if (key == "ammoexplodesound") {
return(["Explosion07_short.wav"]);
}
if (key == "ammoexplosiondamage") {
return(40);
}
if (key == "ammoexplosionradius") {
return(100);
}
}
}
Symbol 3301 MovieClip [__Packages.rr.conf.train.ConfEMP] Frame 0
class rr.conf.train.ConfEMP
{
function ConfEMP () {
}
static function getValue(key) {
if (key == "name") {
return("emp");
}
if (key == "availabilityLevel") {
return(4);
}
if (key == "price") {
return(2450);
}
if (key == "spaces") {
return(2);
}
if (key == "weight") {
return(2200);
}
if (key == "barrel") {
return("electro magnetic pulse");
}
if (key == "power") {
return("extreme power");
}
if (key == "buildmarginbottom") {
return(2);
}
if (key == "mode") {
return("automatic");
}
if (key == "damageclip") {
return("damage_emp");
}
if (key == "feelerradius") {
return(22);
}
if (key == "killlevel") {
return(1200);
}
if (key == "destroydelay") {
return(1500);
}
if (key == "gunsound") {
return("AirplaneSkid1.wav");
}
if (key == "explodesound") {
return("explode08_sound");
}
if (key == "stunDistance") {
return(650);
}
if (key == "minStunTime") {
return(10000);
}
if (key == "maxStunTime") {
return(15000);
}
if (key == "loadTime") {
return(15000);
}
}
}
Symbol 3302 MovieClip [__Packages.rr.conf.train.ConfSmallFastCannon] Frame 0
class rr.conf.train.ConfSmallFastCannon
{
function ConfSmallFastCannon () {
}
static function getValue(key) {
if (key == "name") {
return("small fast cannon");
}
if (key == "availabilityLevel") {
return(2);
}
if (key == "price") {
return(750);
}
if (key == "spaces") {
return(1);
}
if (key == "weight") {
return(1400);
}
if (key == "barrel") {
return("single barrel");
}
if (key == "power") {
return("low power");
}
if (key == "buildmarginbottom") {
return(2);
}
if (key == "buildmarginleft") {
return(9);
}
if (key == "mode") {
return("aim");
}
if (key == "damageclip") {
return("damage_smallfastcannon");
}
if (key == "feelerradius") {
return(22);
}
if (key == "barrellength") {
return(20);
}
if (key == "killlevel") {
return(1000);
}
if (key == "gunsound") {
return("GunCannon11_short.wav");
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "destroydelay") {
return(1400);
}
if (key == "rotationSpeed") {
return(20);
}
if (key == "rotationspeedmin") {
return(10);
}
if (key == "shootingDistance") {
return(350);
}
if (key == "shootingDistanceMin") {
return(50);
}
if (key == "shootingInterval") {
return(500);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "ammospeed") {
return(40);
}
if (key == "ammorange") {
return(350);
}
if (key == "ammoduration") {
return(540);
}
if (key == "ammoAccuracy") {
return(20);
}
if (key == "ammodamage") {
return(15);
}
if (key == "explosionradius") {
return(30);
}
if (key == "ammosound") {
return("Explosion06_short.wav");
}
}
}
Symbol 3303 MovieClip [__Packages.rr.conf.train.ConfRocketLauncher] Frame 0
class rr.conf.train.ConfRocketLauncher
{
function ConfRocketLauncher () {
}
static function getValue(key) {
if (key == "name") {
return("rocketlauncher");
}
if (key == "availabilityLevel") {
return(2);
}
if (key == "price") {
return(1500);
}
if (key == "spaces") {
return(1);
}
if (key == "weight") {
return(1800);
}
if (key == "barrel") {
return("single barrel");
}
if (key == "power") {
return("low power");
}
if (key == "buildmarginbottom") {
return(2);
}
if (key == "buildmarginleft") {
return(-4);
}
if (key == "mode") {
return("automatic");
}
if (key == "damageclip") {
return("damage_rocketlauncher");
}
if (key == "feelerradius") {
return(20);
}
if (key == "barrellength") {
return(20);
}
if (key == "killlevel") {
return(1000);
}
if (key == "gunsound") {
return("GunCannon11_short.wav");
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "destroydelay") {
return(1500);
}
if (key == "rotationSpeed") {
return(20);
}
if (key == "rotationspeedmin") {
return(10);
}
if (key == "shootingDistance") {
return(700);
}
if (key == "shootingInterval") {
return(3000);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "ammospeed") {
return(40);
}
if (key == "ammorange") {
return(300);
}
if (key == "ammoduration") {
return(540);
}
if (key == "ammoAccuracy") {
return(10);
}
if (key == "ammodamage") {
return(400);
}
if (key == "explosionradius") {
return(150);
}
if (key == "ammosound") {
return("Explosion06_short.wav");
}
if (key == "targets") {
return(["Apache", "B2", "BellHuey", "FockeWolf", "MesserSchmidt", "Rocket", "WartHog", "C47"]);
}
}
}
Symbol 3304 MovieClip [__Packages.rr.conf.train.ConfWagon1] Frame 0
class rr.conf.train.ConfWagon1
{
function ConfWagon1 () {
}
static function getValue(key) {
if (key == "name") {
return("size 1 wagon");
}
if (key == "availabilityLevel") {
return(1);
}
if (key == "price") {
return(400);
}
if (key == "spaces") {
return(1);
}
if (key == "weight") {
return(1500);
}
if (key == "maxload") {
return(1500);
}
if (key == "buildmargintop") {
return(9);
}
if (key == "buildmarginbottom") {
return(17);
}
if (key == "buildmarginleft") {
return(14);
}
if (key == "damageclip") {
return("damage_wagon1");
}
if (key == "destroydelay") {
return(900);
}
if (key == "length") {
return(21);
}
if (key == "killlevel") {
return(2000);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3305 MovieClip [__Packages.rr.conf.train.ConfWagon2] Frame 0
class rr.conf.train.ConfWagon2
{
function ConfWagon2 () {
}
static function getValue(key) {
if (key == "name") {
return("size 2 wagon");
}
if (key == "availabilityLevel") {
return(1);
}
if (key == "price") {
return(950);
}
if (key == "spaces") {
return(2);
}
if (key == "weight") {
return(2500);
}
if (key == "maxload") {
return(3400);
}
if (key == "buildmargintop") {
return(9);
}
if (key == "buildmarginbottom") {
return(17);
}
if (key == "buildmarginleft") {
return(14);
}
if (key == "damageclip") {
return("damage_wagon2");
}
if (key == "destroydelay") {
return(900);
}
if (key == "length") {
return(37);
}
if (key == "killlevel") {
return(2100);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3306 MovieClip [__Packages.rr.conf.train.ConfWagon3] Frame 0
class rr.conf.train.ConfWagon3
{
function ConfWagon3 () {
}
static function getValue(key) {
if (key == "name") {
return("size 3 wagon");
}
if (key == "availabilityLevel") {
return(3);
}
if (key == "price") {
return(1500);
}
if (key == "spaces") {
return(3);
}
if (key == "weight") {
return(3500);
}
if (key == "maxload") {
return(5200);
}
if (key == "buildmargintop") {
return(9);
}
if (key == "buildmarginbottom") {
return(17);
}
if (key == "buildmarginleft") {
return(15);
}
if (key == "damageclip") {
return("damage_wagon3");
}
if (key == "destroydelay") {
return(900);
}
if (key == "length") {
return(52);
}
if (key == "killlevel") {
return(2200);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3307 MovieClip [__Packages.rr.conf.train.ConfWagon4] Frame 0
class rr.conf.train.ConfWagon4
{
function ConfWagon4 () {
}
static function getValue(key) {
if (key == "name") {
return("size 4 wagon");
}
if (key == "availabilityLevel") {
return(5);
}
if (key == "price") {
return(2500);
}
if (key == "spaces") {
return(4);
}
if (key == "weight") {
return(6000);
}
if (key == "maxload") {
return(9500);
}
if (key == "buildmargintop") {
return(11);
}
if (key == "buildmarginbottom") {
return(27);
}
if (key == "buildmarginleft") {
return(24);
}
if (key == "damageclip") {
return("damage_wagon4");
}
if (key == "destroydelay") {
return(900);
}
if (key == "length") {
return(72);
}
if (key == "height") {
return(16);
}
if (key == "killlevel") {
return(2400);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3308 MovieClip [__Packages.rr.conf.train.ConfOilTank] Frame 0
class rr.conf.train.ConfOilTank
{
function ConfOilTank () {
}
static function getValue(key) {
if (key == "name") {
return("oil tank");
}
if (key == "availabilityLevel") {
return(1);
}
if (key == "price") {
return(1800);
}
if (key == "spaces") {
return(2);
}
if (key == "weight") {
return(2200);
}
if (key == "buildmarginbottom") {
return(2);
}
if (key == "buildmarginleft") {
return(-2);
}
if (key == "feelerradius") {
return(20);
}
if (key == "damageclip") {
return("damage_oiltank");
}
if (key == "fuel") {
return(10000);
}
if (key == "killlevel") {
return(1800);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "destroydelay") {
return(1000);
}
}
}
Symbol 3309 MovieClip [__Packages.rr.conf.train.ConfColeCart] Frame 0
class rr.conf.train.ConfColeCart
{
function ConfColeCart () {
}
static function getValue(key) {
if (key == "name") {
return("coal cart");
}
if (key == "availabilityLevel") {
return(1);
}
if (key == "price") {
return(1600);
}
if (key == "spaces") {
return(2);
}
if (key == "weight") {
return(2300);
}
if (key == "buildmarginbottom") {
return(2);
}
if (key == "buildmarginleft") {
return(-2);
}
if (key == "feelerradius") {
return(20);
}
if (key == "damageclip") {
return("damage_colecart");
}
if (key == "fuel") {
return(10000);
}
if (key == "killlevel") {
return(1800);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "destroydelay") {
return(1000);
}
}
}
Symbol 3310 MovieClip [__Packages.rr.conf.train.ConfPowerGenerator] Frame 0
class rr.conf.train.ConfPowerGenerator
{
function ConfPowerGenerator () {
}
static function getValue(key) {
if (key == "name") {
return("powergenerator");
}
if (key == "availabilityLevel") {
return(1);
}
if (key == "price") {
return(2200);
}
if (key == "spaces") {
return(2);
}
if (key == "weight") {
return(2450);
}
if (key == "buildmarginbottom") {
return(2);
}
if (key == "buildmarginleft") {
return(-2);
}
if (key == "feelerradius") {
return(20);
}
if (key == "damageclip") {
return("damage_powergenerator");
}
if (key == "fuel") {
return(10000);
}
if (key == "killlevel") {
return(1800);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "destroydelay") {
return(1400);
}
}
}
Symbol 3311 MovieClip [__Packages.rr.conf.train.ConfAirCrane] Frame 0
class rr.conf.train.ConfAirCrane
{
function ConfAirCrane () {
}
static function getValue(key) {
if (key == "feelerradius") {
return(25);
}
if (key == "maxSpeed") {
return(5);
}
if (key == "minCurve") {
return(2);
}
if (key == "maxCurve") {
return(6);
}
if (key == "altitude") {
return(50);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "killlevel") {
return(80);
}
if (key == "sound") {
return("Heli 5.wav");
}
if (key == "gunsound") {
return("Shoot4_short.wav");
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3312 MovieClip [__Packages.rr.conf.train.ConfFuelTank] Frame 0
class rr.conf.train.ConfFuelTank
{
function ConfFuelTank () {
}
static function getValue(key) {
if (key == "name") {
return("fuel tank");
}
if (key == "price") {
return(0);
}
if (key == "weight") {
return(2200);
}
if (key == "buildmarginbottom") {
return(16);
}
if (key == "buildmarginleft") {
return(4);
}
if (key == "damageclip") {
return("damage_fueltank");
}
if (key == "destroydelay") {
return(1000);
}
if (key == "length") {
return(41);
}
if (key == "killlevel") {
return(2000);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3313 MovieClip [__Packages.rr.conf.train.ConfPassenger] Frame 0
class rr.conf.train.ConfPassenger
{
function ConfPassenger () {
}
static function getValue(key) {
if (key == "name") {
return("passenger wagon");
}
if (key == "price") {
return(0);
}
if (key == "weight") {
return(2000);
}
if (key == "buildmarginbottom") {
return(36);
}
if (key == "buildmarginleft") {
return(26);
}
if (key == "damageclip") {
return("damage_passenger");
}
if (key == "destroydelay") {
return(1200);
}
if (key == "length") {
return(54);
}
if (key == "killlevel") {
return(2200);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3314 MovieClip [__Packages.rr.conf.train.ConfPassengerArmored] Frame 0
class rr.conf.train.ConfPassengerArmored
{
function ConfPassengerArmored () {
}
static function getValue(key) {
if (key == "name") {
return("armored passenger wagon");
}
if (key == "price") {
return(0);
}
if (key == "weight") {
return(3500);
}
if (key == "buildmarginbottom") {
return(36);
}
if (key == "buildmarginleft") {
return(22);
}
if (key == "damageclip") {
return("damage_passenger");
}
if (key == "destroydelay") {
return(1500);
}
if (key == "length") {
return(54);
}
if (key == "killlevel") {
return(3000);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3315 MovieClip [__Packages.rr.conf.train.ConfTankTrailer] Frame 0
class rr.conf.train.ConfTankTrailer
{
function ConfTankTrailer () {
}
static function getValue(key) {
if (key == "name") {
return("tank trailer");
}
if (key == "price") {
return(0);
}
if (key == "weight") {
return(2500);
}
if (key == "buildmarginbottom") {
return(38);
}
if (key == "buildmarginleft") {
return(30);
}
if (key == "damageclip") {
return("damage_tanktrailer");
}
if (key == "destroydelay") {
return(1000);
}
if (key == "length") {
return(74);
}
if (key == "killlevel") {
return(2400);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3316 MovieClip [__Packages.rr.conf.train.ConfABomb] Frame 0
class rr.conf.train.ConfABomb
{
function ConfABomb () {
}
static function getValue(key) {
if (key == "name") {
return("atomic bomb");
}
if (key == "price") {
return(0);
}
if (key == "weight") {
return(2000);
}
if (key == "buildmarginbottom") {
return(13);
}
if (key == "buildmarginleft") {
return(4);
}
if (key == "damageclip") {
return("damage_Abomb");
}
if (key == "destroydelay") {
return(1500);
}
if (key == "length") {
return(37);
}
if (key == "killlevel") {
return(2500);
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3317 MovieClip [__Packages.rr.conf.train.ConfCompound] Frame 0
class rr.conf.train.ConfCompound
{
function ConfCompound () {
}
static function getValue(key) {
}
}
Symbol 3318 MovieClip [__Packages.rr.conf.enemy.ConfBasilisk] Frame 0
class rr.conf.enemy.ConfBasilisk
{
function ConfBasilisk () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("bl");
}
if (key == "displayname") {
return("Basilisk");
}
if (key == "detectionDistance") {
return(500);
}
if (key == "shootingDistance") {
return(400);
}
if (key == "shootingInterval") {
return(5000);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(550);
}
if (key == "destroydelay") {
return(1000);
}
if (key == "gunsound") {
return("GunCannon3_short.wav");
}
if (key == "explodesound") {
return("Explosion09_short.wav");
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(1000);
}
if (key == "ammoAccuracy") {
return(70);
}
if (key == "ammodamage") {
return(40);
}
if (key == "explosionradius") {
return(150);
}
if (key == "ammosound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3319 MovieClip [__Packages.rr.conf.enemy.ConfPotTank] Frame 0
class rr.conf.enemy.ConfPotTank
{
function ConfPotTank () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("pt");
}
if (key == "displayname") {
return("Pot Tank");
}
if (key == "maxSpeed") {
return(2);
}
if (key == "curve") {
return(4);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "detectionDistance") {
return(400);
}
if (key == "shootingDistance") {
return(320);
}
if (key == "shootingInterval") {
return(2000);
}
if (key == "followDistance") {
return(50);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(350);
}
if (key == "destroydelay") {
return(1300);
}
if (key == "sound") {
return("tank2.wav");
}
if (key == "gunsound") {
return("GunCannon3_short.wav");
}
if (key == "explodesound") {
return("Explosion07_short.wav");
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(900);
}
if (key == "ammoAccuracy") {
return(50);
}
if (key == "ammodamage") {
return(40);
}
if (key == "explosionradius") {
return(120);
}
if (key == "ammosound") {
return("Explosion11min_short.wav");
}
}
}
Symbol 3320 MovieClip [__Packages.rr.conf.enemy.ConfAbrahams] Frame 0
class rr.conf.enemy.ConfAbrahams
{
function ConfAbrahams () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("ah");
}
if (key == "displayname") {
return("Abrahams");
}
if (key == "maxSpeed") {
return(2);
}
if (key == "curve") {
return(4);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "detectionDistance") {
return(450);
}
if (key == "shootingDistance") {
return(400);
}
if (key == "shootingInterval") {
return(2000);
}
if (key == "followDistance") {
return(50);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(450);
}
if (key == "destroydelay") {
return(1200);
}
if (key == "sound") {
return("tank4.wav");
}
if (key == "gunsound") {
return("GunCannon2_short.wav");
}
if (key == "explodesound") {
return("Explosion09_short.wav");
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(1000);
}
if (key == "ammoAccuracy") {
return(60);
}
if (key == "ammodamage") {
return(50);
}
if (key == "explosionradius") {
return(110);
}
if (key == "ammosound") {
return("Explosion08min_short.wav");
}
}
}
Symbol 3321 MovieClip [__Packages.rr.conf.enemy.ConfElephant] Frame 0
class rr.conf.enemy.ConfElephant
{
function ConfElephant () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("el");
}
if (key == "displayname") {
return("Elephant");
}
if (key == "maxSpeed") {
return(2);
}
if (key == "curve") {
return(4);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "detectionDistance") {
return(400);
}
if (key == "shootingDistance") {
return(320);
}
if (key == "shootingInterval") {
return(2000);
}
if (key == "followDistance") {
return(50);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(300);
}
if (key == "destroydelay") {
return(1500);
}
if (key == "sound") {
return("tank3.wav");
}
if (key == "gunsound") {
return("GunCannon1_short.wav");
}
if (key == "explodesound") {
return("Explosion09_short.wav");
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(800);
}
if (key == "ammoAccuracy") {
return(70);
}
if (key == "ammodamage") {
return(35);
}
if (key == "explosionradius") {
return(50);
}
if (key == "ammosound") {
return("Explosion05min_short.wav");
}
}
}
Symbol 3322 MovieClip [__Packages.rr.conf.enemy.ConfOldJeep] Frame 0
class rr.conf.enemy.ConfOldJeep
{
function ConfOldJeep () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("oj");
}
if (key == "displayname") {
return("Old Jeep");
}
if (key == "maxSpeed") {
return(2);
}
if (key == "curve") {
return(4);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "detectionDistance") {
return(300);
}
if (key == "shootingDistance") {
return(250);
}
if (key == "shootingInterval") {
return(1000);
}
if (key == "followDistance") {
return(50);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(100);
}
if (key == "destroydelay") {
return(1000);
}
if (key == "sound") {
return("Jeep.wav");
}
if (key == "gunsound") {
return("GunCannon7_short.wav");
}
if (key == "explodesound") {
return("Explosion11_short.wav");
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(800);
}
if (key == "ammoAccuracy") {
return(40);
}
if (key == "ammodamage") {
return(15);
}
if (key == "explosionradius") {
return(50);
}
if (key == "ammosound") {
return("Explosion05min_short.wav");
}
}
}
Symbol 3323 MovieClip [__Packages.rr.conf.enemy.ConfGunTruck] Frame 0
class rr.conf.enemy.ConfGunTruck
{
function ConfGunTruck () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("gt");
}
if (key == "displayname") {
return("Gun Truck");
}
if (key == "maxSpeed") {
return(2);
}
if (key == "curve") {
return(4);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "detectionDistance") {
return(350);
}
if (key == "shootingDistance") {
return(280);
}
if (key == "shootingInterval") {
return(3000);
}
if (key == "followDistance") {
return(50);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(225);
}
if (key == "destroydelay") {
return(1300);
}
if (key == "sound") {
return("Guntruck.wav");
}
if (key == "gunsound") {
return("GunCannon3_short.wav");
}
if (key == "explodesound") {
return("Explosion06_short.wav");
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(800);
}
if (key == "ammoAccuracy") {
return(50);
}
if (key == "ammodamage") {
return(25);
}
if (key == "explosionradius") {
return(40);
}
if (key == "ammosound") {
return("Explosion11min_short.wav");
}
}
}
Symbol 3324 MovieClip [__Packages.rr.conf.enemy.ConfArmoredJeep] Frame 0
class rr.conf.enemy.ConfArmoredJeep
{
function ConfArmoredJeep () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("aj");
}
if (key == "displayname") {
return("Armored Jeep");
}
if (key == "maxSpeed") {
return(2);
}
if (key == "curve") {
return(4);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "detectionDistance") {
return(300);
}
if (key == "shootingDistance") {
return(250);
}
if (key == "shootingInterval") {
return(2000);
}
if (key == "followDistance") {
return(50);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(175);
}
if (key == "destroydelay") {
return(800);
}
if (key == "sound") {
return("Jeep2.wav");
}
if (key == "gunsound") {
return("GunCannon7_short.wav");
}
if (key == "explodesound") {
return("Explosion11_short.wav");
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(800);
}
if (key == "ammoAccuracy") {
return(40);
}
if (key == "ammodamage") {
return(20);
}
if (key == "explosionradius") {
return(50);
}
if (key == "ammosound") {
return("Explosion05min_short.wav");
}
}
}
Symbol 3325 MovieClip [__Packages.rr.conf.enemy.ConfPanther] Frame 0
class rr.conf.enemy.ConfPanther
{
function ConfPanther () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("pn");
}
if (key == "displayname") {
return("panther");
}
if (key == "maxSpeed") {
return(2);
}
if (key == "curve") {
return(4);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "detectionDistance") {
return(420);
}
if (key == "shootingDistance") {
return(320);
}
if (key == "shootingInterval") {
return(2000);
}
if (key == "followDistance") {
return(50);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(350);
}
if (key == "destroydelay") {
return(1500);
}
if (key == "sound") {
return("tank3.wav");
}
if (key == "gunsound") {
return("GunCannon1_short.wav");
}
if (key == "explodesound") {
return("Explosion09_short.wav");
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(900);
}
if (key == "ammoAccuracy") {
return(50);
}
if (key == "ammodamage") {
return(40);
}
if (key == "explosionradius") {
return(120);
}
if (key == "ammosound") {
return("Explosion05min_short.wav");
}
}
}
Symbol 3326 MovieClip [__Packages.rr.conf.enemy.ConfBullDozer] Frame 0
class rr.conf.enemy.ConfBullDozer
{
function ConfBullDozer () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("bd");
}
if (key == "displayname") {
return("Bulldozer");
}
if (key == "feelerradius") {
return(30);
}
if (key == "maxSpeed") {
return(1);
}
if (key == "acceleration") {
return(0.02);
}
if (key == "detectionDistance") {
return(450);
}
if (key == "curve") {
return(4);
}
if (key == "killlevel") {
return(300);
}
if (key == "destroydelay") {
return(800);
}
if (key == "sound") {
return("Bulldozer.wav");
}
if (key == "explodesound") {
return("Explosion10_short.wav");
}
}
}
Symbol 3327 MovieClip [__Packages.rr.conf.enemy.ConfBunker] Frame 0
class rr.conf.enemy.ConfBunker
{
function ConfBunker () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("bk");
}
if (key == "displayname") {
return("Bunker");
}
if (key == "detectionDistance") {
return(500);
}
if (key == "shootingDistance") {
return(480);
}
if (key == "shootingInterval") {
return(3000);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(450);
}
if (key == "destroydelay") {
return(1100);
}
if (key == "gunsound") {
return("GunCannon3_short.wav");
}
if (key == "explodesound") {
return("Explosion09_short.wav");
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(1000);
}
if (key == "ammoAccuracy") {
return(60);
}
if (key == "ammodamage") {
return(25);
}
if (key == "explosionradius") {
return(100);
}
if (key == "ammosound") {
return("Explosion08min_short.wav");
}
}
}
Symbol 3328 MovieClip [__Packages.rr.conf.enemy.ConfGatlingSingle] Frame 0
class rr.conf.enemy.ConfGatlingSingle
{
function ConfGatlingSingle () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("gs");
}
if (key == "displayname") {
return("Gatling Single");
}
if (key == "detectionDistance") {
return(380);
}
if (key == "shootingDistance") {
return(300);
}
if (key == "shootingInterval") {
return(1000);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(350);
}
if (key == "destroydelay") {
return(900);
}
if (key == "gunsound") {
return("GunCannon7_short.wav");
}
if (key == "explodesound") {
return("Explosion09_short.wav");
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(1300);
}
if (key == "ammoAccuracy") {
return(50);
}
if (key == "ammodamage") {
return(20);
}
if (key == "explosionradius") {
return(60);
}
if (key == "ammosound") {
return("Explosion11min_short.wav");
}
}
}
Symbol 3329 MovieClip [__Packages.rr.conf.enemy.ConfGatlingDouble] Frame 0
class rr.conf.enemy.ConfGatlingDouble
{
function ConfGatlingDouble () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("gd");
}
if (key == "displayname") {
return("Gatling Double");
}
if (key == "detectionDistance") {
return(400);
}
if (key == "shootingDistance") {
return(300);
}
if (key == "shootingInterval") {
return(800);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(400);
}
if (key == "destroydelay") {
return(900);
}
if (key == "gunsound") {
return("GunCannon7_short.wav");
}
if (key == "explodesound") {
return("Explosion09_short.wav");
}
if (key == "ammospeed") {
return(20);
}
if (key == "ammoduration") {
return(1300);
}
if (key == "ammoAccuracy") {
return(50);
}
if (key == "ammodamage") {
return(25);
}
if (key == "explosionradius") {
return(70);
}
if (key == "ammosound") {
return("Explosion11min_short.wav");
}
}
}
Symbol 3330 MovieClip [__Packages.rr.conf.enemy.ConfRocketeer] Frame 0
class rr.conf.enemy.ConfRocketeer
{
function ConfRocketeer () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("rt");
}
if (key == "displayname") {
return("rocketeer");
}
if (key == "maxSpeed") {
return(2);
}
if (key == "curve") {
return(4);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "detectionDistance") {
return(400);
}
if (key == "shootingDistance") {
return(600);
}
if (key == "shootingInterval") {
return(10000);
}
if (key == "rotationSpeed") {
return(10);
}
if (key == "killlevel") {
return(350);
}
if (key == "destroydelay") {
return(540);
}
if (key == "sound") {
return("tank2.wav");
}
if (key == "gunsound") {
return("GunCannon3_short.wav");
}
if (key == "explodesound") {
return("Explosion09_short.wav");
}
if (key == "ammorange") {
return(2000);
}
if (key == "ammominCurve") {
return(2);
}
if (key == "ammomaxCurve") {
return(6);
}
if (key == "ammomaxSpeed") {
return(20);
}
if (key == "ammoacceleration") {
return(0.3);
}
if (key == "ammoduration") {
return(1300);
}
if (key == "ammostartsound") {
return(["Missile firing3_short.wav"]);
}
if (key == "ammosound") {
return(["Missile2_loop.wav"]);
}
if (key == "ammoexplodesound") {
return(["Explosion07_short.wav"]);
}
if (key == "ammoexplosiondamage") {
return(40);
}
if (key == "ammoexplosionradius") {
return(150);
}
}
}
Symbol 3331 MovieClip [__Packages.rr.conf.enemy.ConfRocketBase] Frame 0
class rr.conf.enemy.ConfRocketBase
{
function ConfRocketBase () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("rb");
}
if (key == "displayname") {
return("Rocketbase");
}
if (key == "launchtime") {
return(20000);
}
if (key == "feelerradius") {
return(60);
}
if (key == "startsound") {
return("Harpoon Base.wav");
}
if (key == "killlevel") {
return(1000);
}
if (key == "destroydelay") {
return(1100);
}
if (key == "explodesound") {
return("ExplosionBig03_short.wav");
}
}
}
Symbol 3332 MovieClip [__Packages.rr.conf.enemy.ConfRocket] Frame 0
class rr.conf.enemy.ConfRocket
{
function ConfRocket () {
}
static function getValue(key) {
if (key == "range") {
return(5000);
}
if (key == "altitude") {
return(100);
}
if (key == "curve") {
return(4);
}
if (key == "maxSpeed") {
return(20);
}
if (key == "acceleration") {
return(0.3);
}
if (key == "ammoduration") {
return(1040);
}
if (key == "startsound") {
return(["Missile firing2_short.wav"]);
}
if (key == "sound") {
return(["Missile1_loop.wav"]);
}
if (key == "explodesound") {
return(["Explosion07_short.wav"]);
}
if (key == "explosiondamage") {
return(40);
}
if (key == "explosionradius") {
return(150);
}
}
}
Symbol 3333 MovieClip [__Packages.rr.conf.enemy.ConfAirField] Frame 0
class rr.conf.enemy.ConfAirField
{
function ConfAirField () {
}
static function getValue(key) {
if (key == "unittype") {
return("GroundUnit");
}
if (key == "confcode") {
return("af");
}
if (key == "displayname") {
return("Airfield");
}
if (key == "detectionRanges") {
return([{d:6000, perc:20}, {d:1000, perc:40}, {d:500, perc:40}]);
}
if (key == "launchtime") {
return(15000);
}
if (key == "feelerradius") {
return(100);
}
if (key == "startsound") {
return("Airport.wav");
}
if (key == "killlevel") {
return(900);
}
if (key == "destroydelay") {
return(1100);
}
if (key == "explodesound") {
return("ExplosionBig02_short.wav");
}
}
}
Symbol 3334 MovieClip [__Packages.rr.conf.enemy.ConfFockeWolf] Frame 0
class rr.conf.enemy.ConfFockeWolf
{
function ConfFockeWolf () {
}
static function getValue(key) {
if (key == "unittype") {
return("AirUnit");
}
if (key == "confcode") {
return("fw");
}
if (key == "displayname") {
return("FockeWolf");
}
if (key == "feelerradius") {
return(25);
}
if (key == "maxSpeed") {
return(5);
}
if (key == "minCurve") {
return(1);
}
if (key == "maxCurve") {
return(4);
}
if (key == "altitude") {
return(50);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "launchDistance") {
return(500);
}
if (key == "detectionDistance") {
return(400);
}
if (key == "shootingDistance") {
return(300);
}
if (key == "shootingAngle") {
return(20);
}
if (key == "shootingInterval") {
return(100);
}
if (key == "killlevel") {
return(400);
}
if (key == "destroydelay") {
return(540);
}
if (key == "sound") {
return("Focke wolf.wav");
}
if (key == "gunsound") {
return("GunCannon2_short.wav");
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "ammospeed") {
return(400);
}
if (key == "ammoduration") {
return(250);
}
if (key == "ammoAccuracy") {
return(0);
}
if (key == "ammodamage") {
return(30);
}
if (key == "ammosound") {
return("GunCannon2_short.wav");
}
}
}
Symbol 3335 MovieClip [__Packages.rr.conf.enemy.ConfMesserSchmidt] Frame 0
class rr.conf.enemy.ConfMesserSchmidt
{
function ConfMesserSchmidt () {
}
static function getValue(key) {
if (key == "unittype") {
return("AirUnit");
}
if (key == "confcode") {
return("ms");
}
if (key == "displayname") {
return("MesserSchmidt");
}
if (key == "feelerradius") {
return(25);
}
if (key == "maxSpeed") {
return(5);
}
if (key == "minCurve") {
return(1);
}
if (key == "maxCurve") {
return(4);
}
if (key == "altitude") {
return(50);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "launchDistance") {
return(500);
}
if (key == "detectionDistance") {
return(400);
}
if (key == "shootingDistance") {
return(300);
}
if (key == "shootingAngle") {
return(20);
}
if (key == "shootingInterval") {
return(100);
}
if (key == "killlevel") {
return(500);
}
if (key == "destroydelay") {
return(1100);
}
if (key == "sound") {
return("MesserSchmidt.wav");
}
if (key == "gunsound") {
return("GunCannon2_short.wav");
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "ammospeed") {
return(400);
}
if (key == "ammoduration") {
return(250);
}
if (key == "ammoAccuracy") {
return(0);
}
if (key == "ammodamage") {
return(40);
}
if (key == "ammosound") {
return("GunCannon2_short.wav");
}
}
}
Symbol 3336 MovieClip [__Packages.rr.conf.enemy.ConfWartHog] Frame 0
class rr.conf.enemy.ConfWartHog
{
function ConfWartHog () {
}
static function getValue(key) {
if (key == "unittype") {
return("AirUnit");
}
if (key == "confcode") {
return("wh");
}
if (key == "displayname") {
return("WartHog");
}
if (key == "feelerradius") {
return(25);
}
if (key == "maxSpeed") {
return(5);
}
if (key == "minCurve") {
return(1);
}
if (key == "maxCurve") {
return(4);
}
if (key == "altitude") {
return(50);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "launchDistance") {
return(500);
}
if (key == "detectionDistance") {
return(400);
}
if (key == "shootingDistance") {
return(300);
}
if (key == "shootingAngle") {
return(20);
}
if (key == "shootingInterval") {
return(100);
}
if (key == "killlevel") {
return(700);
}
if (key == "destroydelay") {
return(540);
}
if (key == "sound") {
return("Warthog.wav");
}
if (key == "gunsound") {
return("GunCannon11_short.wav");
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "ammospeed") {
return(400);
}
if (key == "ammoduration") {
return(250);
}
if (key == "ammoAccuracy") {
return(0);
}
if (key == "ammodamage") {
return(50);
}
if (key == "ammosound") {
return("GunCannon11_short.wav");
}
}
}
Symbol 3337 MovieClip [__Packages.rr.conf.enemy.ConfC47] Frame 0
class rr.conf.enemy.ConfC47
{
function ConfC47 () {
}
static function getValue(key) {
if (key == "unittype") {
return("AirUnit");
}
if (key == "confcode") {
return("c47");
}
if (key == "displayname") {
return("C47");
}
if (key == "feelerradius") {
return(65);
}
if (key == "maxSpeed") {
return(8);
}
if (key == "minCurve") {
return(1);
}
if (key == "maxCurve") {
return(4);
}
if (key == "altitude") {
return(150);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "launchDistance") {
return(600);
}
if (key == "detectionDistance") {
return(1200);
}
if (key == "shootingDistance") {
return(100);
}
if (key == "shootingAngle") {
return(20);
}
if (key == "shootingInterval") {
return(80);
}
if (key == "killlevel") {
return(700);
}
if (key == "destroydelay") {
return(1000);
}
if (key == "sound") {
return("c47.wav");
}
if (key == "gunsound") {
return("Bombs_falling.wav");
}
if (key == "explodesound") {
return("Explosion10_short.wav");
}
if (key == "ammodelay") {
return(1000);
}
if (key == "ammoduration") {
return(1330);
}
if (key == "ammoAccuracy") {
return(0);
}
if (key == "ammodamage") {
return(30);
}
if (key == "ammosound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3338 MovieClip [__Packages.rr.conf.enemy.ConfB2] Frame 0
class rr.conf.enemy.ConfB2
{
function ConfB2 () {
}
static function getValue(key) {
if (key == "unittype") {
return("AirUnit");
}
if (key == "confcode") {
return("b2");
}
if (key == "displayname") {
return("B2");
}
if (key == "feelerradius") {
return(65);
}
if (key == "maxSpeed") {
return(8);
}
if (key == "minCurve") {
return(1);
}
if (key == "maxCurve") {
return(4);
}
if (key == "altitude") {
return(150);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "launchDistance") {
return(600);
}
if (key == "detectionDistance") {
return(1200);
}
if (key == "shootingDistance") {
return(100);
}
if (key == "shootingAngle") {
return(20);
}
if (key == "shootingInterval") {
return(80);
}
if (key == "killlevel") {
return(800);
}
if (key == "destroydelay") {
return(1000);
}
if (key == "sound") {
return("b2.wav");
}
if (key == "gunsound") {
return("Bombs_falling.wav");
}
if (key == "explodesound") {
return("Explosion10_short.wav");
}
if (key == "ammodelay") {
return(1000);
}
if (key == "ammoduration") {
return(1400);
}
if (key == "ammoAccuracy") {
return(0);
}
if (key == "ammodamage") {
return(25);
}
if (key == "ammosound") {
return("Explosion08_short.wav");
}
}
}
Symbol 3339 MovieClip [__Packages.rr.conf.enemy.ConfBellHuey] Frame 0
class rr.conf.enemy.ConfBellHuey
{
function ConfBellHuey () {
}
static function getValue(key) {
if (key == "unittype") {
return("AirUnit");
}
if (key == "confcode") {
return("bh");
}
if (key == "displayname") {
return("Bell Huey");
}
if (key == "maxSpeed") {
return(3);
}
if (key == "minCurve") {
return(2);
}
if (key == "maxCurve") {
return(6);
}
if (key == "altitude") {
return(25);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "shootingDistance") {
return(300);
}
if (key == "hoverDistance") {
return(200);
}
if (key == "shootingInterval") {
return(4000);
}
if (key == "killlevel") {
return(350);
}
if (key == "destroydelay") {
return(1200);
}
if (key == "sound") {
return("Heli 2.wav");
}
if (key == "gunsound") {
return("Shoot4_short.wav");
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "ammorange") {
return(1000);
}
if (key == "ammodetectionDistance") {
return(600);
}
if (key == "ammominCurve") {
return(2);
}
if (key == "ammomaxCurve") {
return(6);
}
if (key == "ammomaxSpeed") {
return(20);
}
if (key == "ammoacceleration") {
return(0.3);
}
if (key == "ammoduration") {
return(1140);
}
if (key == "ammostartsound") {
return(["Missile firing3_short.wav"]);
}
if (key == "ammosound") {
return(["Missile3_loop.wav"]);
}
if (key == "ammoexplodesound") {
return(["Explosion07_short.wav"]);
}
if (key == "ammoexplosiondamage") {
return(40);
}
if (key == "ammoexplosionradius") {
return(150);
}
}
}
Symbol 3340 MovieClip [__Packages.rr.conf.enemy.ConfApache] Frame 0
class rr.conf.enemy.ConfApache
{
function ConfApache () {
}
static function getValue(key) {
if (key == "unittype") {
return("AirUnit");
}
if (key == "confcode") {
return("ap");
}
if (key == "displayname") {
return("apache");
}
if (key == "maxSpeed") {
return(3);
}
if (key == "minCurve") {
return(2);
}
if (key == "maxCurve") {
return(6);
}
if (key == "altitude") {
return(25);
}
if (key == "acceleration") {
return(0.1);
}
if (key == "shootingDistance") {
return(400);
}
if (key == "hoverDistance") {
return(350);
}
if (key == "shootingInterval") {
return(5000);
}
if (key == "killlevel") {
return(500);
}
if (key == "destroydelay") {
return(1200);
}
if (key == "sound") {
return("Heli 4.wav");
}
if (key == "gunsound") {
return("Shoot4_short.wav");
}
if (key == "explodesound") {
return("Explosion08_short.wav");
}
if (key == "ammorange") {
return(2000);
}
if (key == "ammodetectionDistance") {
return(600);
}
if (key == "ammominCurve") {
return(2);
}
if (key == "ammomaxCurve") {
return(6);
}
if (key == "ammomaxSpeed") {
return(20);
}
if (key == "ammoacceleration") {
return(0.3);
}
if (key == "ammoduration") {
return(1400);
}
if (key == "ammostartsound") {
return(["Missile firing1_short.wav"]);
}
if (key == "ammosound") {
return(["Missile4_loop.wav"]);
}
if (key == "ammoexplodesound") {
return(["Explosion07_short.wav"]);
}
if (key == "ammoexplosiondamage") {
return(40);
}
if (key == "ammoexplosionradius") {
return(150);
}
}
}
Symbol 3341 MovieClip [__Packages.rr.utils.Delegate] Frame 0
class rr.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;
arguments=arguments.callee.arguments;//parameter overwritten
arguments.callee.arguments;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
arguments.splice(0, 2);
_local2.arguments = arguments;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
static function callDelayed(obj, func, ival) {
arguments.splice(0, 3);
var _local3 = new Object();
_local3.f = function () {
clearInterval(this.i);
var _local3 = arguments.callee.target;
var _local4 = arguments.callee.func;
arguments=arguments.callee.arguments;//parameter overwritten
arguments.callee.arguments;
return(this.func.apply(this.target, this.arguments));
};
_local3.target = obj;
_local3.func = func;
_local3.arguments = arguments;
_local3.i = setInterval(_local3, "f", ival);
}
}
Symbol 3342 MovieClip [__Packages.rr.control.TabCardLocomotive] Frame 0
class rr.control.TabCardLocomotive extends rr.control.TabCard
{
var name, __get__linkId, price, maxload, maxspeed, armor, weapon, fueltype, price_txt, maxload_txt, maxspeed_txt, enabled, processEnabled;
function TabCardLocomotive () {
super();
}
function init() {
super.init();
var _local3 = new TextFormat();
_local3.font = "myAlternateGothic2 BT";
_local3.size = 12;
_local3.letterSpacing = 0.4;
name = rr.conf.Config.getObjectValue(__get__linkId(), "name");
price = rr.conf.Config.getObjectValue(__get__linkId(), "price");
maxload = rr.conf.Config.getObjectValue(__get__linkId(), "maxload");
maxspeed = rr.conf.Config.getObjectValue(__get__linkId(), "maxspeed");
armor = rr.conf.Config.getObjectValue(__get__linkId(), "armor");
weapon = rr.conf.Config.getObjectValue(__get__linkId(), "weapon");
fueltype = rr.conf.Config.getObjectValue(__get__linkId(), "fueltype");
price_txt.autoSize = "right";
price_txt.text = price;
maxload_txt.autoSize = true;
maxload_txt.text = "PULLS " + (maxload / 1000);
maxload_txt.text = maxload_txt.text + ((maxload >= 2000) ? " TONS" : " TON");
maxspeed_txt.autoSize = true;
maxspeed_txt.text = ("MAX SPEED " + maxspeed) + " KM/H";
price_txt.setTextFormat(_local3);
maxload_txt.setTextFormat(_local3);
maxspeed_txt.setTextFormat(_local3);
}
function checkEnabled() {
enabled = true;
super.checkEnabled();
if (maxload < _global.trainbuild.totalLoad) {
enabled = false;
} else {
var _local4 = (_global.trainbuild.loc ? (rr.conf.Config.getObjectValue(_global.trainbuild.loc.linkId, "price")) : 0);
if (price > (_global.player.cash + _local4)) {
enabled = false;
}
}
processEnabled();
}
}
Symbol 3343 MovieClip [__Packages.rr.control.TabCardWagon] Frame 0
class rr.control.TabCardWagon extends rr.control.TabCard
{
var name, __get__linkId, price, weight, maxload, spaces, price_txt, weight_txt, maxload_txt, enabled, processEnabled;
function TabCardWagon () {
super();
}
function init() {
var _local3 = new TextFormat();
_local3.font = "myAlternateGothic2 BT";
_local3.size = 12;
_local3.letterSpacing = 0.4;
name = rr.conf.Config.getObjectValue(__get__linkId(), "name");
price = rr.conf.Config.getObjectValue(__get__linkId(), "price");
weight = rr.conf.Config.getObjectValue(__get__linkId(), "weight");
maxload = rr.conf.Config.getObjectValue(__get__linkId(), "maxload");
spaces = rr.conf.Config.getObjectValue(__get__linkId(), "spaces");
if (__get__linkId() == "HugeCannon") {
spaces = rr.conf.Config.getObjectValue(__get__linkId(), "wagonspaces");
}
price_txt.autoSize = "right";
price_txt.text = price;
weight_txt.autoSize = true;
weight_txt.text = "WEIGHT " + (weight / 1000);
weight_txt.text = weight_txt.text + ((weight >= 2000) ? " TONS" : " TON");
maxload_txt.autoSize = true;
maxload_txt.text = "CARRIES " + (maxload / 1000);
maxload_txt.text = maxload_txt.text + ((maxload >= 2000) ? " TONS" : " TON");
price_txt.setTextFormat(_local3);
weight_txt.setTextFormat(_local3);
maxload_txt.setTextFormat(_local3);
super.init();
}
function checkEnabled() {
enabled = true;
super.checkEnabled();
if ((_global.trainbuild.totalLoad + weight) > _global.trainbuild.maxLoad) {
enabled = false;
} else if (price > _global.player.cash) {
enabled = false;
} else if (_global.buildmenu.mode == "ingame") {
if (_global.trainbuild.ingameadded != undefined) {
enabled = false;
}
}
processEnabled();
}
}
Symbol 3344 MovieClip [__Packages.rr.control.SpeedLight] Frame 0
class rr.control.SpeedLight extends rr.BaseClip
{
var speedFactor, selected, edge_mc, edgecolor, col, _speedref, tarspeed, defcolor, gotoAndStop, displayspeed, stepmin, stepmax, speed_txt, isBlinking, gotoAndPlay;
function SpeedLight () {
super();
}
function init() {
speedFactor = _global.control.speedFactor;
selected = false;
edge_mc._visible = false;
edgecolor = 13103871 /* 0xC7F2FF */;
col = new Color(edge_mc);
col.setRGB(edgecolor);
if (_speedref == 0) {
tarspeed = 0;
defcolor = 15541546 /* 0xED252A */;
gotoAndStop("on");
_global.control.selectLight(_speedref);
} else {
tarspeed = ((_speedref < 0) ? ((((-_global.loc.speedmin) / speedFactor) * _speedref) / 3) : (((_global.loc.speedmax / speedFactor) * _speedref) / 6));
gotoAndStop("off");
}
defcolor = ((tarspeed == 0) ? 15541546 : (((tarspeed < 0) ? 16763904 : 52224)));
displayspeed = Math.round(tarspeed * speedFactor);
stepmin = (-_global.loc.speedmin) / 150;
stepmax = _global.loc.speedmax / 300;
var _local3 = new TextFormat();
_local3.bold = true;
_local3.font = "myAlternateGothic2 BT";
_local3.size = 13;
_local3.align = "center";
speed_txt.setNewTextFormat(_local3);
speed_txt.embedFonts = true;
speed_txt.text = displayspeed;
_global.loc.addEventListener("onLocAccel", this);
}
function get speedref() {
return(_speedref);
}
function set speedref(value) {
_speedref = value;
//return(speedref);
}
function select() {
selected = true;
_global.loc.setTargetSpeed(tarspeed);
edgecolor = defcolor;
col.setRGB(edgecolor);
edge_mc._visible = true;
Key.addListener(this);
}
function deselect() {
selected = false;
edgecolor = 13103871 /* 0xC7F2FF */;
col.setRGB(edgecolor);
edge_mc._visible = false;
Key.removeListener(this);
}
function onRollOver() {
if (selected) {
return(undefined);
}
edge_mc._visible = true;
}
function onRollOut() {
if (selected) {
return(undefined);
}
edge_mc._visible = false;
}
function onPress() {
if (selected) {
return(undefined);
}
_global.control.selectLight(_speedref);
}
function onKeyUp() {
if (!selected) {
return(undefined);
}
switch (Key.getCode()) {
case 37 :
if (_speedref > -3) {
_global.control.selectLight(_speedref - 1);
}
break;
case 39 :
if (_speedref >= 6) {
break;
}
_global.control.selectLight(_speedref + 1);
}
}
function onLocAccel() {
var _local3 = ((_global.loc.speed < 0) ? (stepmin) : (stepmax));
if (tarspeed < 0) {
if (_global.loc.speed >= 0) {
gotoAndStop("off");
isBlinking = false;
return(undefined);
}
} else if (tarspeed > 0) {
if (_global.loc.speed <= 0) {
gotoAndStop("off");
isBlinking = false;
return(undefined);
}
}
if (_global.loc.speed == tarspeed) {
gotoAndStop("on");
isBlinking = false;
} else if ((_global.loc.speed > (tarspeed - (_local3 / 2))) && (_global.loc.speed < (tarspeed + (_local3 / 2)))) {
if (!isBlinking) {
gotoAndPlay("blink");
isBlinking = true;
}
} else {
gotoAndStop("off");
isBlinking = false;
}
}
}
Symbol 3345 MovieClip [__Packages.rr.control.TabCardWeapon] Frame 0
class rr.control.TabCardWeapon extends rr.control.TabCard
{
var name, __get__linkId, price, weight, barrel, power, spaces, price_txt, weight_txt, _parent, enabled, processEnabled;
function TabCardWeapon () {
super();
}
function init() {
var _local4 = new TextFormat();
_local4.font = "myAlternateGothic2 BT";
_local4.size = 12;
_local4.letterSpacing = 0.4;
name = rr.conf.Config.getObjectValue(__get__linkId(), "name");
price = rr.conf.Config.getObjectValue(__get__linkId(), "price");
weight = rr.conf.Config.getObjectValue(__get__linkId(), "weight");
barrel = rr.conf.Config.getObjectValue(__get__linkId(), "barrel");
power = rr.conf.Config.getObjectValue(__get__linkId(), "power");
spaces = rr.conf.Config.getObjectValue(__get__linkId(), "spaces");
price_txt.autoSize = "right";
price_txt.text = price;
weight_txt.autoSize = true;
weight_txt.text = "WEIGHT " + (weight / 1000);
weight_txt.text = weight_txt.text + ((weight >= 2000) ? " TONS" : " TON");
price_txt.setTextFormat(_local4);
weight_txt.setTextFormat(_local4);
if (_parent != _global.levelresult.items_mc) {
_global.trainbuild.addEventListener("onWagonSelect", this);
_global.trainbuild.addEventListener("onWeaponSelect", this);
}
super.init();
}
function onWagonSelect() {
checkEnabled();
}
function onWeaponSelect() {
checkEnabled();
}
function checkEnabled() {
enabled = true;
super.checkEnabled();
if (!_global.trainbuild.selectedWagon) {
enabled = false;
} else if (_global.trainbuild.getFreeWagonSpace(spaces) < 0) {
enabled = false;
} else if ((_global.trainbuild.totalLoad + weight) > _global.trainbuild.maxLoad) {
enabled = false;
} else if (price > _global.player.cash) {
enabled = false;
}
if (__get__linkId() == "ColeCart") {
if (_global.trainbuild.loc.fueltype != "coal") {
enabled = false;
}
}
if (__get__linkId() == "OilTank") {
if (_global.trainbuild.loc.fueltype != "oil") {
enabled = false;
}
}
if (__get__linkId() == "PowerGenerator") {
if (_global.trainbuild.loc.fueltype != "electric") {
enabled = false;
}
}
processEnabled();
}
}
Symbol 3346 MovieClip [__Packages.cr.level.EnemySelector] Frame 0
class cr.level.EnemySelector extends rr.BaseClip
{
var count, maxcount, image_mc, _linkId, name_txt, count_txt, min_btn, plus_btn, _alpha, xshow, _type, xhide, _x, onEnterFrame;
function EnemySelector () {
super();
init();
}
function init() {
count = 0;
maxcount = 15;
image_mc.gotoAndStop(_linkId);
name_txt.text = rr.conf.Config.getObjectValue(_linkId, "displayname").toUpperCase();
count_txt.text = count.toString();
if (((((_linkId == "OldJeep") || (_linkId == "ArmoredJeep")) || (_linkId == "GunTruck")) || (_linkId == "PotTank")) || (_linkId == "GatlingSingle")) {
min_btn.onPress = rr.utils.Delegate.create(this, minCount);
plus_btn.onPress = rr.utils.Delegate.create(this, plusCount);
} else {
_alpha = 50;
}
_global.stage.addEventListener("onAreaSelect", this);
xshow = ((_type == "left") ? 0 : 510);
xhide = ((_type == "left") ? -150 : 660);
_x = xhide;
}
function get linkId() {
return(_linkId);
}
function set linkId(value) {
_linkId = value;
//return(linkId);
}
function get type() {
return(_type);
}
function set type(value) {
_type = value;
//return(type);
}
function onAreaSelect() {
count = 0;
if (!_global.stage.areaSel) {
hide();
return(undefined);
}
var _local4;
if (_global.stage.areaSel.combination) {
_local4 = _global.stage.areaSel.combination.enemies;
} else {
_local4 = _global.stage.areaSel.enemies;
}
var _local5 = _local4.length;
var _local3 = 0;
while (_local3 < _local5) {
if (_local4[_local3] == _linkId) {
count++;
}
_local3++;
}
count_txt.text = count.toString();
show();
}
function show() {
onEnterFrame = rr.utils.Delegate.create(this, shiftShow);
}
function hide() {
onEnterFrame = rr.utils.Delegate.create(this, shiftHide);
}
function shiftShow() {
if (_type == "left") {
if (_x < xshow) {
_x = _x + 10;
updateAfterEvent();
} else {
delete onEnterFrame;
}
} else if (_x > xshow) {
_x = _x - 10;
updateAfterEvent();
} else {
delete onEnterFrame;
}
}
function shiftHide() {
if (_type == "left") {
if (_x > xhide) {
_x = _x - 10;
updateAfterEvent();
} else {
delete onEnterFrame;
}
} else if (_x < xhide) {
_x = _x + 10;
updateAfterEvent();
} else {
delete onEnterFrame;
}
}
function plusCount() {
if (count < maxcount) {
if (_global.stage.areaSel.addEnemy(_linkId)) {
count++;
count_txt.text = count.toString();
}
}
}
function minCount() {
if (count > 0) {
if (_global.stage.areaSel.removeEnemy(_linkId)) {
count--;
count_txt.text = count.toString();
}
}
}
}
Symbol 3347 MovieClip [__Packages.cr.level.AirUnitSelector] Frame 0
class cr.level.AirUnitSelector extends rr.BaseClip
{
var count, maxcount, image_mc, _linkId, name_txt, count_txt, min_btn, plus_btn, _alpha, _x, onEnterFrame;
function AirUnitSelector () {
super();
init();
}
function init() {
count = 0;
maxcount = 15;
image_mc.gotoAndStop(_linkId);
name_txt.text = rr.conf.Config.getObjectValue(_linkId, "displayname").toUpperCase();
count_txt.text = count.toString();
if (_linkId == "FockeWolf") {
min_btn.onPress = rr.utils.Delegate.create(this, minCount);
plus_btn.onPress = rr.utils.Delegate.create(this, plusCount);
} else {
_alpha = 50;
}
_global.stage.addEventListener("onObjectSelect", this);
_x = 150;
}
function get linkId() {
return(_linkId);
}
function set linkId(value) {
_linkId = value;
//return(linkId);
}
function onObjectSelect() {
count = 0;
if (_global.stage.objSel.linkId != "AirField") {
hide();
return(undefined);
}
var _local4 = _global.stage.objSel.enemies;
var _local5 = _local4.length;
var _local3 = 0;
while (_local3 < _local5) {
if (_local4[_local3] == _linkId) {
count++;
}
_local3++;
}
count_txt.text = count.toString();
show();
}
function show() {
onEnterFrame = rr.utils.Delegate.create(this, shiftShow);
}
function hide() {
onEnterFrame = rr.utils.Delegate.create(this, shiftHide);
}
function shiftShow() {
if (_x > 0) {
_x = _x - 10;
updateAfterEvent();
} else {
delete onEnterFrame;
}
}
function shiftHide() {
if (_x < 150) {
_x = _x + 10;
updateAfterEvent();
} else {
delete onEnterFrame;
}
}
function plusCount() {
if (count < maxcount) {
if (_global.stage.objSel.addEnemy(_linkId)) {
count++;
count_txt.text = count.toString();
}
}
}
function minCount() {
if (count > 0) {
if (_global.stage.objSel.removeEnemy(_linkId)) {
count--;
count_txt.text = count.toString();
}
}
}
}
Symbol 3348 MovieClip [__Packages.rr.control.MiniMap] Frame 0
class rr.control.MiniMap extends rr.BaseClip
{
var _visible, map_bmp, container_mc, margin, scale, w, h, railcolor, createEmptyMovieClip, getNextHighestDepth, map_mc, label_mc, legenda_mc, edge_mc, cam_mc, items_mc, icons_mc, onEnterFrame;
function MiniMap () {
super();
_global.minimap = this;
_visible = false;
}
function init() {
map_bmp.dispose();
delete map_bmp;
container_mc.removeMovieClip();
margin = 5;
var _local3 = _global.map.width;
var _local4 = _global.map.height;
scale = ((_local3 > _local4) ? ((640 - (2 * margin)) / _local3) : ((480 - (2 * margin)) / _local4));
w = _local3 * scale;
h = _local4 * scale;
railcolor = 13103871 /* 0xC7F2FF */;
if ((_global.map.mapId == 2) || (_global.map.mapId == 3)) {
railcolor = 11836;
}
container_mc = createEmptyMovieClip("container_mc", getNextHighestDepth());
map_mc = container_mc.createEmptyMovieClip("map_mc", container_mc.getNextHighestDepth());
map_bmp = new flash.display.BitmapData(w, h, true, 0);
map_mc.attachBitmap(map_bmp, map_mc.getNextHighestDepth());
label_mc = container_mc.attachMovie("MiniMapLabel", "label_mc", container_mc.getNextHighestDepth());
label_mc.mission_txt.autoSize = true;
label_mc.mission_txt.wordWrap = false;
setMissionText();
legenda_mc = container_mc.attachMovie("MiniMapLegenda", "legenda_mc", container_mc.getNextHighestDepth());
if (w > h) {
map_mc._y = label_mc._height;
label_mc._x = 0;
legenda_mc._x = w - legenda_mc._width;
legenda_mc._y = (label_mc._height - legenda_mc._height) - margin;
} else {
map_mc._y = 0;
label_mc._x = w;
legenda_mc._x = w;
legenda_mc._y = h - legenda_mc._height;
}
container_mc._y = ((480 - margin) - h) - map_mc._y;
edge_mc = container_mc.createEmptyMovieClip("edge_mc", container_mc.getNextHighestDepth());
edge_mc.lineStyle(1, 202014);
rr.utils.DrawUtils.drawRect(edge_mc, 0, map_mc._y, w, h);
cam_mc = container_mc.createEmptyMovieClip("cam_mc", container_mc.getNextHighestDepth());
cam_mc.lineStyle(1, 16711680);
rr.utils.DrawUtils.drawRect(cam_mc, 0, 0, 640 * scale, 480 * scale);
}
function showMap() {
trace("show MiniMap: ");
_global.sounds.stopAll();
_global.timer.stop();
_global.aim.hide(this);
cam_mc._x = _global.camera.left * scale;
cam_mc._y = (_global.camera.top * scale) + map_mc._y;
items_mc = container_mc.createEmptyMovieClip("items_mc", container_mc.getNextHighestDepth());
items_mc.lineStyle(1, 65280);
var _local9 = _global.train.segments.length;
var _local6 = 0;
while (_local6 < _local9) {
var _local7 = _global.train.segments[_local6];
rr.utils.DrawUtils.drawSquare(items_mc, (_local7.x * scale) - 2, (map_mc._y + (_local7.y * scale)) - 2, 4, 4, 65280);
_local6++;
}
icons_mc = container_mc.createEmptyMovieClip("icons_mc", container_mc.getNextHighestDepth());
_local9 = _global.map.cells.length;
_local6 = 0;
while (_local6 < _local9) {
var _local5 = _global.map["cell_" + _global.map.cells[_local6]];
var _local8 = _local5.statics.length;
var _local4 = 0;
while (_local4 < _local8) {
var _local3 = _local5.statics[_local4];
if (_local3 instanceof rr.train.Bonus) {
createIcon("b", _local3.x * scale, map_mc._y + (_local3.y * scale));
}
if (_local3 instanceof rr.train.Drop) {
createIcon(_local3.mode, _local3.x * scale, map_mc._y + (_local3.y * scale));
}
_local4++;
}
_local6++;
}
container_mc._x = 650 + margin;
_visible = true;
onEnterFrame = rr.utils.Delegate.create(this, shiftShow);
}
function createIcon(t, px, py) {
var _local2 = icons_mc.attachMovie("MiniMapIcon", rr.utils.StringUtils.getUniqueName(), icons_mc.getNextHighestDepth());
_local2.gotoAndPlay(t);
_local2._x = px;
_local2._y = py;
}
function shiftShow() {
if (container_mc._x > margin) {
container_mc._x = container_mc._x - 50;
updateAfterEvent();
} else {
delete onEnterFrame;
}
}
function closeMap() {
icons_mc.removeMovieClip();
items_mc.removeMovieClip();
_visible = false;
_global.aim.show(this);
_global.timer.start();
}
function setMissionText() {
if (_global.gameconf.missiontext) {
label_mc.mission_txt.text = _global.gameconf.missiontext.toUpperCase();
} else {
var _local16 = _global.gameconf.dp;
var _local17 = _local16.length;
if (_local17 == 0) {
label_mc.mission_txt.text = "JUST REACH THE OTHER SIDE";
} else {
var _local4 = "";
var _local9;
var _local6;
var _local14;
var _local10;
var _local15;
var _local12;
var _local11;
var _local7;
var _local13;
var _local8;
_local8 = 0;
_local13 = _local8;
_local7 = _local13;
_local11 = _local7;
_local12 = _local11;
_local15 = _local12;
_local10 = _local15;
_local14 = _local10;
_local6 = _local14;
_local9 = _local6;
var _local5 = 0;
while (_local5 < _local17) {
var _local3 = _local16[_local5];
if (_local3.m == "d") {
if (_local3.t == "f") {
_local6++;
}
if (_local3.t == "p") {
_local10++;
}
if (_local3.t == "a") {
_local12++;
}
if (_local3.t == "t") {
_local7++;
}
if (_local3.t == "b") {
_local8++;
}
}
if (_local3.m == "p") {
if (_local3.t == "f") {
_local9++;
}
if (_local3.t == "p") {
_local14++;
}
if (_local3.t == "a") {
_local15++;
}
if (_local3.t == "t") {
_local11++;
}
if (_local3.t == "b") {
_local13++;
}
}
_local5++;
}
if (_local6 > 0) {
_local4 = _local4 + (("Drop of " + _local6) + " Oiltank");
if (_local6 > 1) {
_local4 = _local4 + "s";
}
}
if (_local10 > 0) {
_local4 = _local4 + ((_local4 == "") ? "" : "\r");
_local4 = _local4 + (("Drop of " + _local10) + " Passenger wagon");
if (_local10 > 1) {
_local4 = _local4 + "s";
}
}
if (_local12 > 0) {
_local4 = _local4 + ((_local4 == "") ? "" : "\r");
_local4 = _local4 + (("Drop of " + _local12) + " Armored passenger wagon");
if (_local12 > 1) {
_local4 = _local4 + "s";
}
}
if (_local7 > 0) {
_local4 = _local4 + ((_local4 == "") ? "" : "\r");
_local4 = _local4 + (("Drop of " + _local7) + " Tanktrailer");
if (_local7 > 1) {
_local4 = _local4 + "s";
}
}
if (_local8 > 0) {
_local4 = _local4 + ((_local4 == "") ? "" : "\r");
_local4 = _local4 + (("Drop of " + _local8) + " Atomic bomb");
if (_local8 > 1) {
_local4 = _local4 + "s";
}
}
if (_local9 > 0) {
_local4 = _local4 + ((_local4 == "") ? "" : "\r");
_local4 = _local4 + (("Pick up " + _local9) + " Oiltank");
if (_local9 > 1) {
_local4 = _local4 + "s";
}
}
if (_local14 > 0) {
_local4 = _local4 + ((_local4 == "") ? "" : "\r");
_local4 = _local4 + (("Pick up " + _local14) + " Passenger wagon");
if (_local14 > 1) {
_local4 = _local4 + "s";
}
}
if (_local15 > 0) {
_local4 = _local4 + ((_local4 == "") ? "" : "\r");
_local4 = _local4 + (("Pick up " + _local15) + " Armored passenger wagon");
if (_local15 > 1) {
_local4 = _local4 + "s";
}
}
if (_local11 > 0) {
_local4 = _local4 + ((_local4 == "") ? "" : "\r");
_local4 = _local4 + (("Pick up " + _local11) + " Tanktrailer");
if (_local11 > 1) {
_local4 = _local4 + "s";
}
}
if (_local13 > 0) {
_local4 = _local4 + ((_local4 == "") ? "" : "\r");
_local4 = _local4 + (("Pick up " + _local13) + " Atomic bomb");
if (_local13 > 1) {
_local4 = _local4 + "s";
}
}
label_mc.mission_txt.text = _local4.toUpperCase();
}
}
}
}
Symbol 3349 MovieClip [__Packages.rr.utils.DrawUtils] Frame 0
class rr.utils.DrawUtils
{
function DrawUtils () {
}
static function drawSquare(mc, x, y, w, h, c) {
mc.moveTo(x, y);
mc.beginFill(c);
mc.lineTo(x + w, y);
mc.lineTo(x + w, y + h);
mc.lineTo(x, y + h);
mc.lineTo(x, y);
mc.endFill();
}
static function drawRect(mc, x, y, w, h) {
mc.moveTo(x, y);
mc.lineTo(x + w, y);
mc.lineTo(x + w, y + h);
mc.lineTo(x, y + h);
mc.lineTo(x, y);
}
static function drawFillRect(mc, x, y, w, h, fill_col, fill_alpha) {
mc.moveTo(x, y);
mc.beginFill(fill_col, fill_alpha);
mc.lineTo(x + w, y);
mc.lineTo(x + w, y + h);
mc.lineTo(x, y + h);
mc.lineTo(x, y);
mc.endFill();
}
static function drawCircle(mc, x, y, r, style) {
if (!mc.circle) {
mc.circle = mc.createEmptyMovieClip("circle", mc.getNextHighestDepth());
}
mc.circle.moveTo(x + r, y);
mc.circle.lineStyle(1, 0);
var _local7 = Math.tan((style * Math.PI) / 180);
var _local1 = 45;
while (_local1 <= 360) {
var _local4 = r * Math.cos((_local1 * Math.PI) / 180);
var _local3 = r * Math.sin((_local1 * Math.PI) / 180);
var _local6 = _local4 + ((r * _local7) * Math.cos(((_local1 - 90) * Math.PI) / 180));
var _local5 = _local3 + ((r * _local7) * Math.sin(((_local1 - 90) * Math.PI) / 180));
mc.circle.curveTo(_local6 + x, _local5 + y, _local4 + x, _local3 + y);
_local1 = _local1 + 45;
}
}
static function drawArc(mc, x, y, startAngle, arc, radius, colr) {
var _local18;
var _local1;
var _local3;
var _local4;
var _local13;
var _local7;
var _local6;
var _local12;
var _local10;
var _local11;
var _local9;
mc.lineStyle(1, colr, 100);
mc.beginFill(colr);
mc.moveTo(x, y);
if (Math.abs(arc) > 360) {
arc = 360;
}
_local13 = Math.ceil(Math.abs(arc) / 45);
_local18 = arc / _local13;
_local1 = (-(_local18 / 180)) * Math.PI;
_local3 = (-(startAngle / 180)) * Math.PI;
if (_local13 > 0) {
_local7 = x + (Math.cos((startAngle / 180) * Math.PI) * radius);
_local6 = y + (Math.sin(((-startAngle) / 180) * Math.PI) * radius);
mc.lineTo(_local7, _local6);
_local7 = x;
_local6 = y;
var _local5;
_local5 = 0;
while (_local5 < _local13) {
_local3 = _local3 + _local1;
_local4 = _local3 - (_local1 / 2);
_local12 = _local7 + (Math.cos(_local3) * radius);
_local10 = _local6 + (Math.sin(_local3) * radius);
_local11 = _local7 + (Math.cos(_local4) * (radius / Math.cos(_local1 / 2)));
_local9 = _local6 + (Math.sin(_local4) * (radius / Math.cos(_local1 / 2)));
mc.curveTo(_local11, _local9, _local12, _local10);
_local5++;
}
mc.lineTo(x, y);
mc.lineTo(_local7, _local6);
mc.endFill();
}
}
}
Symbol 3350 MovieClip [__Packages.rr.BaseClass] Frame 0
class rr.BaseClass
{
var events;
function BaseClass () {
}
function addEventListener(evt, listener) {
if (events == undefined) {
events = new mx.events.EventDispatcher();
}
events.addEventListener(evt, listener);
}
function removeEventListener(evt, listener) {
events.removeEventListener(evt, listener);
}
var pi = Math.PI;
var cos = Math.cos;
var acos = Math.acos;
var sin = Math.sin;
var asin = Math.asin;
var atan2 = Math.atan2;
var abs = Math.abs;
var round = Math.round;
}
Symbol 3351 MovieClip [__Packages.rr.train.Bonus] Frame 0
class rr.train.Bonus extends rr.BaseClass
{
var linkId, initObj, dfeel, uid, cellId, x, y, t, cash, mov, bonusAdded, typeSet, type;
function Bonus (iObj) {
super();
linkId = "Bonus";
initObj = iObj;
dfeel = 75;
init();
}
function init() {
uid = initObj.uid;
cellId = initObj.cellid;
x = initObj.x;
y = initObj.y;
t = initObj.t;
if (initObj.c) {
cash = initObj.c;
}
}
function update() {
if (rr.utils.MathUtils.getDistance(x, y, _global.loc.x, _global.loc.y) < dfeel) {
applyBonus();
}
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
render();
} else if (mov) {
clearMov();
}
}
function render() {
if (!mov) {
if (!bonusAdded) {
if (!typeSet) {
setType();
}
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId + type, rr.utils.StringUtils.getUniqueName(), _local3);
trace(("linkId + type: " + linkId) + type);
if (cash) {
mov.cash_txt.text = cash.toString();
}
}
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
}
function clearMov() {
mov.removeMovieClip();
delete mov;
}
function setType() {
if (t == "m") {
type = "Money";
} else if (t == "r") {
type = "Repair";
} else {
if (_global.loc.fueltype == "coal") {
type = "Coal";
}
if (_global.loc.fueltype == "oil") {
type = "Oil";
}
if (_global.loc.fueltype == "electric") {
type = "Electric";
}
}
typeSet = true;
}
function applyBonus() {
if (_global.train.isCrashed) {
return(undefined);
}
if (bonusAdded) {
return(undefined);
}
bonusAdded = true;
if (type == "Money") {
_global.player.addBonus(cash);
_global.sounds.playSound("Cash Bonus.wav");
} else {
_global.train.setBonus(type);
}
if (type == "Coal") {
_global.sounds.playSound("Coal Bonus.wav");
}
if (type == "Electric") {
_global.sounds.playSound("Energy Bonus.wav");
}
if (type == "Oil") {
_global.sounds.playSound("Oil Bonus.wav");
}
if (type == "Repair") {
_global.sounds.playSound("Repair Bonus.wav");
}
clearMov();
_global.map["cell_" + cellId].deleteObject(this);
}
}
Symbol 3352 MovieClip [__Packages.rr.utils.MathUtils] Frame 0
class rr.utils.MathUtils
{
function MathUtils () {
}
static function formatDecimals(num, digits) {
if (digits <= 0) {
return(Math.round(num));
}
var _local4 = Math.pow(10, digits);
var _local2 = String(Math.round(num * _local4) / _local4);
if (_local2.indexOf(".") == -1) {
_local2 = _local2 + ".0";
}
var _local6 = _local2.split(".");
var _local3 = digits - _local6[1].length;
var _local1 = 1;
while (_local1 <= _local3) {
_local2 = _local2 + "0";
_local1++;
}
return(Number(_local2));
}
static function toScientific(num, sigDigs) {
num = Number(num);
if (isNaN(num)) {
return(num);
}
var _local2 = Math.floor(Math.log(Math.abs(num)) / Math.LN10);
if (num == 0) {
_local2 = 0;
}
var _local5 = Math.pow(10, _local2);
var _local3 = num / _local5;
_local3 = formatDecimals(_local3, sigDigs - 1);
var _local4 = _local3;
if (_local2 != 0) {
_local4 = _local4 + ("e" + _local2);
}
return(_local4);
}
static function getDistance(x1, y1, x2, y2) {
var _local1 = Math.abs(x1 - x2);
var _local2 = Math.abs(y1 - y2);
return(Math.sqrt(Math.pow(_local1, 2) + Math.pow(_local2, 2)));
}
static function getAngle(x1, y1, x2, y2) {
return(formatAngle2(Math.round((180 * Math.atan2(y2 - y1, x2 - x1)) / Math.PI)));
}
static function formatAngle(ang) {
if (ang > 0) {
return(ang - 360);
}
if (ang < -360) {
return(ang + 360);
}
return(ang);
}
static function formatAngle2(ang) {
if (ang < 0) {
return(ang + 360);
}
if (ang > 360) {
return(ang - 360);
}
return(ang);
}
static function formatAngle3(ang) {
if (ang < -180) {
return(ang + 360);
}
if (ang > 180) {
return(ang - 360);
}
return(ang);
}
static function angDiff(ang1, ang2) {
return(Math.abs(formatAngle3(ang1) - formatAngle3(ang2)));
}
static function angDiff2(ang1, ang2) {
return(formatAngle3(ang1) - formatAngle3(ang2));
}
}
Symbol 3353 MovieClip [__Packages.rr.utils.ClipUtils] Frame 0
class rr.utils.ClipUtils
{
function ClipUtils () {
}
static function getFreeDepth(mc, obj) {
var _local2 = rr.conf.ConfBaseDepths.getDepth(obj);
if (!_local2) {
_local2 = 1000;
}
var _local1 = 0;
while (mc.getInstanceAtDepth(_local2 + _local1)) {
_local1++;
}
return(_local2 + _local1);
}
static function setTint(mc, rgb, amount) {
var _local1 = new flash.geom.ColorTransform();
var _local2 = new flash.geom.Transform(mc);
com.robertpenner.utils.ColorTransformUtil.setTint2(_local1, rgb, amount);
_local2.colorTransform = _local1;
}
static function createFeeler(name, col, w) {
var _local2 = _global.stage.createEmptyMovieClip(name, _global.stage.getNextHighestDepth());
_local2.lineStyle(1, col);
_local2.beginFill(col);
_local2.moveTo(-w, -w);
_local2.lineTo(w, -w);
_local2.lineTo(w, w);
_local2.lineTo(-w, w);
_local2.lineTo(-w, -w);
_local2.endFill();
return(_local2);
}
}
Symbol 3354 MovieClip [__Packages.rr.conf.ConfBaseDepths] Frame 0
class rr.conf.ConfBaseDepths
{
function ConfBaseDepths () {
}
static function getDepth(obj) {
if (obj instanceof rr.Aim) {
return(200000);
}
if (obj instanceof rr.Clock) {
return(196000);
}
if (obj instanceof rr.train.weapons.EMPLoader) {
return(195000);
}
if (obj instanceof rr.rail.RailSwitch) {
return(190000);
}
if (obj instanceof rr.train.Drop) {
return(190000);
}
if (obj instanceof rr.train.Bonus) {
return(190000);
}
if (obj.linkId == "B2") {
return(110000);
}
if (obj instanceof rr.enemy.AirUnit) {
return(100000);
}
if (obj instanceof rr.enemy.Heli) {
return(90000);
}
if (obj.linkId == "BellHuey") {
return(90000);
}
if (obj instanceof rr.train.AirCrane) {
return(80000);
}
if (obj.linkId == "SmokeTrail") {
return(50000);
}
if (obj.linkId == "Heatseeker") {
return(42000);
}
if (obj.linkId == "Rocket") {
return(42000);
}
if (obj == "EMPPulse") {
return(41000);
}
if (obj == "StageForeground") {
return(40000);
}
if (obj instanceof rr.ammo.Ammo) {
return(30000);
}
if (obj == "Compound") {
return(25000);
}
if (obj instanceof rr.train.weapons.FixedWeapon) {
return(23000);
}
if (obj instanceof rr.train.weapons.StaticWeapon) {
return(23000);
}
if (obj instanceof rr.train.weapons.TrainWeapon) {
return(20000);
}
if (obj instanceof rr.train.Locomotive) {
return(18000);
}
if (obj instanceof rr.train.TrainLoad) {
return(15000);
}
if (obj instanceof rr.rail.RailBlock) {
return(14000);
}
if (obj.linkId == "BullDozer") {
return(12000);
}
if (obj instanceof rr.enemy.GroundUnit) {
return(10000);
}
if (obj instanceof rr.train.TrainWagon) {
return(1000);
}
}
}
Symbol 3355 MovieClip [__Packages.rr.Aim] Frame 0
class rr.Aim extends rr.BaseClass
{
var linkId, mov, hidden, mode, events, hiddenBy;
function Aim () {
super();
}
function init() {
linkId = "Aim";
showCrossHair();
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId, rr.utils.StringUtils.getUniqueName(), _local3);
mov.cranewarning_mc._visible = false;
mov.onMouseDown = rr.utils.Delegate.create(this, setDown);
mov.onMouseUp = rr.utils.Delegate.create(this, setUp);
_global.timer.addEventListener("onTimerTick", this);
hidden = true;
show();
}
function onTimerTick() {
if (mov._y > _global.stage.height) {
if (mov._visible) {
hide();
}
} else if (!mov._visible) {
show();
}
}
function setDown() {
if (mov._visible) {
if (mode == "detach") {
checkWagonDetach();
} else {
events.dispatchEvent({type:"onAimDown", target:this});
}
}
}
function setUp() {
if (mov._visible) {
events.dispatchEvent({type:"onAimUp", target:this});
}
}
function show(obj) {
if (!mov) {
return(undefined);
}
if (!hidden) {
return(undefined);
}
if (obj) {
if (obj != hiddenBy) {
return(undefined);
}
delete hiddenBy;
} else if (hiddenBy) {
return(undefined);
}
hidden = false;
mov._visible = true;
Mouse.hide();
mov.startDrag(true);
}
function hide(obj) {
if (!mov) {
return(undefined);
}
if (hidden) {
return(undefined);
}
if (obj) {
hiddenBy = obj;
}
hidden = true;
setUp();
mov._visible = false;
Mouse.show();
}
function showIndicator() {
mode = "ind";
mov.gotoAndPlay("ind");
}
function showCrossHair() {
mode = "crosshair";
mov.gotoAndPlay("crosshair");
}
function showDetach() {
mode = "detach";
mov.gotoAndPlay("detach");
}
function checkWagonDetach() {
var _local3 = _global.loc;
while (_local3.next) {
_local3 = _local3.next;
if (_local3.mov.hitTest(_xmouse, _ymouse, true)) {
_local3.disconnect();
break;
}
}
showCrossHair();
}
function clear() {
mov.removeMovieClip();
delete mov;
_global.timer.removeEventListener("onTimerTick", this);
Mouse.show();
}
}
Symbol 3356 MovieClip [__Packages.rr.utils.StringUtils] Frame 0
class rr.utils.StringUtils
{
function StringUtils () {
}
static function getUniqueName() {
var _local3 = "";
var _local2 = 1;
while (_local2 <= 4) {
var _local1 = 1;
while (_local1 <= 4) {
_local3 = _local3 + getRandomChar();
_local1++;
}
if (_local2 < 4) {
_local3 = _local3 + "-";
}
_local2++;
}
return(_local3);
}
static function getRandomChar() {
switch (Math.round(Math.random() + 1)) {
case 1 :
return(String.fromCharCode(Math.round(Math.random() * 25) + 65));
case 2 :
return(String.fromCharCode(Math.round(Math.random() * 25) + 97));
}
}
static function scrambleArray(arr) {
var _local2 = [];
while (arr.length > 0) {
_local2.push(arr.splice(Math.round(Math.random() * (arr.length - 1)), 1));
}
return(_local2);
}
static function getTimeString(t) {
var _local1 = Math.round(t / 1000);
var _local2 = Math.floor(_local1 / 60);
var _local3 = Math.floor(_local2 / 60);
_local1 = _local1 % 60;
_local2 = _local2 % 60;
var _local4 = ((_local1 < 10) ? ("0" + _local1) : (_local1));
var _local5 = _local2 + ":";
var _local6 = ((_local3 > 0) ? (_local3 + ":") : "");
var _local7 = (_local6 + _local5) + _local4;
return(_local7);
}
static function getHighScoreTimeString(t) {
var _local2 = Math.round(t / 1000);
var _local1 = Math.floor(_local2 / 60);
var _local3 = Math.floor(_local1 / 60);
_local2 = _local2 % 60;
_local1 = _local1 % 60;
var _local6 = ((_local2 < 10) ? ("0" + _local2) : (_local2.toString()));
var _local4 = "00";
if (_local1 > 0) {
_local4 = ((_local1 < 10) ? ("0" + _local1) : (_local1.toString()));
}
var _local5 = "";
if (_local3 > 0) {
_local5 = ((_local3 < 10) ? ("0" + _local3) : (_local3.toString()));
}
var _local7 = (_local5 + _local4) + _local6;
return(_local7);
}
}
Symbol 3357 MovieClip [__Packages.rr.Clock] Frame 0
class rr.Clock extends rr.BaseClip
{
var linkId, mov;
function Clock () {
super();
linkId = "Clock";
}
function init() {
createMov();
_global.timer.addEventListener("onTimerTick", this);
}
function onTimerTick() {
if (_global.leveltime > 0) {
mov.time_txt.text = rr.utils.StringUtils.getTimeString(_global.leveltime);
var _local3 = (360 * (_global.leveltime % 1000)) / 1000;
trace("rot: " + _local3);
mov.hand_mc._rotation = _local3;
}
}
function createMov() {
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId, rr.utils.StringUtils.getUniqueName(), _local3, {parent:this});
mov.time_txt.text = rr.utils.StringUtils.getTimeString(0);
mov.hand_mc._rotation = 0;
}
function clear() {
mov.removeMovieClip();
delete mov;
_global.timer.removeEventListener("onTimerTick", this);
}
}
Symbol 3358 MovieClip [__Packages.rr.train.weapons.EMPLoader] Frame 0
class rr.train.weapons.EMPLoader extends rr.BaseClip
{
var linkId, parent, tload, isLoaded, lastloaded, mov;
function EMPLoader (e) {
super();
linkId = "EMPLoader";
parent = e;
init();
}
function init() {
tload = rr.conf.Config.getObjectValue(parent.linkId, "loadTime");
isLoaded = false;
createMov();
load();
}
function load() {
isLoaded = false;
lastloaded = getTimer();
_global.timer.addEventListener("onTimerTick", this);
}
function onTimerTick() {
var _local3 = (getTimer() - lastloaded) / tload;
mov.lmov.clear();
rr.utils.DrawUtils.drawArc(mov.lmov, 0, 0, 0, 360 - (360 * _local3), 7, 3358282);
if (_local3 >= 1) {
isLoaded = true;
mov.gotoAndStop("ready");
mov.onPress = rr.utils.Delegate.create(this, fire);
mov.onRollOver = rr.utils.Delegate.create(_global.aim, _global.aim.hide, this);
mov.onRollOut = (mov.onDragOut = rr.utils.Delegate.create(_global.aim, _global.aim.show, this));
_global.timer.removeEventListener("onTimerTick", this);
}
}
function fire() {
delete mov.onPress;
parent.fire();
mov.gotoAndStop("loading");
load();
}
function createMov() {
var _local5 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId, rr.utils.StringUtils.getUniqueName(), _local5, {parent:this});
var _local4 = 0;
var _local3 = 0;
while (_local3 < _global.train.emps.length) {
if (_global.train.emps[_local3] == parent.uid) {
break;
}
_local4++;
_local3++;
}
mov._x = _local4 * (mov._width + 5);
mov._y = 480 - mov._height;
}
function destroy() {
mov.removeMovieClip();
}
}
Symbol 3359 MovieClip [__Packages.rr.train.weapons.TrainWeapon] Frame 0
class rr.train.weapons.TrainWeapon extends rr.BaseClass
{
var parent, initObj, uid, bobj, position, weight, linkId, price, mode, dfeel, dfire, dfiremin, tfire, rotspeed, killlevel, destroydelay, sound, gunsound, explodesound, rfire, lbarrel, x, xmargin, y, damage, isdead, rotBarrel, lastFired, lastTargeted, ttarget, conftargets, allTargets, targets, addEventListener, cos, pi, sin, tar, dtar, isShooting, mov, status, tarRot, atan2, events, isdestroyed;
function TrainWeapon () {
super();
}
function init() {
parent = initObj.parent;
parent.weapons.push(this);
uid = initObj.uid;
bobj = initObj.bobj;
position = initObj.position;
weight = rr.conf.Config.getObjectValue(linkId, "weight");
price = rr.conf.Config.getObjectValue(linkId, "price");
mode = rr.conf.Config.getObjectValue(linkId, "mode");
dfeel = rr.conf.Config.getObjectValue(linkId, "feelerradius");
dfire = rr.conf.Config.getObjectValue(linkId, "shootingDistance");
dfiremin = rr.conf.Config.getObjectValue(linkId, "shootingDistanceMin");
tfire = rr.conf.Config.getObjectValue(linkId, "shootingInterval");
rotspeed = rr.conf.Config.getObjectValue(linkId, "rotationSpeed");
killlevel = rr.conf.Config.getObjectValue(linkId, "killlevel");
destroydelay = rr.conf.Config.getObjectValue(linkId, "destroydelay");
sound = rr.conf.Config.getObjectValue(linkId, "sound");
gunsound = rr.conf.Config.getObjectValue(linkId, "gunsound");
explodesound = rr.conf.Config.getObjectValue(linkId, "explodesound");
rfire = rr.conf.Config.getObjectValue(linkId, "ammoAccuracy");
lbarrel = rr.conf.Config.getObjectValue(linkId, "barrellength");
rr.train.TrainUtils.setWeaponMargin(this);
x = (parent.x + (parent.length / 2)) - xmargin;
trace("xmargin: " + xmargin);
y = parent.y;
damage = 0;
isdead = false;
rotBarrel = 0;
lastFired = getTimer();
lastTargeted = getTimer();
ttarget = 5000;
parent.addEventListener("onUpdate", this);
if (mode == "automatic") {
conftargets = rr.conf.Config.getObjectValue(linkId, "targets");
if (!conftargets) {
conftargets = ["All"];
}
if (conftargets[0] == "All") {
allTargets = true;
}
targets = [];
_global.stage.addEventListener("onEnemyCreate", this);
} else {
_global.aim.addEventListener("onAimDown", this);
_global.aim.addEventListener("onAimUp", this);
}
addEventListener("onTrainObjectDestroy", _global.trainbuild);
}
function onUpdate() {
x = parent.x + (cos(((-(parent.rot + parent.fliprot)) * pi) / 180) * ((parent.length / 2) - xmargin));
y = parent.y - (sin(((-(parent.rot + parent.fliprot)) * pi) / 180) * ((parent.length / 2) - xmargin));
if (isdead) {
checkRender();
return(undefined);
}
aimAtTarget();
if (mode == "automatic") {
if (tar) {
if (dtar <= dfire) {
if (dtar >= dfiremin) {
fire();
}
} else {
tar = undefined;
}
}
} else if (isShooting) {
fire();
}
checkRender();
updateAfterEvent();
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov.barrel_mc._rotation = rotBarrel;
}
function checkRender() {
if (parent.isRendered) {
render();
} else if (mov) {
clearMov();
}
}
function createMov() {
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId, rr.utils.StringUtils.getUniqueName(), _local3, {parent:this});
checkNightMode();
}
function clearMov() {
mov.removeMovieClip();
delete mov;
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.base_mc, 0, 90);
rr.utils.ClipUtils.setTint(mov.barrel_mc.base_mc, 0, 90);
}
}
function aimAtTarget() {
if (status == "collapse") {
tarRot = parent.rot;
} else if (mode == "automatic") {
if (!tar) {
getTarget();
if (!tar) {
return(undefined);
}
}
dtar = rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y);
tarRot = (180 * atan2(tar.y - y, tar.x - x)) / pi;
} else {
tarRot = (180 * atan2(_global.aim.mov._y - (y - _global.camera.top), _global.aim.mov._x - (x - _global.camera.left))) / pi;
}
var _local3 = (rotBarrel + 360) % 360;
tarRot = (tarRot + 360) % 360;
if ((tarRot - _local3) > 180) {
tarRot = tarRot - 360;
} else if ((tarRot - _local3) < -180) {
tarRot = tarRot + 360;
}
_local3 = _local3 + ((rotspeed * (tarRot - _local3)) / 100);
rotBarrel = rr.utils.MathUtils.formatAngle2(_local3);
}
function getTarget() {
if ((getTimer() - lastTargeted) < ttarget) {
return(undefined);
}
lastTargeted = getTimer();
if (allTargets) {
var _local6 = _global.stage.enemies.length;
var _local4 = 0;
while (_local4 < _local6) {
var _local3 = _global.stage["enemy_" + _global.stage.enemies[_local4]];
if (!_local3.isdead) {
var _local5 = rr.utils.MathUtils.getDistance(x, y, _local3.x, _local3.y);
if (_local5 <= dfire) {
tar = _local3;
tar.addEventListener("onEnemyDie", this);
return(undefined);
}
}
_local4++;
}
}
var _local6 = targets.length;
var _local4 = 0;
while (_local4 < _local6) {
var _local3 = _global.stage["enemy_" + targets[_local4]];
if (_local3.isdead) {
} else {
var _local5 = rr.utils.MathUtils.getDistance(x, y, _local3.x, _local3.y);
if (_local5 <= dfire) {
tar = _local3;
tar.addEventListener("onEnemyDie", this);
return(undefined);
}
}
_local4++;
}
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
if ((mode == "automatic") && (Math.abs(tarRot - rotBarrel) > 20)) {
return(undefined);
}
lastFired = getTimer();
mov.barrel_mc.gotoAndPlay("shoot");
_global.sounds.playSound(gunsound);
var _local4 = x + (cos(((-rotBarrel) * pi) / 180) * lbarrel);
var _local3 = y - (sin(((-rotBarrel) * pi) / 180) * lbarrel);
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:_local4, y:_local3, rot:rotBarrel});
}
function addDamage(dmg) {
if (isdead) {
return(undefined);
}
if (!dmg) {
return(undefined);
}
damage = damage + dmg;
if (damage >= killlevel) {
damage = killlevel;
die();
}
events.dispatchEvent({type:"onDamage", target:this});
}
function die() {
if (isdead) {
return(undefined);
}
events.dispatchEvent({type:"onTrainTargetDie", target:this});
isdead = true;
render();
_global.sounds.playSound(explodesound);
mov.gotoAndPlay("explode");
rr.utils.Delegate.callDelayed(this, destroy, destroydelay);
}
function destroy() {
if (isdestroyed) {
return(undefined);
}
isdestroyed = true;
mov.removeMovieClip();
events.dispatchEvent({type:"onTrainObjectDestroy", target:this});
parent.removeWeapon(this);
}
function onAimDown() {
if (isdead) {
return(undefined);
}
if (_global.aim.mode != "crosshair") {
return(undefined);
}
isShooting = true;
}
function onAimUp() {
isShooting = false;
}
function onEnemyCreate(evtObj) {
var _local3 = evtObj.target;
var _local4 = conftargets.length;
var _local2 = 0;
while (_local2 < _local4) {
if (_local3.linkId == conftargets[_local2]) {
trace("adding target");
_local3.addEventListener("onEnemyDie", this);
targets.push(_local3.uid);
break;
}
_local2++;
}
}
function onEnemyDie(evtObj) {
if (tar == evtObj.target) {
tar = undefined;
}
var _local3 = targets.length;
var _local2 = 0;
while (_local2 < _local3) {
if (evtObj.target.uid == targets[_local2]) {
targets.splice(_local2, 1);
break;
}
_local2++;
}
}
}
Symbol 3360 MovieClip [__Packages.rr.train.TrainUtils] Frame 0
class rr.train.TrainUtils
{
function TrainUtils () {
}
static function updateRailPosition(obj) {
var _local5;
var _local3;
var _local6 = true;
_local3 = (((obj.speed * obj.rsfactor) >= 0) ? (obj.rs.rce) : (obj.rs.rcs));
obj.d = obj.d + (obj.speed * obj.rsfactor);
if (_local3.block) {
if (rr.utils.MathUtils.getDistance(obj.x, obj.y, _local3.block.x, _local3.block.y) < ((obj.length / 2) + 3)) {
obj.blockStop(_local3.block);
trace("blockstop");
} else {
obj.blocked = false;
}
}
if (obj.d < 0) {
_local3.updateObjectRail(obj);
_local6 = false;
} else if (obj.d > obj.rs.length) {
_local3.updateObjectRail(obj);
_local6 = false;
}
_local5 = obj.rs.getPoint(obj.d);
if (_local5) {
obj.x = _local5.x;
obj.y = _local5.y;
obj.rot = _local5.rot;
}
if (_local6) {
var _local4 = Math.abs((obj.oldRot - obj.rot) * _global.loc.speed);
if (_local4 > _global.loc.crashFactor) {
if (obj.oldRot > obj.rot) {
_local4 = Math.abs(((obj.oldRot - obj.rot) - 360) * _global.loc.speed);
} else {
_local4 = Math.abs(((obj.oldRot - obj.rot) + 360) * _global.loc.speed);
}
if (_local4 > _global.loc.crashFactor) {
_global.train.crash(-_global.loc.rs.dir, null);
}
}
}
if (obj.oldX) {
obj.xspeed = obj.x - obj.oldX;
obj.yspeed = obj.y - obj.oldY;
}
obj.oldX = obj.x;
obj.oldY = obj.y;
obj.oldRot = obj.rot;
obj.hdir = ((obj.xspeed > 0) ? "right" : (((obj.xspeed < 0) ? "left" : "none")));
obj.vdir = ((obj.yspeed > 0) ? "down" : (((obj.yspeed < 0) ? "up" : "none")));
obj.checkRender();
}
static function updateCrashPosition(obj) {
if (!obj.mov) {
obj.createMov();
}
if (obj == _global.loc) {
obj.rot = obj.rot + (_global.train.crashRotDir * _global.train.crashRotSpeed);
_global.train.crashRotSpeed = _global.train.crashRotSpeed * 0.95;
obj.x = obj.x + obj.xspeed;
obj.y = obj.y + obj.yspeed;
obj.xspeed = obj.xspeed * 0.95;
obj.yspeed = obj.yspeed * 0.95;
if (Math.abs(obj.xspeed) < 0.05) {
obj.xspeed = 0;
}
if (Math.abs(obj.yspeed) < 0.05) {
obj.yspeed = 0;
}
if ((obj.xspeed == 0) && (obj.yspeed == 0)) {
_global.train.crashEnded = true;
}
} else if (!obj.prev) {
obj.x = obj.x + obj.xspeed;
obj.y = obj.y + obj.yspeed;
obj.xspeed = obj.xspeed * 0.95;
obj.yspeed = obj.yspeed * 0.95;
if (Math.abs(obj.xspeed) < 0.05) {
obj.xspeed = 0;
}
if (Math.abs(obj.yspeed) < 0.05) {
obj.yspeed = 0;
}
} else {
var _local3 = obj.prev;
var _local8 = _local3.x + ((Math.cos(((-(_local3.rot + _local3.fliprot)) * Math.PI) / 180) * _local3.length) / 2);
var _local7 = _local3.y - ((Math.sin(((-(_local3.rot + _local3.fliprot)) * Math.PI) / 180) * _local3.length) / 2);
var _local10 = _local3.x + ((Math.cos(((-(_local3.rot + _local3.fliprot)) * Math.PI) / 180) * (-_local3.length)) / 2);
var _local9 = _local3.y - ((Math.sin(((-(_local3.rot + _local3.fliprot)) * Math.PI) / 180) * (-_local3.length)) / 2);
var _local4;
if (rr.utils.MathUtils.getDistance(_local10, _local9, obj.x, obj.y) <= rr.utils.MathUtils.getDistance(_local8, _local7, obj.x, obj.y)) {
_local4 = {x:_local10, y:_local9};
} else {
_local4 = {x:_local8, y:_local7};
}
if (_global.train.crashdir == 1) {
var _local12 = 0.98 * (_local4.x - obj.x);
} else {
var _local12 = 1.2 * (_local4.x - obj.x);
}
var _local11 = _local4.y - obj.y;
var _local6 = (180 * Math.atan2(_local11, _local12)) / Math.PI;
var _local5 = rr.utils.MathUtils.angDiff(obj.rot, _local6);
if ((_local5 < 90) || ((360 - _local5) < 90)) {
obj.rot = rr.utils.MathUtils.formatAngle2(_local6);
} else {
obj.rot = rr.utils.MathUtils.formatAngle2(_local6 + 180);
}
_local5 = rr.utils.MathUtils.angDiff(obj.rot, _local3.rot);
if ((_local5 > 90) && ((360 - _local5) > 90)) {
obj.die();
}
obj.x = _local4.x + ((Math.cos(((-_local6) * Math.PI) / 180) * (-obj.length)) / 2);
obj.y = _local4.y - ((Math.sin(((-_local6) * Math.PI) / 180) * (-obj.length)) / 2);
obj.xspeed = obj.x - obj.oldX;
obj.yspeed = obj.y - obj.oldY;
}
obj.render();
obj.oldX = obj.x;
obj.oldY = obj.y;
obj.oldRot = obj.rot;
obj.hdir = ((obj.xspeed > 0) ? "right" : (((obj.xspeed < 0) ? "left" : "none")));
obj.vdir = ((obj.yspeed > 0) ? "down" : (((obj.yspeed < 0) ? "up" : "none")));
}
static function createLoc(initObj) {
switch (initObj.type) {
case "SaddleTank" :
new rr.train.SaddleTank(initObj);
break;
case "BulpFrog" :
new rr.train.BulpFrog(initObj);
}
}
static function createWagon(initObj) {
switch (initObj.type) {
case "Wagon1" :
new rr.train.Wagon1(initObj);
break;
case "Wagon2" :
new rr.train.Wagon2(initObj);
break;
case "Wagon3" :
new rr.train.Wagon3(initObj);
break;
case "Wagon4" :
new rr.train.Wagon4(initObj);
break;
case "HugeCannon" :
new rr.train.Wagon4(initObj);
break;
case "FuelTank" :
new rr.train.FuelTank(initObj);
break;
case "Passenger" :
new rr.train.Passenger(initObj);
break;
case "PassengerArmored" :
new rr.train.PassengerArmored(initObj);
break;
case "TankTrailer" :
new rr.train.TankTrailer(initObj);
break;
case "ABomb" :
new rr.train.ABomb(initObj);
}
}
static function createWeapon(initObj) {
trace("initObj.type: " + initObj.type);
switch (initObj.type) {
case "SmallCannon" :
new rr.train.weapons.SmallCannon(initObj);
break;
case "MediumCannon" :
new rr.train.weapons.MediumCannon(initObj);
break;
case "LargeCannon" :
new rr.train.weapons.LargeCannon(initObj);
break;
case "HugeCannon" :
new rr.train.weapons.HugeCannon(initObj);
break;
case "ColeCart" :
new rr.train.ColeCart(initObj);
break;
case "OilTank" :
new rr.train.OilTank(initObj);
break;
case "PowerGenerator" :
new rr.train.PowerGenerator(initObj);
break;
case "BunkerBuster" :
new rr.train.weapons.BunkerBuster(initObj);
break;
case "RailRockets" :
new rr.train.weapons.RailRockets(initObj);
break;
case "EMP" :
new rr.train.weapons.EMP(initObj);
break;
case "SmallFastCannon" :
new rr.train.weapons.SmallFastCannon(initObj);
break;
case "RocketLauncher" :
new rr.train.weapons.RocketLauncher(initObj);
}
}
static function setWeaponMargin(obj) {
var _local2 = obj.parent.length / rr.conf.Config.getObjectValue(obj.parent.linkId, "spaces");
obj.xmargin = (obj.position * _local2) + ((rr.conf.Config.getObjectValue(obj.linkId, "spaces") * _local2) / 2);
}
static function drawWeaponRange(obj, p1, p2, p3) {
var _local2 = obj.range_mc;
if (Key.isDown(32)) {
if (!_local2) {
_local2 = (obj.range_mc = _global.stage.createEmptyMovieClip("range_" + obj.uid, _global.stage.getNextHighestDepth()));
_local2.blendMode = "overlay";
_local2._alpha = 50;
}
_local2.clear();
_local2.lineStyle(1, 16776960);
_local2.moveTo(p1.x - _global.camera.left, p1.y - _global.camera.top);
_local2.beginFill(16776960);
_local2.lineTo(p2.x - _global.camera.left, p2.y - _global.camera.top);
_local2.lineTo(p3.x - _global.camera.left, p3.y - _global.camera.top);
_local2.moveTo(p1.x - _global.camera.left, p1.y - _global.camera.top);
_local2.endFill();
_local2._visible = true;
} else {
_local2._visible = false;
}
}
static function drawLocLight(obj) {
var _local2 = obj.light_mc;
if (!_local2) {
return(undefined);
}
_local2._x = obj.x - _global.camera.left;
_local2._y = obj.y - _global.camera.top;
var _local4 = {x:0, y:0};
var _local6 = {x:Math.cos(((-(obj.rotLight - 10)) * Math.PI) / 180) * 500, y:Math.sin(((-(obj.rotLight - 10)) * Math.PI) / 180) * 500};
var _local5 = {x:Math.cos(((-(obj.rotLight + 10)) * Math.PI) / 180) * 500, y:Math.sin(((-(obj.rotLight + 10)) * Math.PI) / 180) * 500};
_local2.clear();
_local2.lineStyle(1, 16776960);
_local2.moveTo(_local4.x, _local4.y);
_local2.beginFill(16776960);
_local2.lineTo(_local6.x, _local6.y);
_local2.lineTo(_local5.x, _local5.y);
_local2.moveTo(_local4.x, _local4.y);
_local2.endFill();
}
}
Symbol 3361 MovieClip [__Packages.rr.rail.RailConnection] Frame 0
class rr.rail.RailConnection extends rr.BaseClass
{
var id, x, y, ang, s, ins, outs, curin, curout, rswitch, block;
function RailConnection (initObj) {
super();
id = initObj.id;
x = initObj.x;
y = initObj.y;
ang = initObj.a;
s = initObj.s;
ins = [];
outs = [];
}
function init() {
curin = ins[0];
curout = outs[0];
if (s) {
rswitch = new rr.rail.RailSwitch(this);
delete s;
}
var _local3 = ins.length;
var _local2 = 0;
while (_local2 < _local3) {
_local2++;
}
_local3 = outs.length;
_local2 = 0;
while (_local2 < _local3) {
_local2++;
}
}
function get railin() {
if ((!rswitch) || (rswitch.inpositions.length <= 1)) {
return(_global.map["rs" + curin]);
}
return(rswitch.__get__railin());
}
function get railout() {
if ((!rswitch) || (rswitch.outpositions.length <= 1)) {
return(_global.map["rs" + curout]);
}
return(rswitch.__get__railout());
}
function checkBlocks() {
if (ins.length == 0) {
block = new rr.rail.RailBlock(this, "in");
var _local4 = outs.length;
var _local3 = 0;
while (_local3 < _local4) {
_global.map["rs" + outs[_local3]].inblock = true;
_local3++;
}
return(undefined);
}
if (outs.length == 0) {
block = new rr.rail.RailBlock(this, "out");
var _local4 = ins.length;
var _local3 = 0;
while (_local3 < _local4) {
_global.map["rs" + ins[_local3]].outblock = true;
_local3++;
}
}
}
function updateObjectRail(obj, checkprev) {
var _local4 = getNextRail(obj, checkprev);
obj.rsprev = obj.rs;
obj.rsfactorprev = obj.rsfactor;
obj.rs = _local4.rs;
obj.d = _local4.d;
if (_local4.changefactor) {
obj.rsfactor = -obj.rsfactor;
obj.flip = !obj.flip;
obj.fliprot = (obj.flip ? 180 : 0);
}
if ((obj == _global.loc) || (obj == _global.train.lastsegment)) {
if (_global.loc != _global.train.lastsegment) {
if (obj.rsprev.rcs != obj.rsprev.rce) {
if (isOut(obj.rsprev)) {
if (rswitch) {
rswitch.setOutPosition(obj.rsprev);
} else {
curout = obj.rsprev.id;
}
} else if (rswitch) {
rswitch.setInPosition(obj.rsprev);
} else {
curin = obj.rsprev.id;
}
}
if (rswitch) {
rswitch.toggleLock();
}
}
}
}
function getNextRail(obj, checkprev) {
var _local3;
var _local4;
var _local6;
var _local5;
var _local8;
var _local10;
var _local7 = ((obj.d > obj.rs.length) ? (obj.d - obj.rs.length) : (Math.abs(obj.d)));
_local6 = obj.rs.rcs == this;
if (obj.rs.rcs == obj.rs.rce) {
if (obj.d < 0) {
_local6 = true;
_local4 = (obj.rs.eo ? false : true);
} else {
_local6 = false;
_local4 = (obj.rs.eo ? true : false);
}
} else {
_local4 = isOut(obj.rs);
}
_local3 = (_local4 ? (railin) : (railout));
if (_local3.rcs == _local3.rce) {
if (_local4) {
_local5 = (_local3.eo ? true : false);
} else {
_local5 = (_local3.eo ? false : true);
}
} else {
_local5 = _local3.rcs == this;
}
if (_local5) {
_local8 = _local7;
} else {
_local8 = _local3.length - _local7;
}
if (_local3.rcs != _local3.rce) {
if (_local6 == _local5) {
_local10 = true;
}
}
return({rs:_local3, d:_local8, changefactor:_local10});
}
function isOut(rs) {
var _local3 = outs.length;
var _local2 = 0;
while (_local2 < _local3) {
if (outs[_local2] == rs.id) {
return(true);
}
_local2++;
}
return(false);
}
}
Symbol 3362 MovieClip [__Packages.rr.rail.RailSwitch] Frame 0
class rr.rail.RailSwitch
{
var linkId, rc, dfeel, inpos, inpositions, outpos, outpositions, x, y, view, forceview, locked, mov;
function RailSwitch (prc) {
linkId = "RailSwitch";
rc = prc;
dfeel = 25;
init();
}
function get railin() {
return(_global.map["rs" + inpositions[inpos].rsid]);
}
function get railout() {
return(_global.map["rs" + outpositions[outpos].rsid]);
}
function init() {
var _local9 = [];
x = rc.s.x;
y = rc.s.y;
inpos = (outpos = 0);
inpositions = [];
outpositions = [];
var _local7 = rc.ins.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 <= 7) {
if (rc.s.p[_local3] > 0) {
if (rc.ins[_local4] == rc.s.p[_local3]) {
inpositions.push({dir:getDir(_local3), rsid:rc.s.p[_local3]});
}
}
_local3++;
}
_local4++;
}
_local7 = rc.outs.length;
_local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 <= 7) {
if (rc.s.p[_local3] > 0) {
if (rc.outs[_local4] == rc.s.p[_local3]) {
outpositions.push({dir:getDir(_local3), rsid:rc.s.p[_local3]});
}
}
_local3++;
}
_local4++;
}
view = ((outpositions.length > 0) ? "out" : "in");
forceview = false;
locked = false;
var _local8 = _global.map.getCellByPos(x, y);
_local8.statics.push(this);
}
function setOutPosition(rs) {
var _local3 = outpositions.length;
var _local2 = 0;
while (_local2 < _local3) {
if (outpositions[_local2].rsid == rs.id) {
outpos = _local2;
break;
}
_local2++;
}
if (view == "out") {
setArrow();
}
}
function setInPosition(rs) {
var _local3 = inpositions.length;
var _local2 = 0;
while (_local2 < _local3) {
if (inpositions[_local2].rsid == rs.id) {
inpos = _local2;
break;
}
_local2++;
}
if (view == "in") {
setArrow();
}
}
function toggleLock() {
locked = !locked;
setArrow();
if (locked) {
rr.utils.Delegate.callDelayed(this, checkLock, 1500);
}
}
function checkLock() {
if (!locked) {
return(undefined);
}
if (_global.game.levelended) {
return(undefined);
}
if (_global.train.isInRange(rc.x, rc.y, dfeel)) {
rr.utils.Delegate.callDelayed(this, checkLock, 1500);
return(undefined);
}
locked = false;
setArrow();
}
function toggle() {
if (locked) {
return(undefined);
}
if (rc.id == 6) {
_global.guide.showGuide(15);
}
if (view == "out") {
outpos = outpos + 1;
if (outpos >= outpositions.length) {
outpos = 0;
if (!forceview) {
if (inpositions.length > 0) {
view = "in";
inpos = 0;
}
}
}
} else {
inpos = inpos + 1;
if (inpos >= inpositions.length) {
inpos = 0;
if (!forceview) {
if (outpositions.length > 0) {
view = "out";
outpos = 0;
}
}
}
}
setArrow();
}
function setArrow() {
if (locked) {
mov.arrow_mc.gotoAndStop("locked");
} else if (view == "out") {
mov.arrow_mc.gotoAndStop(outpositions[outpos].dir);
} else {
mov.arrow_mc.gotoAndStop(inpositions[inpos].dir);
}
}
function getDir(i) {
switch (i) {
case 0 :
return("n");
case 1 :
return("ne");
case 2 :
return("e");
case 3 :
return("se");
case 4 :
return("s");
case 5 :
return("sw");
case 6 :
return("w");
case 7 :
return("nw");
}
}
function update() {
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 425) {
render();
} else {
clearMov();
}
}
function render() {
if (!mov) {
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId, rr.utils.StringUtils.getUniqueName(), _local3);
mov._alpha = 80;
setArrow();
mov.onRelease = rr.utils.Delegate.create(this, toggle);
mov.onRollOver = rr.utils.Delegate.create(_global.aim, _global.aim.hide, this);
mov.onRollOut = (mov.onDragOut = rr.utils.Delegate.create(_global.aim, _global.aim.show, this));
locked = false;
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
}
function clearMov() {
mov.removeMovieClip();
delete mov;
}
}
Symbol 3363 MovieClip [__Packages.rr.rail.RailSegment] Frame 0
class rr.rail.RailSegment
{
var id, type, rcs, rce, eo, t, ang, length, radius, dir;
function RailSegment (initObj) {
id = initObj.id;
type = (initObj.r ? "arc" : "line");
rcs = _global.map["rc" + initObj.s];
rce = _global.map["rc" + initObj.e];
eo = initObj.eo;
t = initObj.t;
if (t) {
rcs.ins.push(id);
ang = rcs.ang + 180;
} else {
rcs.outs.push(id);
ang = rcs.ang;
}
if (eo) {
rce.outs.push(id);
} else {
rce.ins.push(id);
}
if (type == "line") {
length = rr.utils.MathUtils.getDistance(rcs.x, rcs.y, rce.x, rce.y);
}
if (type == "arc") {
radius = initObj.r;
dir = initObj.d;
length = initObj.l;
}
}
function getPoint(d) {
if (d > length) {
d = length;
}
if (d < 0) {
d = 0;
}
if (type == "line") {
var _local5 = rr.utils.MathUtils.formatAngle(ang);
var _local9 = rcs.x + (cos((_local5 * pi) / 180) * d);
var _local8 = rcs.y - (sin((_local5 * pi) / 180) * d);
var _local7 = -_local5;
return({x:_local9, y:_local8, rot:_local7});
}
if (type == "arc") {
var _local5 = rr.utils.MathUtils.formatAngle(ang - 90);
var _local4 = new flash.geom.Point((-dir) * (radius * cos((_local5 * pi) / 180)), dir * (radius * sin((_local5 * pi) / 180)));
var _local6 = (rr.utils.MathUtils.formatAngle(ang - 90) * pi) / 180;
var _local3 = _local6 - (((-dir) * d) / radius);
var _local9 = (rcs.x + _local4.x) + ((dir * radius) * cos(_local3));
var _local8 = (rcs.y + _local4.y) - ((dir * radius) * sin(_local3));
var _local7 = -rr.utils.MathUtils.formatAngle((_local3 / (pi / 180)) + 90);
return({x:_local9, y:_local8, rot:_local7});
}
}
function getCatchPoint(obj, dcast) {
var _local4 = (((obj.speed * obj.rsfactor) > 0) ? (obj.d + dcast) : (obj.d - dcast));
var _local1 = {rs:obj.rs, d:_local4, rsfactor:obj.rsfactor, speed:obj.speed};
while ((_local1.d > _local1.rs.length) || (_local1.d < 0)) {
var _local2 = (((_local1.speed * _local1.rsfactor) > 0) ? (_local1.rs.rce) : (_local1.rs.rcs));
_local2.updateObjectRail(_local1);
}
return(_local1.rs.getPoint(_local1.d));
}
var pi = Math.PI;
var cos = Math.cos;
var acos = Math.acos;
var sin = Math.sin;
var asin = Math.asin;
var atan2 = Math.atan2;
}
Symbol 3364 MovieClip [__Packages.rr.rail.RailBlock] Frame 0
class rr.rail.RailBlock
{
var linkId, rc, dir, dfeel, x, y, rot, iscrashed, crashrotspeed, crashdir, xspeed, yspeed, mov;
function RailBlock (prc, pdir) {
linkId = "RailBlock";
rc = prc;
dir = pdir;
dfeel = 15;
init();
}
function init() {
x = rc.x;
y = rc.y;
if (rc.id == 10000) {
_global.endblock = this;
}
rot = -rr.utils.MathUtils.formatAngle(rc.ang);
if (dir == "out") {
rot = rot + 180;
}
var _local3 = _global.map.getCellByPos(x, y);
_local3.statics.push(this);
}
function update() {
if (iscrashed) {
rot = rot + (crashdir * crashrotspeed);
crashrotspeed = crashrotspeed * 0.95;
x = x + xspeed;
y = y + yspeed;
xspeed = xspeed * 0.95;
yspeed = yspeed * 0.95;
if (Math.abs(xspeed) < 0.05) {
xspeed = 0;
}
if (Math.abs(yspeed) < 0.05) {
yspeed = 0;
}
if ((xspeed == 0) && (yspeed == 0)) {
iscrashed = false;
}
}
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
render();
} else if (mov) {
clearMov();
}
}
function render() {
if (!mov) {
var _local4 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
var _local3 = linkId;
if (_global.map.nightmap) {
_local3 = _local3 + "Night";
} else if (_global.endblock == this) {
_local3 = _local3 + "Light";
}
mov = _global.stage.attachMovie(_local3, rr.utils.StringUtils.getUniqueName(), _local4);
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._rotation = rot;
}
function clearMov() {
mov.removeMovieClip();
delete mov;
}
function crash(obj) {
xspeed = obj.xspeed;
yspeed = obj.yspeed;
crashdir = -_global.train.crashRotDir;
crashrotspeed = _global.train.crashRotSpeed;
iscrashed = true;
}
}
Symbol 3365 MovieClip [__Packages.rr.train.TrainSegment] Frame 0
class rr.train.TrainSegment extends rr.BaseClass
{
var uid, initObj, bobj, length, linkId, price, weight, killlevel, destroydelay, explodesound, fliprot, addEventListener, mov, x, y, rot, isRendered, isdead, damage, events, isexploded, speed, tspeed, prev, d, rs, rsfactor, oldX, oldY, oldRot, affirmed, next;
function TrainSegment () {
super();
}
function init() {
uid = initObj.uid;
bobj = initObj.bobj;
length = rr.conf.Config.getObjectValue(linkId, "length");
price = rr.conf.Config.getObjectValue(linkId, "price");
weight = rr.conf.Config.getObjectValue(linkId, "weight");
killlevel = rr.conf.Config.getObjectValue(linkId, "killlevel");
destroydelay = rr.conf.Config.getObjectValue(linkId, "destroydelay");
explodesound = rr.conf.Config.getObjectValue(linkId, "explodesound");
fliprot = 0;
addEventListener("onTrainObjectDestroy", _global.trainbuild);
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov.base_mc._rotation = rot + fliprot;
}
function checkRender() {
isRendered = false;
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
isRendered = true;
render();
} else if (mov) {
clearMov();
}
}
function createMov() {
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId, rr.utils.StringUtils.getUniqueName(), _local3, {parent:this});
checkNightMode();
}
function clearMov() {
mov.removeMovieClip();
delete mov;
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.base_mc, 0, 90);
}
}
function addDamage(dmg) {
if (isdead) {
return(undefined);
}
if (!dmg) {
return(undefined);
}
damage = damage + dmg;
if (damage < 0) {
damage = 0;
}
if (damage >= killlevel) {
die();
}
events.dispatchEvent({type:"onDamage", target:this});
}
function die() {
}
function explode() {
if (isexploded) {
return(undefined);
}
isexploded = true;
_global.sounds.playSound(explodesound);
render();
mov.gotoAndPlay("explode");
rr.utils.Delegate.callDelayed(this, destroy, destroydelay);
}
function destroy() {
trace("destroy: " + linkId);
mov.removeMovieClip();
events.dispatchEvent({type:"onTrainObjectDestroy", target:this});
_global.train.removeSegment(this);
}
function blockStop(b) {
if (_global.train.isCrashed) {
return(undefined);
}
if (Math.abs(speed) > 1.6) {
if (speed < 0) {
_global.train.crash(null, 0.5);
} else {
_global.train.crash(null, 2);
}
b.crash(this);
return(undefined);
}
speed = (tspeed = (_global.loc.speed = (_global.loc.tspeed = 0)));
_global.control.fullStop();
if (prev) {
prev.blockStop();
}
if (b == _global.endblock) {
_global.game.checkEndLevel();
}
}
function reAffirm() {
if (prev) {
d = prev.d - (prev.rsfactor * (((prev.length / 2) + (length / 2)) - 1));
rs = prev.rs;
rsfactor = prev.rsfactor;
var _local3;
if (d < 0) {
_local3 = rs.rcs;
_local3.updateObjectRail(this, true);
} else if (d > rs.length) {
_local3 = rs.rce;
_local3.updateObjectRail(this, true);
}
var _local2 = rs.getPoint(d);
if (_local2) {
x = (oldX = _local2.x);
y = (oldY = _local2.y);
rot = (oldRot = _local2.rot);
}
affirmed = true;
}
if (next) {
next.reAffirm();
}
}
function getWagonPointBehind(len) {
var _local2 = new Object();
_local2.d = d - (rsfactor * (((length / 2) + (len / 2)) - 1));
_local2.rs = rs;
_local2.rsfactor = rsfactor;
var _local3;
if (_local2.d < 0) {
_local3 = _local2.rs.rcs;
_local3.updateObjectRail(_local2, true);
} else if (_local2.d > _local2.rs.length) {
_local3 = _local2.rs.rce;
_local3.updateObjectRail(_local2, true);
}
var _local4 = _local2.rs.getPoint(_local2.d);
return(_local4);
}
}
Symbol 3366 MovieClip [__Packages.rr.train.Locomotive] Frame 0
class rr.train.Locomotive extends rr.train.TrainSegment
{
var segmentType, rs, d, length, rsfactor, speedmax, linkId, speedmin, maxload, adef, afullstop, crashFactor, fueltype, fueldef, fuelcons, fuelprice, rotspeed, tfire, gunsounds, hornsound, dfeel, speed, tspeed, xspeed, yspeed, prevspeed, stepidx, x, y, a, damage, rot, rotBarrel, fuel, stepsounds, loopsoundid, laststepped, bcount, isShooting, events, loopsound, loclight_mc, rotLight, fliprot, mov, cos, pi, sin, atan2, killlevel, dmgwarningplayed, isdead, explode;
function Locomotive () {
super();
}
function init() {
_global.loc = this;
segmentType = "loc";
super.init();
rs = _global.map.rs1;
d = length / 2;
rsfactor = 1;
speedmax = rr.conf.Config.getObjectValue(linkId, "maxspeed");
speedmin = rr.conf.Config.getObjectValue(linkId, "minspeed");
maxload = rr.conf.Config.getObjectValue(linkId, "maxload");
adef = rr.conf.Config.getObjectValue(linkId, "acceleration");
afullstop = rr.conf.Config.getObjectValue(linkId, "accelerationfullstop");
crashFactor = rr.conf.Config.getObjectValue(linkId, "crashfactor");
fueltype = rr.conf.Config.getObjectValue(linkId, "fueltype");
fueldef = rr.conf.Config.getObjectValue(linkId, "fuel");
fuelcons = rr.conf.Config.getObjectValue(linkId, "fuelconsumption");
fuelprice = rr.conf.Config.getObjectValue(linkId, "fuelprice");
rotspeed = rr.conf.Config.getObjectValue(linkId, "rotationspeed");
tfire = rr.conf.Config.getObjectValue(linkId, "shootinginterval");
gunsounds = rr.conf.Config.getObjectValue(linkId, "gunsounds");
hornsound = rr.conf.Config.getObjectValue(linkId, "hornsound");
dfeel = length / 2;
speed = (tspeed = (xspeed = (yspeed = (prevspeed = (stepidx = 0)))));
x = (y = 0);
a = adef;
damage = 0;
rot = (rotBarrel = 0);
fuel = fueldef;
if (fueltype == "electric") {
stepsounds = ["Train 1and2 step 2.wav"];
loopsoundid = "Train 5min.wav";
} else {
stepsounds = ["Train 1and2 step 1.wav", "Train 1and2 step 2.wav"];
}
laststepped = getTimer();
var _local4 = 1;
while (_local4 <= bcount) {
this["rotbarrel" + _local4] = 0;
this["bs" + _local4] = rr.conf.Config.getObjectValue(linkId, "rotationspeed" + _local4);
this["tf" + _local4] = rr.conf.Config.getObjectValue(linkId, "shootinginterval" + _local4);
this["lf" + _local4] = getTimer();
_local4++;
}
_global.aim.addEventListener("onAimDown", this);
_global.aim.addEventListener("onAimUp", this);
_global.map.addCompoundListeners();
_global.train.segments.push(this);
_global.train.onConnectionChanged();
}
function update() {
if (_global.leveltime) {
_global.leveltime = _global.leveltime + 40;
}
aimAtTarget();
if (isShooting) {
fire();
}
if (speed != tspeed) {
speed = ((Math.abs(speed - tspeed) <= a) ? (tspeed) : (((tspeed > speed) ? (speed + a) : (speed - a))));
events.dispatchEvent({target:this, type:"onLocAccel"});
}
_global.control.displayspeed = speed;
if (speed == 0) {
if (loopsound.isplaying) {
loopsound.isplaying = false;
loopsound.sound.setVolume(0);
loopsound.sound.stop();
}
if (prevspeed != 0) {
trace("onLocStop: ");
events.dispatchEvent({target:this, type:"onLocStop"});
rr.utils.Delegate.callDelayed(this, checkEnabled, 1000);
}
} else {
if (!_global.leveltime) {
_global.leveltime = 40;
_global.guide.showGuide(14);
}
if (!_global.train.isCrashed) {
var _local3;
if (fueltype == "electric") {
_local3 = Math.min(Math.abs(1200 / speed), 1000);
_local3 = Math.round(Math.max(_local3, 250));
} else {
_local3 = Math.min(Math.abs(450 / speed), 1000);
_local3 = Math.max(_local3, 100);
}
if ((getTimer() - laststepped) > _local3) {
laststepped = getTimer();
if (fueltype == "electric") {
_global.sounds.playSound(stepsounds[0]);
} else {
_global.sounds.playSound(stepsounds[stepidx]);
stepidx = ((stepidx == 0) ? 1 : 0);
}
}
}
}
if (_global.train.crashEnded) {
_global.game.endLevel(false);
render();
} else if (_global.train.isCrashed) {
rr.train.TrainUtils.updateCrashPosition(this);
} else {
rr.train.TrainUtils.updateRailPosition(this);
}
prevspeed = speed;
fuel = fuel - Math.abs(((fuelcons * _global.train.load) / 1000) * speed);
if (fuel <= 0) {
fuel = 0;
tspeed = 0;
_global.control.selectLight(0);
}
events.dispatchEvent({target:this, type:"onFuelUpdate"});
events.dispatchEvent({target:this, type:"onUpdate"});
if (loclight_mc) {
rotLight = rr.utils.MathUtils.formatAngle(rotLight + 2);
}
}
function render() {
super.render();
mov.lights_mc._rotation = rot + fliprot;
var _local3 = 1;
while (_local3 <= bcount) {
mov[("barrel" + _local3) + "_mc"]._x = cos(((-(rot + fliprot)) * pi) / 180) * this["bxdef" + _local3];
mov[("barrel" + _local3) + "_mc"]._y = (-sin(((-(rot + fliprot)) * pi) / 180)) * this["bxdef" + _local3];
mov[("barrel" + _local3) + "_mc"]._rotation = this["rotbarrel" + _local3];
_local3++;
}
}
function aimAtTarget() {
var _local3 = 1;
while (_local3 <= bcount) {
this["bx" + _local3] = x + (cos(((-(rot + fliprot)) * pi) / 180) * this["bxdef" + _local3]);
this["by" + _local3] = y - (sin(((-(rot + fliprot)) * pi) / 180) * this["bxdef" + _local3]);
var _local4 = (180 * atan2(_global.aim.mov._y - (this["by" + _local3] - _global.camera.top), _global.aim.mov._x - (this["bx" + _local3] - _global.camera.left))) / pi;
var _local5 = (this["rotbarrel" + _local3] + 360) % 360;
_local4 = (_local4 + 360) % 360;
if ((_local4 - _local5) > 180) {
_local4 = _local4 - 360;
} else if ((_local4 - _local5) < -180) {
_local4 = _local4 + 360;
}
_local5 = _local5 + ((this["bs" + _local3] * (_local4 - _local5)) / 100);
this["rotbarrel" + _local3] = rr.utils.MathUtils.formatAngle2(_local5);
_local3++;
}
}
function setTargetSpeed(ts) {
a = adef;
tspeed = ts;
if (speed == 0) {
if (tspeed != 0) {
events.dispatchEvent({target:this, type:"onLocAccel"});
}
}
}
function onFullStop(evtObj) {
a = afullstop;
tspeed = 0;
}
function addDamage(dmg) {
super.addDamage(dmg);
var _local4 = (100 * damage) / killlevel;
if (_local4 < 80) {
dmgwarningplayed = false;
}
if (!dmgwarningplayed) {
if (_local4 > 90) {
_global.sounds.playSound("Warning Critical Damage.wav");
}
dmgwarningplayed = true;
}
}
function die() {
if (isdead) {
return(undefined);
}
isdead = true;
isShooting = false;
onFullStop();
damage = killlevel;
events.dispatchEvent({type:"onTrainTargetDie", target:this});
explode();
}
function destroy() {
_global.game.endLevel(false);
}
function onAimDown() {
if (isdead) {
return(undefined);
}
if (_global.aim.mode != "crosshair") {
return(undefined);
}
isShooting = true;
}
function onAimUp() {
isShooting = false;
}
function fire() {
var _local3 = 1;
while (_local3 <= bcount) {
if ((getTimer() - this["lf" + _local3]) >= this["tf" + _local3]) {
this["lf" + _local3] = getTimer();
mov[("barrel" + _local3) + "_mc"].gotoAndPlay("shoot");
_global.sounds.playSound(gunsounds[Math.round(Math.random() * (gunsounds.length - 1))]);
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:this["bx" + _local3], y:this["by" + _local3], rot:this["rotbarrel" + _local3]});
}
_local3++;
}
}
function addFuel(f) {
fuel = fuel + f;
if (fuel < 0) {
fuel = 0;
}
}
function checkNightMode() {
if (_global.map.nightmap) {
var _local4 = 1;
while (_local4 <= bcount) {
rr.utils.ClipUtils.setTint(mov[("barrel" + _local4) + "_mc"].base_mc, 0, 90);
_local4++;
}
super.checkNightMode();
} else {
mov.lights_mc._visible = false;
}
}
function checkEnabled() {
if (!_global.control.compound_mc._visible) {
if (fuel <= 0) {
var _local4 = rr.conf.Config.getObjectValue("Wagon2", "weight");
var _local3 = rr.conf.Config.getObjectValue("Wagon2", "price");
switch (fueltype) {
case "oil" :
_local4 = _local4 + rr.conf.Config.getObjectValue("OilTank", "weight");
_local3 = _local3 + rr.conf.Config.getObjectValue("OilTank", "price");
break;
case "coal" :
_local4 = _local4 + rr.conf.Config.getObjectValue("ColeCart", "weight");
_local3 = _local3 + rr.conf.Config.getObjectValue("ColeCart", "price");
break;
case "electric" :
_local4 = _local4 + rr.conf.Config.getObjectValue("PowerGenerator", "weight");
_local3 = _local3 + rr.conf.Config.getObjectValue("PowerGenerator", "price");
}
if ((maxload - _global.train.buildload) < _local4) {
_global.control.showDisabledMenu("nocap");
} else if (_global.player.cash < _local3) {
_global.control.showDisabledMenu("nocash");
}
}
}
}
}
Symbol 3367 MovieClip [__Packages.rr.ammo.AmmoUtils] Frame 0
class rr.ammo.AmmoUtils
{
function AmmoUtils () {
}
static function createAmmo(initObj) {
var _local2 = rr.utils.StringUtils.getUniqueName();
initObj.uid = _local2;
switch (initObj.type) {
case "SaddleTank" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoSaddleTank(initObj);
break;
case "BulpFrog" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoBulpFrog(initObj);
break;
case "Rhino" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoRhino(initObj);
break;
case "Loewy" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoLoewy(initObj);
break;
case "SuperChief" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoSuperChief(initObj);
break;
case "Dragon" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoDragon(initObj);
break;
case "ICE" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoICE(initObj);
break;
case "Pennsylvania" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoPennsylvania(initObj);
break;
case "SmallCannon" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoSmallCannon(initObj);
break;
case "MediumCannon" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoMediumCannon(initObj);
break;
case "LargeCannon" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoLargeCannon(initObj);
break;
case "HugeCannon" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoHugeCannon(initObj);
break;
case "BunkerBuster" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoBunkerBuster(initObj);
break;
case "RailRockets" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoRailRockets(initObj);
break;
case "SmallFastCannon" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoSmallFastCannon(initObj);
break;
case "RocketLauncher" :
_global.stage["ammo_" + _local2] = new rr.ammo.Heatseeker(initObj);
break;
case "PotTank" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoPotTank(initObj);
break;
case "OldJeep" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoOldJeep(initObj);
break;
case "GunTruck" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoGunTruck(initObj);
break;
case "ArmoredJeep" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoArmoredJeep(initObj);
break;
case "Basilisk" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoBasilisk(initObj);
break;
case "Bunker" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoBunker(initObj);
break;
case "GatlingSingle" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoGatlingSingle(initObj);
break;
case "GatlingDouble" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoGatlingDouble(initObj);
break;
case "Abrahams" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoAbrahams(initObj);
break;
case "Elephant" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoElephant(initObj);
break;
case "Panther" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoPanther(initObj);
break;
case "Rocketeer" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoRocketeer(initObj);
break;
case "FockeWolf" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoFockeWolf(initObj);
break;
case "B2" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoB2(initObj);
break;
case "C47" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoC47(initObj);
break;
case "WartHog" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoWartHog(initObj);
break;
case "MesserSchmidt" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoMesserSchmidt(initObj);
break;
case "BellHuey" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoBellHuey(initObj);
break;
case "Apache" :
_global.stage["ammo_" + _local2] = new rr.ammo.AmmoApache(initObj);
}
}
}
Symbol 3368 MovieClip [__Packages.rr.ammo.Ammo] Frame 0
class rr.ammo.Ammo extends rr.BaseClass
{
var uid, initObj, rot, x, mov, y, linkId;
function Ammo () {
super();
}
function init() {
uid = initObj.uid;
rot = initObj.rot;
_global.stage.ammo.push(uid);
}
function render() {
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._rotation = rot;
}
function createMov() {
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId, rr.utils.StringUtils.getUniqueName(), _local3, {parent:this});
render();
}
function clearMov() {
mov.removeMovieClip();
delete mov;
}
function destroy() {
mov.removeMovieClip();
_global.stage.removeAmmo(this);
}
}
Symbol 3369 MovieClip [__Packages.rr.ammo.AmmoBullet] Frame 0
class rr.ammo.AmmoBullet extends rr.ammo.Ammo
{
var x, sx, initObj, y, sy, cellId, speed, parentLinkId, range, damage, exploded, createMov, render, cos, pi, rot, sin, destroy, mov, dfeel;
function AmmoBullet () {
super();
}
function init() {
super.init();
x = (sx = initObj.x);
y = (sy = initObj.y);
var _local4 = _global.map.getCellByPos(x, y);
cellId = _local4.id;
speed = rr.conf.Config.getObjectValue(parentLinkId, "ammospeed");
range = rr.conf.Config.getObjectValue(parentLinkId, "ammorange");
damage = rr.conf.Config.getObjectValue(parentLinkId, "ammodamage");
exploded = false;
createMov();
}
function update() {
if (exploded) {
render();
return(undefined);
}
x = x + (cos(((-rot) * pi) / 180) * speed);
y = y - (sin(((-rot) * pi) / 180) * speed);
var _local5 = _global.map["cell_" + cellId];
if (((x < _local5.left) || (x >= _local5.right)) || ((y < _local5.top) | (y >= _local5.bottom))) {
_local5 = _global.map.getCellByPos(x, y);
cellId = _local5.id;
}
var _local6 = _local5.enemies.length;
var _local4 = 0;
while (_local4 < _local6) {
var _local3 = _global.stage["enemy_" + _local5.enemies[_local4]];
if (_local3.isdead) {
} else if (checkHit(_local3)) {
_local3.addDamage(damage);
destroy();
return(undefined);
}
_local4++;
}
_local6 = _global.stage.enemies_dyn.length;
_local4 = 0;
while (_local4 < _local6) {
var _local3 = _global.stage["enemy_" + _global.stage.enemies_dyn[_local4]];
if (_local3.isdead) {
} else if (checkHit(_local3)) {
_local3.addDamage(damage);
destroy();
return(undefined);
}
_local4++;
}
_local6 = _global.stage.afs.length;
_local4 = 0;
while (_local4 < _local6) {
var _local3 = _global.stage["enemy_" + _global.stage.afs[_local4]];
if (_local3.isdead) {
} else if (checkHit(_local3)) {
_local3.addDamage(damage);
destroy();
return(undefined);
}
_local4++;
}
_local6 = _global.stage.rbs.length;
_local4 = 0;
while (_local4 < _local6) {
var _local3 = _global.stage["enemy_" + _global.stage.rbs[_local4]];
if (_local3.isdead) {
} else if (checkHit(_local3)) {
_local3.addDamage(damage);
destroy();
return(undefined);
}
_local4++;
}
if (rr.utils.MathUtils.getDistance(x, y, sx, sy) >= range) {
exploded = true;
mov.gotoAndPlay("explode");
var _local7 = rr.conf.Config.getObjectValue(parentLinkId, "ammoduration");
rr.utils.Delegate.callDelayed(this, destroy, _local7);
}
render();
}
function checkHit(e) {
if (e.isdead) {
}
if (rr.utils.MathUtils.getDistance(x, y, e.x, e.y) < (e.dfeel + dfeel)) {
e.render();
return(e.mov.hitTest(x - _global.camera.left, y - _global.camera.top, true));
}
}
}
Symbol 3370 MovieClip [__Packages.rr.ammo.AmmoSaddleTank] Frame 0
class rr.ammo.AmmoSaddleTank extends rr.ammo.AmmoBullet
{
var linkId, parentLinkId, initObj, dfeel, init;
function AmmoSaddleTank (iObj) {
super();
linkId = "AmmoSaddleTank";
parentLinkId = "SaddleTank";
initObj = iObj;
dfeel = 3.5;
init();
}
}
Symbol 3371 MovieClip [__Packages.rr.ammo.AmmoBulpFrog] Frame 0
class rr.ammo.AmmoBulpFrog extends rr.ammo.AmmoBullet
{
var linkId, parentLinkId, initObj, dfeel, init;
function AmmoBulpFrog (iObj) {
super();
linkId = "AmmoBulpFrog";
parentLinkId = "BulpFrog";
initObj = iObj;
dfeel = 3.5;
init();
}
}
Symbol 3372 MovieClip [__Packages.rr.ammo.AmmoRhino] Frame 0
class rr.ammo.AmmoRhino extends rr.ammo.AmmoBullet
{
var linkId, parentLinkId, initObj, dfeel, init;
function AmmoRhino (iObj) {
super();
linkId = "AmmoRhino";
parentLinkId = "Rhino";
initObj = iObj;
dfeel = 3.5;
init();
}
}
Symbol 3373 MovieClip [__Packages.rr.ammo.AmmoLoewy] Frame 0
class rr.ammo.AmmoLoewy extends rr.ammo.AmmoBullet
{
var linkId, parentLinkId, initObj, dfeel, init;
function AmmoLoewy (iObj) {
super();
linkId = "AmmoLoewy";
parentLinkId = "Loewy";
initObj = iObj;
dfeel = 3.5;
init();
}
}
Symbol 3374 MovieClip [__Packages.rr.ammo.AmmoSuperChief] Frame 0
class rr.ammo.AmmoSuperChief extends rr.ammo.AmmoBullet
{
var linkId, parentLinkId, initObj, dfeel, init;
function AmmoSuperChief (iObj) {
super();
linkId = "AmmoSuperChief";
parentLinkId = "SuperChief";
initObj = iObj;
dfeel = 4.5;
init();
}
}
Symbol 3375 MovieClip [__Packages.rr.ammo.AmmoDragon] Frame 0
class rr.ammo.AmmoDragon extends rr.ammo.AmmoBullet
{
var linkId, parentLinkId, initObj, dfeel, init;
function AmmoDragon (iObj) {
super();
linkId = "AmmoDragon";
parentLinkId = "Dragon";
initObj = iObj;
dfeel = 3.5;
init();
}
}
Symbol 3376 MovieClip [__Packages.rr.ammo.AmmoICE] Frame 0
class rr.ammo.AmmoICE extends rr.ammo.AmmoBullet
{
var linkId, parentLinkId, initObj, dfeel, init;
function AmmoICE (iObj) {
super();
linkId = "AmmoICE";
parentLinkId = "ICE";
initObj = iObj;
dfeel = 4.5;
init();
}
}
Symbol 3377 MovieClip [__Packages.rr.ammo.AmmoPennsylvania] Frame 0
class rr.ammo.AmmoPennsylvania extends rr.ammo.AmmoBullet
{
var linkId, parentLinkId, initObj, dfeel, init;
function AmmoPennsylvania (iObj) {
super();
linkId = "AmmoPennsylvania";
parentLinkId = "Pennsylvania";
initObj = iObj;
dfeel = 3.5;
init();
}
}
Symbol 3378 MovieClip [__Packages.rr.ammo.AmmoSmallCannon] Frame 0
class rr.ammo.AmmoSmallCannon extends rr.ammo.AmmoBullet
{
var linkId, parentLinkId, initObj, dfeel, init;
function AmmoSmallCannon (iObj) {
super();
linkId = "AmmoSmallCannon";
parentLinkId = "SmallCannon";
initObj = iObj;
dfeel = 3.5;
init();
}
}
Symbol 3379 MovieClip [__Packages.rr.ammo.AmmoMediumCannon] Frame 0
class rr.ammo.AmmoMediumCannon extends rr.ammo.AmmoBullet
{
var linkId, parentLinkId, initObj, dfeel, init;
function AmmoMediumCannon (iObj) {
super();
linkId = "AmmoMediumCannon";
parentLinkId = "MediumCannon";
initObj = iObj;
dfeel = 3.5;
init();
}
}
Symbol 3380 MovieClip [__Packages.rr.ammo.AmmoPlayerDefault] Frame 0
class rr.ammo.AmmoPlayerDefault extends rr.ammo.Ammo
{
var d, initObj, x, cos, pi, rot, y, sin, cell, damage, parentLinkId, rexplode, created, createMov, destroy;
function AmmoPlayerDefault () {
super();
}
function init() {
super.init();
d = initObj.d;
x = initObj.x + (cos((rot * pi) / 180) * d);
y = initObj.y - (sin((rot * pi) / 180) * d);
cell = _global.map.getCellByPos(x, y);
damage = rr.conf.Config.getObjectValue(parentLinkId, "ammodamage");
rexplode = rr.conf.Config.getObjectValue(parentLinkId, "explosionradius");
var _local4 = (40 * d) / rr.conf.Config.getObjectValue(parentLinkId, "ammospeed");
rr.utils.Delegate.callDelayed(this, createDelayed, _local4);
}
function update() {
if (!created) {
return(undefined);
}
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
super.render();
}
}
function createDelayed() {
created = true;
_global.sounds.playSound(rr.conf.Config.getObjectValue(parentLinkId, "ammosound"));
checkHit();
createMov();
var _local3 = rr.conf.Config.getObjectValue(parentLinkId, "ammoduration");
rr.utils.Delegate.callDelayed(this, destroy, _local3);
}
function checkHit() {
var _local4 = _global.stage.enemies.length;
var _local3 = 0;
while (_local3 < _local4) {
checkObjectHit(_global.stage["enemy_" + _global.stage.enemies[_local3]]);
_local3++;
}
if (cell) {
_local4 = cell.enemies.length;
_local3 = 0;
while (_local3 < _local4) {
checkObjectHit(_global.stage["enemy_" + cell.enemies[_local3]]);
_local3++;
}
}
_local4 = _global.stage.enemies_dyn.length;
_local3 = 0;
while (_local3 < _local4) {
checkObjectHit(_global.stage["enemy_" + _global.stage.enemies_dyn[_local3]]);
_local3++;
}
}
function checkObjectHit(obj) {
if (obj.isdead) {
return(undefined);
}
var _local3 = rr.utils.MathUtils.getDistance(obj.x, obj.y, x, y);
if (_local3 < rexplode) {
obj.addDamage(Math.round(damage / (1 + (_local3 / 25))));
}
}
}
Symbol 3381 MovieClip [__Packages.rr.MapCell] Frame 0
class rr.MapCell extends rr.BaseClass
{
var colId, rowId, width, height, id, left, right, top, bottom, center, statics, enemies, hasEnemies, bg_bmp, fg_bmp, hasfg, nb, da, rectX, rectY, rectW, rectH, pX, pY, isFocused, eiObjects;
function MapCell (cId, rId) {
super();
colId = cId;
rowId = rId;
init();
}
function init() {
width = 640;
height = 480;
id = (colId + "_") + rowId;
left = (colId - 1) * width;
right = colId * width;
top = (rowId - 1) * height;
bottom = rowId * height;
center = new flash.geom.Point(left + (width / 2), top + (height / 2));
statics = new Array();
enemies = new Array();
hasEnemies = true;
_global.camera.addEventListener("onCameraCellChange", this);
}
function createBackground() {
var _local4 = new flash.geom.Rectangle(left, top, width, height);
var _local3 = new flash.geom.Point(0, 0);
bg_bmp = new flash.display.BitmapData(width, height, true, 0);
bg_bmp.copyPixels(_global.map.map_bmp, _local4, _local3);
}
function createForeground() {
var _local4 = new flash.geom.Rectangle(left, top, width, height);
var _local3 = new flash.geom.Point(0, 0);
fg_bmp = new flash.display.BitmapData(width, height, true, 0);
fg_bmp.copyPixels(_global.map.fg_bmp, _local4, _local3);
hasfg = true;
}
function createNeighbours() {
nb = [];
nb[1] = (((colId > 1) && (rowId > 1)) ? (_global.map.getCell(((colId - 1) + "_") + (rowId - 1))) : undefined);
nb[2] = ((rowId > 1) ? (_global.map.getCell((colId + "_") + (rowId - 1))) : undefined);
nb[3] = (((colId < _global.map.cols) && (rowId > 1)) ? (_global.map.getCell(((colId + 1) + "_") + (rowId - 1))) : undefined);
nb[4] = ((colId > 1) ? (_global.map.getCell(((colId - 1) + "_") + rowId)) : undefined);
nb[5] = ((colId < _global.map.cols) ? (_global.map.getCell(((colId + 1) + "_") + rowId)) : undefined);
nb[6] = (((colId > 1) && (rowId < _global.map.rows)) ? (_global.map.getCell(((colId - 1) + "_") + (rowId + 1))) : undefined);
nb[7] = ((rowId < _global.map.rows) ? (_global.map.getCell((colId + "_") + (rowId + 1))) : undefined);
nb[8] = (((colId < _global.map.cols) && (rowId < _global.map.rows)) ? (_global.map.getCell(((colId + 1) + "_") + (rowId + 1))) : undefined);
}
function drawMiniMap() {
var _local4 = bg_bmp.clone();
var _local5 = new flash.geom.Matrix();
var _local3 = _global.minimap.scale;
_local5.scale(_local3, _local3);
_local5.translate(left * _local3, top * _local3);
_global.minimap.map_bmp.draw(_local4, _local5);
_local4.dispose();
}
function update() {
var _local7 = _global.camera.left;
var _local9 = _global.camera.right;
var _local8 = _global.camera.top;
var _local10 = _global.camera.bottom;
if ((((_local9 < left) || (_local7 > right)) || (_local10 < top)) || (_local8 > bottom)) {
da = undefined;
} else {
rectX = ((left > _local7) ? 0 : (_local7 - left));
rectY = ((top < _local8) ? 0 : (_local8 - top));
rectW = ((rectX == 0) ? (_local9 - left) : (right - _local7));
rectH = ((rectY == 0) ? (_local10 - top) : (bottom - _local8));
pX = ((rectX == 0) ? (_global.stage.width - rectW) : 0);
pY = ((rectY == 0) ? (_global.stage.height - rectH) : 0);
da = {rect:new flash.geom.Rectangle(rectX, rectY, rectW, rectH), point:new flash.geom.Point(pX, pY)};
_global.stage.bg_bmp.copyPixels(bg_bmp, da.rect, da.point, null, null, true);
if (hasfg) {
_global.stage.fg_bmp.copyPixels(fg_bmp, da.rect, da.point);
}
}
var _local11 = rr.utils.MathUtils.getDistance(center.x, center.y, _global.camera.x, _global.camera.y);
if (_local11 < 810) {
var _local6 = enemies.length;
var _local5 = 0;
while (_local5 < _local6) {
var _local3 = _global.stage["enemy_" + enemies[_local5]];
if (rr.utils.MathUtils.getDistance(_local3.x, _local3.y, _global.camera.x, _global.camera.y) < 550) {
_local3.update();
}
_local5++;
}
_local6 = statics.length;
_local5 = 0;
while (_local5 < _local6) {
var _local4 = statics[_local5];
if (rr.utils.MathUtils.getDistance(_local4.x, _local4.y, _global.camera.x, _global.camera.y) < 550) {
_local4.update();
}
_local5++;
}
}
if (isFocused) {
var _local6 = nb.length;
var _local5 = 0;
while (_local5 < _local6) {
nb[_local5].update();
_local5++;
}
}
}
function onCameraCellChange() {
if (isFocused) {
if (!hasEnemies) {
createEnemies();
}
return(undefined);
}
var _local3 = false;
var _local4 = nb.length;
var _local2 = 0;
while (_local2 < _local4) {
if (nb[_local2].isFocused) {
_local3 = true;
break;
}
_local2++;
}
if (_local3) {
if (!hasEnemies) {
createEnemies();
}
} else if (hasEnemies) {
removeEnemies();
}
}
function checkFocus(x, y) {
if ((((x >= left) && (x < right)) && (y >= top)) && (y < bottom)) {
return(undefined);
}
isFocused = false;
}
function isInCell(x, y) {
if ((((x >= left) && (x < right)) && (y >= top)) && (y < bottom)) {
return(true);
}
return(false);
}
function addCompound(iObj) {
iObj.uid = rr.utils.StringUtils.getUniqueName();
this["cp" + iObj.uid] = new rr.train.Compound(iObj);
this["cp" + iObj.uid].addToMapBackground();
statics.push(this["cp" + iObj.uid]);
}
function addBonus(iObj) {
iObj.uid = rr.utils.StringUtils.getUniqueName();
iObj.cellid = id;
this["bs" + iObj.uid] = new rr.train.Bonus(iObj);
statics.push(this["bs" + iObj.uid]);
}
function addDrop(iObj) {
iObj.uid = rr.utils.StringUtils.getUniqueName();
iObj.cellid = id;
this["dp" + iObj.uid] = new rr.train.Drop(iObj);
statics.push(this["dp" + iObj.uid]);
}
function createEnemies() {
enemies = new Array();
var _local3 = eiObjects.length;
var _local2 = 0;
while (_local2 < _local3) {
rr.enemy.EnemyUtils.createEnemy(eiObjects[_local2]);
_local2++;
}
hasEnemies = true;
delete eiObjects;
}
function removeEnemies() {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < enemies.length) {
_local6.push(enemies[_local3]);
_local3++;
}
eiObjects = new Array();
var _local7 = _local6.length;
_local3 = 0;
while (_local3 < _local7) {
var _local4 = _global.stage["enemy_" + _local6[_local3]];
var _local5 = _local4.getInitObj();
eiObjects.push(_local5);
_local4.destroy();
_local3++;
}
delete enemies;
hasEnemies = false;
}
function removeEnemy(obj) {
var _local3 = enemies.length;
var _local2 = 0;
while (_local2 < _local3) {
if (enemies[_local2] == obj.uid) {
enemies.splice(_local2, 1);
break;
}
_local2++;
}
}
function deleteObject(obj) {
var _local4 = statics.length;
var _local2 = 0;
while (_local2 < _local4) {
if (statics[_local2] == obj) {
statics.splice(_local2, 1);
break;
}
_local2++;
}
if (obj instanceof rr.train.Bonus) {
delete this["bs" + obj.uid];
}
if (obj instanceof rr.train.Drop) {
delete this["dp" + obj.uid];
}
}
function addCompoundListeners() {
var _local4 = statics.length;
var _local3 = 0;
while (_local3 < _local4) {
if (statics[_local3] instanceof rr.train.Compound) {
_global.loc.addEventListener("onLocStop", statics[_local3]);
}
_local3++;
}
}
function getCompounds(includeNeigh) {
var _local3 = new Array();
var _local4 = statics.length;
var _local2 = 0;
while (_local2 < _local4) {
if (statics[_local2] instanceof rr.train.Compound) {
_local3.push(statics[_local2]);
}
_local2++;
}
if (includeNeigh) {
_local4 = nb.length;
_local2 = 0;
while (_local2 < _local4) {
_local3.concat(nb[_local2].getCompounds(false));
_local2++;
}
}
return(_local3);
}
}
Symbol 3382 MovieClip [__Packages.rr.train.Compound] Frame 0
class rr.train.Compound extends rr.BaseClass
{
var linkId, initObj, uid, id, type, x, y, rot, pi, mov;
function Compound (iObj) {
super();
linkId = "Compound";
initObj = iObj;
init();
}
function init() {
uid = initObj.uid;
id = initObj.id;
type = _global.map.maptype + Math.round(1 + Math.random()).toString();
x = initObj.x;
y = initObj.y;
rot = initObj.rot;
_global.map.collapsepoints.push({x:x, y:y});
}
function addToMapBackground() {
var _local3 = flash.display.BitmapData.loadBitmap(type + "_base");
var _local4 = new flash.display.BitmapData(500, 500, true, 0);
var _local6 = new flash.geom.Rectangle(0, 0, 500, 500);
var _local5 = new flash.geom.Matrix();
_local5.translate((-_local3.width) / 2, (-_local3.height) / 2);
_local5.rotate((rr.utils.MathUtils.formatAngle(rot) / 180) * pi);
_local5.translate((_local3.width / 2) + 250, (_local3.height / 2) + 250);
_local4.draw(_local3, _local5);
_global.map.map_bmp.copyPixels(_local4, _local6, new flash.geom.Point((x - 250) - (_local3.width / 2), (y - 250) - (_local3.height / 2)), null, null, true);
_local3.dispose();
_local4.dispose();
}
function update() {
checkRender();
}
function onLocStop() {
if (_global.loc.isdead) {
return(undefined);
}
if (_global.train.isCrashed) {
return(undefined);
}
if (_global.train.isInRange(x, y, 20)) {
_global.control.showCompoundMenu(this);
}
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._rotation = rot;
}
function checkRender() {
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
render();
} else if (mov) {
clearMov();
}
}
function createMov() {
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, linkId);
mov = _global.stage.attachMovie(linkId, rr.utils.StringUtils.getUniqueName(), _local3, {parent:this});
mov.gotoAndStop(type);
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov, 0, 80);
}
}
function clearMov() {
mov.removeMovieClip();
delete mov;
}
function remove() {
_global.loc.removeEventListener("onLocStop", this);
clearMov();
}
}
Symbol 3383 MovieClip [__Packages.rr.train.Drop] Frame 0
class rr.train.Drop extends rr.BaseClass
{
var linkId, initObj, dfeel, uid, cellId, x, y, t, mode, type, mov, dropDone;
function Drop (iObj) {
super();
linkId = "Drop";
initObj = iObj;
dfeel = 75;
init();
}
function init() {
uid = initObj.uid;
cellId = initObj.cellid;
x = initObj.x;
y = initObj.y;
t = initObj.t;
mode = initObj.m;
if (t == "f") {
type = "FuelTank";
}
if (t == "p") {
type = "Passenger";
}
if (t == "a") {
type = "PassengerArmored";
}
if (t == "t") {
type = "TankTrailer";
}
if (t == "b") {
type = "ABomb";
}
}
function update() {
if (mode == "d") {
if (_global.train.isInRange(x, y, dfeel)) {
var _local3 = _global.loc;
while (_local3.next) {
_local3 = _local3.next;
if (_local3.linkId == type) {
applyDrop(_local3);
break;
}
}
}
}
if (mode == "p") {
if (rr.utils.MathUtils.getDistance(x, y, _global.loc.x, _global.loc.y) < dfeel) {
applyPickup();
}
}
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
render();
} else if (mov) {
clearMov();
}
}
function render() {
if (!mov) {
if (!dropDone) {
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId + type, rr.utils.StringUtils.getUniqueName(), _local3);
if (mode == "d") {
mov.gotoAndPlay(2);
}
}
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
}
function clearMov() {
mov.removeMovieClip();
delete mov;
}
function applyDrop(s) {
if (_global.train.isCrashed) {
return(undefined);
}
if (dropDone) {
return(undefined);
}
dropDone = true;
if (type == "FuelTank") {
_global.sounds.playSound("Fuel Wagon Dropped.wav");
}
if (type == "Passenger") {
_global.guide.showGuide(16);
_global.sounds.playSound("Passenger Wagon Dropped.wav");
}
if (type == "PassengerArmored") {
_global.sounds.playSound("Armor Passenger Wagon Dropped.wav");
}
if (type == "TankTrailer") {
_global.sounds.playSound("Tank Trailer Dropped.wav");
}
if (type == "ABomb") {
_global.sounds.playSound("Atomic Bomb Dropped.wav");
}
var _local4 = _global.game.dropoffs.length;
var _local3 = 0;
while (_local3 < _local4) {
if (_global.game.dropoffs[_local3] == s.linkId) {
_global.game.dropoffs.splice(_local3, 1);
break;
}
_local3++;
}
s.remove();
clearMov();
_global.map["cell_" + cellId].deleteObject(this);
}
function applyPickup() {
if (_global.train.isCrashed) {
return(undefined);
}
if (dropDone) {
return(undefined);
}
dropDone = true;
if (type == "FuelTank") {
_global.sounds.playSound("Fuel Wagon Attached.wav");
}
if (type == "Passenger") {
_global.sounds.playSound("Passenger Wagon Attached.wav");
}
if (type == "PassengerArmored") {
_global.sounds.playSound("Armor Passenger Wagon Attached.wav");
}
if (type == "TankTrailer") {
_global.sounds.playSound("Tank Trailer Attached.wav");
}
if (type == "ABomb") {
_global.sounds.playSound("Atomic Bomb Attached.wav");
}
_global.train.addPickup(type);
clearMov();
_global.map["cell_" + cellId].deleteObject(this);
}
}
Symbol 3384 MovieClip [__Packages.rr.enemy.EnemyUtils] Frame 0
class rr.enemy.EnemyUtils
{
function EnemyUtils () {
}
static function createEnemy(initObj) {
if (!initObj.uid) {
initObj.uid = rr.utils.StringUtils.getUniqueName();
}
var _local2 = initObj.uid;
var _local4;
if (initObj.cellid) {
_local4 = _global.map["cell_" + initObj.cellid];
} else {
_local4 = _global.map.getCellByPos(initObj.x, initObj.y);
initObj.cellid = _local4.id;
}
switch (initObj.linkid) {
case "OldJeep" :
_global.stage["enemy_" + _local2] = new rr.enemy.OldJeep(initObj);
_local4.enemies.push(_local2);
break;
case "ArmoredJeep" :
_global.stage["enemy_" + _local2] = new rr.enemy.ArmoredJeep(initObj);
_local4.enemies.push(_local2);
break;
case "GunTruck" :
_global.stage["enemy_" + _local2] = new rr.enemy.GunTruck(initObj);
_local4.enemies.push(_local2);
break;
case "PotTank" :
_global.stage["enemy_" + _local2] = new rr.enemy.PotTank(initObj);
_local4.enemies.push(_local2);
break;
case "Abrahams" :
_global.stage["enemy_" + _local2] = new rr.enemy.Abrahams(initObj);
_local4.enemies.push(_local2);
break;
case "Elephant" :
_global.stage["enemy_" + _local2] = new rr.enemy.Elephant(initObj);
_local4.enemies.push(_local2);
break;
case "BullDozer" :
_global.stage["enemy_" + _local2] = new rr.enemy.BullDozer(initObj);
_local4.enemies.push(_local2);
break;
case "Basilisk" :
_global.stage["enemy_" + _local2] = new rr.enemy.Basilisk(initObj);
_local4.enemies.push(_local2);
break;
case "Bunker" :
_global.stage["enemy_" + _local2] = new rr.enemy.Bunker(initObj);
_local4.enemies.push(_local2);
break;
case "GatlingSingle" :
_global.stage["enemy_" + _local2] = new rr.enemy.GatlingSingle(initObj);
_local4.enemies.push(_local2);
break;
case "GatlingDouble" :
_global.stage["enemy_" + _local2] = new rr.enemy.GatlingDouble(initObj);
_local4.enemies.push(_local2);
break;
case "AirField" :
_global.stage["enemy_" + _local2] = new rr.enemy.AirField(initObj);
break;
case "FockeWolf" :
_global.stage["enemy_" + _local2] = new rr.enemy.FockeWolf(initObj);
break;
case "C47" :
_global.stage["enemy_" + _local2] = new rr.enemy.C47(initObj);
break;
case "BellHuey" :
_global.stage["enemy_" + _local2] = new rr.enemy.BellHuey(initObj);
}
_global.stage.events.dispatchEvent({type:"onEnemyCreate", target:_global.stage["enemy_" + _local2]});
return(_global.stage["enemy_" + _local2]);
}
static function checkAreaRails(a) {
a.areaoverlap = false;
var _local10 = _global.map.rs.length;
var _local8 = 0;
while (_local8 < _local10) {
var _local7 = _global.map["rs" + _global.map.rs[_local8]];
var _local5 = 5;
while (_local5 < _local7.length) {
var _local4 = _local7.getPoint(_local5);
if ((((_local4.x >= a.rect.x) && (_local4.x <= (a.rect.x + a.rect.width))) && (_local4.y >= a.rect.y)) && (_local4.y <= (a.rect.y + a.rect.heigth))) {
a.areaoverlap = true;
break;
}
_local5 = _local5 + 5;
}
if (a.rsoverlaps) {
break;
}
_local8++;
}
a.statics = [];
_local10 = _global.map.cells.length;
_local8 = 0;
while (_local8 < _local10) {
var _local6 = _global.map["cell_" + _global.map.cells[_local8]];
var _local9 = _local6.statics.length;
var _local5 = 0;
while (_local5 < _local9) {
if (_local6.statics[_local5] instanceof rr.rail.RailBlock) {
var _local3 = _local6.statics[_local5];
if ((((_local3.x >= a.rect.x) && (_local3.x <= (a.rect.x + a.rect.width))) && (_local3.y >= a.rect.y)) && (_local3.y <= (a.rect.y + a.rect.heigth))) {
a.statics.push(_local3);
}
}
_local5++;
}
_local8++;
}
}
}
Symbol 3385 MovieClip [__Packages.rr.enemy.EnemyUnit] Frame 0
class rr.enemy.EnemyUnit extends rr.BaseClass
{
var uid, initObj, mode, loopsoundid, linkId, loopsound, x, y, isdead, isexploded, mov, rot, isSoundPlaying, events, tstun, laststunned, isstunned;
function EnemyUnit () {
super();
}
function init() {
uid = initObj.uid;
_global.stage.enemies.push(uid);
if (!mode) {
mode = "static";
}
loopsoundid = rr.conf.Config.getObjectValue(linkId, "sound");
if (loopsoundid) {
loopsound = _global.sounds.addLoopSound(this);
}
}
function checkRender() {
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
if (loopsound) {
if (!isdead) {
playLoopSound();
}
}
render();
} else if (isexploded) {
destroy();
} else if (mov) {
_global.sounds.stopLoopSound(this);
clearMov();
}
}
function playLoopSound() {
if ((!loopsound.isplaying) || (loopsound.vol < 100)) {
_global.sounds.playLoopSound(this);
}
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._rotation = rot;
}
function createMov() {
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId, uid, _local3, {parent:this});
checkNightMode();
}
function clearMov() {
mov.removeMovieClip();
delete mov;
}
function die() {
if (isdead) {
return(undefined);
}
isdead = true;
_global.sounds.stopLoopSound(this, true);
isSoundPlaying = false;
events.dispatchEvent({type:"onRemoveLoopSound", target:this});
events.dispatchEvent({type:"onEnemyDie", target:this});
}
function destroy() {
mov.removeMovieClip();
_global.stage.removeEnemy(this);
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov, 0, 80);
}
}
function stun(t) {
tstun = t;
trace("tstun: " + tstun);
laststunned = getTimer();
isstunned = true;
}
function checkStun() {
if ((getTimer() - laststunned) > tstun) {
isstunned = false;
}
}
}
Symbol 3386 MovieClip [__Packages.rr.enemy.GroundUnit] Frame 0
class rr.enemy.GroundUnit extends rr.enemy.EnemyUnit
{
var cellId, initObj, area, ea, x, y, rot, damage, rect, mode, maxspeed, linkId, curve, a, ddetect, dfire, tfire, rotspeed, killlevel, destroydelay, gunsound, explodesound, rfire, status, isdead, rotBarrel, speed, tspeed, lastFired, addEventListener, checkRender, isstunned, checkStun, tar, dtar, paused, dfeel, retreat, cos, pi, sin, uid, mov, loopsound, atan2, movetar, isexploded, removeEventListener, clearMov;
function GroundUnit () {
super();
}
function init() {
cellId = initObj.cellid;
area = initObj.area;
ea = initObj.ea;
x = initObj.x;
y = initObj.y;
rot = (initObj.rot ? (initObj.rot) : (Math.random() * 180));
damage = (initObj.damage ? (initObj.damage) : 0);
rect = ea.rect;
super.init();
if (mode != "static") {
mode = ((Math.random() > 0.6) ? "dynamic" : "static");
}
maxspeed = rr.conf.Config.getObjectValue(linkId, "maxSpeed");
curve = rr.conf.Config.getObjectValue(linkId, "curve");
a = rr.conf.Config.getObjectValue(linkId, "acceleration");
ddetect = rr.conf.Config.getObjectValue(linkId, "detectionDistance");
dfire = rr.conf.Config.getObjectValue(linkId, "shootingDistance");
tfire = rr.conf.Config.getObjectValue(linkId, "shootingInterval");
rotspeed = rr.conf.Config.getObjectValue(linkId, "rotationSpeed");
killlevel = rr.conf.Config.getObjectValue(linkId, "killlevel");
destroydelay = rr.conf.Config.getObjectValue(linkId, "destroydelay");
gunsound = rr.conf.Config.getObjectValue(linkId, "gunsound");
explodesound = rr.conf.Config.getObjectValue(linkId, "explodesound");
rfire = rr.conf.Config.getObjectValue(linkId, "ammoAccuracy");
status = "watch";
isdead = false;
rotBarrel = Math.random() * 180;
speed = (tspeed = 0);
lastFired = getTimer();
area.addEventListener("onAreaDetect", this);
addEventListener("onEnemyDie", area);
}
function getInitObj() {
initObj.x = x;
initObj.y = y;
initObj.rot = rot;
initObj.damage = damage;
initObj.cellid = cellId;
return(initObj);
}
function update() {
if (isdead) {
checkRender();
return(undefined);
}
if (isstunned) {
checkStun();
checkRender();
return(undefined);
}
if (status == "watch") {
if (_global.train.isInRange(x, y, ddetect)) {
area.setDetected();
}
}
if (status == "attack") {
if (!tar) {
getTarget();
}
dtar = rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y);
aimAtTarget();
if (dtar <= dfire) {
fire();
}
if (mode == "dynamic") {
if (speed != tspeed) {
speed = ((Math.abs(speed - tspeed) <= a) ? (tspeed) : (((tspeed > speed) ? (speed + a) : (speed - a))));
}
if (!paused) {
if (dtar < (dfeel * 5)) {
pause();
}
if (retreat) {
if (rr.utils.MathUtils.getDistance(x, y, rect.left + (rect.width / 2), rect.top + (rect.height / 2)) < 20) {
retreat = false;
reapproach();
}
}
checkFeelers();
if (speed != 0) {
rotateToTarget();
}
x = x + (cos(((-rot) * pi) / 180) * speed);
y = y - (sin(((-rot) * pi) / 180) * speed);
var _local3 = _global.map["cell_" + cellId];
if (((x < _local3.left) || (x >= _local3.right)) || ((y < _local3.top) | (y >= _local3.bottom))) {
_local3.removeEnemy(this);
_local3 = _global.map.getCellByPos(x, y);
cellId = _local3.id;
trace("groundunit new cell: " + _local3.id);
_local3.enemies.push(uid);
}
}
}
if (ea.areaoverlap) {
var _local4 = _global.train.checkObjectHit(this);
if (_local4) {
die();
explode();
}
}
}
checkRender();
}
function render() {
super.render();
mov.barrel_mc._rotation = rr.utils.MathUtils.formatAngle(rotBarrel - rot);
}
function playLoopSound() {
if ((mode != "static") && (speed != 0)) {
if ((!loopsound.isplaying) || (loopsound.vol < 100)) {
_global.sounds.playLoopSound(this);
}
}
}
function aimAtTarget() {
var _local2 = (180 * atan2(tar.y - y, tar.x - x)) / pi;
var _local3 = (rotBarrel + 360) % 360;
_local2 = (_local2 + 360) % 360;
if ((_local2 - _local3) > 180) {
_local2 = _local2 - 360;
} else if ((_local2 - _local3) < -180) {
_local2 = _local2 + 360;
}
_local3 = _local3 + ((rotspeed * (_local2 - _local3)) / 100);
rotBarrel = rr.utils.MathUtils.formatAngle2(_local3);
}
function rotateToTarget() {
var _local4;
_local4 = rr.utils.MathUtils.getAngle(x, y, movetar.x, movetar.y);
var _local2 = _local4;
var _local3 = (rot + 360) % 360;
_local2 = (_local2 + 360) % 360;
if ((_local2 - _local3) > 180) {
_local2 = _local2 - 360;
} else if ((_local2 - _local3) < -180) {
_local2 = _local2 + 360;
}
if ((_local2 - _local3) > 0) {
rot = rr.utils.MathUtils.formatAngle2(_local3 + curve);
} else {
rot = rr.utils.MathUtils.formatAngle2(_local3 - curve);
}
var _local5 = rr.utils.MathUtils.angDiff(rot, _local4);
if ((_local5 <= (curve + 1)) || ((360 - _local5) <= (curve + 1))) {
rot = _local4;
}
}
function getTarget() {
tar = _global.train.getTargetSegment();
tar.addEventListener("onTrainTargetDie", this);
movetar = tar;
}
function onTrainTargetDie(evtObj) {
if (evtObj.target == tar) {
tar.removeEventListener("onTrainTargetDie", this);
tar = undefined;
}
}
function onAreaDetect() {
getTarget();
tspeed = maxspeed;
status = "attack";
}
function checkFeelers() {
var _local5 = 0;
var _local7 = 0;
var _local6 = 0;
var _local8 = 0;
var _local12 = x + (cos(((-rr.utils.MathUtils.formatAngle2(rot + 315)) * pi) / 180) * (dfeel + 5));
var _local11 = y - (sin(((-rr.utils.MathUtils.formatAngle2(rot + 315)) * pi) / 180) * (dfeel + 5));
var _local10 = x + (cos(((-rr.utils.MathUtils.formatAngle2(rot + 45)) * pi) / 180) * (dfeel + 5));
var _local9 = y - (sin(((-rr.utils.MathUtils.formatAngle2(rot + 45)) * pi) / 180) * (dfeel + 5));
var _local15 = x + (cos(((-rr.utils.MathUtils.formatAngle2(rot + 225)) * pi) / 180) * (dfeel + 5));
var _local14 = y - (sin(((-rr.utils.MathUtils.formatAngle2(rot + 225)) * pi) / 180) * (dfeel + 5));
var _local17 = x + (cos(((-rr.utils.MathUtils.formatAngle2(rot + 135)) * pi) / 180) * (dfeel + 5));
var _local16 = y - (sin(((-rr.utils.MathUtils.formatAngle2(rot + 135)) * pi) / 180) * (dfeel + 5));
if (!retreat) {
if ((((_local12 < rect.left) || (_local12 > rect.right)) || (_local11 < rect.top)) || (_local11 > rect.bottom)) {
_local5 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, setRetreat, 1500);
} else if ((((_local15 < rect.left) || (_local15 > rect.right)) || (_local14 < rect.top)) || (_local14 > rect.bottom)) {
_local6 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, setRetreat, 1500);
} else if ((((_local10 < rect.left) || (_local10 > rect.right)) || (_local9 < rect.top)) || (_local9 > rect.bottom)) {
_local7 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, setRetreat, 1500);
} else if ((((_local17 < rect.left) || (_local17 > rect.right)) || (_local16 < rect.top)) || (_local16 > rect.bottom)) {
_local8 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, setRetreat, 1500);
}
}
var _local18 = ea.enemies.length;
var _local13 = 0;
while (_local13 < _local18) {
var _local3 = _global.stage["enemy_" + ea.enemies[_local13]];
if ((_local3 && (_local3 != this)) && (!_local3.isdead)) {
if (rr.utils.MathUtils.getDistance(x, y, _local3.x, _local3.y) < (dfeel + _local3.dfeel)) {
pause();
return(undefined);
}
if (rr.utils.MathUtils.getDistance(_local12, _local11, _local3.x, _local3.y) < _local3.dfeel) {
_local5 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local10, _local9, _local3.x, _local3.y) < _local3.dfeel) {
_local7 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local17, _local16, _local3.x, _local3.y) < _local3.dfeel) {
_local8 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local15, _local14, _local3.x, _local3.y) < _local3.dfeel) {
_local6 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
}
_local13++;
}
_local18 = ea.statics.length;
_local13 = 0;
while (_local13 < _local18) {
var _local4 = ea.statics[_local13];
if (rr.utils.MathUtils.getDistance(x, y, _local4.x, _local4.y) < (dfeel + _local4.dfeel)) {
pause();
return(undefined);
}
if (rr.utils.MathUtils.getDistance(_local12, _local11, _local4.x, _local4.y) < _local4.dfeel) {
_local5 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local10, _local9, _local4.x, _local4.y) < _local4.dfeel) {
_local7 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local17, _local16, _local4.x, _local4.y) < _local4.dfeel) {
_local8 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local15, _local14, _local4.x, _local4.y) < _local4.dfeel) {
_local6 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
_local13++;
}
}
function setRetreat() {
tspeed = maxspeed;
retreat = true;
movetar = {x:rect.left + (rect.width / 2), y:rect.top + (rect.height / 2)};
}
function pause() {
paused = true;
rr.utils.Delegate.callDelayed(this, reapproach, 5000);
}
function reapproach() {
if (retreat) {
movetar = {x:rect.left + (rect.width / 2), y:rect.top + (rect.height / 2)};
} else {
movetar = tar;
}
tspeed = maxspeed;
paused = false;
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
lastFired = getTimer();
mov.barrel_mc.gotoAndPlay("shoot");
mov.barrel_mc.base_mc.gotoAndPlay("shoot");
_global.sounds.playSound(gunsound);
var _local3 = ((Math.random() < 0.5) ? (dtar - (Math.random() * rfire)) : (dtar + (Math.random() * rfire)));
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:x, y:y, rot:rotBarrel, d:_local3});
}
function addDamage(dmg) {
if (isdead) {
return(undefined);
}
if (!dmg) {
return(undefined);
}
damage = damage + dmg;
if (damage >= killlevel) {
die();
explode();
}
}
function die() {
if (isdead) {
return(undefined);
}
_global.landshot++;
super.die();
}
function explode() {
if (isexploded) {
return(undefined);
}
isexploded = true;
status = "";
_global.sounds.playSound(explodesound);
render();
mov.gotoAndPlay("explode");
rr.utils.Delegate.callDelayed(this, destroy, destroydelay);
}
function remove() {
area.removeEventListener("onAreaDetect", this);
removeEventListener("onEnemyDie", area);
clearMov();
}
function destroy() {
remove();
super.destroy();
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.base_mc, 0, 80);
rr.utils.ClipUtils.setTint(mov.barrel_mc.base_mc, 0, 80);
}
}
}
Symbol 3387 MovieClip [__Packages.rr.enemy.EnemyArea] Frame 0
class rr.enemy.EnemyArea extends rr.BaseClass
{
var initObj, id, areas, iscombined, events;
function EnemyArea (iObj) {
super();
initObj = iObj;
}
function init() {
id = initObj.id;
trace("init area: " + id);
areas = new Array();
if (initObj.a) {
iscombined = true;
var _local2 = 0;
while (_local2 < initObj.a.length) {
addArea(new flash.geom.Rectangle(initObj.a[_local2].x, initObj.a[_local2].y, initObj.a[_local2].w, initObj.a[_local2].h));
_local2++;
}
} else {
addArea(new flash.geom.Rectangle(initObj.x, initObj.y, initObj.w, initObj.h));
}
var _local4 = rr.conf.Config.translateEnemyCodes(initObj.e);
var _local6 = _local4.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local3 = getFreeArea();
_local3.edefs.push(_local4[_local2]);
_local3.tmpenemies.push({linkid:_local4[_local2]});
_local2++;
}
distributeEnemies();
createEnemies();
}
function addArea(r) {
var _local2 = new Object();
_local2.rect = r;
_local2.maxenemies = Math.floor((r.width * r.height) / 7000);
_local2.edefs = new Array();
_local2.tmpenemies = new Array();
_local2.enemies = new Array();
rr.enemy.EnemyUtils.checkAreaRails(_local2);
areas.push(_local2);
}
function getFreeArea() {
var _local2 = [];
var _local3 = 0;
while (_local3 < areas.length) {
if (areas[_local3].tmpenemies.length < areas[_local3].maxenemies) {
_local2.push(areas[_local3]);
}
_local3++;
}
_local3 = Math.round(Math.random() * (_local2.length - 1));
return(_local2[_local3]);
}
function distributeEnemies() {
var _local7 = areas.length;
var _local5 = 0;
while (_local5 < _local7) {
var _local3 = areas[_local5];
var _local6 = _local3.tmpenemies.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local4 = _local3.tmpenemies[_local2];
setEnemyPosition(_local4, _local3);
_local2++;
}
_local5++;
}
}
function setEnemyPosition(e, a) {
var _local10 = a.tmpenemies.length;
var _local11 = a.statics.length;
var _local9 = 0;
while (_local9 < 1000) {
var _local6 = false;
e.x = a.rect.x + (Math.random() * a.rect.width);
e.y = a.rect.y + (Math.random() * a.rect.height);
var _local4 = 0;
while (_local4 < _local10) {
var _local3 = a.tmpenemies[_local4];
if ((_local3 != e) && (_local3.x)) {
var _local8 = rr.utils.MathUtils.getDistance(e.x, e.y, _local3.x, _local3.y);
if (_local8 < 70) {
_local6 = true;
break;
}
}
_local4++;
}
if (!_local6) {
_local4 = 0;
while (_local4 < _local11) {
var _local7 = a.statics[_local4];
var _local8 = rr.utils.MathUtils.getDistance(e.x, e.y, _local7.x, _local7.y);
if (_local8 < 70) {
_local6 = true;
break;
}
_local4++;
}
}
if (!_local6) {
break;
}
_local9++;
}
if (_local6) {
trace("failed enemy placement loop: " + _local9);
trace("a.rect: " + a.rect);
setEnemyPosition(e, a);
}
}
function createEnemies() {
var _local13 = areas.length;
var _local6 = 0;
while (_local6 < _local13) {
var _local4 = areas[_local6];
var _local7 = _local4.tmpenemies.length;
var _local3 = 0;
while (_local3 < _local7) {
var _local5 = rr.enemy.EnemyUtils.createEnemy({linkid:_local4.tmpenemies[_local3].linkid, area:this, ea:_local4, x:_local4.tmpenemies[_local3].x, y:_local4.tmpenemies[_local3].y});
_local4.enemies.push(_local5.uid);
_local3++;
}
_local6++;
}
_global.stage.onAreaInit(this);
}
function setDetected() {
events.dispatchEvent({type:"onAreaDetect"});
}
function onEnemyDie(evtObj) {
var _local7 = areas.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = areas[_local4];
var _local5 = _local3.enemies.length;
var _local2 = 0;
while (_local2 < _local5) {
if (_local3.enemies[_local2] == evtObj.target.uid) {
_local3.enemies.splice(_local4, 1);
break;
}
_local2++;
}
_local4++;
}
}
}
Symbol 3388 MovieClip [__Packages.rr.enemy.OldJeep] Frame 0
class rr.enemy.OldJeep extends rr.enemy.GroundUnit
{
var linkId, initObj, mode, dfeel, init;
function OldJeep (iObj) {
super();
linkId = "OldJeep";
initObj = iObj;
mode = "dynamic";
dfeel = 15;
init();
}
}
Symbol 3389 MovieClip [__Packages.rr.enemy.ArmoredJeep] Frame 0
class rr.enemy.ArmoredJeep extends rr.enemy.GroundUnit
{
var linkId, initObj, mode, dfeel, init;
function ArmoredJeep (iObj) {
super();
linkId = "ArmoredJeep";
initObj = iObj;
mode = "dynamic";
dfeel = 18;
init();
}
}
Symbol 3390 MovieClip [__Packages.rr.enemy.GunTruck] Frame 0
class rr.enemy.GunTruck extends rr.enemy.GroundUnit
{
var linkId, initObj, mode, dfeel, init;
function GunTruck (iObj) {
super();
linkId = "GunTruck";
initObj = iObj;
mode = "dynamic";
dfeel = 23;
init();
}
}
Symbol 3391 MovieClip [__Packages.rr.enemy.PotTank] Frame 0
class rr.enemy.PotTank extends rr.enemy.GroundUnit
{
var linkId, initObj, mode, dfeel, init;
function PotTank (iObj) {
super();
linkId = "PotTank";
initObj = iObj;
mode = "dynamic";
dfeel = 22;
init();
}
}
Symbol 3392 MovieClip [__Packages.rr.enemy.Abrahams] Frame 0
class rr.enemy.Abrahams extends rr.enemy.GroundUnit
{
var linkId, initObj, mode, dfeel, init;
function Abrahams (iObj) {
super();
linkId = "Abrahams";
initObj = iObj;
mode = "dynamic";
dfeel = 22;
init();
}
}
Symbol 3393 MovieClip [__Packages.rr.enemy.Elephant] Frame 0
class rr.enemy.Elephant extends rr.enemy.GroundUnit
{
var linkId, initObj, mode, dfeel, init, mov, createMov, x, y, rotBarrel, tfire, lastFired, gunsound, rfire, dtar;
function Elephant (iObj) {
super();
linkId = "Elephant";
initObj = iObj;
mode = "static";
dfeel = 23;
init();
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov.barrel_mc._rotation = rr.utils.MathUtils.formatAngle(rotBarrel);
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
lastFired = getTimer();
mov.barrel_mc.gotoAndPlay("shoot");
mov.barrel_mc.base_mc.gotoAndPlay("shoot");
_global.sounds.playSound(gunsound);
var _local3 = ((Math.random() < 0.5) ? (dtar - (Math.random() * rfire)) : (dtar + (Math.random() * rfire)));
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:x, y:y, rot:rotBarrel, d:_local3});
}
}
Symbol 3394 MovieClip [__Packages.rr.enemy.BullDozer] Frame 0
class rr.enemy.BullDozer extends rr.enemy.EnemyUnit
{
var linkId, initObj, mode, dfeel, area, ea, x, y, rot, damage, rect, maxspeed, curve, a, ddetect, killlevel, destroydelay, explodesound, status, isdead, speed, tspeed, addEventListener, cellId, checkRender, isstunned, checkStun, iscrashed, crashrotspeed, crashdir, xspeed, yspeed, tar, dtar, paused, retreat, cos, pi, sin, uid, movetar, mov, isexploded, render, destroy;
function BullDozer (iObj) {
super();
linkId = "BullDozer";
initObj = iObj;
mode = "dynamic";
dfeel = 30;
init();
}
function init() {
area = initObj.area;
ea = initObj.ea;
x = initObj.x;
y = initObj.y;
rot = (initObj.rot ? (initObj.rot) : (Math.random() * 180));
damage = (initObj.damage ? (initObj.damage) : 0);
rect = ea.rect;
super.init();
dfeel = rr.conf.Config.getObjectValue(linkId, "feelerradius");
maxspeed = rr.conf.Config.getObjectValue(linkId, "maxSpeed");
curve = rr.conf.Config.getObjectValue(linkId, "curve");
a = rr.conf.Config.getObjectValue(linkId, "acceleration");
ddetect = rr.conf.Config.getObjectValue(linkId, "detectionDistance");
killlevel = rr.conf.Config.getObjectValue(linkId, "killlevel");
destroydelay = rr.conf.Config.getObjectValue(linkId, "destroydelay");
explodesound = rr.conf.Config.getObjectValue(linkId, "explodesound");
status = "watch";
isdead = false;
speed = (tspeed = 0);
area.addEventListener("onAreaDetect", this);
addEventListener("onEnemyDie", area);
}
function getInitObj() {
initObj.x = x;
initObj.y = y;
initObj.rot = rot;
initObj.damage = damage;
initObj.cellid = cellId;
return(initObj);
}
function update() {
if (isdead) {
checkRender();
return(undefined);
}
if (isstunned) {
checkStun();
checkRender();
return(undefined);
}
if (iscrashed) {
rot = rot + (crashdir * crashrotspeed);
crashrotspeed = crashrotspeed * 0.95;
x = x + xspeed;
y = y + yspeed;
xspeed = xspeed * 0.95;
yspeed = yspeed * 0.95;
if (Math.abs(xspeed) < 0.05) {
xspeed = 0;
}
if (Math.abs(yspeed) < 0.05) {
yspeed = 0;
}
if ((xspeed == 0) && (yspeed == 0)) {
iscrashed = false;
}
checkRender();
return(undefined);
}
if (status == "watch") {
if (_global.train.isInRange(x, y, ddetect)) {
area.setDetected();
}
}
if (status == "attack") {
if (!tar) {
getTarget();
}
dtar = rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y);
if (speed != tspeed) {
speed = ((Math.abs(speed - tspeed) <= a) ? (tspeed) : (((tspeed > speed) ? (speed + a) : (speed - a))));
}
if (!paused) {
if (retreat) {
if (rr.utils.MathUtils.getDistance(x, y, rect.left + (rect.width / 2), rect.top + (rect.height / 2)) < 20) {
retreat = false;
reapproach();
}
}
checkFeelers();
if (speed != 0) {
rotateToTarget();
}
x = x + (cos(((-rot) * pi) / 180) * speed);
y = y - (sin(((-rot) * pi) / 180) * speed);
var _local3 = _global.map["cell_" + cellId];
if (((x < _local3.left) || (x >= _local3.right)) || ((y < _local3.top) | (y >= _local3.bottom))) {
_local3.removeEnemy(this);
_local3 = _global.map.getCellByPos(x, y);
cellId = _local3.id;
trace("Bulldozer new cell: " + _local3.id);
_local3.enemies.push(uid);
}
if (ea.enemies.length > 1) {
checkEnemyHit();
}
}
if (ea.areaoverlap) {
var _local4 = _global.train.checkObjectHit(this);
if (_local4) {
crash(_local4);
}
}
}
checkRender();
}
function checkFeelers() {
var _local5 = 0;
var _local7 = 0;
var _local6 = 0;
var _local8 = 0;
var _local20 = x + (cos(((-rot) * pi) / 180) * (dfeel + 5));
var _local19 = y - (sin(((-rot) * pi) / 180) * (dfeel + 5));
var _local12 = x + (cos(((-rr.utils.MathUtils.formatAngle2(rot + 315)) * pi) / 180) * (dfeel + 5));
var _local11 = y - (sin(((-rr.utils.MathUtils.formatAngle2(rot + 315)) * pi) / 180) * (dfeel + 5));
var _local10 = x + (cos(((-rr.utils.MathUtils.formatAngle2(rot + 45)) * pi) / 180) * (dfeel + 5));
var _local9 = y - (sin(((-rr.utils.MathUtils.formatAngle2(rot + 45)) * pi) / 180) * (dfeel + 5));
var _local15 = x + (cos(((-rr.utils.MathUtils.formatAngle2(rot + 225)) * pi) / 180) * (dfeel + 5));
var _local14 = y - (sin(((-rr.utils.MathUtils.formatAngle2(rot + 225)) * pi) / 180) * (dfeel + 5));
var _local17 = x + (cos(((-rr.utils.MathUtils.formatAngle2(rot + 135)) * pi) / 180) * (dfeel + 5));
var _local16 = y - (sin(((-rr.utils.MathUtils.formatAngle2(rot + 135)) * pi) / 180) * (dfeel + 5));
if (!retreat) {
if ((((_local12 < rect.left) || (_local12 > rect.right)) || (_local11 < rect.top)) || (_local11 > rect.bottom)) {
_local5 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, setRetreat, 1500);
} else if ((((_local15 < rect.left) || (_local15 > rect.right)) || (_local14 < rect.top)) || (_local14 > rect.bottom)) {
_local6 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, setRetreat, 1500);
} else if ((((_local10 < rect.left) || (_local10 > rect.right)) || (_local9 < rect.top)) || (_local9 > rect.bottom)) {
_local7 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, setRetreat, 1500);
} else if ((((_local17 < rect.left) || (_local17 > rect.right)) || (_local16 < rect.top)) || (_local16 > rect.bottom)) {
_local8 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, setRetreat, 1500);
}
}
var _local18 = ea.enemies.length;
var _local13 = 0;
while (_local13 < _local18) {
var _local3 = _global.stage["enemy_" + ea.enemies[_local13]];
if ((_local3.linkId == "BullDozer") && (_local3 != this)) {
if (rr.utils.MathUtils.getDistance(x, y, _local3.x, _local3.y) < (dfeel + _local3.dfeel)) {
pause();
return(undefined);
}
if ((rr.utils.MathUtils.getDistance(_local12, _local11, _local3.x, _local3.y) < _local3.dfeel) || (rr.utils.MathUtils.getDistance(_local20, _local19, _local3.x, _local3.y) < _local3.dfeel)) {
_local5 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local10, _local9, _local3.x, _local3.y) < _local3.dfeel) {
_local7 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local17, _local16, _local3.x, _local3.y) < _local3.dfeel) {
_local8 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local15, _local14, _local3.x, _local3.y) < _local3.dfeel) {
_local6 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
}
_local13++;
}
_local18 = ea.statics.length;
_local13 = 0;
while (_local13 < _local18) {
var _local4 = ea.statics[_local13];
if (rr.utils.MathUtils.getDistance(x, y, _local4.x, _local4.y) < (dfeel + _local4.dfeel)) {
pause();
return(undefined);
}
if ((rr.utils.MathUtils.getDistance(_local12, _local11, _local4.x, _local4.y) < _local4.dfeel) || (rr.utils.MathUtils.getDistance(_local20, _local19, _local4.x, _local4.y) < _local4.dfeel)) {
_local5 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local10, _local9, _local4.x, _local4.y) < _local4.dfeel) {
_local7 = 1;
speed = ((speed > 0) ? 0 : (speed));
tspeed = -maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local17, _local16, _local4.x, _local4.y) < _local4.dfeel) {
_local8 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local12, y:_local11};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
if (rr.utils.MathUtils.getDistance(_local15, _local14, _local4.x, _local4.y) < _local4.dfeel) {
_local6 = 1;
speed = ((speed < 0) ? 0 : (speed));
tspeed = maxspeed;
movetar = {x:_local10, y:_local9};
rr.utils.Delegate.callDelayed(this, reapproach, 1500);
if ((((_local5 + _local7) + _local8) + _local6) > 2) {
pause();
return(undefined);
}
}
_local13++;
}
}
function rotateToTarget() {
var _local4;
_local4 = rr.utils.MathUtils.getAngle(x, y, movetar.x, movetar.y);
var _local2 = _local4;
var _local3 = (rot + 360) % 360;
_local2 = (_local2 + 360) % 360;
if ((_local2 - _local3) > 180) {
_local2 = _local2 - 360;
} else if ((_local2 - _local3) < -180) {
_local2 = _local2 + 360;
}
if ((_local2 - _local3) > 0) {
rot = rr.utils.MathUtils.formatAngle2(_local3 + curve);
} else {
rot = rr.utils.MathUtils.formatAngle2(_local3 - curve);
}
var _local5 = rr.utils.MathUtils.angDiff(rot, _local4);
if ((_local5 <= (curve + 1)) || ((360 - _local5) <= (curve + 1))) {
rot = _local4;
}
}
function getTarget() {
tar = _global.loc;
movetar = tar;
}
function onAreaDetect() {
getTarget();
tspeed = maxspeed;
status = "attack";
}
function crash(obj) {
if (iscrashed) {
return(undefined);
}
_global.train.crash(null, 2);
mov.base_mc.gotoAndPlay("bullup");
xspeed = obj.xspeed;
yspeed = obj.yspeed;
crashdir = -_global.train.crashRotDir;
crashrotspeed = _global.train.crashRotSpeed;
iscrashed = true;
}
function checkEnemyHit() {
var _local6 = x + (cos(((-rot) * pi) / 180) * 25);
var _local5 = y - (sin(((-rot) * pi) / 180) * 25);
var _local7 = ea.enemies.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = _global.stage["enemy_" + ea.enemies[_local4]];
if ((_local3 != this) && (!_local3.isdead)) {
if (rr.utils.MathUtils.getDistance(_local6, _local5, _local3.x, _local3.y) <= (15 + _local3.dfeel)) {
if (rr.utils.HitTest.isShapeHit(mov, _local3.mov)) {
_local3.die();
_local3.explode();
break;
}
}
}
_local4++;
}
}
function setRetreat() {
tspeed = maxspeed;
retreat = true;
movetar = {x:rect.left + (rect.width / 2), y:rect.top + (rect.height / 2)};
}
function pause() {
paused = true;
rr.utils.Delegate.callDelayed(this, reapproach, 5000);
}
function reapproach() {
if (retreat) {
movetar = {x:rect.left + (rect.width / 2), y:rect.top + (rect.height / 2)};
} else {
movetar = tar;
}
tspeed = maxspeed;
paused = false;
}
function addDamage(dmg) {
if (isdead) {
return(undefined);
}
if (!dmg) {
return(undefined);
}
damage = damage + dmg;
if (damage >= killlevel) {
die();
explode();
}
}
function die() {
if (isdead) {
return(undefined);
}
_global.landshot++;
super.die();
}
function explode() {
if (isexploded) {
return(undefined);
}
isexploded = true;
status = "";
_global.sounds.playSound(explodesound);
render();
mov.gotoAndPlay("explode");
rr.utils.Delegate.callDelayed(this, destroy, destroydelay);
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.base_mc, 0, 80);
}
}
}
Symbol 3395 MovieClip [__Packages.rr.utils.HitTest] Frame 0
class rr.utils.HitTest
{
function HitTest () {
}
static function isShapeHit(p_clip1, p_clip2, p_alphaTolerance, p_scope) {
if (p_alphaTolerance == undefined) {
p_alphaTolerance = 0;
}
if (p_scope == undefined) {
p_scope = _root;
}
var _local4 = p_clip1.getBounds(p_scope);
var _local3 = p_clip2.getBounds(p_scope);
if (((_local4.xMax < _local3.xMin) || (_local3.xMax < _local4.xMin)) || ((_local4.yMax < _local3.yMin) || (_local3.yMax < _local4.yMin))) {
return(null);
}
var _local2 = {};
_local2.xMin = Math.max(_local4.xMin, _local3.xMin);
_local2.xMax = Math.min(_local4.xMax, _local3.xMax);
_local2.yMin = Math.max(_local4.yMin, _local3.yMin);
_local2.yMax = Math.min(_local4.yMax, _local3.yMax);
var _local7 = new flash.display.BitmapData(_local2.xMax - _local2.xMin, _local2.yMax - _local2.yMin, false);
var _local6 = p_clip1.transform.matrix;
var _local5 = {x:0, y:0};
p_clip1.localToGlobal(_local5);
_local6.tx = _local5.x - _local2.xMin;
_local6.ty = _local5.y - _local2.yMin;
_local7.draw(p_clip1, _local6, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, p_alphaTolerance));
_local6 = p_clip2.transform.matrix;
_local5 = {x:0, y:0};
p_clip2.localToGlobal(_local5);
_local6.tx = _local5.x - _local2.xMin;
_local6.ty = _local5.y - _local2.yMin;
_local7.draw(p_clip2, _local6, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, p_alphaTolerance), "difference");
var _local11 = _local7.getColorBoundsRect(4294967295, 4278255615);
if ((_local11.width > 0) || (_local11.height > 0)) {
return(true);
}
return(false);
}
static function drawBounds(bounds, bname, col) {
_root["bounds" + bname].removeMovieClip();
_root.createEmptyMovieClip("bounds" + bname, _root.getNextHighestDepth());
with (_root["bounds" + bname]) {
lineStyle(1, col, 100);
moveTo(bounds.xMin, bounds.yMin);
lineTo(bounds.xMax, bounds.yMin);
lineTo(bounds.xMax, bounds.yMax);
lineTo(bounds.xMin, bounds.yMax);
lineTo(bounds.xMin, bounds.yMin);
}
}
static function drawRectangle(rect, bounds) {
_root.rect.removeMovieClip();
_root.createEmptyMovieClip("rect", _root.getNextHighestDepth(), {_x:bounds.xMin, _y:bounds.yMin});
_root.rect.lineStyle(1, 39168, 100);
_root.rect.moveTo(rect.x, rect.y);
_root.rect.lineTo(rect.x + rect.width, rect.y);
_root.rect.lineTo(rect.x + rect.width, rect.y + rect.height);
_root.rect.lineTo(rect.x, rect.y + rect.height);
_root.rect.lineTo(rect.x, rect.y);
}
}
Symbol 3396 MovieClip [__Packages.rr.enemy.Basilisk] Frame 0
class rr.enemy.Basilisk extends rr.enemy.GroundUnit
{
var linkId, initObj, mode, dfeel, init, isexploded, status, explodesound, render, mov, destroydelay, isdead;
function Basilisk (iObj) {
super();
linkId = "Basilisk";
initObj = iObj;
mode = "static";
dfeel = 45;
init();
}
function die() {
super.die();
}
function explode() {
if (isexploded) {
return(undefined);
}
isexploded = true;
status = "";
_global.sounds.playSound(explodesound);
render();
mov.gotoAndPlay("explode");
rr.utils.Delegate.callDelayed(this, showBroken, destroydelay);
}
function showBroken() {
mov.gotoAndStop("dead");
mov.base_mc.gotoAndStop("broken");
}
function createMov() {
super.createMov();
if (isdead) {
showBroken();
}
}
}
Symbol 3397 MovieClip [__Packages.rr.enemy.Bunker] Frame 0
class rr.enemy.Bunker extends rr.enemy.GroundUnit
{
var linkId, initObj, mode, dfeel, scale, rot, rotBarrel, status, mov, checkNightMode, isdead, checkRender, x, y, ddetect, tar, getTarget, dtar, validangle, dfire, fire;
function Bunker (iObj) {
super();
linkId = "Bunker";
initObj = iObj;
mode = "static";
dfeel = 30;
init();
}
function init() {
super.init();
scale = initObj.s;
rot = initObj.r;
rotBarrel = rot;
status = "watch";
}
function createMov() {
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId, rr.utils.StringUtils.getUniqueName(), _local3, {_xscale:scale, _yscale:scale, parent:this});
checkNightMode();
}
function update() {
if (isdead) {
checkRender();
return(undefined);
}
if (status == "watch") {
if (_global.train.isInRange(x, y, ddetect)) {
status = "attack";
}
}
if (status == "attack") {
if (!tar) {
getTarget();
}
dtar = rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y);
aimAtTarget();
if (validangle) {
if (dtar <= dfire) {
fire();
}
}
}
checkRender();
}
function aimAtTarget() {
if (!tar) {
getTarget();
}
super.aimAtTarget();
validangle = false;
var _local3 = rr.utils.MathUtils.angDiff(rotBarrel, rot);
if ((_local3 < 30) || ((360 - _local3) < 30)) {
validangle = true;
return(undefined);
}
if (rr.utils.MathUtils.formatAngle2(rotBarrel) > rr.utils.MathUtils.formatAngle2(rot)) {
rotBarrel = rr.utils.MathUtils.formatAngle2(rot + 30);
} else {
rotBarrel = rr.utils.MathUtils.formatAngle2(rot - 30);
}
}
}
Symbol 3398 MovieClip [__Packages.rr.enemy.GatlingSingle] Frame 0
class rr.enemy.GatlingSingle extends rr.enemy.GroundUnit
{
var linkId, initObj, mode, dfeel, init, tfire, lastFired, mov, gunsound, rfire, dtar, rotBarrel, y, x;
function GatlingSingle (iObj) {
super();
linkId = "GatlingSingle";
initObj = iObj;
mode = "static";
dfeel = 28;
init();
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
lastFired = getTimer();
mov.barrel_mc.gotoAndPlay("shoot");
mov.barrel_mc.base_mc.gotoAndPlay("shoot");
_global.sounds.playSound(gunsound);
var _local3 = ((Math.random() < 0.5) ? (dtar - (Math.random() * rfire)) : (dtar + (Math.random() * rfire)));
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:x, y:y, rot:rotBarrel, d:_local3});
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.barrel_mc.base_mc, 0, 80);
}
}
}
Symbol 3399 MovieClip [__Packages.rr.enemy.GatlingDouble] Frame 0
class rr.enemy.GatlingDouble extends rr.enemy.GroundUnit
{
var linkId, initObj, mode, dfeel, init, tfire, lastFired, mov, gunsound, rfire, dtar, rotBarrel, y, x;
function GatlingDouble (iObj) {
super();
linkId = "GatlingDouble";
initObj = iObj;
mode = "static";
dfeel = 28;
init();
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
lastFired = getTimer();
mov.barrel_mc.barrel1_mc.gotoAndPlay("shoot");
mov.barrel_mc.barrel1_mc.base_mc.gotoAndPlay("shoot");
mov.barrel_mc.barrel2_mc.gotoAndPlay("shoot");
mov.barrel_mc.barrel2_mc.base_mc.gotoAndPlay("shoot");
_global.sounds.playSound(gunsound);
var _local3 = ((Math.random() < 0.5) ? (dtar - (Math.random() * rfire)) : (dtar + (Math.random() * rfire)));
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:x, y:y, rot:rotBarrel, d:_local3});
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.barrel_mc.barrel1_mc.base_mc, 0, 80);
rr.utils.ClipUtils.setTint(mov.barrel_mc.barrel2_mc.base_mc, 0, 80);
}
}
}
Symbol 3400 MovieClip [__Packages.rr.enemy.AirField] Frame 0
class rr.enemy.AirField extends rr.enemy.EnemyUnit
{
var linkId, mode, initObj, x, y, rot, planes, activeranges, dfeel, dranges, launchtime, sound, killlevel, destroydelay, explodesound, planesAdded, planecount, damage, actcount, uid, tlaunch, isdead, checkRender, mov, isexploded, render;
function AirField (iObj) {
super();
linkId = "AirField";
mode = "static";
initObj = iObj;
init();
}
function init() {
x = initObj.x;
y = initObj.y;
rot = initObj.r;
planes = rr.utils.StringUtils.scrambleArray(rr.conf.Config.translateEnemyCodes(initObj.e));
trace("planes: " + planes.length);
activeranges = new Array();
super.init();
dfeel = rr.conf.Config.getObjectValue(linkId, "feelerradius");
dranges = rr.conf.Config.getObjectValue(linkId, "detectionRanges");
launchtime = rr.conf.Config.getObjectValue(linkId, "launchtime");
sound = rr.conf.Config.getObjectValue(linkId, "startsound");
killlevel = rr.conf.Config.getObjectValue(linkId, "killlevel");
destroydelay = rr.conf.Config.getObjectValue(linkId, "destroydelay");
explodesound = rr.conf.Config.getObjectValue(linkId, "explodesound");
planesAdded = 0;
planecount = planes.length;
damage = 0;
actcount = 0;
setRanges();
_global.stage.afs.push(uid);
tlaunch = getTimer();
}
function update() {
if (isdead) {
checkRender();
return(undefined);
}
if (actcount != dranges.length) {
var _local5 = dranges.length;
var _local3 = 0;
while (_local3 < _local5) {
var _local4 = dranges[_local3];
if (!_local4.active) {
if (_global.train.isInRange(x, y, _local4.d)) {
_local4.active = true;
actcount++;
activeranges.push(_local3);
}
}
_local3++;
}
}
if (planesAdded < planecount) {
if ((getTimer() - tlaunch) > launchtime) {
addPlane();
}
}
checkRender();
}
function setRanges() {
var _local2 = 0;
while (_local2 < dranges.length) {
dranges[_local2].active = false;
dranges[_local2].planes = new Array();
var _local5 = Math.round((planecount * dranges[_local2].perc) / 100);
var _local4 = 0;
while (_local4 < _local5) {
var _local3 = planes.pop();
if (_local3) {
dranges[_local2].planes.push(_local3);
}
_local4++;
}
_local2++;
}
if (planes.length > 0) {
dranges[dranges.length - 1].planes.concat(planes);
}
}
function createMov() {
super.createMov();
mov.base_mc.gotoAndStop(_global.map.maptype);
}
function addPlane() {
if (isdead) {
return(undefined);
}
tlaunch = getTimer();
var _local3 = getRandomPlane();
if (!_local3) {
return(undefined);
}
trace("addPlane: " + _local3);
_global.sounds.playSound(sound);
rr.enemy.EnemyUtils.createEnemy({linkid:_local3, base:this});
planesAdded++;
}
function getRandomPlane() {
if (activeranges.length <= 0) {
return(undefined);
}
var _local2 = Math.round(Math.random() * (activeranges.length - 1));
var _local3 = dranges[activeranges[_local2]];
var _local4 = _local3.planes.pop();
if (_local3.planes.length == 0) {
activeranges.splice(_local2, 1);
}
return(_local4.toString());
}
function addDamage(dmg) {
if (isdead) {
return(undefined);
}
if (!dmg) {
return(undefined);
}
damage = damage + dmg;
if (damage >= killlevel) {
die();
explode();
}
}
function die() {
if (isdead) {
return(undefined);
}
_global.landshot++;
super.die();
}
function explode() {
if (isexploded) {
return(undefined);
}
isexploded = true;
_global.sounds.playSound(explodesound);
render();
mov.gotoAndPlay("explode");
rr.utils.Delegate.callDelayed(this, destroy, destroydelay);
}
function destroy() {
mov.base_mc.gotoAndStop(_global.map.maptype + "dead");
}
}
Symbol 3401 MovieClip [__Packages.rr.enemy.AirUnit] Frame 0
class rr.enemy.AirUnit extends rr.enemy.EnemyUnit
{
var mode, uid, base, initObj, dfeel, linkId, speedmax, altmax, mincurve, maxcurve, a, dlaunch, ddetect, dfire, tfire, killlevel, destroydelay, gunsound, explodesound, rot, speed, tspeed, alt, damage, lastFired, roll, troll, x, xstart, cos, pi, y, ystart, sin, status, movetar, checkRender, mov, createMov, curve, rolldir, maxroll, minroll, patrolpoint, tar, isdead, isexploded, destroy;
function AirUnit () {
super();
}
function init() {
mode = "dynamic";
super.init();
_global.stage.enemies_dyn.push(uid);
base = initObj.base;
dfeel = rr.conf.Config.getObjectValue(linkId, "feelerradius");
speedmax = rr.conf.Config.getObjectValue(linkId, "maxSpeed");
altmax = rr.conf.Config.getObjectValue(linkId, "altitude");
mincurve = rr.conf.Config.getObjectValue(linkId, "minCurve");
maxcurve = rr.conf.Config.getObjectValue(linkId, "maxCurve");
a = rr.conf.Config.getObjectValue(linkId, "acceleration");
dlaunch = rr.conf.Config.getObjectValue(linkId, "launchDistance");
ddetect = rr.conf.Config.getObjectValue(linkId, "detectionDistance");
dfire = rr.conf.Config.getObjectValue(linkId, "shootingDistance");
tfire = rr.conf.Config.getObjectValue(linkId, "shootingInterval");
killlevel = rr.conf.Config.getObjectValue(linkId, "killlevel");
destroydelay = rr.conf.Config.getObjectValue(linkId, "destroydelay");
gunsound = rr.conf.Config.getObjectValue(linkId, "gunsound");
explodesound = rr.conf.Config.getObjectValue(linkId, "explodesound");
rot = base.rot - 20;
speed = (tspeed = 0);
alt = 0;
damage = 0;
lastFired = getTimer();
roll = (troll = 0);
var _local5 = rr.utils.MathUtils.getAngle(0, 0, -81, -27) + base.rot;
var _local4 = rr.utils.MathUtils.getDistance(0, 0, -81, -27);
x = (xstart = base.x + (cos(((-_local5) * pi) / 180) * _local4));
trace("base.x: " + base.x);
y = (ystart = base.y - (sin(((-_local5) * pi) / 180) * _local4));
}
function update() {
if (speed != tspeed) {
speed = ((Math.abs(speed - tspeed) <= a) ? (tspeed) : (((tspeed > speed) ? (speed + a) : (speed - a))));
}
if (status != "suicide") {
if (alt < altmax) {
alt = alt + 0.5;
}
}
if (status == "launch") {
if (rr.utils.MathUtils.getDistance(x, y, xstart, ystart) > dlaunch) {
status = "approach";
getTargetPoint();
}
} else if (status == "patrol") {
if (rr.utils.MathUtils.getDistance(x, y, movetar.x, movetar.y) < 50) {
getTargetPoint();
}
if (_global.train.isInRange(x, y, ddetect)) {
status = "approach";
getTargetPoint();
}
} else if (status == "approach") {
checkFire();
if (rr.utils.MathUtils.getDistance(x, y, movetar.x, movetar.y) < 50) {
status = "reapproach";
getTargetPoint();
}
} else if (status == "reapproach") {
if (rr.utils.MathUtils.getDistance(x, y, movetar.x, movetar.y) < speed) {
status = "approach";
getTargetPoint();
}
}
rotateToTarget();
x = x + (cos(((-rot) * pi) / 180) * speed);
y = y - (sin(((-rot) * pi) / 180) * speed);
if (roll != troll) {
roll = roll + ((roll < troll) ? 1 : -1);
}
checkRender();
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._xscale = (mov._yscale = 70 + ((30 * alt) / altmax));
var _local3 = new flash.geom.Point(mov._x + alt, mov._y + alt);
mov.globalToLocal(_local3);
mov.shadow_mc._x = _local3.x;
mov.shadow_mc._y = _local3.y;
mov.base_mc.gotoAndStop("r" + roll.toString());
mov.base_mc._rotation = (mov.shadow_mc._rotation = rr.utils.MathUtils.formatAngle2(rot));
}
function launch() {
status = "launch";
getTargetPoint();
tspeed = speedmax;
}
function rotateToTarget() {
var _local5 = rr.utils.MathUtils.getAngle(x, y, movetar.x, movetar.y);
var _local2 = _local5;
var _local3 = (rot + 360) % 360;
_local2 = (_local2 + 360) % 360;
if ((_local2 - _local3) > 180) {
_local2 = _local2 - 360;
} else if ((_local2 - _local3) < -180) {
_local2 = _local2 + 360;
}
if ((_local2 - _local3) > 0) {
rot = rr.utils.MathUtils.formatAngle2(_local3 + curve);
rolldir = 1;
} else {
rot = rr.utils.MathUtils.formatAngle2(_local3 - curve);
if (status != "suicide") {
rolldir = -1;
}
}
var _local4 = rr.utils.MathUtils.angDiff(rot, _local5);
if ((_local4 <= curve) || ((360 - _local4) <= curve)) {
rot = _local5;
if (status != "suicide") {
troll = 0;
}
} else if (status != "suicide") {
var _local6 = ((rolldir < 0) ? (minroll) : (maxroll));
var _local7 = Math.min(Math.abs((100 * _local4) / 180), 100);
troll = Math.round((_local6 * _local7) / 100);
}
}
function getTargetPoint() {
var _local3;
var _local4;
curve = mincurve + (Math.random() * (maxcurve - mincurve));
if (status == "launch") {
_local3 = x + ((cos(((-rot) * pi) / 180) * dlaunch) * 2);
_local4 = y - ((sin(((-rot) * pi) / 180) * dlaunch) * 2);
movetar = {x:_local3, y:_local4};
}
if (status == "patrol") {
patrolpoint = ((!patrolpoint) ? "left" : (((patrolpoint == "left") ? "right" : "left")));
if (patrolpoint == "left") {
_local3 = Math.random() * _global.stage.width;
} else {
_local3 = _global.map.width - (Math.random() * _global.stage.width);
}
_local4 = Math.random() * _global.map.height;
movetar = {x:_local3, y:_local4};
}
if ((status == "approach") || (status == "suicide")) {
tar = (movetar = _global.train.getTargetSegment());
tar.addEventListener("onTrainTargetDie", this);
}
if (status == "reapproach") {
_local3 = x + (cos(((-rot) * pi) / 180) * dlaunch);
_local4 = y - (sin(((-rot) * pi) / 180) * dlaunch);
movetar = {x:_local3, y:_local4};
}
}
function onTrainTargetDie(evtObj) {
if (evtObj.target == tar) {
tar.removeEventListener("onTrainTargetDie", this);
tar = undefined;
status = "patrol";
getTargetPoint();
}
}
function addDamage(dmg) {
if (isdead) {
return(undefined);
}
if (!dmg) {
return(undefined);
}
damage = damage + dmg;
if (damage >= killlevel) {
die();
render();
}
}
function die() {
if (isdead) {
return(undefined);
}
_global.airshot++;
super.die();
}
function explode() {
if (isexploded) {
return(undefined);
}
status = "";
_global.sounds.playSound(explodesound);
isexploded = true;
render();
mov.gotoAndPlay("explode");
rr.utils.Delegate.callDelayed(this, destroy, destroydelay);
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.base_mc, 0, 80);
rr.utils.ClipUtils.setTint(mov.barrel_mc.base_mc, 0, 80);
}
}
function checkFire() {
}
}
Symbol 3402 MovieClip [__Packages.rr.enemy.FockeWolf] Frame 0
class rr.enemy.FockeWolf extends rr.enemy.AirUnit
{
var linkId, initObj, minroll, maxroll, ygunroll1, ygunroll2, launch, isFiring, roll, mov, rot, status, y, x, rolldir, troll, alt, explode, dfire, sin, pi, cos, tfire, lastFired, gunsound, isdead, getTargetPoint;
function FockeWolf (iObj) {
super();
linkId = "FockeWolf";
initObj = iObj;
init();
}
function init() {
super.init();
minroll = -7;
maxroll = 7;
ygunroll1 = [12, 11, 10, 8, 6, 4, 1, 0, 0, 0, 0, 0];
ygunroll2 = [12, 12.5, 13, 13.5, 13.5, 13, 12, 11, 9, 6, 4, 4];
launch();
}
function render() {
super.render();
if (isFiring) {
if (roll >= 0) {
mov.guns_mc.gunleft_mc._y = -ygunroll2[Math.abs(roll)];
mov.guns_mc.gunright_mc._y = ygunroll1[Math.abs(roll)];
} else {
mov.guns_mc.gunleft_mc._y = -ygunroll1[Math.abs(roll)];
mov.guns_mc.gunright_mc._y = ygunroll2[Math.abs(roll)];
}
mov.guns_mc._rotation = rr.utils.MathUtils.formatAngle2(rot);
}
}
function update() {
if (status == "suicide") {
var _local5 = rr.utils.ClipUtils.getFreeDepth(_global.stage, "SmokeTrail");
var _local4 = _global.stage.attachMovie("SmokeTrail", "smoke" + rr.utils.StringUtils.getUniqueName(), _local5, {x:x, y:y});
_local4._x = x - _global.camera.left;
_local4._y = y - _global.camera.top;
_local4._rotation = Math.round(Math.random() * 360);
roll = roll + rolldir;
if (roll > 12) {
roll = -12;
}
if (roll < -12) {
roll = 12;
}
troll = roll;
if (alt > 15) {
alt = alt - 1;
} else {
_global.sounds.stopSound("planecrash.wav");
explode();
}
}
super.update();
}
function checkFire() {
var _local3 = {x:x + (cos(((-rot) * pi) / 180) * dfire), y:y - (sin(((-rot) * pi) / 180) * dfire)};
if (_global.train.isInRange(_local3.x, _local3.y, 100)) {
isFiring = true;
fire();
} else {
isFiring = false;
}
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
mov.guns_mc.gunleft_mc.gotoAndPlay("shoot");
mov.guns_mc.gunright_mc.gotoAndPlay("shoot");
lastFired = getTimer();
_global.sounds.playSound(gunsound);
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:x, y:y, rot:rot + 5, d:dfire, playsound:true});
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:x, y:y, rot:rot - 5, d:dfire});
}
function die() {
if (isdead) {
return(undefined);
}
_global.sounds.playSound("planecrash.wav");
status = "suicide";
super.die();
getTargetPoint();
}
}
Symbol 3403 MovieClip [__Packages.rr.enemy.C47] Frame 0
class rr.enemy.C47 extends rr.enemy.AirUnit
{
var linkId, initObj, minroll, maxroll, launch, x, y, dfire, isFiring, tfire, lastFired, gunsound, cos, pi, sin, rot, isdead, explode;
function C47 (iObj) {
super();
linkId = "C47";
initObj = iObj;
init();
}
function init() {
super.init();
minroll = -7;
maxroll = 7;
launch();
}
function checkFire() {
if (_global.train.isInRange(x, y, dfire)) {
fire();
} else {
isFiring = false;
}
}
function fire() {
isFiring = false;
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
isFiring = true;
lastFired = getTimer();
_global.sounds.playSound(gunsound);
var _local3 = Math.random() * 360;
var _local4 = 20 + (Math.random() * 50);
var _local6 = x + (cos(((-_local3) * pi) / 180) * _local4);
var _local5 = y - (sin(((-_local3) * pi) / 180) * _local4);
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:_local6, y:_local5, rot:rot});
}
function die() {
if (isdead) {
return(undefined);
}
super.die();
explode();
}
}
Symbol 3404 MovieClip [__Packages.rr.enemy.Heli] Frame 0
class rr.enemy.Heli extends rr.enemy.EnemyUnit
{
var mode, uid, base, initObj, dfire, linkId, tfire, dhover, speedmax, altmax, mincurve, maxcurve, a, destroydelay, gunsound, explodesound, rot, speed, tspeed, alt, damage, lastFired, roll, troll, pitch, tpitch, x, xstart, cos, pi, y, ystart, sin, movetar, dtar, tar, dmovetar, status, thover, checkRender, mov, createMov, maxpitch, curve, rolldir, minroll, maxroll, isdead, killlevel, isexploded, destroy;
function Heli () {
super();
}
function init() {
mode = "dynamic";
super.init();
_global.stage.enemies_dyn.push(uid);
base = initObj.base;
dfire = rr.conf.Config.getObjectValue(linkId, "shootingDistance");
tfire = rr.conf.Config.getObjectValue(linkId, "shootingInterval");
dhover = rr.conf.Config.getObjectValue(linkId, "hoverDistance");
speedmax = rr.conf.Config.getObjectValue(linkId, "maxSpeed");
altmax = rr.conf.Config.getObjectValue(linkId, "altitude");
mincurve = rr.conf.Config.getObjectValue(linkId, "minCurve");
maxcurve = rr.conf.Config.getObjectValue(linkId, "maxCurve");
a = rr.conf.Config.getObjectValue(linkId, "acceleration");
destroydelay = rr.conf.Config.getObjectValue(linkId, "destroydelay");
gunsound = rr.conf.Config.getObjectValue(linkId, "gunsound");
explodesound = rr.conf.Config.getObjectValue(linkId, "explodesound");
rot = base.rot - 20;
speed = (tspeed = 0);
alt = 0;
damage = 0;
lastFired = getTimer();
roll = (troll = 0);
pitch = (tpitch = 0);
var _local5 = rr.utils.MathUtils.getAngle(0, 0, -81, -27) + base.rot;
var _local4 = rr.utils.MathUtils.getDistance(0, 0, -81, -27);
x = (xstart = base.x + (cos(((-_local5) * pi) / 180) * _local4));
y = (ystart = base.y - (sin(((-_local5) * pi) / 180) * _local4));
lastFired = getTimer();
launch();
}
function update() {
tspeed = speedmax * Math.min(rr.utils.MathUtils.getDistance(x, y, movetar.x, movetar.y) / 100, 1);
if (speed != tspeed) {
speed = ((Math.abs(speed - tspeed) <= a) ? (tspeed) : (((tspeed > speed) ? (speed + a) : (speed - a))));
}
if (alt < altmax) {
alt = alt + 0.5;
}
dtar = rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y);
dmovetar = rr.utils.MathUtils.getDistance(x, y, movetar.x, movetar.y);
rotateToTarget();
if (status == "approach") {
var _local2 = rr.utils.MathUtils.formatAngle2(rr.utils.MathUtils.getAngle(x, y, movetar.x, movetar.y));
x = x + (cos(((-_local2) * pi) / 180) * speed);
y = y - (sin(((-_local2) * pi) / 180) * speed);
if (movetar == tar) {
if (dtar < dhover) {
getMoveTarget();
}
}
if (dmovetar <= 100) {
if ((dtar <= dhover) && (dtar > (dhover / 2))) {
status = "hover";
movetar = tar;
thover = getTimer();
} else {
getMoveTarget();
}
}
}
if (status == "hover") {
if ((getTimer() - thover) > 4000) {
if (dtar > dhover) {
getMoveTarget();
} else {
thover = getTimer();
}
}
}
if (dtar <= dfire) {
fire();
}
if (roll != troll) {
roll = roll + ((roll < troll) ? 1 : -1);
}
if (pitch != tpitch) {
pitch = pitch + ((pitch < tpitch) ? 1 : -1);
}
checkRender();
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._xscale = (mov._yscale = 70 + ((30 * alt) / altmax));
var _local3 = new flash.geom.Point(mov._x + alt, mov._y + alt);
mov.globalToLocal(_local3);
mov.shadow_mc._x = _local3.x;
mov.shadow_mc._y = _local3.y;
var _local4 = ((pitch > (maxpitch / 2)) ? "roll" : "pitch");
if (_local4 == "roll") {
mov.base_mc.mc.gotoAndStop("r" + roll.toString());
} else {
mov.base_mc.mc.gotoAndStop("s" + pitch.toString());
}
mov.base_mc._rotation = (mov.shadow_mc._rotation = rr.utils.MathUtils.formatAngle2(rot));
}
function launch() {
status = "approach";
getTarget();
tspeed = speedmax;
}
function getTarget() {
tar = _global.train.getTargetSegment();
tar.addEventListener("onTrainTargetDie", this);
getMoveTarget();
}
function getMoveTarget() {
if (!tar) {
return(undefined);
}
if (dtar > (dhover * 2)) {
movetar = tar;
} else {
var _local2 = Math.random() * 360;
movetar = {x:tar.x + (cos(((-_local2) * pi) / 180) * (dhover - 20)), y:tar.y - (sin(((-_local2) * pi) / 180) * (dhover - 20))};
}
status = "approach";
}
function onTrainTargetDie(evtObj) {
if (evtObj.target == tar) {
tar.removeEventListener("onTrainTargetDie", this);
getTarget();
}
}
function rotateToTarget() {
curve = mincurve + ((maxcurve - mincurve) * (1 - Math.min(dmovetar / 150, 1)));
var _local5 = rr.utils.MathUtils.getAngle(x, y, movetar.x, movetar.y);
var _local2 = _local5;
var _local3 = (rot + 360) % 360;
_local2 = (_local2 + 360) % 360;
if ((_local2 - _local3) > 180) {
_local2 = _local2 - 360;
} else if ((_local2 - _local3) < -180) {
_local2 = _local2 + 360;
}
if ((_local2 - _local3) > 0) {
rot = rr.utils.MathUtils.formatAngle2(_local3 + curve);
rolldir = 1;
} else {
rot = rr.utils.MathUtils.formatAngle2(_local3 - curve);
rolldir = -1;
}
var _local4 = rr.utils.MathUtils.angDiff(rot, _local5);
if ((_local4 <= (curve + 1)) || ((360 - _local4) <= (curve + 1))) {
rot = _local5;
troll = 0;
} else {
var _local6 = ((rolldir < 0) ? (maxroll) : (minroll));
var _local7 = Math.min(Math.abs((100 * _local4) / 180), 100);
troll = Math.round((_local6 * _local7) / 100);
}
tpitch = Math.min(Math.round((maxpitch * speed) / speedmax), maxpitch);
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
lastFired = getTimer();
_global.sounds.playSound(gunsound);
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:x, y:y, rot:rot, tar:tar});
}
function addDamage(dmg) {
if (isdead) {
return(undefined);
}
if (!dmg) {
return(undefined);
}
damage = damage + dmg;
if (damage >= killlevel) {
die();
render();
}
}
function die() {
if (isdead) {
return(undefined);
}
_global.airshot++;
super.die();
explode();
}
function explode() {
if (isexploded) {
return(undefined);
}
status = "";
_global.sounds.playSound(explodesound);
isexploded = true;
render();
mov.gotoAndPlay("explode");
rr.utils.Delegate.callDelayed(this, destroy, destroydelay);
}
}
Symbol 3405 MovieClip [__Packages.rr.enemy.BellHuey] Frame 0
class rr.enemy.BellHuey extends rr.enemy.Heli
{
var linkId, initObj, minroll, maxroll, maxpitch, dfeel, init;
function BellHuey (iObj) {
super();
linkId = "BellHuey";
initObj = iObj;
minroll = -9;
maxroll = 9;
maxpitch = 10;
dfeel = 21;
init();
}
}
Symbol 3406 MovieClip [__Packages.rr.ammo.AmmoLargeCannon] Frame 0
class rr.ammo.AmmoLargeCannon extends rr.ammo.AmmoPlayerDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoLargeCannon (iObj) {
super();
linkId = "AmmoLargeCannon";
parentLinkId = "LargeCannon";
initObj = iObj;
init();
}
}
Symbol 3407 MovieClip [__Packages.rr.ammo.AmmoHugeCannon] Frame 0
class rr.ammo.AmmoHugeCannon extends rr.ammo.AmmoPlayerDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoHugeCannon (iObj) {
super();
linkId = "AmmoHugeCannon";
parentLinkId = "HugeCannon";
initObj = iObj;
init();
}
}
Symbol 3408 MovieClip [__Packages.rr.ammo.AmmoBunkerBuster] Frame 0
class rr.ammo.AmmoBunkerBuster extends rr.ammo.AmmoPlayerDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoBunkerBuster (iObj) {
super();
linkId = "AmmoBunkerBuster";
parentLinkId = "BunkerBuster";
initObj = iObj;
init();
}
}
Symbol 3409 MovieClip [__Packages.rr.ammo.AmmoRailRockets] Frame 0
class rr.ammo.AmmoRailRockets extends rr.ammo.Ammo
{
var linkId, parentLinkId, initObj, dfeel, dir, x, y, minrange, maxrange, speedmax, mincurve, maxcurve, a, startsound, loopsoundid, explodesound, damage, rexplode, cellId, d, speed, tspeed, loopsound, mov, createMov, rot, cos, pi, sin, exploded, range, clearMov, curve, events, destroy;
function AmmoRailRockets (iObj) {
super();
linkId = "AmmoRailRockets";
parentLinkId = "RailRockets";
initObj = iObj;
dfeel = 5;
init();
}
function init() {
dir = initObj.dir;
x = initObj.x;
y = initObj.y;
super.init();
minrange = rr.conf.Config.getObjectValue(parentLinkId, "ammominrange");
maxrange = rr.conf.Config.getObjectValue(parentLinkId, "ammomaxrange");
speedmax = rr.conf.Config.getObjectValue(parentLinkId, "ammomaxSpeed");
mincurve = rr.conf.Config.getObjectValue(parentLinkId, "ammominCurve");
maxcurve = rr.conf.Config.getObjectValue(parentLinkId, "ammomaxCurve");
a = rr.conf.Config.getObjectValue(parentLinkId, "ammoacceleration");
startsound = rr.conf.Config.getObjectValue(parentLinkId, "ammostartsound");
loopsoundid = rr.conf.Config.getObjectValue(parentLinkId, "ammosound");
explodesound = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplodesound");
damage = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplosiondamage");
rexplode = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplosionradius");
cellId = _global.map.getCellByPos(x, y).id;
d = (speed = (tspeed = 0));
loopsound = _global.sounds.addLoopSound(this);
launch();
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._rotation = rr.utils.MathUtils.formatAngle2(rot);
}
function update() {
if (speed != tspeed) {
speed = ((Math.abs(speed - tspeed) <= a) ? (tspeed) : (((tspeed > speed) ? (speed + a) : (speed - a))));
}
rotate();
var _local9 = x;
var _local8 = y;
x = x + (cos(((-rot) * pi) / 180) * speed);
y = y - (sin(((-rot) * pi) / 180) * speed);
d = d + rr.utils.MathUtils.getDistance(x, y, _local9, _local8);
if (exploded) {
render();
return(undefined);
}
var _local6 = _global.map["cell_" + cellId];
if (((x < _local6.left) || (x >= _local6.right)) || ((y < _local6.top) | (y >= _local6.bottom))) {
_local6 = _global.map.getCellByPos(x, y);
cellId = _local6.id;
}
var _local7 = _local6.enemies.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = _global.stage["enemy_" + _local6.enemies[_local4]];
if (_local3.isdead) {
} else if (rr.utils.MathUtils.getDistance(x, y, _local3.x, _local3.y) < (_local3.dfeel + dfeel)) {
_local3.render();
var _local5 = false;
if (_local3.mov.hitTest(x - _global.camera.left, y - _global.camera.top, true)) {
_local5 = true;
}
if (_local5) {
explode();
break;
}
}
_local4++;
}
if (d > range) {
explode();
}
checkRender();
}
function checkRender() {
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
if (!exploded) {
if ((!loopsound.isplaying) || (loopsound.vol < 100)) {
_global.sounds.playLoopSound(this);
}
}
render();
} else if (mov) {
_global.sounds.stopLoopSound(this);
clearMov();
}
}
function launch() {
_global.sounds.playSound(startsound);
curve = mincurve + (Math.random() * (maxcurve - mincurve));
range = minrange + (Math.random() * (maxrange - minrange));
tspeed = speedmax;
}
function rotate() {
if (dir == "right") {
rot = rr.utils.MathUtils.formatAngle2(rot + curve);
} else {
rot = rr.utils.MathUtils.formatAngle2(rot - curve);
}
}
function explode() {
if (exploded) {
return(undefined);
}
exploded = true;
speed = speed / 10;
tspeed = 0;
_global.sounds.playSound(explodesound);
events.dispatchEvent({type:"onRemoveLoopSound", target:this});
var _local5 = _global.map["cell_" + cellId];
var _local6 = _local5.enemies.length;
var _local4 = 0;
while (_local4 < _local6) {
var _local3 = _global.stage["enemy_" + _local5.enemies[_local4]];
if (_local3.isdead) {
} else if (rr.utils.MathUtils.getDistance(x, y, _local3.x, _local3.y) < rexplode) {
_local3.addDamage(damage);
}
_local4++;
}
render();
mov.gotoAndPlay("explode");
var _local7 = rr.conf.Config.getObjectValue(parentLinkId, "ammoduration");
rr.utils.Delegate.callDelayed(this, destroy, _local7);
}
}
Symbol 3410 MovieClip [__Packages.rr.ammo.AmmoSmallFastCannon] Frame 0
class rr.ammo.AmmoSmallFastCannon extends rr.ammo.AmmoBullet
{
var linkId, parentLinkId, initObj, dfeel, init;
function AmmoSmallFastCannon (iObj) {
super();
linkId = "AmmoSmallFastCannon";
parentLinkId = "SmallFastCannon";
initObj = iObj;
dfeel = 3.5;
init();
}
}
Symbol 3411 MovieClip [__Packages.rr.ammo.Heatseeker] Frame 0
class rr.ammo.Heatseeker extends rr.ammo.Ammo
{
var linkId, initObj, x, y, range, speedmax, mincurve, maxcurve, a, ddetect, startsound, loopsoundid, explodesound, damage, rexplode, d, speed, tspeed, loopsound, mov, createMov, rot, status, etar, tar, isexploded, cos, pi, sin, clearMov, curve, events, destroy;
function Heatseeker (iObj) {
super();
linkId = "Heatseeker";
initObj = iObj;
init();
}
function init() {
x = initObj.x;
y = initObj.y;
super.init();
range = rr.conf.Config.getObjectValue(linkId, "range");
speedmax = rr.conf.Config.getObjectValue(linkId, "maxSpeed");
mincurve = rr.conf.Config.getObjectValue(linkId, "minCurve");
maxcurve = rr.conf.Config.getObjectValue(linkId, "maxCurve");
a = rr.conf.Config.getObjectValue(linkId, "acceleration");
ddetect = rr.conf.Config.getObjectValue(linkId, "detectionDistance");
startsound = rr.conf.Config.getObjectValue(linkId, "startsound");
loopsoundid = rr.conf.Config.getObjectValue(linkId, "sound");
explodesound = rr.conf.Config.getObjectValue(linkId, "explodesound");
damage = rr.conf.Config.getObjectValue(linkId, "explosiondamage");
rexplode = rr.conf.Config.getObjectValue(linkId, "explosionradius");
d = (speed = (tspeed = 0));
loopsound = _global.sounds.addLoopSound(this);
launch();
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._rotation = rr.utils.MathUtils.formatAngle2(rot);
}
function update() {
if (speed != tspeed) {
speed = ((Math.abs(speed - tspeed) <= a) ? (tspeed) : (((tspeed > speed) ? (speed + a) : (speed - a))));
}
if (status == "launch") {
if (d > 50) {
status = "approach";
getEnemyTarget();
}
} else if (status == "approach") {
if (etar) {
if (rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y) < (speed * 2)) {
explode();
}
} else {
getEnemyTarget();
}
}
if (!isexploded) {
rotateToTarget();
}
var _local3 = x;
var _local2 = y;
x = x + (cos(((-rot) * pi) / 180) * speed);
y = y - (sin(((-rot) * pi) / 180) * speed);
d = d + rr.utils.MathUtils.getDistance(x, y, _local3, _local2);
if (status != "exploded") {
if (d > range) {
explode();
}
checkRender();
} else {
render();
}
}
function checkRender() {
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
if (!isexploded) {
if ((!loopsound.isplaying) || (loopsound.vol < 100)) {
_global.sounds.playLoopSound(this);
}
}
render();
} else if (mov) {
_global.sounds.stopLoopSound(this);
clearMov();
}
}
function launch() {
status = "launch";
_global.sounds.playSound(startsound);
curve = mincurve + (Math.random() * (maxcurve - mincurve));
tar = {x:x + (cos(((-rot) * pi) / 180) * 3000), y:y - (sin(((-rot) * pi) / 180) * 3000)};
tspeed = speedmax;
}
function rotateToTarget() {
var _local4 = rr.utils.MathUtils.getAngle(x, y, tar.x, tar.y);
var _local2 = _local4;
var _local3 = (rot + 360) % 360;
_local2 = (_local2 + 360) % 360;
if ((_local2 - _local3) > 180) {
_local2 = _local2 - 360;
} else if ((_local2 - _local3) < -180) {
_local2 = _local2 + 360;
}
if ((_local2 - _local3) > 0) {
rot = rr.utils.MathUtils.formatAngle2(_local3 + curve);
} else {
rot = rr.utils.MathUtils.formatAngle2(_local3 - curve);
}
var _local5 = rr.utils.MathUtils.angDiff(rot, _local4);
if ((_local5 <= curve) || ((360 - _local5) <= curve)) {
rot = _local4;
}
}
function getEnemyTarget() {
status = "approach";
var _local5 = _global.stage.enemies_dyn.length;
var _local4 = 0;
while (_local4 < _local5) {
var _local3 = _global.stage["enemy_" + _global.stage.enemies_dyn[_local4]];
if (!_local3.isdead) {
if (rr.utils.MathUtils.getDistance(x, y, _local3.x, _local3.y) <= ddetect) {
etar = _local3;
break;
}
}
_local4++;
}
if (etar) {
curve = mincurve + (Math.random() * (maxcurve - mincurve));
tar = etar;
}
}
function explode() {
if (isexploded) {
return(undefined);
}
isexploded = true;
speed = speed / 10;
tspeed = 0;
_global.sounds.playSound(explodesound);
events.dispatchEvent({type:"onRemoveLoopSound", target:this});
if (etar) {
var _local4 = rr.utils.MathUtils.getDistance(x, y, etar.x, etar.y);
if (_local4 < rexplode) {
etar.addDamage(damage);
}
}
render();
mov.gotoAndPlay("explode");
var _local3 = rr.conf.Config.getObjectValue(linkId, "ammoduration");
rr.utils.Delegate.callDelayed(this, destroy, _local3);
}
}
Symbol 3412 MovieClip [__Packages.rr.ammo.AmmoDefault] Frame 0
class rr.ammo.AmmoDefault extends rr.ammo.Ammo
{
var d, initObj, x, cos, pi, rot, y, sin, damage, parentLinkId, rexplode, created, createMov, destroy;
function AmmoDefault () {
super();
}
function init() {
super.init();
d = initObj.d;
x = initObj.x + (cos(((-rot) * pi) / 180) * d);
y = initObj.y - (sin(((-rot) * pi) / 180) * d);
damage = rr.conf.Config.getObjectValue(parentLinkId, "ammodamage");
rexplode = rr.conf.Config.getObjectValue(parentLinkId, "explosionradius");
var _local3 = (40 * d) / rr.conf.Config.getObjectValue(parentLinkId, "ammospeed");
rr.utils.Delegate.callDelayed(this, createDelayed, _local3);
}
function update() {
if (!created) {
return(undefined);
}
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
super.render();
}
}
function createDelayed() {
created = true;
_global.sounds.playSound(rr.conf.Config.getObjectValue(parentLinkId, "ammosound"));
checkHit();
createMov();
var _local3 = rr.conf.Config.getObjectValue(parentLinkId, "ammoduration");
rr.utils.Delegate.callDelayed(this, destroy, _local3);
}
function checkHit() {
var _local7 = _global.train.segments.length;
var _local5 = 0;
while (_local5 < _local7) {
var _local4 = _global.train.segments[_local5];
checkObjectHit(_local4);
var _local6 = _local4.weapons.length;
var _local3 = 0;
while (_local3 < _local6) {
checkObjectHit(_local4.weapons[_local3]);
_local3++;
}
_local5++;
}
}
function checkObjectHit(obj) {
var _local4 = rr.utils.MathUtils.getDistance(obj.x, obj.y, x, y);
if (_local4 <= obj.dfeel) {
obj.render();
if (obj.mov.base_mc.hitTest(x - _global.camera.left, y - _global.camera.top, true)) {
obj.addDamage(damage);
return(undefined);
}
}
if (rexplode) {
if (_local4 < rexplode) {
obj.addDamage(Math.round(damage / (1 + (_local4 / 25))));
}
}
}
}
Symbol 3413 MovieClip [__Packages.rr.ammo.AmmoPotTank] Frame 0
class rr.ammo.AmmoPotTank extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoPotTank (iObj) {
super();
linkId = "AmmoPotTank";
parentLinkId = "PotTank";
initObj = iObj;
init();
}
}
Symbol 3414 MovieClip [__Packages.rr.ammo.AmmoOldJeep] Frame 0
class rr.ammo.AmmoOldJeep extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoOldJeep (iObj) {
super();
linkId = "AmmoOldJeep";
parentLinkId = "OldJeep";
initObj = iObj;
init();
}
}
Symbol 3415 MovieClip [__Packages.rr.ammo.AmmoGunTruck] Frame 0
class rr.ammo.AmmoGunTruck extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoGunTruck (iObj) {
super();
linkId = "AmmoGunTruck";
parentLinkId = "GunTruck";
initObj = iObj;
init();
}
}
Symbol 3416 MovieClip [__Packages.rr.ammo.AmmoArmoredJeep] Frame 0
class rr.ammo.AmmoArmoredJeep extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoArmoredJeep (iObj) {
super();
linkId = "AmmoArmoredJeep";
parentLinkId = "ArmoredJeep";
initObj = iObj;
init();
}
}
Symbol 3417 MovieClip [__Packages.rr.ammo.AmmoBasilisk] Frame 0
class rr.ammo.AmmoBasilisk extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoBasilisk (iObj) {
super();
linkId = "AmmoBasilisk";
parentLinkId = "Basilisk";
initObj = iObj;
init();
}
}
Symbol 3418 MovieClip [__Packages.rr.ammo.AmmoBunker] Frame 0
class rr.ammo.AmmoBunker extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoBunker (iObj) {
super();
linkId = "AmmoBunker";
parentLinkId = "Bunker";
initObj = iObj;
init();
}
}
Symbol 3419 MovieClip [__Packages.rr.ammo.AmmoGatlingSingle] Frame 0
class rr.ammo.AmmoGatlingSingle extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoGatlingSingle (iObj) {
super();
linkId = "AmmoGatlingSingle";
parentLinkId = "GatlingSingle";
initObj = iObj;
init();
}
}
Symbol 3420 MovieClip [__Packages.rr.ammo.AmmoGatlingDouble] Frame 0
class rr.ammo.AmmoGatlingDouble extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoGatlingDouble (iObj) {
super();
linkId = "AmmoGatlingDouble";
parentLinkId = "GatlingDouble";
initObj = iObj;
init();
}
}
Symbol 3421 MovieClip [__Packages.rr.ammo.AmmoAbrahams] Frame 0
class rr.ammo.AmmoAbrahams extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoAbrahams (iObj) {
super();
linkId = "AmmoAbrahams";
parentLinkId = "Abrahams";
initObj = iObj;
init();
}
}
Symbol 3422 MovieClip [__Packages.rr.ammo.AmmoElephant] Frame 0
class rr.ammo.AmmoElephant extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoElephant (iObj) {
super();
linkId = "AmmoElephant";
parentLinkId = "Elephant";
initObj = iObj;
init();
}
}
Symbol 3423 MovieClip [__Packages.rr.ammo.AmmoPanther] Frame 0
class rr.ammo.AmmoPanther extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init;
function AmmoPanther (iObj) {
super();
linkId = "AmmoPanther";
parentLinkId = "Panther";
initObj = iObj;
init();
}
}
Symbol 3424 MovieClip [__Packages.rr.ammo.AmmoRocketeer] Frame 0
class rr.ammo.AmmoRocketeer extends rr.ammo.Ammo
{
var linkId, parentLinkId, initObj, x, y, tar, range, speedmax, mincurve, maxcurve, a, startsound, loopsoundid, explodesound, damage, rexplode, d, speed, tspeed, loopsound, mov, createMov, rot, isexploded, cos, pi, sin, status, clearMov, curve, events, destroy;
function AmmoRocketeer (iObj) {
super();
linkId = "AmmoRocketeer";
parentLinkId = "Rocketeer";
initObj = iObj;
init();
}
function init() {
x = initObj.x;
y = initObj.y;
tar = _global.train.getTargetSegment();
super.init();
range = rr.conf.Config.getObjectValue(parentLinkId, "ammorange");
speedmax = rr.conf.Config.getObjectValue(parentLinkId, "ammomaxSpeed");
mincurve = rr.conf.Config.getObjectValue(parentLinkId, "ammominCurve");
maxcurve = rr.conf.Config.getObjectValue(parentLinkId, "ammomaxCurve");
a = rr.conf.Config.getObjectValue(parentLinkId, "ammoacceleration");
startsound = rr.conf.Config.getObjectValue(parentLinkId, "ammostartsound");
loopsoundid = rr.conf.Config.getObjectValue(parentLinkId, "ammosound");
explodesound = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplodesound");
damage = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplosiondamage");
rexplode = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplosionradius");
d = (speed = (tspeed = 0));
loopsound = _global.sounds.addLoopSound(this);
launch();
}
function render() {
if (!mov) {
createMov();
checkNightMode();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._rotation = rr.utils.MathUtils.formatAngle2(rot);
}
function update() {
if (speed != tspeed) {
speed = ((Math.abs(speed - tspeed) <= a) ? (tspeed) : (((tspeed > speed) ? (speed + a) : (speed - a))));
}
if (tar) {
if (rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y) < (speed * 2)) {
explode();
}
}
if (!isexploded) {
if (d > 100) {
rotateToTarget();
}
}
var _local3 = x;
var _local2 = y;
x = x + (cos(((-rot) * pi) / 180) * speed);
y = y - (sin(((-rot) * pi) / 180) * speed);
d = d + rr.utils.MathUtils.getDistance(x, y, _local3, _local2);
if (status != "exploded") {
if (d > range) {
explode();
}
checkRender();
} else {
render();
}
}
function checkRender() {
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
if (!isexploded) {
if ((!loopsound.isplaying) || (loopsound.vol < 100)) {
_global.sounds.playLoopSound(this);
}
}
render();
} else if (mov) {
_global.sounds.stopLoopSound(this);
clearMov();
}
}
function launch() {
_global.sounds.playSound(startsound);
curve = mincurve + (Math.random() * (maxcurve - mincurve));
tspeed = speedmax;
}
function rotateToTarget() {
var _local4 = rr.utils.MathUtils.getAngle(x, y, tar.x, tar.y);
var _local2 = _local4;
var _local3 = (rot + 360) % 360;
_local2 = (_local2 + 360) % 360;
if ((_local2 - _local3) > 180) {
_local2 = _local2 - 360;
} else if ((_local2 - _local3) < -180) {
_local2 = _local2 + 360;
}
if ((_local2 - _local3) > 0) {
rot = rr.utils.MathUtils.formatAngle2(_local3 + curve);
} else {
rot = rr.utils.MathUtils.formatAngle2(_local3 - curve);
}
var _local5 = rr.utils.MathUtils.angDiff(rot, _local4);
if ((_local5 <= curve) || ((360 - _local5) <= curve)) {
rot = _local4;
}
}
function explode() {
if (isexploded) {
return(undefined);
}
isexploded = true;
speed = speed / 10;
tspeed = 0;
_global.sounds.playSound(explodesound);
events.dispatchEvent({type:"onRemoveLoopSound", target:this});
if (tar) {
var _local4 = rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y);
if (_local4 < rexplode) {
tar.addDamage(damage);
}
}
render();
mov.gotoAndPlay("explode");
var _local3 = rr.conf.Config.getObjectValue(parentLinkId, "ammoduration");
rr.utils.Delegate.callDelayed(this, destroy, _local3);
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.base_mc, 0, 80);
}
}
}
Symbol 3425 MovieClip [__Packages.rr.ammo.AmmoFockeWolf] Frame 0
class rr.ammo.AmmoFockeWolf extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, created, mov, movCol, render, x, y;
function AmmoFockeWolf (iObj) {
super();
linkId = "AmmoFockeWolf";
parentLinkId = "FockeWolf";
initObj = iObj;
init();
}
function init() {
super.init();
}
function createMov() {
created = true;
var _local5 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
var _local4 = ((Math.random() < 0.5) ? (linkId + "1") : (linkId + "2"));
mov = _global.stage.attachMovie(_local4, rr.utils.StringUtils.getUniqueName(), _local5, {parent:this});
var _local3 = new Color(mov);
_local3.setRGB(movCol);
render();
}
function checkHit() {
super.checkHit();
movCol = _global.stage.bg_bmp.getPixel(x - _global.camera.left, y - _global.camera.top);
var _local4 = rr.utils.ColorConversion.hex32toargb(movCol);
var _local5 = rr.utils.ColorConversion.rgbtohsb(_local4.red, _local4.green, _local4.blue);
if (_global.map.maptype == "desert") {
_local4 = rr.utils.ColorConversion.hsbtorgb(_local5.hue, _local5.saturation, _local5.brightness * (0.3 + (Math.random() / 3)));
} else {
_local4 = rr.utils.ColorConversion.hsbtorgb(_local5.hue, _local5.saturation, _local5.brightness * (1.3 + (Math.random() / 3)));
}
movCol = rr.utils.ColorConversion.argbtohex32(_local4.red, _local4.green, _local4.blue, 100);
}
}
Symbol 3426 MovieClip [__Packages.rr.utils.ColorConversion] Frame 0
class rr.utils.ColorConversion
{
function ColorConversion () {
}
static function hsbtorgb(hue, saturation, brightness) {
var _local9;
var _local11;
var _local10;
hue = hue % 360;
if (brightness == 0) {
return({red:0, green:0, blue:0});
}
saturation = saturation / 100;
brightness = brightness / 100;
hue = hue / 60;
var _local7 = Math.floor(hue);
var _local8 = hue - _local7;
var _local2 = brightness * (1 - saturation);
var _local4 = brightness * (1 - (saturation * _local8));
var _local3 = brightness * (1 - (saturation * (1 - _local8)));
switch (_local7) {
case 0 :
_local9 = brightness;
_local11 = _local3;
_local10 = _local2;
break;
case 1 :
_local9 = _local4;
_local11 = brightness;
_local10 = _local2;
break;
case 2 :
_local9 = _local2;
_local11 = brightness;
_local10 = _local3;
break;
case 3 :
_local9 = _local2;
_local11 = _local4;
_local10 = brightness;
break;
case 4 :
_local9 = _local3;
_local11 = _local2;
_local10 = brightness;
break;
case 5 :
_local9 = brightness;
_local11 = _local2;
_local10 = _local4;
}
_local9 = Math.round(_local9 * 255);
_local11 = Math.round(_local11 * 255);
_local10 = Math.round(_local10 * 255);
return({red:_local9, green:_local11, blue:_local10});
}
static function rgbtohsb(red, green, blue) {
var _local5 = Math.min(Math.min(red, green), blue);
var _local7 = Math.max(Math.max(red, green), blue);
var _local1 = _local7 - _local5;
var _local8 = ((_local7 == 0) ? 0 : (_local1 / _local7));
var _local6;
if (_local8 == 0) {
_local6 = 0;
} else {
if (red == _local7) {
_local6 = (60 * (green - blue)) / _local1;
} else if (green == _local7) {
_local6 = 120 + ((60 * (blue - red)) / _local1);
} else {
_local6 = 240 + ((60 * (red - green)) / _local1);
}
if (_local6 < 0) {
_local6 = _local6 + 360;
}
}
_local8 = _local8 * 100;
_local7 = (_local7 / 255) * 100;
return({hue:_local6, saturation:_local8, brightness:_local7});
}
static function rgbtohex24(red, green, blue) {
return(((red << 16) | (green << 8)) | blue);
}
static function hex24torgb(color) {
var _local2 = (color >> 16) & 255;
var _local4 = (color >> 8) & 255;
var _local1 = color & 255;
return({red:_local2, green:_local4, blue:_local1});
}
static function argbtohex32(red, green, blue, alpha) {
return((((alpha << 24) | (red << 16)) | (green << 8)) | blue);
}
static function hex32toargb(color) {
var _local3 = (color >> 24) & 255;
var _local4 = (color >> 16) & 255;
var _local5 = (color >> 8) & 255;
var _local2 = color & 255;
return({alpha:_local3, red:_local4, green:_local5, blue:_local2});
}
static function hex24tohsb(color) {
var _local1 = hex24torgb(color);
return(rgbtohsb(_local1.red, _local1.green, _local1.blue));
}
static function hsbtohex24(hue, saturation, brightness) {
var _local1 = hsbtorgb(hue, saturation, brightness);
return(rgbtohex24(_local1.red, _local1.green, _local1.blue));
}
static function toHexadecimalString(val) {
return("0x" + val.toString(16).toUpperCase());
}
}
Symbol 3427 MovieClip [__Packages.rr.ammo.AmmoB2] Frame 0
class rr.ammo.AmmoB2 extends rr.ammo.Ammo
{
var linkId, parentLinkId, initObj, x, y, damage, rexplode, created;
function AmmoB2 (iObj) {
super();
linkId = "AmmoB2";
parentLinkId = "B2";
initObj = iObj;
init();
}
function init() {
super.init();
x = initObj.x;
y = initObj.y;
damage = rr.conf.Config.getObjectValue(parentLinkId, "ammodamage");
rexplode = rr.conf.Config.getObjectValue(parentLinkId, "explosionradius");
checkHit();
var _local3 = rr.conf.Config.getObjectValue(parentLinkId, "ammodelay");
rr.utils.Delegate.callDelayed(this, createMov, _local3);
}
function update() {
if (!created) {
return(undefined);
}
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
super.render();
}
}
function createMov() {
created = true;
_global.sounds.playSound(rr.conf.Config.getObjectValue(parentLinkId, "ammosound"));
super.createMov();
}
function checkHit() {
var _local7 = _global.train.segments.length;
var _local5 = 0;
while (_local5 < _local7) {
var _local4 = _global.train.segments[_local5];
checkObjectHit(_local4);
var _local6 = _local4.weapons.length;
var _local3 = 0;
while (_local3 < _local6) {
checkObjectHit(_local4.weapons[_local3]);
_local3++;
}
_local5++;
}
}
function checkObjectHit(obj) {
var _local4 = rr.utils.MathUtils.getDistance(obj.x, obj.y, x, y);
if (_local4 <= obj.dfeel) {
obj.render();
if (obj.mov.hitTest(x - _global.camera.left, y - _global.camera.top, true)) {
obj.addDamage(damage);
return(undefined);
}
}
if (_local4 < rexplode) {
obj.addDamage(Math.round(damage / (1 + (_local4 / 25))));
}
}
}
Symbol 3428 MovieClip [__Packages.rr.ammo.AmmoC47] Frame 0
class rr.ammo.AmmoC47 extends rr.ammo.Ammo
{
var linkId, parentLinkId, initObj, x, y, damage, rexplode, created;
function AmmoC47 (iObj) {
super();
linkId = "AmmoC47";
parentLinkId = "C47";
initObj = iObj;
init();
}
function init() {
super.init();
x = initObj.x;
y = initObj.y;
damage = rr.conf.Config.getObjectValue(parentLinkId, "ammodamage");
rexplode = rr.conf.Config.getObjectValue(parentLinkId, "explosionradius");
checkHit();
var _local3 = rr.conf.Config.getObjectValue(parentLinkId, "ammodelay");
rr.utils.Delegate.callDelayed(this, createMov, _local3);
}
function update() {
if (!created) {
return(undefined);
}
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
super.render();
}
}
function createMov() {
created = true;
_global.sounds.playSound(rr.conf.Config.getObjectValue(parentLinkId, "ammosound"));
super.createMov();
}
function checkHit() {
var _local7 = _global.train.segments.length;
var _local5 = 0;
while (_local5 < _local7) {
var _local4 = _global.train.segments[_local5];
checkObjectHit(_local4);
var _local6 = _local4.weapons.length;
var _local3 = 0;
while (_local3 < _local6) {
checkObjectHit(_local4.weapons[_local3]);
_local3++;
}
_local5++;
}
}
function checkObjectHit(obj) {
var _local4 = rr.utils.MathUtils.getDistance(obj.x, obj.y, x, y);
if (_local4 <= obj.dfeel) {
obj.render();
if (obj.mov.hitTest(x - _global.camera.left, y - _global.camera.top, true)) {
obj.addDamage(damage);
return(undefined);
}
}
if (_local4 < rexplode) {
obj.addDamage(Math.round(damage / (1 + (_local4 / 25))));
}
}
}
Symbol 3429 MovieClip [__Packages.rr.ammo.AmmoWartHog] Frame 0
class rr.ammo.AmmoWartHog extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init, created, mov, movCol, render, x, y;
function AmmoWartHog (iObj) {
super();
linkId = "AmmoWartHog";
parentLinkId = "WartHog";
initObj = iObj;
init();
}
function createMov() {
created = true;
var _local5 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
var _local4 = ((Math.random() < 0.5) ? (linkId + "1") : (linkId + "2"));
mov = _global.stage.attachMovie(_local4, rr.utils.StringUtils.getUniqueName(), _local5, {parent:this});
var _local3 = new Color(mov);
_local3.setRGB(movCol);
render();
}
function checkHit() {
super.checkHit();
movCol = _global.stage.bg_bmp.getPixel(x - _global.camera.left, y - _global.camera.top);
var _local4 = rr.utils.ColorConversion.hex32toargb(movCol);
var _local5 = rr.utils.ColorConversion.rgbtohsb(_local4.red, _local4.green, _local4.blue);
if (_global.map.maptype == "desert") {
_local4 = rr.utils.ColorConversion.hsbtorgb(_local5.hue, _local5.saturation, _local5.brightness * (0.3 + (Math.random() / 3)));
} else {
_local4 = rr.utils.ColorConversion.hsbtorgb(_local5.hue, _local5.saturation, _local5.brightness * (1.3 + (Math.random() / 3)));
}
movCol = rr.utils.ColorConversion.argbtohex32(_local4.red, _local4.green, _local4.blue, 100);
}
}
Symbol 3430 MovieClip [__Packages.rr.ammo.AmmoMesserSchmidt] Frame 0
class rr.ammo.AmmoMesserSchmidt extends rr.ammo.AmmoDefault
{
var linkId, parentLinkId, initObj, init, created, mov, movCol, render, x, y;
function AmmoMesserSchmidt (iObj) {
super();
linkId = "AmmoMesserSchmidt";
parentLinkId = "MesserSchmidt";
initObj = iObj;
init();
}
function createMov() {
created = true;
var _local5 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
var _local4 = ((Math.random() < 0.5) ? (linkId + "1") : (linkId + "2"));
mov = _global.stage.attachMovie(_local4, rr.utils.StringUtils.getUniqueName(), _local5, {parent:this});
var _local3 = new Color(mov);
_local3.setRGB(movCol);
render();
}
function checkHit() {
super.checkHit();
movCol = _global.stage.bg_bmp.getPixel(x - _global.camera.left, y - _global.camera.top);
var _local4 = rr.utils.ColorConversion.hex32toargb(movCol);
var _local5 = rr.utils.ColorConversion.rgbtohsb(_local4.red, _local4.green, _local4.blue);
_local4 = rr.utils.ColorConversion.hsbtorgb(_local5.hue, _local5.saturation, _local5.brightness * (1.3 + (Math.random() / 3)));
movCol = rr.utils.ColorConversion.argbtohex32(_local4.red, _local4.green, _local4.blue, 100);
}
}
Symbol 3431 MovieClip [__Packages.rr.ammo.AmmoBellHuey] Frame 0
class rr.ammo.AmmoBellHuey extends rr.ammo.Ammo
{
var linkId, parentLinkId, initObj, x, y, tar, range, speedmax, mincurve, maxcurve, a, startsound, loopsoundid, explodesound, damage, rexplode, d, speed, tspeed, loopsound, mov, createMov, rot, isexploded, cos, pi, sin, status, clearMov, curve, events, destroy;
function AmmoBellHuey (iObj) {
super();
linkId = "AmmoBellHuey";
parentLinkId = "BellHuey";
initObj = iObj;
init();
}
function init() {
x = initObj.x;
y = initObj.y;
tar = initObj.tar;
trace("tar: " + tar.linkId);
super.init();
range = rr.conf.Config.getObjectValue(parentLinkId, "ammorange");
speedmax = rr.conf.Config.getObjectValue(parentLinkId, "ammomaxSpeed");
mincurve = rr.conf.Config.getObjectValue(parentLinkId, "ammominCurve");
maxcurve = rr.conf.Config.getObjectValue(parentLinkId, "ammomaxCurve");
a = rr.conf.Config.getObjectValue(parentLinkId, "ammoacceleration");
startsound = rr.conf.Config.getObjectValue(parentLinkId, "ammostartsound");
loopsoundid = rr.conf.Config.getObjectValue(parentLinkId, "ammosound");
explodesound = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplodesound");
damage = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplosiondamage");
rexplode = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplosionradius");
d = (speed = (tspeed = 0));
loopsound = _global.sounds.addLoopSound(this);
launch();
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._rotation = rr.utils.MathUtils.formatAngle2(rot);
}
function update() {
if (speed != tspeed) {
speed = ((Math.abs(speed - tspeed) <= a) ? (tspeed) : (((tspeed > speed) ? (speed + a) : (speed - a))));
}
if (tar) {
if (rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y) < (speed * 2)) {
explode();
}
}
if (!isexploded) {
rotateToTarget();
}
var _local3 = x;
var _local2 = y;
x = x + (cos(((-rot) * pi) / 180) * speed);
y = y - (sin(((-rot) * pi) / 180) * speed);
d = d + rr.utils.MathUtils.getDistance(x, y, _local3, _local2);
if (status != "exploded") {
if (d > range) {
explode();
}
checkRender();
} else {
render();
}
}
function checkRender() {
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
if (!isexploded) {
if ((!loopsound.isplaying) || (loopsound.vol < 100)) {
_global.sounds.playLoopSound(this);
}
}
render();
} else if (mov) {
_global.sounds.stopLoopSound(this);
clearMov();
}
}
function launch() {
_global.sounds.playSound(startsound);
curve = mincurve + (Math.random() * (maxcurve - mincurve));
tspeed = speedmax;
}
function rotateToTarget() {
var _local4 = rr.utils.MathUtils.getAngle(x, y, tar.x, tar.y);
var _local2 = _local4;
var _local3 = (rot + 360) % 360;
_local2 = (_local2 + 360) % 360;
if ((_local2 - _local3) > 180) {
_local2 = _local2 - 360;
} else if ((_local2 - _local3) < -180) {
_local2 = _local2 + 360;
}
if ((_local2 - _local3) > 0) {
rot = rr.utils.MathUtils.formatAngle2(_local3 + curve);
} else {
rot = rr.utils.MathUtils.formatAngle2(_local3 - curve);
}
var _local5 = rr.utils.MathUtils.angDiff(rot, _local4);
if ((_local5 <= curve) || ((360 - _local5) <= curve)) {
rot = _local4;
}
}
function explode() {
if (isexploded) {
return(undefined);
}
isexploded = true;
speed = speed / 10;
tspeed = 0;
_global.sounds.playSound(explodesound);
events.dispatchEvent({type:"onRemoveLoopSound", target:this});
if (tar) {
var _local4 = rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y);
if (_local4 < rexplode) {
tar.addDamage(damage);
}
}
render();
mov.gotoAndPlay("explode");
var _local3 = rr.conf.Config.getObjectValue(parentLinkId, "ammoduration");
rr.utils.Delegate.callDelayed(this, destroy, _local3);
}
}
Symbol 3432 MovieClip [__Packages.rr.ammo.AmmoApache] Frame 0
class rr.ammo.AmmoApache extends rr.ammo.Ammo
{
var linkId, parentLinkId, initObj, x, y, tar, range, speedmax, mincurve, maxcurve, a, startsound, loopsoundid, explodesound, damage, rexplode, d, speed, tspeed, loopsound, mov, createMov, rot, isexploded, cos, pi, sin, status, clearMov, curve, events, destroy;
function AmmoApache (iObj) {
super();
linkId = "AmmoApache";
parentLinkId = "Apache";
initObj = iObj;
init();
}
function init() {
x = initObj.x;
y = initObj.y;
tar = initObj.tar;
trace("tar: " + tar.linkId);
super.init();
range = rr.conf.Config.getObjectValue(parentLinkId, "ammorange");
speedmax = rr.conf.Config.getObjectValue(parentLinkId, "ammomaxSpeed");
mincurve = rr.conf.Config.getObjectValue(parentLinkId, "ammominCurve");
maxcurve = rr.conf.Config.getObjectValue(parentLinkId, "ammomaxCurve");
a = rr.conf.Config.getObjectValue(parentLinkId, "ammoacceleration");
startsound = rr.conf.Config.getObjectValue(parentLinkId, "ammostartsound");
loopsoundid = rr.conf.Config.getObjectValue(parentLinkId, "ammosound");
explodesound = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplodesound");
damage = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplosiondamage");
rexplode = rr.conf.Config.getObjectValue(parentLinkId, "ammoexplosionradius");
d = (speed = (tspeed = 0));
loopsound = _global.sounds.addLoopSound(this);
launch();
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._rotation = rr.utils.MathUtils.formatAngle2(rot);
}
function update() {
if (speed != tspeed) {
speed = ((Math.abs(speed - tspeed) <= a) ? (tspeed) : (((tspeed > speed) ? (speed + a) : (speed - a))));
}
if (tar) {
if (rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y) < (speed * 2)) {
explode();
}
}
if (!isexploded) {
rotateToTarget();
}
var _local3 = x;
var _local2 = y;
x = x + (cos(((-rot) * pi) / 180) * speed);
y = y - (sin(((-rot) * pi) / 180) * speed);
d = d + rr.utils.MathUtils.getDistance(x, y, _local3, _local2);
if (status != "exploded") {
if (d > range) {
explode();
}
checkRender();
} else {
render();
}
}
function checkRender() {
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
if (!isexploded) {
if ((!loopsound.isplaying) || (loopsound.vol < 100)) {
_global.sounds.playLoopSound(this);
}
}
render();
} else if (mov) {
_global.sounds.stopLoopSound(this);
clearMov();
}
}
function launch() {
_global.sounds.playSound(startsound);
curve = mincurve + (Math.random() * (maxcurve - mincurve));
tspeed = speedmax;
}
function rotateToTarget() {
var _local4 = rr.utils.MathUtils.getAngle(x, y, tar.x, tar.y);
var _local2 = _local4;
var _local3 = (rot + 360) % 360;
_local2 = (_local2 + 360) % 360;
if ((_local2 - _local3) > 180) {
_local2 = _local2 - 360;
} else if ((_local2 - _local3) < -180) {
_local2 = _local2 + 360;
}
if ((_local2 - _local3) > 0) {
rot = rr.utils.MathUtils.formatAngle2(_local3 + curve);
} else {
rot = rr.utils.MathUtils.formatAngle2(_local3 - curve);
}
var _local5 = rr.utils.MathUtils.angDiff(rot, _local4);
if ((_local5 <= curve) || ((360 - _local5) <= curve)) {
rot = _local4;
}
}
function explode() {
if (isexploded) {
return(undefined);
}
isexploded = true;
speed = speed / 10;
tspeed = 0;
_global.sounds.playSound(explodesound);
events.dispatchEvent({type:"onRemoveLoopSound", target:this});
if (tar) {
var _local4 = rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y);
if (_local4 < rexplode) {
tar.addDamage(damage);
}
}
render();
mov.gotoAndPlay("explode");
var _local3 = rr.conf.Config.getObjectValue(parentLinkId, "ammoduration");
rr.utils.Delegate.callDelayed(this, destroy, _local3);
}
}
Symbol 3433 MovieClip [__Packages.rr.train.SaddleTank] Frame 0
class rr.train.SaddleTank extends rr.train.Locomotive
{
var linkId, initObj, bcount, bxdef1, init;
function SaddleTank (iObj) {
super();
linkId = "SaddleTank";
initObj = iObj;
bcount = 1;
bxdef1 = 0;
init();
}
}
Symbol 3434 MovieClip [__Packages.rr.train.BulpFrog] Frame 0
class rr.train.BulpFrog extends rr.train.Locomotive
{
var linkId, initObj, bcount, bxdef1, bxdef2, init, rotbarrel2, fliprot, rot, mov;
function BulpFrog (iObj) {
super();
linkId = "BulpFrog";
initObj = iObj;
bcount = 2;
bxdef1 = 9;
bxdef2 = -21;
init();
}
function aimAtTarget() {
super.aimAtTarget();
rotbarrel2 = rr.utils.MathUtils.formatAngle2((rot + fliprot) + 180);
}
function render() {
super.render();
mov.barrel2_mc._rotation = rotbarrel2 - 180;
}
}
Symbol 3435 MovieClip [__Packages.rr.train.TrainWagon] Frame 0
class rr.train.TrainWagon extends rr.train.TrainSegment
{
var segmentType, weapons, prev, reAffirm, isconnected, isreversed, dfeel, length, xspeed, yspeed, x, y, damage, tdisconn, initObj, isdead, render, isCrashed, speed, events, next, killlevel, explode, mov, cos, pi, sin;
function TrainWagon () {
super();
}
function init() {
segmentType = "wagon";
weapons = [];
super.init();
prev = _global.train.lastsegment;
prev.next = this;
reAffirm();
isconnected = true;
isreversed = false;
dfeel = length / 2;
xspeed = (yspeed = 0);
x = (y = 0);
damage = 0;
tdisconn = getTimer();
addWeapons(initObj.weapons);
_global.train.segments.push(this);
_global.train.onConnectionChanged();
}
function update() {
if (isdead) {
render();
return(undefined);
}
if (isCrashed) {
if (_global.train.crashEnded) {
render();
} else {
rr.train.TrainUtils.updateCrashPosition(this);
}
} else if (!isconnected) {
var _local3 = 0.05;
if (speed != 0) {
speed = ((Math.abs(speed) <= _local3) ? 0 : (((0 > speed) ? (speed + _local3) : (speed - _local3))));
}
rr.train.TrainUtils.updateRailPosition(this);
if ((getTimer() - tdisconn) > 500) {
checkConnection(_global.loc);
if (_global.train.lastsegment != this) {
checkConnection(_global.train.lastsegment);
}
}
} else {
speed = prev.speed;
rr.train.TrainUtils.updateRailPosition(this);
}
events.dispatchEvent({target:this, type:"onUpdate"});
}
function addWeapons(w) {
trace("weapons: " + w.length);
var _local4 = w.length;
var _local2 = 0;
while (_local2 < _local4) {
var _local3 = w[_local2];
_local3.parent = this;
rr.train.TrainUtils.createWeapon(_local3);
_local2++;
}
}
function removeWeapon(obj) {
var _local4 = weapons.length;
var _local3 = 0;
while (_local3 < _local4) {
if (weapons[_local3] == obj) {
delete weapons[_local3];
weapons.splice(_local3, 1);
break;
}
_local3++;
}
_global.train.onConnectionChanged();
}
function die() {
if (isdead) {
return(undefined);
}
isdead = true;
if (!_global.train.isCrashed) {
next.disconnect();
disconnect();
} else {
next.prev = undefined;
}
var _local4 = weapons.length;
var _local3 = 0;
while (_local3 < _local4) {
weapons[_local3].die();
_local3++;
}
damage = killlevel;
events.dispatchEvent({type:"onTrainTargetDie", target:this});
explode();
}
function disconnect() {
if (!prev) {
return(undefined);
}
if ((!isdead) && (!prev.isdead)) {
_global.sounds.playSound("Wagon Dropped.wav");
}
tdisconn = getTimer();
prev.next = undefined;
prev = undefined;
setConnFlag(false);
_global.train.onConnectionChanged();
}
function setConnFlag(val) {
isconnected = val;
if (next) {
next.setConnFlag(val);
}
checkFuelLoad();
}
function checkConnection(s) {
var _local4 = false;
if (rr.utils.MathUtils.getDistance(x, y, s.x, s.y) > ((dfeel + s.dfeel) + 10)) {
return(undefined);
}
if (rr.utils.HitTest.isShapeHit(mov.base_mc, s.mov.base_mc)) {
_local4 = true;
}
if (_local4) {
if (s == _global.loc) {
var _local7 = s.x + ((cos(((-(s.rot + s.fliprot)) * pi) / 180) * s.length) / 2);
var _local6 = s.y - ((sin(((-(s.rot + s.fliprot)) * pi) / 180) * s.length) / 2);
var _local9 = s.x + ((cos(((-(s.rot + s.fliprot)) * pi) / 180) * (-s.length)) / 2);
var _local8 = s.y - ((sin(((-(s.rot + s.fliprot)) * pi) / 180) * (-s.length)) / 2);
if (rr.utils.MathUtils.getDistance(x, y, _local7, _local6) < rr.utils.MathUtils.getDistance(x, y, _local9, _local8)) {
die();
return(undefined);
}
}
var _local5 = speed;
if (prev) {
next = prev;
prev.reverse();
}
prev = s;
s.next = this;
setConnFlag(true);
speed = prev.speed;
reAffirm();
_global.train.onConnectionChanged();
if (Math.abs(_local5 - s.speed) > 1) {
_global.train.crash(null, 0.5);
} else {
_global.sounds.playSound("Wagon Attached.wav");
}
}
}
function reverse() {
var _local2 = prev;
prev = next;
next = _local2;
isreversed = !isreversed;
if (next) {
next.reverse();
}
}
function checkFuelLoad() {
var _local4 = weapons.length;
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = weapons[_local3];
if (_local2 instanceof rr.train.FuelLoad) {
if (isconnected) {
_local2.addToLocFuel();
} else {
_local2.subtractFromLocFuel();
}
}
_local3++;
}
}
}
Symbol 3436 MovieClip [__Packages.rr.train.TrainLoad] Frame 0
class rr.train.TrainLoad extends rr.BaseClass
{
var parent, initObj, uid, bobj, position, weight, linkId, price, dfeel, killlevel, explodesound, destroydelay, x, xmargin, y, damage, isdead, addEventListener, cos, pi, sin, rot, mov, events;
function TrainLoad () {
super();
}
function init() {
parent = initObj.parent;
uid = initObj.uid;
bobj = initObj.bobj;
parent.weapons.push(this);
position = initObj.position;
weight = rr.conf.Config.getObjectValue(linkId, "weight");
price = rr.conf.Config.getObjectValue(linkId, "price");
dfeel = rr.conf.Config.getObjectValue(linkId, "feelerradius");
killlevel = rr.conf.Config.getObjectValue(linkId, "killlevel");
explodesound = rr.conf.Config.getObjectValue(linkId, "explodesound");
destroydelay = rr.conf.Config.getObjectValue(linkId, "destroydelay");
rr.train.TrainUtils.setWeaponMargin(this);
x = (parent.x + (parent.length / 2)) - xmargin;
y = parent.y;
damage = 0;
isdead = false;
parent.addEventListener("onUpdate", this);
addEventListener("onTrainObjectDestroy", _global.trainbuild);
}
function onUpdate() {
x = parent.x + (cos(((-(parent.rot + parent.fliprot)) * pi) / 180) * ((parent.length / 2) - xmargin));
y = parent.y - (sin(((-(parent.rot + parent.fliprot)) * pi) / 180) * ((parent.length / 2) - xmargin));
rot = parent.rot + parent.fliprot;
if (isdead) {
checkRender();
return(undefined);
}
checkRender();
updateAfterEvent();
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov.base_mc._rotation = rot;
}
function checkRender() {
if (parent.isRendered) {
render();
} else if (mov) {
clearMov();
}
}
function createMov() {
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId, rr.utils.StringUtils.getUniqueName(), _local3, {parent:this});
checkNightMode();
}
function clearMov() {
mov.removeMovieClip();
delete mov;
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.base_mc, 0, 90);
}
}
function addDamage(dmg) {
if (isdead) {
return(undefined);
}
if (!dmg) {
return(undefined);
}
damage = damage + dmg;
if (damage >= killlevel) {
damage = killlevel;
die();
}
events.dispatchEvent({type:"onDamage", target:this});
}
function die() {
if (isdead) {
return(undefined);
}
events.dispatchEvent({type:"onTrainTargetDie", target:this});
isdead = true;
render();
_global.sounds.playSound(explodesound);
mov.gotoAndPlay("explode");
rr.utils.Delegate.callDelayed(this, destroy, destroydelay);
}
function destroy() {
mov.removeMovieClip();
events.dispatchEvent({type:"onTrainObjectDestroy", target:this});
parent.removeWeapon(this);
}
}
Symbol 3437 MovieClip [__Packages.rr.train.FuelLoad] Frame 0
class rr.train.FuelLoad extends rr.train.TrainLoad
{
var fueldef, linkId, fuel;
function FuelLoad () {
super();
}
function init() {
super.init();
fueldef = rr.conf.Config.getObjectValue(linkId, "fuel");
fuel = fueldef;
addToLocFuel();
}
function die() {
subtractFromLocFuel();
super.die();
}
function addToLocFuel() {
trace("addToLocFuel: " + fuel);
_global.loc.addFuel(fuel);
}
function subtractFromLocFuel() {
var _local3 = fuel;
var _local4 = _global.loc.fuel;
if ((_local4 - _local3) < _global.loc.fueldef) {
_local3 = _local3 - (_global.loc.fueldef - (_local4 - _local3));
if (_local3 > fueldef) {
_local3 = fueldef;
}
}
_global.loc.addFuel(-_local3);
fuel = _local3;
trace("subtractFromLocFuel: " + _local3);
}
}
Symbol 3438 MovieClip [__Packages.rr.train.Wagon1] Frame 0
class rr.train.Wagon1 extends rr.train.TrainWagon
{
var linkId, initObj, init;
function Wagon1 (iObj) {
super();
linkId = "Wagon1";
initObj = iObj;
init();
}
}
Symbol 3439 MovieClip [__Packages.rr.train.Wagon2] Frame 0
class rr.train.Wagon2 extends rr.train.TrainWagon
{
var linkId, initObj, init;
function Wagon2 (iObj) {
super();
linkId = "Wagon2";
initObj = iObj;
init();
}
}
Symbol 3440 MovieClip [__Packages.rr.train.Wagon3] Frame 0
class rr.train.Wagon3 extends rr.train.TrainWagon
{
var linkId, initObj, init;
function Wagon3 (iObj) {
super();
linkId = "Wagon3";
initObj = iObj;
init();
}
}
Symbol 3441 MovieClip [__Packages.rr.train.Wagon4] Frame 0
class rr.train.Wagon4 extends rr.train.TrainWagon
{
var linkId, initObj, init;
function Wagon4 (iObj) {
super();
linkId = "Wagon4";
initObj = iObj;
init();
}
}
Symbol 3442 MovieClip [__Packages.rr.train.DropWagon] Frame 0
class rr.train.DropWagon extends rr.train.TrainSegment
{
var segmentType, prev, reAffirm, isconnected, dfeel, length, xspeed, yspeed, x, y, damage, tdisconn, affirmed, isdead, render, isCrashed, speed, next, killlevel, events, explode, rsprev, rsfactorprev, destroy, mov, cos, pi, sin;
function DropWagon () {
super();
}
function init() {
segmentType = "dropwagon";
super.init();
prev = _global.train.lastsegment;
prev.next = this;
reAffirm();
isconnected = true;
dfeel = length / 2;
xspeed = (yspeed = 0);
x = (y = 0);
damage = 0;
tdisconn = getTimer();
_global.train.segments.push(this);
_global.train.onConnectionChanged();
}
function update() {
if (!affirmed) {
return(undefined);
}
if (isdead) {
render();
return(undefined);
}
if (isCrashed) {
if (_global.train.crashEnded) {
render();
} else {
rr.train.TrainUtils.updateCrashPosition(this);
}
} else if (!isconnected) {
var _local3 = 0.05;
if (speed != 0) {
speed = ((Math.abs(speed) <= _local3) ? 0 : (((0 > speed) ? (speed + _local3) : (speed - _local3))));
}
rr.train.TrainUtils.updateRailPosition(this);
if ((getTimer() - tdisconn) > 500) {
checkConnection(_global.loc);
if (_global.train.lastsegment != this) {
checkConnection(_global.train.lastsegment);
}
}
} else {
speed = prev.speed;
rr.train.TrainUtils.updateRailPosition(this);
}
}
function die() {
if (isdead) {
return(undefined);
}
if (!_global.train.isCrashed) {
next.disconnect();
disconnect();
} else {
next.prev = undefined;
}
isdead = true;
damage = killlevel;
events.dispatchEvent({type:"onTrainTargetDie", target:this});
explode();
}
function remove() {
var _local2 = next;
prev.next = _local2;
_local2.prev = prev;
_local2.rsprev = rsprev;
_local2.rsfactorprev = rsfactorprev;
next = undefined;
prev = undefined;
_local2.reAffirm();
events.dispatchEvent({type:"onTrainTargetDie", target:this});
destroy();
}
function disconnect() {
if (!prev) {
return(undefined);
}
if (!isdead) {
_global.sounds.playSound("Wagon Dropped.wav");
}
tdisconn = getTimer();
prev.next = undefined;
prev = undefined;
setConnFlag(false);
_global.train.onConnectionChanged();
}
function setConnFlag(val) {
isconnected = val;
if (next) {
next.setConnFlag(val);
}
}
function checkConnection(s) {
var _local4 = false;
if (rr.utils.MathUtils.getDistance(x, y, s.x, s.y) > ((dfeel + s.dfeel) + 10)) {
return(undefined);
}
if (rr.utils.HitTest.isShapeHit(mov.base_mc, s.mov.base_mc)) {
_local4 = true;
}
if (_local4) {
if (s == _global.loc) {
var _local7 = s.x + ((cos(((-(s.rot + s.fliprot)) * pi) / 180) * s.length) / 2);
var _local6 = s.y - ((sin(((-(s.rot + s.fliprot)) * pi) / 180) * s.length) / 2);
var _local9 = s.x + ((cos(((-(s.rot + s.fliprot)) * pi) / 180) * (-s.length)) / 2);
var _local8 = s.y - ((sin(((-(s.rot + s.fliprot)) * pi) / 180) * (-s.length)) / 2);
if (rr.utils.MathUtils.getDistance(x, y, _local7, _local6) < rr.utils.MathUtils.getDistance(x, y, _local9, _local8)) {
die();
return(undefined);
}
}
if (prev) {
next = prev;
prev.reverse();
}
var _local5 = speed;
prev = s;
s.next = this;
setConnFlag(true);
speed = prev.speed;
reAffirm();
_global.train.onConnectionChanged();
if (Math.abs(_local5 - s.speed) > 1) {
_global.train.crash(null, 0.5);
} else {
_global.sounds.playSound("Wagon Attached.wav");
}
}
}
function reverse() {
var _local2 = prev;
prev = next;
next = _local2;
if (next) {
next.reverse();
}
}
}
Symbol 3443 MovieClip [__Packages.rr.train.FuelTank] Frame 0
class rr.train.FuelTank extends rr.train.DropWagon
{
var linkId, initObj, init;
function FuelTank (iObj) {
super();
linkId = "FuelTank";
initObj = iObj;
init();
}
}
Symbol 3444 MovieClip [__Packages.rr.train.Passenger] Frame 0
class rr.train.Passenger extends rr.train.DropWagon
{
var linkId, initObj, init;
function Passenger (iObj) {
super();
linkId = "Passenger";
initObj = iObj;
init();
}
}
Symbol 3445 MovieClip [__Packages.rr.train.PassengerArmored] Frame 0
class rr.train.PassengerArmored extends rr.train.DropWagon
{
var linkId, initObj, init;
function PassengerArmored (iObj) {
super();
linkId = "PassengerArmored";
initObj = iObj;
init();
}
}
Symbol 3446 MovieClip [__Packages.rr.train.TankTrailer] Frame 0
class rr.train.TankTrailer extends rr.train.DropWagon
{
var linkId, initObj, init;
function TankTrailer (iObj) {
super();
linkId = "TankTrailer";
initObj = iObj;
init();
}
}
Symbol 3447 MovieClip [__Packages.rr.train.ABomb] Frame 0
class rr.train.ABomb extends rr.train.DropWagon
{
var linkId, initObj, init;
function ABomb (iObj) {
super();
linkId = "ABomb";
initObj = iObj;
init();
}
}
Symbol 3448 MovieClip [__Packages.rr.train.weapons.SmallCannon] Frame 0
class rr.train.weapons.SmallCannon extends rr.train.weapons.TrainWeapon
{
var linkId, initObj, init;
function SmallCannon (iObj) {
super();
linkId = "SmallCannon";
initObj = iObj;
init();
}
}
Symbol 3449 MovieClip [__Packages.rr.train.weapons.MediumCannon] Frame 0
class rr.train.weapons.MediumCannon extends rr.train.weapons.TrainWeapon
{
var linkId, initObj, x, y, status;
function MediumCannon (iObj) {
super();
linkId = "MediumCannon";
initObj = iObj;
init();
}
function init() {
super.init();
}
function onUpdate() {
super.onUpdate();
var _local6 = _global.map.collapsepoints.length;
var _local4 = 0;
while (_local4 < _local6) {
var _local5 = _global.map.collapsepoints[_local4];
if (rr.utils.MathUtils.getDistance(x, y, _local5.x, _local5.y) < 100) {
status = "collapse";
break;
}
status = "";
_local4++;
}
}
}
Symbol 3450 MovieClip [__Packages.rr.train.weapons.StaticWeapon] Frame 0
class rr.train.weapons.StaticWeapon extends rr.train.weapons.TrainWeapon
{
var linkId, flipped, initObj, aammo, rotBarrel, parent, tar, targets, x, y, dfire, pi, atan2, dtar, tarRot, tfire, lastFired, mov, gunsound, rfire, uid;
function StaticWeapon () {
super();
}
function init() {
trace("init: " + linkId);
super.init();
flipped = initObj.flipped;
aammo = rr.conf.Config.getObjectValue(linkId, "ammoangle");
}
function aimAtTarget() {
rotBarrel = parent.rot + parent.fliprot;
if (flipped) {
rotBarrel = rotBarrel + 180;
}
tar = undefined;
var _local7 = targets.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = _global.stage["enemy_" + targets[_local4]];
if (_local3.isdead) {
} else {
var _local5 = rr.utils.MathUtils.getDistance(x, y, _local3.x, _local3.y);
if (_local5 > dfire) {
} else {
var _local6 = (180 * atan2(_local3.y - y, _local3.x - x)) / pi;
if (rr.utils.MathUtils.angDiff(_local6, rotBarrel) > aammo) {
} else {
tar = _local3;
dtar = _local5;
tarRot = _local6;
tar.addEventListener("onEnemyDie", this);
return(undefined);
}
}
}
_local4++;
}
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
lastFired = getTimer();
mov.barrel_mc.gotoAndPlay("shoot");
mov.barrel_mc.base_mc.gotoAndPlay("shoot");
_global.sounds.playSound(gunsound);
var _local3 = ((Math.random() < 0.5) ? (dtar - (Math.random() * rfire)) : (dtar + (Math.random() * rfire)));
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:x, y:y, rot:-tarRot, d:_local3});
}
function destroy() {
_global.stage["range_" + uid].removeMovieClip();
super.destroy();
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.barrel_mc.base_mc, 0, 70);
}
}
}
Symbol 3451 MovieClip [__Packages.rr.train.weapons.LargeCannon] Frame 0
class rr.train.weapons.LargeCannon extends rr.train.weapons.StaticWeapon
{
var linkId, initObj, init;
function LargeCannon (iObj) {
super();
linkId = "LargeCannon";
initObj = iObj;
init();
}
}
Symbol 3452 MovieClip [__Packages.rr.train.weapons.HugeCannon] Frame 0
class rr.train.weapons.HugeCannon extends rr.train.weapons.StaticWeapon
{
var linkId, initObj, init;
function HugeCannon (iObj) {
super();
linkId = "HugeCannon";
initObj = iObj;
init();
}
}
Symbol 3453 MovieClip [__Packages.rr.train.ColeCart] Frame 0
class rr.train.ColeCart extends rr.train.FuelLoad
{
var linkId, initObj, dfeel, init;
function ColeCart (iObj) {
super();
linkId = "ColeCart";
initObj = iObj;
dfeel = 18;
init();
}
}
Symbol 3454 MovieClip [__Packages.rr.train.OilTank] Frame 0
class rr.train.OilTank extends rr.train.FuelLoad
{
var linkId, initObj, dfeel, init;
function OilTank (iObj) {
super();
linkId = "OilTank";
initObj = iObj;
dfeel = 18;
init();
}
}
Symbol 3455 MovieClip [__Packages.rr.train.PowerGenerator] Frame 0
class rr.train.PowerGenerator extends rr.train.FuelLoad
{
var linkId, initObj, dfeel, init;
function PowerGenerator (iObj) {
super();
linkId = "PowerGenerator";
initObj = iObj;
dfeel = 18;
init();
}
}
Symbol 3456 MovieClip [__Packages.rr.train.weapons.BunkerBuster] Frame 0
class rr.train.weapons.BunkerBuster extends rr.train.weapons.TrainWeapon
{
var linkId, initObj, init, mov, createMov, x, y, rotBarrel, parent, tfire, lastFired, mode, tarRot, gunsound, rfire, dtar, lbarrel, cos, pi, sin;
function BunkerBuster (iObj) {
super();
linkId = "BunkerBuster";
initObj = iObj;
init();
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov.barrel_mc._rotation = rotBarrel;
mov.base_mc._rotation = parent.rot + parent.fliprot;
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
if ((mode == "automatic") && (Math.abs(tarRot - rotBarrel) > 20)) {
return(undefined);
}
lastFired = getTimer();
mov.barrel_mc.base_mc.gotoAndPlay("shoot");
_global.sounds.playSound(gunsound);
if (mode == "automatic") {
var _local5 = ((Math.random() < 0.5) ? (dtar - (Math.random() * rfire)) : (dtar + (Math.random() * rfire)));
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:x, y:y, rot:-rotBarrel, d:_local5});
} else {
var _local4 = x + (cos(((-rotBarrel) * pi) / 180) * lbarrel);
var _local3 = y - (sin(((-rotBarrel) * pi) / 180) * lbarrel);
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:_local4, y:_local3, rot:rotBarrel});
}
}
}
Symbol 3457 MovieClip [__Packages.rr.train.weapons.RailRockets] Frame 0
class rr.train.weapons.RailRockets extends rr.train.weapons.TrainWeapon
{
var linkId, initObj, ddetect, rdetect, x, y, closecompounds, cellId, xmargin, parent, cos, pi, sin, isdead, checkRender, status, mov, rotBarrel, flipped, tfire, lastFired;
function RailRockets (iObj) {
super();
linkId = "RailRockets";
initObj = iObj;
init();
}
function init() {
super.init();
ddetect = rr.conf.Config.getObjectValue(linkId, "detectionDistance");
rdetect = rr.conf.Config.getObjectValue(linkId, "detectionRadius");
var _local4 = _global.map.getCellByPos(x, y);
closecompounds = _local4.getCompounds(true);
cellId = _local4.id;
}
function onUpdate() {
x = parent.x + (cos(((-(parent.rot + parent.fliprot)) * pi) / 180) * ((parent.length / 2) - xmargin));
y = parent.y - (sin(((-(parent.rot + parent.fliprot)) * pi) / 180) * ((parent.length / 2) - xmargin));
if (isdead) {
checkRender();
return(undefined);
}
var _local5 = _global.map["cell_" + cellId];
if (((x < _local5.left) || (x >= _local5.right)) || ((y < _local5.top) | (y >= _local5.bottom))) {
_local5 = _global.map.getCellByPos(x, y);
closecompounds = _local5.getCompounds(true);
cellId = _local5.id;
}
var _local6 = false;
var _local7 = _global.map.collapsepoints.length;
var _local3 = 0;
while (_local3 < _local7) {
var _local4 = _global.map.collapsepoints[_local3];
if (rr.utils.MathUtils.getDistance(x, y, _local4.x, _local4.y) < 100) {
_local6 = true;
break;
}
_local3++;
}
if (_local6) {
if (status != "collapse") {
mov.barrel_mc.b1_mc.gotoAndPlay("collapse");
mov.barrel_mc.b2_mc.gotoAndPlay("collapse");
status = "collapse";
}
} else if (status == "collapse") {
mov.barrel_mc.b1_mc.gotoAndPlay("reset");
mov.barrel_mc.b2_mc.gotoAndPlay("reset");
status = "";
}
rotBarrel = parent.rot + parent.fliprot;
if (flipped) {
rotBarrel = rotBarrel + 180;
}
fire();
checkRender();
updateAfterEvent();
}
function fire() {
if (status == "collapse") {
return(undefined);
}
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
if (!checkTargets()) {
return(undefined);
}
lastFired = getTimer();
if (status != "collapse") {
mov.barrel_mc.b1_mc.gotoAndPlay("shoot");
mov.barrel_mc.b2_mc.gotoAndPlay("shoot");
}
var _local2 = 0;
while (_local2 <= 7) {
rr.utils.Delegate.callDelayed(this, launchRockets, _local2 * 200);
_local2++;
}
}
function checkTargets() {
var _local5 = {x:x + (cos(((-rotBarrel) * pi) / 180) * ddetect), y:y - (sin(((-rotBarrel) * pi) / 180) * ddetect)};
var _local6 = _global.map.getCellByPos(x, y);
var _local7 = _local6.enemies.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = _global.stage["enemy_" + _local6.enemies[_local4]];
if (_local3.isdead) {
} else if (rr.utils.MathUtils.getDistance(_local5.x, _local5.y, _local3.x, _local3.y) < rdetect) {
return(true);
}
_local4++;
}
return(false);
}
function getStartPoint(px, py) {
var _local3 = rr.utils.MathUtils.getAngle(0, 0, px, py) + rotBarrel;
var _local2 = rr.utils.MathUtils.getDistance(0, 0, px, py);
return({x:x + (cos(((-_local3) * pi) / 180) * _local2), y:y - (sin(((-_local3) * pi) / 180) * _local2)});
}
function launchRockets() {
if (_global.timer.stopped) {
return(undefined);
}
var _local3;
_local3 = getStartPoint(7, -11 - (Math.random() * 6));
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:_local3.x, y:_local3.y, rot:rotBarrel, dir:"left"});
_local3 = getStartPoint(7, 11 + (Math.random() * 6));
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:_local3.x, y:_local3.y, rot:rotBarrel, dir:"right"});
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.barrel_mc, 0, 90);
}
}
}
Symbol 3458 MovieClip [__Packages.rr.train.weapons.SmallFastCannon] Frame 0
class rr.train.weapons.SmallFastCannon extends rr.train.weapons.TrainWeapon
{
var linkId, initObj, init, tfire, lastFired, mode, rotBarrel, tarRot, mov, gunsound, sin, pi, y, cos, x;
function SmallFastCannon (iObj) {
super();
linkId = "SmallFastCannon";
initObj = iObj;
init();
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
if ((mode == "automatic") && (Math.abs(tarRot - rotBarrel) > 20)) {
return(undefined);
}
lastFired = getTimer();
mov.barrel_mc.gotoAndPlay("shoot");
_global.sounds.playSound(gunsound);
var _local3 = getStartPoint(20, -3.5);
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:_local3.x, y:_local3.y, rot:rotBarrel});
_local3 = getStartPoint(20, 4);
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:_local3.x, y:_local3.y, rot:rotBarrel});
}
function getStartPoint(px, py) {
var _local3 = rr.utils.MathUtils.getAngle(0, 0, px, py) + rotBarrel;
var _local2 = rr.utils.MathUtils.getDistance(0, 0, px, py);
return({x:x + (cos(((-_local3) * pi) / 180) * _local2), y:y - (sin(((-_local3) * pi) / 180) * _local2)});
}
}
Symbol 3459 MovieClip [__Packages.rr.train.weapons.RocketLauncher] Frame 0
class rr.train.weapons.RocketLauncher extends rr.train.weapons.TrainWeapon
{
var linkId, initObj, init, tfire, lastFired, mov, gunsound, rotBarrel, sin, pi, y, cos, x;
function RocketLauncher (iObj) {
super();
linkId = "RocketLauncher";
initObj = iObj;
init();
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
lastFired = getTimer();
mov.barrel_mc.gotoAndPlay("shoot");
_global.sounds.playSound(gunsound);
var _local3 = getStartPoint(7.5, -3);
launchRocket({type:linkId, x:_local3.x, y:_local3.y, rot:rotBarrel});
_local3 = getStartPoint(7.5, 3);
rr.utils.Delegate.callDelayed(this, launchRocket, 200, {type:linkId, x:_local3.x, y:_local3.y, rot:rotBarrel});
}
function getStartPoint(px, py) {
var _local3 = rr.utils.MathUtils.getAngle(0, 0, px, py) + rotBarrel;
var _local2 = rr.utils.MathUtils.getDistance(0, 0, px, py);
return({x:x + (cos(((-_local3) * pi) / 180) * _local2), y:y - (sin(((-_local3) * pi) / 180) * _local2)});
}
function launchRocket(iObj) {
if (_global.timer.stopped) {
return(undefined);
}
rr.ammo.AmmoUtils.createAmmo(iObj);
}
}
Symbol 3460 MovieClip [__Packages.rr.train.weapons.FixedWeapon] Frame 0
class rr.train.weapons.FixedWeapon extends rr.train.weapons.TrainWeapon
{
var linkId, flipped, initObj, aammo, rotBarrel, parent, tar, targets, x, y, dfire, pi, atan2, dtar, tarRot, tfire, lastFired, mov, gunsound, rfire, uid;
function FixedWeapon () {
super();
}
function init() {
trace("init: " + linkId);
super.init();
flipped = initObj.flipped;
aammo = rr.conf.Config.getObjectValue(linkId, "ammoangle");
}
function aimAtTarget() {
rotBarrel = parent.rot + parent.fliprot;
if (flipped) {
rotBarrel = rotBarrel + 180;
}
tar = undefined;
var _local7 = targets.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = _global.stage["enemy_" + targets[_local4]];
if (_local3.isdead) {
} else {
var _local5 = rr.utils.MathUtils.getDistance(x, y, _local3.x, _local3.y);
if (_local5 > dfire) {
} else {
var _local6 = (180 * atan2(_local3.y - y, _local3.x - x)) / pi;
if (rr.utils.MathUtils.angDiff(_local6, rotBarrel) > aammo) {
} else {
tar = _local3;
dtar = _local5;
tarRot = _local6;
tar.addEventListener("onEnemyDie", this);
return(undefined);
}
}
}
_local4++;
}
}
function fire() {
if ((getTimer() - lastFired) < tfire) {
return(undefined);
}
lastFired = getTimer();
mov.barrel_mc.gotoAndPlay("shoot");
_global.sounds.playSound(gunsound);
var _local3 = ((Math.random() < 0.5) ? (dtar - (Math.random() * rfire)) : (dtar + (Math.random() * rfire)));
rr.ammo.AmmoUtils.createAmmo({type:linkId, x:x, y:y, rot:-tarRot, d:_local3});
}
function destroy() {
_global.stage["range_" + uid].removeMovieClip();
super.destroy();
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.barrel_mc.base_mc, 0, 70);
}
}
}
Symbol 3461 MovieClip [__Packages.rr.train.weapons.EMP] Frame 0
class rr.train.weapons.EMP extends rr.train.weapons.FixedWeapon
{
var linkId, initObj, dstun, tstunmin, tstunmax, uid, ldr, x, xmargin, parent, cos, pi, y, sin, rotBarrel, checkRender, mov, gunsound;
function EMP (iObj) {
super();
linkId = "EMP";
initObj = iObj;
init();
}
function init() {
super.init();
dstun = rr.conf.Config.getObjectValue(linkId, "stunDistance");
tstunmin = rr.conf.Config.getObjectValue(linkId, "minStunTime");
tstunmax = rr.conf.Config.getObjectValue(linkId, "maxStunTime");
_global.train.emps.push(uid);
ldr = new rr.train.weapons.EMPLoader(this);
}
function onUpdate() {
x = parent.x + (cos(((-(parent.rot + parent.fliprot)) * pi) / 180) * ((parent.length / 2) - xmargin));
y = parent.y - (sin(((-(parent.rot + parent.fliprot)) * pi) / 180) * ((parent.length / 2) - xmargin));
rotBarrel = parent.rot + parent.fliprot;
checkRender();
updateAfterEvent();
}
function fire() {
if (!ldr.isLoaded) {
return(undefined);
}
mov.barrel_mc.gotoAndPlay("shoot");
_global.sounds.playSound(gunsound);
var _local6 = _global.stage.enemies.length;
var _local4 = 0;
while (_local4 < _local6) {
var _local3 = _global.stage["enemy_" + _global.stage.enemies[_local4]];
if (_local3.isdead) {
return(undefined);
}
var _local5 = rr.utils.MathUtils.getDistance(_local3.x, _local3.y, x, y);
if (_local5 < dstun) {
_local3.stun(tstunmin + (Math.random() * (tstunmax - tstunmin)));
}
_local4++;
}
}
function destroy() {
var _local4 = 0;
while (_local4 < _global.train.emps.length) {
if (_global.train.emps[_local4] == uid) {
_global.train.emps.splice(_local4, 1);
break;
}
_local4++;
}
ldr.destroy();
super.destroy();
}
}
Symbol 3462 MovieClip [__Packages.rr.train.AirCrane] Frame 0
class rr.train.AirCrane extends rr.BaseClass
{
var linkId, uid, dfeel, speedmax, altmax, mincurve, maxcurve, a, killlevel, loopsoundid, explodesound, loopsound, rot, rotload, dtar, speed, tspeed, alt, damage, roll, troll, minroll, maxroll, pitch, tpitch, maxpitch, xp, yp, x, xload, y, yload, status, wagobj, isdestroyed, tar, cos, pi, sin, loadmov, tarloadx, tarloady, tarloadrot, tarx, tary, isdead, isexploded, mov, curve, rolldir, isSoundPlaying, events;
function AirCrane () {
super();
linkId = "AirCrane";
uid = rr.utils.StringUtils.getUniqueName();
init();
}
function init() {
dfeel = rr.conf.Config.getObjectValue(linkId, "feelerradius");
speedmax = rr.conf.Config.getObjectValue(linkId, "maxSpeed");
altmax = rr.conf.Config.getObjectValue(linkId, "altitude");
mincurve = rr.conf.Config.getObjectValue(linkId, "minCurve");
maxcurve = rr.conf.Config.getObjectValue(linkId, "maxCurve");
a = rr.conf.Config.getObjectValue(linkId, "acceleration");
killlevel = rr.conf.Config.getObjectValue(linkId, "killlevel");
loopsoundid = rr.conf.Config.getObjectValue(linkId, "sound");
explodesound = rr.conf.Config.getObjectValue(linkId, "explodesound");
loopsound = _global.sounds.addLoopSound(this);
rot = (rotload = 0);
dtar = 1000;
speed = 0;
tspeed = speedmax;
alt = altmax;
damage = 0;
roll = (troll = 0);
minroll = -10;
maxroll = 9;
pitch = (tpitch = 0);
maxpitch = 10;
xp = (yp = 0);
x = (xload = _global.camera.left - 50);
y = (yload = _global.camera.top + (Math.random() * _global.stage.height));
status = "launch";
createLoad();
rotateToTarget();
_global.aim.showIndicator();
_global.guide.showGuide(12);
}
function createLoad() {
var _local5 = _global.trainbuild.ingameadded;
var _local8 = [];
if (_local5.linkId == "HugeCannon") {
_local8.push({type:"HugeCannon", uid:_local5.uid, flipped:_local5.flipped, position:1, bobj:_local5});
}
var _local4 = 0;
while (_local4 < _local5.weapons.length) {
var _local3 = _local5.weapons[_local4];
_local8.push({type:_local3.linkId, uid:_local3.uid, flipped:_local3.flipped, position:_local3.spaceIndex, bobj:_local3});
_local4++;
}
wagobj = {type:_local5.linkId, uid:_local5.uid, weapons:_local8, bobj:_local5};
}
function addLoad() {
rr.train.TrainUtils.createWagon(wagobj);
_global.sounds.playSound("Wagon Attached.wav");
}
function update() {
if (isdestroyed) {
return(undefined);
}
tspeed = speedmax * Math.min(rr.utils.MathUtils.getDistance(x, y, tar.x, tar.y) / 100, 1);
if (speed != tspeed) {
speed = ((Math.abs(speed - tspeed) <= a) ? (tspeed) : (((tspeed > speed) ? (speed + a) : (speed - a))));
}
rotateToTarget();
var _local3 = rr.utils.MathUtils.formatAngle2(rr.utils.MathUtils.getAngle(x, y, tar.x, tar.y));
x = x + (cos(((-_local3) * pi) / 180) * speed);
y = y - (sin(((-_local3) * pi) / 180) * speed);
if (status == "retreat") {
if (x < (_global.camera.left - 100)) {
die();
destroy();
}
}
updateLoad();
if (roll != troll) {
roll = roll + ((roll < troll) ? 1 : -1);
}
if (pitch != tpitch) {
pitch = pitch + ((pitch < tpitch) ? 1 : -1);
}
checkRender();
}
function updateLoad() {
var _local3 = rot;
var _local4 = (rotload + 360) % 360;
_local3 = (_local3 + 360) % 360;
if ((_local3 - _local4) > 180) {
_local3 = _local3 - 360;
} else if ((_local3 - _local4) < -180) {
_local3 = _local3 + 360;
}
_local4 = _local4 + ((5 * (_local3 - _local4)) / 100);
rotload = rr.utils.MathUtils.formatAngle2(_local4);
var _local12 = x + (cos(((-rot) * pi) / 180) * -10);
var _local10 = y - (sin(((-rot) * pi) / 180) * -10);
var _local8 = 0.6;
var _local6 = 0.2;
var _local14 = _local12 - xload;
var _local13 = _local10 - yload;
xp = (xp * _local8) + (_local14 * _local6);
yp = (yp * _local8) + (_local13 * _local6);
xload = xload + xp;
yload = yload + yp;
var _local11 = loadmov.wagon._width;
var _local5 = _global.train.lastsegment.getWagonPointBehind(_local11);
tarloadx = _local5.x;
tarloady = _local5.y;
tarloadrot = _local5.rot;
rr.utils.ClipUtils.setTint(loadmov, 16711680, 0);
_global.aim.removeEventListener("onAimDown", this);
var _local7 = objectsNear();
_global.aim.mov.cranewarning_mc._visible = _local7;
if (!_local7) {
if (rr.utils.MathUtils.getDistance(xload, yload, tarloadx, tarloady) < 10) {
var _local9 = rr.utils.MathUtils.angDiff(rotload, tarloadrot);
if ((_local9 < 5) || ((180 - _local9) < 5)) {
_global.aim.addEventListener("onAimDown", this);
rr.utils.ClipUtils.setTint(loadmov, 16711680, 60);
}
}
}
}
function objectsNear() {
var _local4 = _global.train.lastsegment;
var _local6 = _global.map.getCellByPos(_local4.x, _local4.y);
var _local9 = _local6.statics.length;
var _local5 = 0;
while (_local5 < _local9) {
var _local2 = _local6.statics[_local5];
if (_local2 instanceof rr.rail.RailBlock) {
if (rr.utils.MathUtils.getDistance(_local4.x, _local4.y, _local2.x, _local2.y) < 100) {
return(true);
}
}
_local5++;
}
_local9 = _local6.nb.length;
_local5 = 0;
while (_local5 < _local9) {
var _local8 = _local6.nb[_local5];
var _local7 = _local8.statics.length;
var _local3 = 0;
while (_local3 < _local7) {
var _local2 = _local6.statics[_local3];
if (_local2 instanceof rr.rail.RailBlock) {
if (rr.utils.MathUtils.getDistance(_local4.x, _local4.y, _local2.x, _local2.y) < 100) {
return(true);
}
}
_local3++;
}
_local5++;
}
return(false);
}
function onAimDown() {
_global.aim.removeEventListener("onAimDown", this);
_global.aim.showCrossHair();
_global.guide.close();
_global.aim.mov.cranewarning_mc._visible = false;
addLoad();
tarx = -300;
tary = _global.camera.top + (Math.random() * _global.stage.height);
status = "retreat";
}
function checkRender() {
if (rr.utils.MathUtils.getDistance(x, y, _global.camera.x, _global.camera.y) < 500) {
if (loopsound) {
if (!isdead) {
playLoopSound();
}
}
render();
} else if (isexploded) {
destroy();
} else if (mov) {
_global.sounds.stopLoopSound(this);
clearMov();
}
}
function playLoopSound() {
if ((!loopsound.isplaying) || (loopsound.vol < 100)) {
_global.sounds.playLoopSound(this);
}
}
function render() {
if (!mov) {
createMov();
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
var _local3 = new flash.geom.Point(mov._x + alt, mov._y + alt);
mov.globalToLocal(_local3);
mov.shadow_mc._x = _local3.x;
mov.shadow_mc._y = _local3.y;
var _local4 = ((pitch > (maxpitch / 2)) ? "roll" : "pitch");
if (_local4 == "roll") {
mov.base_mc.mc.gotoAndStop("r" + roll.toString());
} else {
mov.base_mc.mc.gotoAndStop("s" + pitch.toString());
}
mov.base_mc._rotation = (mov.shadow_mc._rotation = rr.utils.MathUtils.formatAngle2(rot));
loadmov._x = xload - _global.camera.left;
loadmov._y = yload - _global.camera.top;
loadmov._rotation = rr.utils.MathUtils.formatAngle2(rotload);
}
function createMov() {
var _local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
loadmov = _global.stage.createEmptyMovieClip("craneloadmov", _local3, {parent:this});
var _local4 = loadmov.attachMovie("AirCraneLoad", "wagon", 10);
_local4.gotoAndStop(wagobj.type);
_local3 = rr.utils.ClipUtils.getFreeDepth(_global.stage, this);
mov = _global.stage.attachMovie(linkId, "mov_" + uid, _local3, {parent:this});
mov.base_mc.mc.gotoAndStop("r0");
checkNightMode();
}
function rotateToTarget() {
if (status == "launch") {
tarx = _global.stage._xmouse + _global.camera.left;
tary = _global.stage._ymouse + _global.camera.top;
}
dtar = rr.utils.MathUtils.getDistance(x, y, tarx, tary) - 100;
var _local4 = rr.utils.MathUtils.getAngle(x, y, tarx, tary);
tar = {x:x + (cos(((-rr.utils.MathUtils.formatAngle2(_local4)) * pi) / 180) * dtar), y:y - (sin(((-rr.utils.MathUtils.formatAngle2(_local4)) * pi) / 180) * dtar)};
curve = mincurve + ((maxcurve - mincurve) * (1 - Math.min(rr.utils.MathUtils.getDistance(x, y, tarx, tary) / 150, 1)));
var _local3 = _local4;
var _local5 = (rot + 360) % 360;
_local3 = (_local3 + 360) % 360;
if ((_local3 - _local5) > 180) {
_local3 = _local3 - 360;
} else if ((_local3 - _local5) < -180) {
_local3 = _local3 + 360;
}
if ((_local3 - _local5) > 0) {
rot = rr.utils.MathUtils.formatAngle2(_local5 + curve);
rolldir = 1;
} else {
rot = rr.utils.MathUtils.formatAngle2(_local5 - curve);
rolldir = -1;
}
var _local6 = rr.utils.MathUtils.angDiff(rot, _local4);
if ((_local6 <= (curve + 1)) || ((360 - _local6) <= (curve + 1))) {
rot = _local4;
troll = 0;
} else {
var _local7 = ((rolldir < 0) ? (maxroll) : (minroll));
var _local8 = Math.min(Math.abs((100 * _local6) / 180), 100);
troll = Math.round((_local7 * _local8) / 100);
}
tpitch = Math.min(Math.round((maxpitch * speed) / speedmax), maxpitch);
}
function addDamage(dmg) {
if (isdead) {
return(undefined);
}
if (!dmg) {
return(undefined);
}
damage = damage + dmg;
if (damage >= killlevel) {
die();
render();
}
}
function explode() {
if (isexploded) {
return(undefined);
}
_global.sounds.playSound(explodesound);
isexploded = true;
render();
mov.gotoAndPlay("explode");
}
function checkNightMode() {
if (_global.map.nightmap) {
rr.utils.ClipUtils.setTint(mov.base_mc, 0, 80);
rr.utils.ClipUtils.setTint(loadmov.wagon, 0, 80);
}
}
function clearMov() {
}
function die() {
if (isdead) {
return(undefined);
}
isdead = true;
isSoundPlaying = false;
events.dispatchEvent({type:"onRemoveLoopSound", target:this});
events.dispatchEvent({type:"onEnemyDie", target:this});
}
function destroy() {
if (isdestroyed) {
return(undefined);
}
isdestroyed = true;
_global.sounds.stopLoopSound(this, true);
trace("stopLoopSound: ");
loadmov.removeMovieClip();
mov.removeMovieClip();
_global.stage.deleteCrane();
}
}
Symbol 3463 MovieClip [__Packages.com.robertpenner.utils.ColorTransformUtil] Frame 0
class com.robertpenner.utils.ColorTransformUtil
{
function ColorTransformUtil () {
}
static function setRGBStr(colorTrans, hexStr) {
hexStr = hexStr.substr(-6, 6);
colorTrans.rgb = parseInt(hexStr, 16);
}
static function getRGBStr(colorTrans) {
var _local1 = colorTrans.rgb.toString(16);
var _local2 = 6 - _local1.length;
while (_local2--) {
_local1 = "0" + _local1;
}
return(_local1.toUpperCase());
}
static function setRGB2(colorTrans, r, g, b) {
colorTrans.rgb = ((r << 16) | (g << 8)) | b;
}
static function getRGB2(colorTrans) {
return({r:colorTrans.redOffset, g:colorTrans.greenOffset, b:colorTrans.blueOffset});
}
static function reset(colorTrans) {
colorTrans.redMultiplier = 1;
colorTrans.greenMultiplier = 1;
colorTrans.blueMultiplier = 1;
colorTrans.redOffset = 0;
colorTrans.greenOffset = 0;
colorTrans.blueOffset = 0;
}
static function setBrightness(colorTrans, bright) {
with (colorTrans) {
redMultiplier = (greenMultiplier = (blueMultiplier = 1 - Math.abs(bright / 100)));
redOffset = (greenOffset = (blueOffset = (((bright / 100) > 0) ? ((bright / 100) * 256) : 0)));
}
}
static function getBrightness(colorTrans) {
with (colorTrans) {
return(((redOffset * 100) ? ((1 - redMultiplier) * 100) : ((redMultiplier - 1) * 100)));
}
}
static function setBrightOffset(colorTrans, offset) {
with (colorTrans) {
redOffset = (greenOffset = (blueOffset = offset));
}
}
static function getBrightOffset(colorTrans) {
return(colorTrans.redOffset);
}
static function setTint(colorTrans, r, g, b, percent) {
var _local2 = percent / 100;
colorTrans.redOffset = r * _local2;
colorTrans.greenOffset = g * _local2;
colorTrans.blueOffset = b * _local2;
colorTrans.redMultiplier = (colorTrans.greenMultiplier = (colorTrans.blueMultiplier = (100 - percent) / 100));
}
static function getTint(colorTrans) {
var _local1 = {percent:(1 - colorTrans.redMultiplier) * 100};
var _local2 = 100 / _local1.percent;
_local1.r = colorTrans.redOffset * _local2;
_local1.g = colorTrans.greenOffset * _local2;
_local1.b = colorTrans.blueOffset * _local2;
return(_local1);
}
static function setTint2(colorTrans, rgb, percent) {
var _local5 = rgb >> 16;
var _local6 = (rgb >> 8) & 255;
var _local4 = rgb & 255;
var _local2 = percent / 100;
colorTrans.redOffset = _local5 * _local2;
colorTrans.greenOffset = _local6 * _local2;
colorTrans.blueOffset = _local4 * _local2;
colorTrans.redMultiplier = (colorTrans.greenMultiplier = (colorTrans.blueMultiplier = (100 - percent) / 100));
}
static function getTint2(colorTrans) {
var _local1 = {percent:(1 - colorTrans.redMultiplier) * 100};
var _local2 = 100 / _local1.percent;
_local1.rgb = (((colorTrans.redOffset * _local2) << 16) | ((colorTrans.greenOffset * _local2) << 8)) | (colorTrans.blueOffset * _local2);
return(_local1);
}
static function setTintOffset(colorTrans, r, g, b) {
with (colorTrans) {
redOffset = r;
greenOffset = g;
blueOffset = b;
}
}
static function getTintOffset(colorTrans) {
return({r:colorTrans.redOffset, g:colorTrans.greenOffset, b:colorTrans.blueOffset});
}
static function setTintOffset2(colorTrans, rgb) {
var r = (rgb >> 16);
var g = ((rgb >> 8) & 255);
var b = (rgb & 255);
with (colorTrans) {
redOffset = r;
greenOffset = g;
blueOffset = b;
}
}
static function getTintOffset2(colorTrans) {
return(((colorTrans.redOffset << 16) | (colorTrans.greenOffset << 8)) | colorTrans.blueOffset);
}
static function invert(colorTrans) {
with (colorTrans) {
redMultiplier = -redMultiplier;
greenMultiplier = -greenMultiplier;
blueMultiplier = -blueMultiplier;
redOffset = 255 - redOffset;
greenOffset = 255 - greenOffset;
blueOffset = 255 - blueOffset;
}
}
static function setNegative(colorTrans, percent) {
colorTrans.redMultiplier = (colorTrans.greenMultiplier = (colorTrans.blueMultiplier = 100 - (2 * percent)));
colorTrans.redOffset = (colorTrans.greenOffset = (colorTrans.blueOffset = percent * 2.55));
}
static function getNegative(colorTrans) {
return(colorTrans.redOffset * 0.392156862745098);
}
static function setRed(colorTrans, amount) {
colorTrans.rgb = ((amount << 16) | (colorTrans.greenOffset << 8)) | colorTrans.blueOffset;
}
static function getRed(colorTrans) {
return(colorTrans.redOffset);
}
static function setGreen(colorTrans, amount) {
colorTrans.rgb = ((colorTrans.redOffset << 16) | (amount << 8)) | colorTrans.blueOffset;
}
static function getGreen(colorTrans) {
return(colorTrans.greenOffset);
}
static function setBlue(colorTrans, amount) {
colorTrans.rgb = ((colorTrans.redOffset << 16) | (colorTrans.greenOffset << 8)) | amount;
}
static function getBlue(colorTrans) {
return(colorTrans.blueOffset);
}
static function setRedPercent(colorTrans, percent) {
colorTrans.redMultiplier = percent / 100;
}
static function getRedPercent(colorTrans) {
return(colorTrans.redMultiplier * 100);
}
static function setGreenPercent(colorTrans, percent) {
colorTrans.greenMultiplier = percent / 100;
}
static function getGreenPercent(colorTrans) {
return(colorTrans.greenMultiplier * 100);
}
static function setBluePercent(colorTrans, percent) {
colorTrans.blueMultiplier = percent / 100;
}
static function getBluePercent(colorTrans) {
return(colorTrans.blueMultiplier * 100);
}
}
Symbol 3464 MovieClip [__Packages.rr.control.TrainSelect] Frame 0
class rr.control.TrainSelect extends rr.BaseClip
{
var _visible, locsPage1, ST_mc, BF_mc, RH_mc, LW_mc, PN_mc, locsPage2, SC_mc, DR_mc, IC_mc, more_btn, back_btn, locs, page;
function TrainSelect () {
super();
_global.trainselect = this;
init();
}
function init() {
_visible = false;
hideAll();
locsPage1 = [ST_mc, BF_mc, RH_mc, LW_mc, PN_mc];
locsPage2 = [SC_mc, DR_mc, IC_mc];
more_btn.onPress = rr.utils.Delegate.create(this, showPage, 2);
back_btn.onPress = rr.utils.Delegate.create(this, showPage, 1);
showPage(1);
_visible = true;
}
function showPage(p) {
var _local3 = 0;
if (locs) {
var _local2 = locs.length - 1;
while (_local2 >= 0) {
rr.utils.Delegate.callDelayed(this, hideLoc, _local3, locs[_local2]);
_local3 = _local3 + 50;
_local2--;
}
}
page = p;
more_btn._visible = page == 1;
back_btn._visible = page == 2;
locs = this["locsPage" + page];
var _local2 = 0;
while (_local2 < locs.length) {
rr.utils.Delegate.callDelayed(this, showLoc, _local3, locs[_local2]);
_local3 = _local3 + 50;
_local2++;
}
}
function showLoc(l) {
l._visible = true;
}
function hideLoc(l) {
l._visible = false;
}
function hideAll() {
for (var _local2 in this) {
if (this[_local2] instanceof MovieClip) {
this[_local2]._visible = false;
}
}
}
}
Symbol 3465 MovieClip [__Packages.rr.control.WagonSelect] Frame 0
class rr.control.WagonSelect extends rr.BaseClip
{
var page1, W1_mc, W2_mc, W3_mc, W4_mc, CC_mc, OT_mc, PG_mc, page2, more_btn, back_btn, items, page;
function WagonSelect () {
super();
_global.wagonselect = this;
init();
}
function init() {
hideAll();
page1 = [W1_mc, W2_mc, W3_mc, W4_mc, CC_mc, OT_mc, PG_mc];
page2 = [];
more_btn.onPress = rr.utils.Delegate.create(this, showPage, 2);
back_btn.onPress = rr.utils.Delegate.create(this, showPage, 1);
showPage(1);
}
function showPage(p) {
var _local3 = 0;
if (items) {
var _local2 = items.length - 1;
while (_local2 >= 0) {
rr.utils.Delegate.callDelayed(this, hideItem, _local3, items[_local2]);
_local3 = _local3 + 50;
_local2--;
}
}
page = p;
more_btn._visible = false;
back_btn._visible = false;
items = this["page" + page];
var _local2 = 0;
while (_local2 < items.length) {
rr.utils.Delegate.callDelayed(this, showItem, _local3, items[_local2]);
_local3 = _local3 + 50;
_local2++;
}
}
function showItem(l) {
l._visible = true;
}
function hideItem(l) {
l._visible = false;
}
function hideAll() {
for (var _local2 in this) {
if (this[_local2] instanceof MovieClip) {
this[_local2]._visible = false;
}
}
}
}
Symbol 3466 MovieClip [__Packages.cr.XmlControl] Frame 0
class cr.XmlControl extends rr.BaseClip
{
var _visible, done_btn;
function XmlControl () {
super();
_global.xmlcontrol = this;
init();
}
function init() {
_visible = false;
done_btn.onPress = rr.utils.Delegate.create(this, close);
}
function showMapXml() {
_global.demoalert.show();
}
function showLevelXml() {
_global.demoalert.show();
}
function close() {
_visible = false;
}
}
Symbol 3467 MovieClip [__Packages.cr.XmlImport] Frame 0
class cr.XmlImport extends rr.BaseClip
{
var import_mc, save_mc, import_btn, convert_btn, cnf_txt;
function XmlImport () {
super();
_global.xmlimport = this;
init();
}
function init() {
import_mc._visible = false;
save_mc._visible = false;
import_btn.onPress = rr.utils.Delegate.create(this, showImport);
import_mc.map_btn.onPress = rr.utils.Delegate.create(this, importMap);
import_mc.level_btn.onPress = rr.utils.Delegate.create(this, importLevel);
convert_btn._visible = false;
cnf_txt._visible = false;
}
function showImport() {
import_mc.result_txt.text = "";
import_mc.map_txt.text = "";
import_mc.level_txt.text = "";
import_mc._visible = true;
}
function importMap() {
showError(import_mc, "THIS FEATURE IS AVAILABLE IN THE FULL VERSION ONLY");
}
function isValidMap() {
return(true);
}
function importLevel() {
showError(import_mc, "THIS FEATURE IS AVAILABLE IN THE FULL VERSION ONLY");
}
function isValidLevel() {
return(true);
}
function showError(mc, err) {
mc.result_txt.textColor = 16711680 /* 0xFF0000 */;
mc.result_txt.text = err;
}
function showResult(mc, res) {
mc.result_txt.textColor = 65280;
mc.result_txt.text = res;
}
}
Symbol 3468 MovieClip [__Packages.cr.map.MapContainer] Frame 0
class cr.map.MapContainer extends rr.BaseClip
{
var more_btn, back_btn, defaultmaps, so, localmaps, maps, idx, laststart, nomap_txt, attachMovie;
function MapContainer () {
super();
init();
}
function init() {
more_btn.onRelease = rr.utils.Delegate.create(this, showMaps);
back_btn.onRelease = rr.utils.Delegate.create(this, flipBack);
defaultmaps = new Array();
so = SharedObject.getLocal("mapconfig");
localmaps = so.data.maps;
if (localmaps == undefined) {
localmaps = new Array();
}
maps = defaultmaps.concat(localmaps);
idx = 0;
showMaps();
}
function flipBack() {
idx = laststart - 12;
showMaps();
}
function showMaps() {
more_btn._visible = (back_btn._visible = false);
var _local5 = 0;
var _local6 = 0;
laststart = idx;
var _local4 = 0;
while (_local4 < 12) {
this["mb" + _local4].removeMovieClip();
_local4++;
}
var _local7 = maps.length;
if (_local7 > 0) {
nomap_txt._visible = false;
} else {
nomap_txt.autoSize = true;
nomap_txt.text = "THERE ARE CURRENTLY NO MAPS AVAILABLE\rCREATE AND SAVE A NEW MAP TO LOAD HERE";
nomap_txt._visible = true;
return(undefined);
}
_local4 = 0;
while (_local4 < 12) {
if (!maps[idx]) {
break;
}
var _local3 = attachMovie("MapButton", "mb" + _local4, 100 + _local4);
_local3.locked_mc._visible = false;
if (_local5 > 3) {
_local5 = 0;
_local6++;
}
_local3._x = _local5 * (_local3._width + 4);
_local3._y = _local6 * (_local3._height + 4);
_local5++;
_local3.title_txt.text = (("MAP" + maps[idx].mapid) + "_") + maps[idx].title;
_local3.image_mc.gotoAndStop(maps[idx].mapid);
if (maps[idx].title == "default") {
_local3.delete_btn._visible = false;
}
if (_global.createaction == "loadmap") {
_local3.image_mc.onPress = rr.utils.Delegate.create(_global.createcontrol, _global.createcontrol.loadMap, maps[idx]);
}
if (_global.createaction == "newlevel") {
_local3.image_mc.onPress = rr.utils.Delegate.create(_global.createcontrol, _global.createcontrol.createLevel, maps[idx]);
}
_local3.delete_btn.onPress = rr.utils.Delegate.create(this, deleteMap, maps[idx]);
idx++;
_local4++;
}
more_btn._visible = (maps.length > 12) && (idx < maps.length);
back_btn._visible = idx > 12;
}
function deleteMap(delMap) {
var _local3 = localmaps.length;
var _local2 = 0;
while (_local2 < _local3) {
if (localmaps[_local2] == delMap) {
localmaps.splice(_local2, 1);
break;
}
_local2++;
}
so.data.maps = localmaps;
so.flush();
maps = defaultmaps.concat(localmaps);
idx = laststart;
showMaps();
}
}
Symbol 3469 MovieClip [__Packages.cr.map.NewMapContainer] Frame 0
class cr.map.NewMapContainer extends rr.BaseClip
{
var maps, attachMovie;
function NewMapContainer () {
super();
init();
}
function init() {
maps = [{id:1, sid:1, title:"GRASSLAND"}, {id:2, sid:2, title:"DESERT"}, {id:3, sid:4, title:"ARCTIC ICE"}, {id:4, sid:6, title:"JUNGLE"}, {id:5, sid:8, title:"FLATLANDS"}];
showMaps();
}
function showMaps() {
var _local5 = 0;
var _local6 = 0;
var _local3 = 0;
while (_local3 < 5) {
this["mb" + _local3].removeMovieClip();
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
if (!maps[_local3]) {
break;
}
var _local4 = attachMovie("MapButton", "mb" + _local3, 100 + _local3);
if (_local5 > 3) {
_local5 = 0;
_local6++;
}
_local4._x = _local5 * (_local4._width + 4);
_local4._y = _local6 * (_local4._height + 4);
_local5++;
_local4.title_txt.text = (("MAP " + maps[_local3].id) + "_") + maps[_local3].title;
_local4.image_mc.gotoAndStop(maps[_local3].id);
_local4.delete_btn._visible = false;
if (maps[_local3].sid == 1) {
_local4.locked_mc._visible = false;
_local4.image_mc.onPress = rr.utils.Delegate.create(_global.createcontrol, _global.createcontrol.createMap, maps[_local3].id);
} else {
_local4._alpha = 50;
}
_local3++;
}
}
}
Symbol 3470 MovieClip [__Packages.cr.level.LevelContainer] Frame 0
class cr.level.LevelContainer extends rr.BaseClip
{
var more_btn, back_btn, defaultlevels, so, locallevels, levels, idx, laststart, nolevel_txt, attachMovie;
function LevelContainer () {
super();
init();
}
function init() {
more_btn.onRelease = rr.utils.Delegate.create(this, showLevels);
back_btn.onRelease = rr.utils.Delegate.create(this, flipBack);
defaultlevels = [];
so = SharedObject.getLocal("levelconfig");
locallevels = so.data.levels;
if (locallevels == undefined) {
locallevels = new Array();
}
levels = defaultlevels.concat(locallevels);
idx = 0;
showLevels();
}
function flipBack() {
idx = laststart - 12;
showLevels();
}
function showLevels() {
more_btn._visible = (back_btn._visible = false);
var _local5 = 0;
var _local6 = 0;
laststart = idx;
var _local4 = 0;
while (_local4 < 12) {
this["lb" + _local4].removeMovieClip();
_local4++;
}
var _local7 = levels.length;
if (_local7 > 0) {
nolevel_txt._visible = false;
} else {
nolevel_txt.autoSize = true;
nolevel_txt.text = "THERE ARE CURRENTLY NO LEVELS AVAILABLE\rCREATE AND SAVE A NEW LEVEL TO LOAD HERE";
nolevel_txt._visible = true;
return(undefined);
}
_local4 = 0;
while (_local4 < 12) {
if (!levels[idx]) {
break;
}
var _local3 = attachMovie("MapButton", "lb" + _local4, 100 + _local4);
_local3.locked_mc._visible = false;
if (_local5 > 3) {
_local5 = 0;
_local6++;
}
_local3._x = _local5 * (_local3._width + 4);
_local3._y = _local6 * (_local3._height + 4);
_local5++;
_local3.title_txt.text = (("LEVEL" + levels[idx].map.mapid) + "_") + levels[idx].title;
_local3.image_mc.gotoAndStop(levels[idx].map.mapid);
if (levels[idx].title == "default") {
_local3.delete_btn._visible = false;
}
_local3.image_mc.onPress = rr.utils.Delegate.create(_global.createcontrol, _global.createcontrol.loadLevel, levels[idx]);
_local3.delete_btn.onPress = rr.utils.Delegate.create(this, deleteLevel, levels[idx]);
idx++;
_local4++;
}
more_btn._visible = (levels.length > 12) && (idx < levels.length);
back_btn._visible = idx > 12;
}
function deleteLevel(delLevel) {
var _local3 = locallevels.length;
var _local2 = 0;
while (_local2 < _local3) {
if (locallevels[_local2] == delLevel) {
locallevels.splice(_local2, 1);
break;
}
_local2++;
}
so.data.levels = locallevels;
so.flush();
levels = defaultlevels.concat(locallevels);
idx = laststart;
showLevels();
}
}
Symbol 3471 MovieClip [__Packages.rr.GameContainer] Frame 0
class rr.GameContainer extends rr.BaseClip
{
var more_btn, back_btn, defaultlevels, so, locallevels, levels, idx, laststart, nogame_txt, attachMovie, _parent;
function GameContainer () {
super();
init();
}
function init() {
more_btn.onRelease = rr.utils.Delegate.create(this, showLevels);
back_btn.onRelease = rr.utils.Delegate.create(this, flipBack);
defaultlevels = new Array();
if (_global.gametype == "railrage") {
var _local4 = _global.superlevel;
if (_local4 > 1) {
var _local3 = new rr.conf.level.ConfLevel1();
_local3.isdefault = true;
_local3.ragelevelid = 1;
defaultlevels.push(_local3);
}
if (_local4 > 2) {
var _local3 = new rr.conf.level.ConfLevel2();
_local3.isdefault = true;
_local3.ragelevelid = 2;
defaultlevels.push(_local3);
}
}
so = SharedObject.getLocal("levelconfig");
locallevels = so.data.levels;
if (locallevels == undefined) {
locallevels = new Array();
}
levels = defaultlevels.concat(locallevels);
idx = 0;
showLevels();
}
function flipBack() {
idx = laststart - 12;
showLevels();
}
function showLevels() {
more_btn._visible = (back_btn._visible = false);
var _local5 = 0;
var _local6 = 0;
laststart = idx;
var _local4 = 0;
while (_local4 < 12) {
this["gb" + _local4].removeMovieClip();
_local4++;
}
var _local7 = levels.length;
if (_local7 > 0) {
nogame_txt._visible = false;
} else {
nogame_txt.autoSize = true;
if (_global.gametype == "railrage") {
nogame_txt.text = "THERE ARE CURRENTLY NO RAIL RAGE LEVELS AVAILABLE\rPLAY MISSIONS TO UNLOCK RAIL RAGE LEVELS\rOR CREATE AND SAVE YOUR OWN LEVEL IN \"CREATE YOUR LEVEL\"";
} else {
nogame_txt.text = "THERE ARE CURRENTLY NO LEVELS AVAILABLE\rCREATE AND SAVE YOUR OWN LEVEL IN \"CREATE YOUR LEVEL\"";
}
nogame_txt._visible = true;
return(undefined);
}
_local4 = 0;
while (_local4 < 12) {
if (!levels[idx]) {
break;
}
var _local3 = attachMovie("GameButton", "gb" + _local4, 100 + _local4);
if (_local5 > 3) {
_local5 = 0;
_local6++;
}
_local3._x = _local5 * (_local3._width + 4);
_local3._y = _local6 * (_local3._height + 4);
_local5++;
_local3.title_txt.text = levels[idx].title;
_local3.image_mc.gotoAndStop(levels[idx].map.mapid);
_local3.image_mc.onPress = rr.utils.Delegate.create(this, loadLevel, levels[idx]);
idx++;
_local4++;
}
more_btn._visible = (levels.length > 12) && (idx < levels.length);
back_btn._visible = idx > 12;
}
function loadLevel(levelConfig) {
_global.loadedlevel = levelConfig;
_parent._parent.gotoAndPlay("game");
}
}
Symbol 3472 MovieClip [__Packages.cr.SaveControl] Frame 0
class cr.SaveControl extends rr.BaseClip
{
var savetype, header, title, gotoAndPlay, result_txt;
function SaveControl () {
super();
_global.savecontrol = this;
}
function init() {
}
function showMapSave() {
savetype = "map";
header = ("MAP" + _global.createcontrol.mapId) + "_";
title = "DEMO";
_global.demoalert.show("IN THIS DEMO-VERSION IT IS POSSIBLE TO\rSAVE ONLY ONE MAP AND ONE LEVEL");
(gotoAndPlay("show"));// not popped
}
function showLevelSave() {
savetype = "level";
header = "LEVEL_";
title = "DEMO";
_global.demoalert.show("IN THIS DEMO-VERSION IT IS POSSIBLE TO\rSAVE ONLY ONE MAP AND ONE LEVEL");
(gotoAndPlay("show"));// not popped
}
function submit() {
var _local2;
if (savetype == "map") {
_local2 = submitMap();
}
if (savetype == "level") {
_local2 = submitLevel();
}
if (_local2 == false) {
result_txt.textColor = 16711680 /* 0xFF0000 */;
result_txt.text = "Not able to save.";
} else if (_local2 == "pending") {
result_txt.textColor = 16711680 /* 0xFF0000 */;
result_txt.text = "Not enough disk space\rto save.";
} else if (_local2 == true) {
result_txt.textColor = 65280;
result_txt.text = (header + title) + "\rSUCCESSFULLY SAVED";
}
(gotoAndPlay("result"));// not popped
}
function showError(err) {
result_txt.textColor = 16711680 /* 0xFF0000 */;
result_txt.text = err;
(gotoAndPlay("result"));// not popped
}
function submitMap() {
title = "DEMO";
_global.createcontrol.mapTitle = title;
if (title == "") {
showError("No name for map\rMAP HAS NOT BEEN SAVED");
return(undefined);
}
if (title == "default") {
showError("Mapname is reserved\rMAP HAS NOT BEEN SAVED");
return(undefined);
}
var _local3 = cr.CreateUtils.createMapConf();
_local3.mapid = _global.createcontrol.mapId;
_local3.title = title;
var _local5 = SharedObject.getLocal("mapconfig");
var _local4 = new Array();
_local4.push(_local3);
_local5.data.maps = _local4;
return(_local5.flush());
}
function submitLevel() {
title = "DEMO";
_global.createcontrol.levelTitle = title;
if (title == "") {
showError("No name for level\rMAP HAS NOT BEEN SAVED");
return(undefined);
}
if (title == "default") {
showError("Mapname is reserved\rMAP HAS NOT BEEN SAVED");
return(undefined);
}
var _local4 = cr.CreateUtils.createLevelConf();
_local4.title = title;
var _local5 = SharedObject.getLocal("levelconfig");
var _local3 = new Array();
_local3.push(_local4);
_local5.data.levels = _local3;
return(_local5.flush());
}
}
Symbol 3473 MovieClip [__Packages.cr.CreateUtils] Frame 0
class cr.CreateUtils
{
function CreateUtils () {
}
static function mapConfToXml(cnf) {
var _local10 = new XML();
_local10.ignoreWhite = true;
var _local12;
var _local17;
var _local16 = _local10.createElement("map");
_local16.attributes.mapid = cnf.mapid;
var _local13 = _local10.createElement("rcs");
_local16.appendChild(_local13);
_local12 = cnf.rc.length;
var _local9 = 0;
while (_local9 < _local12) {
_local17 = false;
var _local8 = cnf.rc[_local9];
var _local4 = _local10.createElement("rc");
if (_local8.s) {
var _local5 = "";
_local4.attributes.sy = _local8.s.y;
_local4.attributes.sx = _local8.s.x;
var _local1 = 0;
while (_local1 <= 7) {
var _local6 = _local8.s.p[_local1];
_local5 = _local5 + _local6.toString();
if (_local1 < 7) {
_local5 = _local5 + ",";
}
_local1++;
}
_local4.attributes.sp = _local5;
}
_local4.attributes.a = _local8.a;
_local4.attributes.y = _local8.y;
_local4.attributes.x = _local8.x;
_local4.attributes.id = _local8.id;
_local13.appendChild(_local4);
_local9++;
}
var _local15 = _local10.createElement("rss");
_local16.appendChild(_local15);
_local12 = cnf.rs.length;
_local9 = 0;
while (_local9 < _local12) {
var _local2 = cnf.rs[_local9];
var _local3 = _local10.createElement("rs");
if (_local2.r) {
_local3.attributes.l = _local2.l;
_local3.attributes.d = _local2.d;
_local3.attributes.r = _local2.r;
}
if (_local2.eo) {
_local3.attributes.eo = 1;
}
if (_local2.t) {
_local3.attributes.t = 1;
}
_local3.attributes.e = _local2.e;
_local3.attributes.s = _local2.s;
_local3.attributes.id = _local2.id;
_local15.appendChild(_local3);
_local9++;
}
var _local14 = _local10.createElement("cps");
_local16.appendChild(_local14);
_local12 = cnf.cp.length;
_local9 = 0;
while (_local9 < _local12) {
var _local8 = cnf.cp[_local9];
var _local7 = _local10.createElement("cp");
_local7.attributes.r = _local8.rot;
_local7.attributes.y = _local8.y;
_local7.attributes.x = _local8.x;
_local14.appendChild(_local7);
_local9++;
}
return(_local16);
}
static function mapXmlToConf(mapxml) {
var _local5 = new Object();
var _local6;
var _local17 = mapxml;
_local5.mapid = Number(_local17.attributes.mapid);
_local5.rc = [];
var _local15 = findChildNode(_local17, "rcs");
_local6 = _local15.childNodes.length;
var _local3 = 0;
while (_local3 < _local6) {
var _local1 = _local15.childNodes[_local3];
var _local7 = {id:Number(_local1.attributes.id), x:Number(_local1.attributes.x), y:Number(_local1.attributes.y), a:Number(_local1.attributes.a)};
if (_local1.attributes.sp) {
_local7.s = new Object();
_local7.s.x = Number(_local1.attributes.sx);
_local7.s.y = Number(_local1.attributes.sy);
_local7.s.p = _local1.attributes.sp.split(",");
}
_local5.rc.push(_local7);
_local3++;
}
_local5.rs = [];
var _local14 = findChildNode(_local17, "rss");
_local6 = _local14.childNodes.length;
_local3 = 0;
while (_local3 < _local6) {
var _local2 = _local14.childNodes[_local3];
var _local7 = {id:Number(_local2.attributes.id), s:Number(_local2.attributes.s), e:Number(_local2.attributes.e)};
if (_local2.attributes.r) {
_local7.r = Number(_local2.attributes.r);
_local7.d = Number(_local2.attributes.d);
_local7.l = Number(_local2.attributes.l);
}
if (_local2.attributes.eo) {
_local7.eo = 1;
}
if (_local2.attributes.t) {
_local7.t = 1;
}
_local5.rs.push(_local7);
_local3++;
}
_local5.cp = [];
var _local16 = findChildNode(_local17, "cps");
_local6 = _local16.childNodes.length;
_local3 = 0;
while (_local3 < _local6) {
var _local4 = _local16.childNodes[_local3];
var _local7 = {x:Number(_local4.attributes.x), y:Number(_local4.attributes.y), rot:Number(_local4.attributes.r)};
_local5.cp.push(_local7);
_local3++;
}
return(_local5);
}
static function createMapConf() {
var _local9 = new Object();
var _local10;
var _local8;
_local9.rc = [];
_local10 = _global.stage.rc.length;
var _local6 = 0;
while (_local6 < _local10) {
_local8 = false;
var _local2 = _global.stage["rc_" + _global.stage.rc[_local6]];
var _local11 = {id:_local2.id, x:_local2.x, y:_local2.y, a:_local2.ang};
var _local3 = 0;
while (_local3 <= 7) {
if (_local2.rswitch.positions[_local3].rsid != null) {
_local8 = true;
break;
}
_local3++;
}
if (_local8) {
_local11.s = new Object();
_local11.s.x = Math.round(_local2.rswitch.x);
_local11.s.y = Math.round(_local2.rswitch.y);
_local11.s.p = [];
_local3 = 0;
while (_local3 <= 7) {
var _local5 = ((_local2.rswitch.positions[_local3].rsid == null) ? -1 : (_local2.rswitch.positions[_local3].rsid));
_local11.s.p.push(_local5);
_local3++;
}
}
_local9.rc.push(_local11);
_local6++;
}
_local9.rs = [];
_local10 = _global.stage.rs.length;
_local6 = 0;
while (_local6 < _local10) {
var _local4 = _global.stage["rs_" + _global.stage.rs[_local6]];
var _local11 = {id:_local4.id, s:_local4.cps.id, e:_local4.cpe.id};
if (_local4.type == "arc") {
_local11.r = _local4.radius;
_local11.d = _local4.dir;
_local11.l = Math.round(_local4.length);
}
if (_local4.endout) {
_local11.eo = 1;
}
if (_local4.toggled) {
_local11.t = 1;
}
_local9.rs.push(_local11);
_local6++;
}
_local9.cp = [];
_local10 = _global.stage.cp.length;
_local6 = 0;
while (_local6 < _local10) {
var _local7 = _global.stage["cp_" + _global.stage.cp[_local6]];
var _local11 = {x:_local7.x, y:_local7.y, rot:_local7.rot};
_local9.cp.push(_local11);
_local6++;
}
return(_local9);
}
static function levelXmlToConf(levelxml) {
var _local3 = new Object();
var _local4;
var _local20 = levelxml;
_local3.nightmap = Boolean(_local20.attributes.nightmap);
_local3.startcash = Number(_local20.attributes.startcash);
var _local27 = findChildNode(_local20, "map");
_local3.map = mapXmlToConf(_local27);
_local3.ea = [];
var _local23 = findChildNode(_local20, "eas");
_local4 = _local23.childNodes.length;
var _local8 = 0;
while (_local8 < _local4) {
var _local7 = _local23.childNodes[_local8];
if (_local7.nodeName == "ea") {
var _local12 = {x:Number(_local7.attributes.x), y:Number(_local7.attributes.y), w:Number(_local7.attributes.w), h:Number(_local7.attributes.h)};
_local12.e = _local7.attributes.e.split(",");
_local3.ea.push(_local12);
}
if (_local7.nodeName == "cea") {
var _local12 = {a:[], e:[]};
_local12.e = _local7.attributes.e.split(",");
var _local9 = _local7.childNodes.length;
var _local2 = 0;
while (_local2 < _local9) {
var _local1 = _local7.childNodes[_local2];
_local12.a.push({x:Number(_local1.attributes.x), y:Number(_local1.attributes.y), w:Number(_local1.attributes.w), h:Number(_local1.attributes.h)});
_local2++;
}
_local3.ea.push(_local12);
}
_local8++;
}
_local3.af = [];
var _local26 = findChildNode(_local20, "afs");
_local4 = _local26.childNodes.length;
_local8 = 0;
while (_local8 < _local4) {
var _local7 = _local26.childNodes[_local8];
var _local12 = {x:Number(_local7.attributes.x), y:Number(_local7.attributes.y), r:Number(_local7.attributes.r)};
_local12.e = _local7.attributes.e.split(",");
_local3.af.push(_local12);
_local8++;
}
_local3.bk = [];
var _local25 = findChildNode(_local20, "bks");
_local4 = _local25.childNodes.length;
_local8 = 0;
while (_local8 < _local4) {
var _local5 = _local25.childNodes[_local8];
var _local12 = {x:Number(_local5.attributes.x), y:Number(_local5.attributes.y), r:Number(_local5.attributes.r), s:Number(_local5.attributes.s)};
_local3.bk.push(_local12);
_local8++;
}
_local3.rb = [];
var _local22 = findChildNode(_local20, "rbs");
_local4 = _local22.childNodes.length;
_local8 = 0;
while (_local8 < _local4) {
var _local5 = _local22.childNodes[_local8];
var _local12 = {x:Number(_local5.attributes.x), y:Number(_local5.attributes.y), r:Number(_local5.attributes.r)};
_local3.rb.push(_local12);
_local8++;
}
_local3.bs = [];
var _local21 = findChildNode(_local20, "bss");
_local4 = _local21.childNodes.length;
_local8 = 0;
while (_local8 < _local4) {
var _local5 = _local21.childNodes[_local8];
var _local12 = {x:Number(_local5.attributes.x), y:Number(_local5.attributes.y), t:_local5.attributes.t};
if (_local5.attributes.t == "m") {
_local12.c = Number(_local5.attributes.c);
}
_local3.bs.push(_local12);
_local8++;
}
_local3.dp = [];
var _local24 = findChildNode(_local20, "dps");
_local4 = _local24.childNodes.length;
_local8 = 0;
while (_local8 < _local4) {
var _local6 = _local24.childNodes[_local8];
var _local12 = {x:Number(_local6.attributes.x), y:Number(_local6.attributes.y), t:_local6.attributes.t, m:_local6.attributes.m};
_local3.dp.push(_local12);
_local8++;
}
return(_local3);
}
static function createLevelConf() {
var _local3 = new Object();
var _local5;
_local3.map = copyMapValues(_global.createcontrol.confmap);
_local3.nightmap = _global.stage.isnightlevel;
_local3.startcash = _global.stage.startcash;
_local3.ea = [];
_local3.af = [];
_local3.bk = [];
_local3.rb = [];
_local3.bs = [];
_local3.dp = [];
_local5 = _global.stage.areas.length;
var _local11 = 0;
while (_local11 < _local5) {
var _local8 = _global.stage["area_" + _global.stage.areas[_local11]];
if (!_local8.combination) {
var _local9 = _local8.enemies.length;
if (_local9 > 0) {
var _local15 = {x:_local8.x, y:_local8.y, w:_local8.w, h:_local8.h, e:[]};
var _local2 = 0;
while (_local2 < _local9) {
_local15.e.push(rr.conf.Config.getObjectValue(_local8.enemies[_local2], "confcode"));
_local2++;
}
_local3.ea.push(_local15);
}
}
_local11++;
}
_local5 = _global.stage.combinations.length;
_local11 = 0;
while (_local11 < _local5) {
var _local4 = _global.stage["comb_" + _global.stage.combinations[_local11]];
if (_local4.enemies.length > 0) {
var _local15 = {a:[], e:[]};
var _local12 = _local4.areas.length;
var _local2 = 0;
while (_local2 < _local12) {
var _local8 = _local4.areas[_local2];
_local15.a.push({x:_local8.x, y:_local8.y, w:_local8.w, h:_local8.h});
_local2++;
}
var _local9 = _local4.enemies.length;
_local2 = 0;
while (_local2 < _local9) {
_local15.e.push(rr.conf.Config.getObjectValue(_local4.enemies[_local2], "confcode"));
_local2++;
}
_local3.ea.push(_local15);
}
_local11++;
}
var _local23 = _global.stage.AirFieldarr;
_local5 = _local23.length;
_local11 = 0;
while (_local11 < _local5) {
var _local8 = _global.stage["AirField" + _local23[_local11]];
var _local9 = _local8.enemies.length;
if (_local9 > 0) {
var _local15 = {x:_local8.x, y:_local8.y, r:_local8.rot, e:[]};
var _local2 = 0;
while (_local2 < _local9) {
_local15.e.push(rr.conf.Config.getObjectValue(_local8.enemies[_local2], "confcode"));
_local2++;
}
_local3.af.push(_local15);
}
_local11++;
}
_local23 = _global.stage.Bunkerarr;
_local5 = _local23.length;
_local11 = 0;
while (_local11 < _local5) {
var _local7 = _global.stage["Bunker" + _local23[_local11]];
var _local15 = {x:_local7.x, y:_local7.y, r:_local7.rot, s:_local7.scale};
_local3.bk.push(_local15);
_local11++;
}
_local23 = _global.stage.RocketBasearr;
_local5 = _local23.length;
_local11 = 0;
while (_local11 < _local5) {
var _local7 = _global.stage["RocketBase" + _local23[_local11]];
var _local15 = {x:_local7.x, y:_local7.y, r:_local7.rot};
_local3.rb.push(_local15);
_local11++;
}
_local23 = _global.stage.Bonusarr;
_local5 = _local23.length;
_local11 = 0;
while (_local11 < _local5) {
var _local7 = _global.stage["Bonus" + _local23[_local11]];
var _local15 = {x:_local7.x, y:_local7.y, t:_local7.type};
if (_local7.type == "m") {
var _local10 = Number(_local7.mov.image_mc.cash_txt.text);
if (!_local10) {
_local10 = 10000;
}
_local15.c = _local10;
}
if (_local7.type == "e") {
_local3.bs.push(_local15);
}
_local11++;
}
_local23 = _global.stage.Droparr;
_local5 = _local23.length;
_local11 = 0;
while (_local11 < _local5) {
var _local6 = _global.stage["Drop" + _local23[_local11]];
var _local15 = {x:_local6.x, y:_local6.y, t:_local6.type, m:_local6.mode};
if ((_local6.type == "f") || (_local6.type == "p")) {
_local3.dp.push(_local15);
}
_local11++;
}
return(_local3);
}
static function copyMapValues(m) {
var _local1 = new Object();
_local1.mapid = m.mapid;
_local1.title = m.title;
_local1.cp = m.cp;
_local1.rc = m.rc;
_local1.rs = m.rs;
return(_local1);
}
static function findChildNode(rootnode, childnodename) {
var _local3 = rootnode.childNodes.length;
var _local1 = 0;
while (_local1 < _local3) {
if (rootnode.childNodes[_local1].nodeName == childnodename) {
return(rootnode.childNodes[_local1]);
}
_local1++;
}
}
static function mapXmlToConfString(mapxml) {
var _local1 = "";
var _local2;
var _local4 = "\t\t";
var _local9 = mapxml;
_local1 = _local1 + (((_local4 + "mapid = ") + _local9.attributes.mapid) + newline);
_local1 = _local1 + (((_local4 + "title = \"default\"") + newline) + newline);
_local1 = _local1 + ((_local4 + "rc = [") + newline);
var _local7 = findChildNode(_local9, "rcs");
_local2 = _local7.childNodes.length;
_local4 = "\t\t\t";
var _local3 = 0;
while (_local3 < _local2) {
var _local5 = _local7.childNodes[_local3];
_local1 = _local1 + (_local4 + "{");
_local1 = _local1 + (("id:" + _local5.attributes.id) + ", ");
_local1 = _local1 + (("x:" + _local5.attributes.x) + ", ");
_local1 = _local1 + (("y:" + _local5.attributes.y) + ", ");
_local1 = _local1 + ("a:" + _local5.attributes.a);
if (_local5.attributes.sp) {
_local1 = _local1 + ", s:{";
_local1 = _local1 + (("x:" + _local5.attributes.sx) + ", ");
_local1 = _local1 + (("y:" + _local5.attributes.sy) + ", ");
_local1 = _local1 + (("p:[" + _local5.attributes.sp) + "]");
_local1 = _local1 + "}";
}
_local1 = _local1 + "}";
if (_local3 < (_local2 - 1)) {
_local1 = _local1 + ",";
}
_local1 = _local1 + newline;
_local3++;
}
_local4 = "\t\t";
_local1 = _local1 + (((_local4 + "]") + newline) + newline);
_local1 = _local1 + ((_local4 + "rs = [") + newline);
var _local6 = findChildNode(_local9, "rss");
_local2 = _local6.childNodes.length;
_local4 = "\t\t\t";
_local3 = 0;
while (_local3 < _local2) {
var _local5 = _local6.childNodes[_local3];
_local1 = _local1 + (_local4 + "{");
_local1 = _local1 + (("id:" + _local5.attributes.id) + ", ");
_local1 = _local1 + (("s:" + _local5.attributes.s) + ", ");
_local1 = _local1 + ("e:" + _local5.attributes.e);
if (_local5.attributes.r) {
_local1 = _local1 + (", r:" + _local5.attributes.r);
_local1 = _local1 + (", d:" + _local5.attributes.d);
_local1 = _local1 + (", l:" + _local5.attributes.l);
}
if (_local5.attributes.eo) {
_local1 = _local1 + ", eo:1";
}
if (_local5.attributes.t) {
_local1 = _local1 + ", t:1";
}
_local1 = _local1 + "}";
if (_local3 < (_local2 - 1)) {
_local1 = _local1 + ",";
}
_local1 = _local1 + newline;
_local3++;
}
_local4 = "\t\t";
_local1 = _local1 + (((_local4 + "]") + newline) + newline);
_local1 = _local1 + ((_local4 + "cp = [") + newline);
var _local8 = findChildNode(_local9, "cps");
_local2 = _local8.childNodes.length;
_local4 = "\t\t\t";
_local3 = 0;
while (_local3 < _local2) {
var _local5 = _local8.childNodes[_local3];
_local1 = _local1 + (_local4 + "{");
_local1 = _local1 + (("x:" + _local5.attributes.x) + ", ");
_local1 = _local1 + (("y:" + _local5.attributes.y) + ", ");
_local1 = _local1 + ("rot:" + _local5.attributes.r);
_local1 = _local1 + "}";
if (_local3 < (_local2 - 1)) {
_local1 = _local1 + ",";
}
_local1 = _local1 + newline;
_local3++;
}
_local4 = "\t\t";
_local1 = _local1 + (((_local4 + "]") + newline) + newline);
return(_local1);
}
static function levelXmlToConfString(levelxml) {
var _local1 = "";
var _local3;
var _local2 = "\t\t";
var _local19 = levelxml;
_local1 = _local1 + ((_local2 + "ea = [") + newline);
var _local15 = findChildNode(_local19, "eas");
_local3 = _local15.childNodes.length;
_local2 = "\t\t\t";
var _local11 = 0;
while (_local11 < _local3) {
var _local9 = _local15.childNodes[_local11];
if (_local9.nodeName == "ea") {
_local1 = _local1 + (_local2 + "{");
_local1 = _local1 + (("x:" + _local9.attributes.x) + ", ");
_local1 = _local1 + (("y:" + _local9.attributes.y) + ", ");
_local1 = _local1 + (("w:" + _local9.attributes.w) + ", ");
_local1 = _local1 + (("h:" + _local9.attributes.h) + ", ");
_local1 = _local1 + "e:[";
var _local12 = _local9.attributes.e.split(",");
var _local7 = _local12.length;
var _local4 = 0;
while (_local4 < _local7) {
_local1 = _local1 + (("\"" + _local12[_local4]) + "\"");
if (_local4 < (_local7 - 1)) {
_local1 = _local1 + ",";
}
_local4++;
}
_local1 = _local1 + "]";
_local1 = _local1 + "}";
}
if (_local9.nodeName == "cea") {
_local1 = _local1 + ((_local2 + "{") + newline);
_local2 = "\t\t\t\t";
_local1 = _local1 + (_local2 + "e:[");
var _local12 = _local9.attributes.e.split(",");
var _local7 = _local12.length;
var _local4 = 0;
while (_local4 < _local7) {
_local1 = _local1 + (("\"" + _local12[_local4]) + "\"");
if (_local4 < (_local7 - 1)) {
_local1 = _local1 + ",";
}
_local4++;
}
_local1 = _local1 + "],\r";
_local1 = _local1 + (_local2 + "a:[");
var _local10 = _local9.childNodes.length;
_local4 = 0;
while (_local4 < _local10) {
var _local5 = _local9.childNodes[_local4];
_local1 = _local1 + "{";
_local1 = _local1 + (("x:" + _local5.attributes.x) + ", ");
_local1 = _local1 + (("y:" + _local5.attributes.y) + ", ");
_local1 = _local1 + (("w:" + _local5.attributes.w) + ", ");
_local1 = _local1 + ("h:" + _local5.attributes.h);
_local1 = _local1 + "}";
if (_local4 < (_local10 - 1)) {
_local1 = _local1 + ",";
}
_local4++;
}
_local1 = _local1 + "]\r";
_local2 = "\t\t\t";
_local1 = _local1 + (_local2 + "}");
}
if (_local11 < (_local3 - 1)) {
_local1 = _local1 + ",";
}
_local1 = _local1 + newline;
_local11++;
}
_local2 = "\t\t";
_local1 = _local1 + (((_local2 + "]") + newline) + newline);
_local1 = _local1 + ((_local2 + "af = [") + newline);
var _local18 = findChildNode(_local19, "afs");
_local3 = _local18.childNodes.length;
_local2 = "\t\t\t";
_local11 = 0;
while (_local11 < _local3) {
var _local9 = _local18.childNodes[_local11];
_local1 = _local1 + (_local2 + "{");
_local1 = _local1 + (("x:" + _local9.attributes.x) + ", ");
_local1 = _local1 + (("y:" + _local9.attributes.y) + ", ");
_local1 = _local1 + (("r:" + _local9.attributes.r) + ", ");
_local1 = _local1 + "e:[";
var _local12 = _local9.attributes.e.split(",");
var _local7 = _local12.length;
var _local4 = 0;
while (_local4 < _local7) {
_local1 = _local1 + (("\"" + _local12[_local4]) + "\"");
if (_local4 < (_local7 - 1)) {
_local1 = _local1 + ",";
}
_local4++;
}
_local1 = _local1 + "]";
_local1 = _local1 + "}";
if (_local11 < (_local3 - 1)) {
_local1 = _local1 + ",";
}
_local1 = _local1 + newline;
_local11++;
}
_local2 = "\t\t";
_local1 = _local1 + (((_local2 + "]") + newline) + newline);
_local1 = _local1 + ((_local2 + "bk = [") + newline);
var _local17 = findChildNode(_local19, "bks");
_local3 = _local17.childNodes.length;
_local2 = "\t\t\t";
_local11 = 0;
while (_local11 < _local3) {
var _local6 = _local17.childNodes[_local11];
_local1 = _local1 + (_local2 + "{");
_local1 = _local1 + (("x:" + _local6.attributes.x) + ", ");
_local1 = _local1 + (("y:" + _local6.attributes.y) + ", ");
_local1 = _local1 + (("r:" + _local6.attributes.r) + ", ");
_local1 = _local1 + ("s:" + _local6.attributes.s);
_local1 = _local1 + "}";
if (_local11 < (_local3 - 1)) {
_local1 = _local1 + ",";
}
_local1 = _local1 + newline;
_local11++;
}
_local2 = "\t\t";
_local1 = _local1 + (((_local2 + "]") + newline) + newline);
_local1 = _local1 + ((_local2 + "rb = [") + newline);
var _local14 = findChildNode(_local19, "rbs");
_local3 = _local14.childNodes.length;
_local2 = "\t\t\t";
_local11 = 0;
while (_local11 < _local3) {
var _local6 = _local14.childNodes[_local11];
_local1 = _local1 + (_local2 + "{");
_local1 = _local1 + (("x:" + _local6.attributes.x) + ", ");
_local1 = _local1 + (("y:" + _local6.attributes.y) + ", ");
_local1 = _local1 + ("r:" + _local6.attributes.r);
_local1 = _local1 + "}";
if (_local11 < (_local3 - 1)) {
_local1 = _local1 + ",";
}
_local1 = _local1 + newline;
_local11++;
}
_local2 = "\t\t";
_local1 = _local1 + (((_local2 + "]") + newline) + newline);
_local1 = _local1 + ((_local2 + "bs = [") + newline);
var _local13 = findChildNode(_local19, "bss");
_local3 = _local13.childNodes.length;
_local2 = "\t\t\t";
_local11 = 0;
while (_local11 < _local3) {
var _local6 = _local13.childNodes[_local11];
_local1 = _local1 + (_local2 + "{");
_local1 = _local1 + (("x:" + _local6.attributes.x) + ", ");
_local1 = _local1 + (("y:" + _local6.attributes.y) + ", ");
_local1 = _local1 + (("t:\"" + _local6.attributes.t) + "\"");
if (_local6.attributes.t == "m") {
_local1 = _local1 + (", c:" + _local6.attributes.c);
}
_local1 = _local1 + "}";
if (_local11 < (_local3 - 1)) {
_local1 = _local1 + ",";
}
_local1 = _local1 + newline;
_local11++;
}
_local2 = "\t\t";
_local1 = _local1 + (((_local2 + "]") + newline) + newline);
_local1 = _local1 + ((_local2 + "dp = [") + newline);
var _local16 = findChildNode(_local19, "dps");
_local3 = _local16.childNodes.length;
_local2 = "\t\t\t";
_local11 = 0;
while (_local11 < _local3) {
var _local8 = _local16.childNodes[_local11];
_local1 = _local1 + (_local2 + "{");
_local1 = _local1 + (("x:" + _local8.attributes.x) + ", ");
_local1 = _local1 + (("y:" + _local8.attributes.y) + ", ");
_local1 = _local1 + (("t:\"" + _local8.attributes.t) + "\", ");
_local1 = _local1 + (("m:\"" + _local8.attributes.m) + "\"");
_local1 = _local1 + "}";
if (_local11 < (_local3 - 1)) {
_local1 = _local1 + ",";
}
_local1 = _local1 + newline;
_local11++;
}
_local2 = "\t\t";
_local1 = _local1 + (((_local2 + "]") + newline) + newline);
return(_local1);
}
}
Symbol 3474 MovieClip [__Packages.rr.Sounds] Frame 0
class rr.Sounds extends rr.BaseClip
{
var createEmptyMovieClip, getNextHighestDepth;
function Sounds () {
super();
_global.sounds = this;
}
function init() {
clear();
}
function playSound(linkId, vol) {
if (vol == undefined) {
vol = 100;
}
if (!linkId) {
return(undefined);
}
if (!this[linkId]) {
this[linkId] = new Sound(_global.stage);
this[linkId].attachSound(linkId);
}
this[linkId].setVolume(vol);
this[linkId].start();
}
function playNewSound(linkId, vol) {
if (!linkId) {
return(undefined);
}
if (vol == undefined) {
vol = 100;
}
var _local3 = rr.utils.StringUtils.getUniqueName();
this[_local3] = new Sound(_global.stage);
this[_local3].attachSound(linkId);
this[_local3].onSoundComplete = rr.utils.Delegate.create(this, deleteSound, this[_local3]);
this[_local3].setVolume(vol);
this[_local3].start();
}
function deleteSound(s) {
trace("deleteSound: " + s);
trace("deleteSound: " + s);
}
function stopSound(linkId) {
if (!linkId) {
return(undefined);
}
this[linkId].stop();
}
function addLoopSound(obj) {
if (!this["loop_" + obj.uid]) {
this["loop_" + obj.uid] = new Object();
this["loop_" + obj.uid].soundmov = createEmptyMovieClip("soundmov" + obj.uid, getNextHighestDepth());
this["loop_" + obj.uid].sound = new Sound(this["loop_" + obj.uid].soundmov);
this["loop_" + obj.uid].sound.attachSound(obj.loopsoundid);
this["loop_" + obj.uid].isplaying = false;
this["loop_" + obj.uid].vol = 0;
this["loop_" + obj.uid].fade = "";
obj.addEventListener("onRemoveLoopSound", this);
}
return(this["loop_" + obj.uid]);
}
function playLoopSound(obj) {
if (_global.timer.stopped) {
return(undefined);
}
var _local3 = this["loop_" + obj.uid];
if (!_local3.isplaying) {
_local3.isplaying = true;
_local3.sound.start(0, 100000);
}
_local3.fade = "in";
fade(_local3);
}
function stopLoopSound(obj, immediate) {
var _local2 = this["loop_" + obj.uid];
if (immediate) {
_local2.isplaying = false;
_local2.vol = 0;
_local2.fade = "";
_local2.sound.stop();
} else {
_local2.fade = "out";
fade(_local2);
}
}
function fade(s) {
if (_global.timer.stopped) {
return(undefined);
}
var _local4 = 2;
if (s.fade == "") {
return(undefined);
}
if (s.fade == "in") {
if (s.vol >= 100) {
s.vol = 100;
s.fade = "";
return(undefined);
}
s.vol = s.vol + _local4;
}
if (s.fade == "out") {
if (s.vol <= 0) {
s.vol = 0;
s.isplaying = false;
s.fade = "";
s.sound.stop();
return(undefined);
}
s.vol = s.vol - _local4;
}
s.sound.setVolume(s.vol);
rr.utils.Delegate.callDelayed(this, fade, 40, s);
}
function onRemoveLoopSound(evtObj) {
var _local2 = evtObj.target;
_local2.removeEventListener("onRemoveLoopSound", this);
this["loop_" + _local2.uid].sound.stop();
this["loop_" + _local2.uid].soundmov.removeMovieClip();
delete this["loop_" + _local2.uid];
}
function stopAll() {
trace("sounds stopAll: ");
for (var _local3 in this) {
var _local2 = this[_local3];
if (_local2 instanceof Sound) {
this[_local3].stop();
} else {
_local2.isplaying = false;
_local2.vol = 0;
_local2.fade = "";
_local2.sound.stop();
}
}
}
function clear() {
for (var _local2 in this) {
if (this[_local2] instanceof Sound) {
trace("clear sound: ");
delete this[_local2];
}
}
for (var _local2 in this) {
if (this[_local2] instanceof Object) {
trace("clear sound Object: ");
delete this[_local2];
}
}
}
}
Symbol 3475 MovieClip [__Packages.rr.Stage] Frame 0
class rr.Stage extends rr.BaseClip
{
var enemyareas, enemies, enemies_dyn, ammo, afs, rbs, width, height, bg_mc, createEmptyMovieClip, bg_bmp, fg_mc, fg_bmp, crane;
function Stage () {
super();
_global.stage = this;
}
function init() {
clear();
enemyareas = new Array();
enemies = new Array();
enemies_dyn = new Array();
ammo = new Array();
afs = new Array();
rbs = new Array();
width = 640;
height = 480;
bg_mc = createEmptyMovieClip("bg_mc", 10);
bg_bmp = new flash.display.BitmapData(width, height, false, 0);
bg_mc.attachBitmap(bg_bmp, bg_mc.getNextHighestDepth());
if (_global.gameconf.map.foreground) {
fg_mc = createEmptyMovieClip("fg_mc", rr.conf.ConfBaseDepths.getDepth("StageForeground"));
fg_bmp = new flash.display.BitmapData(width, height, true, 0);
fg_mc.attachBitmap(fg_bmp, fg_mc.getNextHighestDepth());
}
_global.timer.addEventListener("onTimerTick", this);
}
function createObjects() {
new rr.train.Train();
if (_global.gametype == "railrage") {
_global.game.play();
return(undefined);
}
var _local8 = _global.gameconf.ea;
var _local4 = _local8.length;
var _local3 = 0;
while (_local3 < _local4) {
_local8[_local3].id = _local3;
this["ea_" + _local3] = new rr.enemy.EnemyArea(_local8[_local3]);
enemyareas.push(this["ea_" + _local3]);
_local3++;
}
var _local6 = _global.gameconf.af;
_local4 = _local6.length;
_local3 = 0;
while (_local3 < _local4) {
_local6[_local3].linkid = "AirField";
rr.enemy.EnemyUtils.createEnemy(_local6[_local3]);
_local3++;
}
var _local5 = _global.gameconf.bk;
_local4 = _local5.length;
_local3 = 0;
while (_local3 < _local4) {
_local5[_local3].linkid = "Bunker";
rr.enemy.EnemyUtils.createEnemy(_local5[_local3]);
_local3++;
}
var _local7 = _global.gameconf.rb;
_local4 = _local7.length;
_local3 = 0;
while (_local3 < _local4) {
_local7[_local3].linkid = "RocketBase";
rr.enemy.EnemyUtils.createEnemy(_local7[_local3]);
_local3++;
}
if (enemyareas.length > 0) {
enemyareas[0].init();
} else {
_global.game.play();
}
}
function onAreaInit(a) {
if (a.id >= (enemyareas.length - 1)) {
trace("lastarea: ");
_global.game.play();
} else {
var _local3 = Math.round((50 * a.id) / (enemyareas.length - 1));
if (_local3 > 40) {
_global.control.setLevelLoad(_local3, "get ready");
} else {
_global.control.setLevelLoad(_local3, "creating enemies");
}
rr.utils.Delegate.callDelayed(enemyareas[a.id + 1], enemyareas[a.id + 1].init, 10);
}
}
function onTimerTick() {
_global.camera.update();
_global.train.update();
if (_global.aim.mov._y > height) {
_global.aim.hide();
}
l = ammo.length;
var _local3 = 0;
while (_local3 < l) {
this["ammo_" + ammo[_local3]].update();
_local3++;
}
if (crane) {
crane.update();
}
if (_global.gametype == "railrage") {
updateAfterEvent();
return(undefined);
}
var l = enemies_dyn.length;
_local3 = 0;
while (_local3 < l) {
this["enemy_" + enemies_dyn[_local3]].update();
_local3++;
}
l = afs.length;
_local3 = 0;
while (_local3 < l) {
this["enemy_" + afs[_local3]].update();
_local3++;
}
l = rbs.length;
_local3 = 0;
while (_local3 < l) {
this["enemy_" + rbs[_local3]].update();
_local3++;
}
updateAfterEvent();
}
function removeEnemy(obj) {
var _local6 = obj.linkId;
var _local7 = obj.mode;
var _local5;
if (obj.cellId) {
_global.map["cell_" + obj.cellId].removeEnemy(obj);
} else {
_local5 = enemies_dyn.length;
var _local3 = 0;
while (_local3 < _local5) {
if (enemies_dyn[_local3] == obj.uid) {
enemies_dyn.splice(_local3, 1);
break;
}
_local3++;
}
}
_local5 = enemies.length;
var _local3 = 0;
while (_local3 < _local5) {
if (enemies[_local3] == obj.uid) {
enemies.splice(_local3, 1);
break;
}
_local3++;
}
delete this["enemy_" + obj.uid];
}
function removeAmmo(obj) {
var _local3 = ammo.length;
var _local2 = 0;
while (_local2 < _local3) {
if (this["ammo_" + ammo[_local2]] == obj) {
ammo.splice(_local2, 1);
break;
}
_local2++;
}
delete this["ammo_" + obj.uid];
}
function sendCrane() {
if (crane) {
return(undefined);
}
crane = new rr.train.AirCrane();
}
function deleteCrane() {
var _local2 = delete crane;
}
function clear() {
bg_bmp.dispose();
fg_bmp.dispose();
delete bg_bmp;
delete fg_bmp;
for (var _local2 in this) {
if (this[_local2] instanceof MovieClip) {
trace("clear stage Clip: ");
this[_local2].removeMovieClip();
}
}
for (var _local2 in this) {
if (this[_local2] instanceof Object) {
trace("clear stage Object: ");
delete this[_local2];
}
}
}
}
Symbol 3476 MovieClip [__Packages.rr.train.Train] Frame 0
class rr.train.Train extends rr.BaseClass
{
var segments, emps, isCrashed, crashdir, crashRotDir, crashRotSpeed, load, fuelcap, lastsegment, buildload;
function Train () {
super();
_global.train = this;
init();
}
function init() {
segments = new Array();
emps = new Array();
rr.train.TrainUtils.createLoc({type:_global.trainbuild.loc.linkId, bobj:_global.trainbuild.loc});
var _local14 = _global.trainbuild.wagons.length;
var _local7 = 0;
while (_local7 < _local14) {
var _local4 = _global.trainbuild.wagons[_local7];
var _local6 = new Array();
if (_local4.linkId == "HugeCannon") {
_local6.push({type:"HugeCannon", uid:_local4.uid, flipped:_local4.flipped, position:1, bobj:_local4});
}
var _local5 = 0;
while (_local5 < _local4.weapons.length) {
var _local3 = _local4.weapons[_local5];
_local6.push({type:_local3.linkId, uid:_local3.uid, flipped:_local3.flipped, position:_local3.spaceIndex, bobj:_local3});
_local5++;
}
rr.train.TrainUtils.createWagon({type:_local4.linkId, uid:_local4.uid, weapons:_local6, bobj:_local4});
_local7++;
}
initSegments();
_global.control.setDamageClips();
}
function update() {
var _local3 = segments.length;
var _local2 = 0;
while (_local2 < _local3) {
segments[_local2].update();
_local2++;
}
}
function initSegments() {
var _local4 = 0;
var _local5 = segments.length;
var _local3 = 1;
while (_local3 < _local5) {
_local4 = _local4 + (segments[_local3].length - 1);
_local3++;
}
_global.loc.d = _local4 + (_global.loc.length / 2);
_global.loc.reAffirm();
}
function crash(dir, rotfact) {
if (isCrashed) {
return(undefined);
}
crashdir = ((_global.loc.speed >= 0) ? 1 : -1);
_global.sounds.playSound("traincrash.wav");
if ((!dir) || (dir == null)) {
dir = ((Math.random() > 0.5) ? 1 : -1);
}
if ((!rotfact) || (rotfact == null)) {
rotfact = 2;
}
crashRotDir = dir;
crashRotSpeed = Math.random() * rotfact;
var _local3 = _global.loc;
_local3.isCrashed = true;
rr.utils.Delegate.callDelayed(_local3, _local3.die, 3000 + (Math.random() * 3000));
while (_local3.next) {
_local3 = _local3.next;
_local3.isCrashed = true;
rr.utils.Delegate.callDelayed(_local3, _local3.die, 2000 + (Math.random() * 2000));
}
_global.control.fullStop();
isCrashed = true;
}
function onConnectionChanged() {
var _local4 = _global.loc;
load = _local4.weight;
fuelcap = _local4.fueldef;
lastsegment = _local4;
while (_local4.next) {
_local4 = _local4.next;
if (_local4.weapons) {
var _local7 = _local4.weapons.length;
var _local3 = 0;
while (_local3 < _local7) {
var _local5 = _local4.weapons[_local3];
load = load + _local5.weight;
if (_local5 instanceof rr.train.FuelLoad) {
fuelcap = fuelcap + _local5.fueldef;
}
_local3++;
}
}
load = load + _local4.weight;
lastsegment = _local4;
}
_global.control.setDamageClips();
trace("lastsegment: " + lastsegment.linkId);
trace("trainload: " + load);
buildload = 0;
var _local8 = segments.length;
var _local6 = 0;
while (_local6 < _local8) {
_local4 = segments[_local6];
if (_local4 != _global.loc) {
buildload = buildload + _local4.weight;
if (_local4.weapons) {
var _local7 = _local4.weapons.length;
var _local3 = 0;
while (_local3 < _local7) {
var _local5 = _local4.weapons[_local3];
buildload = buildload + _local5.weight;
_local3++;
}
}
}
_local6++;
}
_global.control.setLoad(_global.loc.maxload - buildload);
}
function getTargetSegment() {
var _local3 = new Array();
var _local2 = _global.loc;
_local3.push(_local2);
while (_local2.next) {
_local2 = _local2.next;
_local3.push(_local2);
}
var _local4 = Math.round(Math.random() * (_local3.length - 1));
return(_local3[_local4]);
}
function removeSegment(obj) {
var _local4 = segments.length;
var _local2 = 0;
while (_local2 < _local4) {
if (segments[_local2] == obj) {
trace("remove segment: " + segments[_local2].linkId);
var _local3 = delete segments[_local2];
segments.splice(_local2, 1);
break;
}
_local2++;
}
onConnectionChanged();
}
function isInRange(px, py, range) {
var _local2 = _global.loc;
if (rr.utils.MathUtils.getDistance(px, py, _local2.x, _local2.y) < (range + _local2.dfeel)) {
return(true);
}
while (_local2.next) {
_local2 = _local2.next;
if (rr.utils.MathUtils.getDistance(px, py, _local2.x, _local2.y) < (range + _local2.dfeel)) {
return(true);
}
}
return(false);
}
function checkObjectHit(obj) {
var _local5 = segments.length;
var _local3 = 0;
while (_local3 <= _local5) {
var _local2 = segments[_local3];
if (rr.utils.MathUtils.getDistance(obj.x, obj.y, _local2.x, _local2.y) <= ((obj.dfeel + _local2.dfeel) - 10)) {
if (rr.utils.HitTest.isShapeHit(obj.mov, _local2.mov)) {
return(_local2);
}
}
_local3++;
}
return(false);
}
function setBonus(type) {
if (((type == "Electric") || (type == "Oil")) || (type == "Coal")) {
var _local2 = _global.loc;
_local2.fuel = _local2.fueldef;
while (_local2.next) {
_local2 = _local2.next;
if (_local2.weapons) {
var _local3 = 0;
while (_local3 <= _local2.weapons.length) {
var _local4 = _local2.weapons[_local3];
if (_local4 instanceof rr.train.FuelLoad) {
_local4.fuel = _local4.fueldef;
_local4.addToLocFuel();
}
_local3++;
}
}
}
}
if (type == "Repair") {
var _local2 = _global.loc;
_local2.addDamage(-_local2.damage);
while (_local2.next) {
_local2 = _local2.next;
_local2.addDamage(-_local2.damage);
if (_local2.weapons) {
var _local3 = 0;
while (_local3 <= _local2.weapons.length) {
var _local4 = _local2.weapons[_local3];
_local4.addDamage(-_local4.damage);
_local3++;
}
}
}
}
}
function addPickup(type) {
var _local4 = _global.trainbuild.addPickupWagon(type);
rr.train.TrainUtils.createWagon({type:type, uid:_local4.uid, bobj:_local4});
}
}
Symbol 3477 MovieClip [__Packages.rr.control.Damage] Frame 0
class rr.control.Damage extends rr.BaseClip
{
var clips, unitClips, totalLength, margin, createEmptyMovieClip, getNextHighestDepth;
function Damage () {
super();
init();
}
function init() {
clips = new Array();
unitClips = new Array();
}
function setClips(addAll) {
totalLength = 0;
margin = 0;
removeAll();
var _local7 = new Array();
var _local3 = _global.loc;
_local7.push(_local3.uid);
addSegmentClip(_local3);
while (_local3.next) {
_local3 = _local3.next;
_local7.push(_local3.uid);
if (_local3.bobj) {
addSegmentClip(_local3);
}
}
if (addAll) {
var _local9 = _global.train.segments.length;
var _local6 = 0;
while (_local6 < _local9) {
_local3 = _global.train.segments[_local6];
var _local5 = false;
var _local8 = _local7.length;
var _local4 = 0;
while (_local4 < _local8) {
if (_local7[_local4] == _local3.uid) {
_local5 = true;
break;
}
_local4++;
}
if (!_local5) {
if (!_local3.prev) {
addSegmentClip(_local3);
while (_local3.next) {
_local3 = _local3.next;
addSegmentClip(_local3);
}
}
}
_local6++;
}
}
resetClips();
}
function addSegmentClip(s) {
var _local7 = createEmptyMovieClip(rr.utils.StringUtils.getUniqueName(), getNextHighestDepth() + 100);
var _local10 = _local7.attachMovie(rr.conf.Config.getObjectValue(s.linkId, "damageclip"), "segment", _local7.getNextHighestDepth(), {parent:s});
if (s.isdead) {
_local10._visible = false;
}
totalLength = totalLength + _local10._width;
if (s != _global.loc) {
totalLength = totalLength + margin;
if (!s.prev) {
totalLength = totalLength + 5;
}
}
clips.push(_local10);
unitClips.push(_local7);
if (s.segmentType == "wagon") {
var _local4 = 0;
while (_local4 < s.weapons.length) {
var _local3 = s.weapons[_local4];
var _local5 = _local7.attachMovie(rr.conf.Config.getObjectValue(_local3.linkId, "damageclip"), rr.utils.StringUtils.getUniqueName(), _local7.getNextHighestDepth(), {parent:_local3, wagonclip:_local10});
if (_local3.isdead) {
_local5._visible = false;
}
clips.push(_local5);
_local4++;
}
}
}
function resetClips() {
var _local4 = 5 + totalLength;
var _local7 = clips.length;
var _local2 = 0;
while (_local2 < _local7) {
var _local5 = clips[_local2];
if ((_local5.parent instanceof rr.train.weapons.TrainWeapon) || (_local5.parent instanceof rr.train.TrainLoad)) {
if (_local5.parent.linkId == "SmallCannon") {
_local5.swapDepths(_local5._parent.getNextHighestDepth());
}
var _local3 = _local5.wagonclip;
var _local6 = _local3._width / _local3.parent.bobj.spaces;
_local5._x = ((_local3._x + _local3._width) - _local5._width) - (_local5.parent.position * _local6);
if (_local5.parent.linkId == "HugeCannon") {
_local5._x = _local5._x + (_local5.parent.flipped ? 0 : 14);
}
if (_local5.parent.linkId == "LargeCannon") {
_local5._x = _local5._x + (_local5.parent.flipped ? 0 : 7);
}
if (_local5.parent.linkId == "MediumCannon") {
_local5._x = _local5._x + 2;
}
if (_local5.parent.linkId == "SmallFastCannon") {
_local5._x = _local5._x + 4;
}
if (_local5.parent.flipped) {
_local5.gotoAndStop("true");
}
_local5._y = (_local3._y - _local5._height) + 3;
if (_local5.parent.linkId == "RailRockets") {
_local5._y = _local5._y + 3;
}
} else {
_local5._x = _local4 - _local5._width;
if (!_local5.parent.prev) {
_local5._x = _local5._x - 5;
_local4 = _local4 - 5;
} else if (_local5.parent.prev.linkId == "TankTrailer") {
_local5._x = _local5._x + 4;
_local4 = _local4 + 4;
}
_local4 = _local4 - _local5._width;
_local4 = _local4 - margin;
}
_local2++;
}
_local7 = unitClips.length;
_local2 = 0;
while (_local2 < _local7) {
var _local5 = unitClips[_local2];
if (_local5._x < (unitClips[_local2 + 1]._x + unitClips[_local2 + 1]._width)) {
unitClips[_local2 + 1].swapDepths(_local5.getDepth() - 2);
}
_local2++;
}
}
function removeAll() {
var _local3 = unitClips.length;
var _local2 = 0;
while (_local2 < _local3) {
unitClips[_local2].removeMovieClip();
_local2++;
}
clips = new Array();
unitClips = new Array();
}
}
Symbol 3478 MovieClip [__Packages.rr.control.FuelMeter] Frame 0
class rr.control.FuelMeter extends rr.BaseClip
{
var my_fmt, perc, perc_txt, trainperc, warning1played, warning2played, mask_mc;
function FuelMeter () {
super();
init();
}
function init() {
my_fmt = new TextFormat();
my_fmt.bold = true;
my_fmt.font = "myAlternateGothic2 BT";
my_fmt.size = 11;
my_fmt.align = "right";
perc = 100;
perc_txt.text = "100%";
perc_txt.setTextFormat(my_fmt);
_global.loc.addEventListener("onFuelUpdate", this);
}
function onFuelUpdate() {
if (_global.loc.fuel > 0) {
perc = Math.round((100 * _global.loc.fuel) / _global.loc.fueldef);
trainperc = Math.round((100 * _global.loc.fuel) / _global.train.fuelcap);
if (perc > 100) {
perc = 100;
}
} else {
perc = 0;
}
if (perc > 40) {
warning1played = false;
warning2played = false;
}
if (perc < 30) {
if (!warning1played) {
_global.sounds.playSound("Warning Fuel Low.wav");
warning1played = true;
}
}
if (perc < 10) {
if (!warning2played) {
_global.sounds.playSound("Warning Fuel Critical.wav");
warning2played = true;
}
}
mask_mc._xscale = trainperc;
perc_txt.text = trainperc + "%";
perc_txt.setTextFormat(my_fmt);
}
function setTotalCapacity() {
if (_global.loc.fuel > 0) {
trainperc = Math.round((100 * _global.loc.fuel) / _global.train.fuelcap);
if (trainperc > 100) {
trainperc = 100;
}
} else {
trainperc = 0;
}
mask_mc._xscale = trainperc;
perc_txt.text = trainperc + "%";
perc_txt.setTextFormat(my_fmt);
}
}
Symbol 3479 MovieClip [__Packages.rr.control.CompoundMenu] Frame 0
class rr.control.CompoundMenu extends rr.BaseClip
{
var totalrepaircost_txt, fillcost_txt, repair_btn, repairall_btn, fuel20_btn, fuel40_btn, fuel60_btn, fuel80_btn, fuel100_btn, cancel_btn, compound, _visible, station_txt, damage_mc, fuel_mc, totalrepaircost, selectedClip, repaircost, repaircost_txt;
function CompoundMenu () {
super();
init();
}
function init() {
hide();
totalrepaircost_txt.autoSize = true;
fillcost_txt.autoSize = true;
repair_btn._visible = false;
repair_btn.onPress = rr.utils.Delegate.create(this, repair);
repairall_btn.onPress = rr.utils.Delegate.create(this, repairAll);
fuel20_btn.onPress = rr.utils.Delegate.create(this, addFuel, fuel20_btn);
fuel40_btn.onPress = rr.utils.Delegate.create(this, addFuel, fuel40_btn);
fuel60_btn.onPress = rr.utils.Delegate.create(this, addFuel, fuel60_btn);
fuel80_btn.onPress = rr.utils.Delegate.create(this, addFuel, fuel80_btn);
fuel100_btn.onPress = rr.utils.Delegate.create(this, addFuel, fuel100_btn);
cancel_btn.onPress = rr.utils.Delegate.create(this, hide);
}
function show(comp) {
trace("show: compound");
_global.sounds.stopAll();
_global.timer.stop();
_global.aim.hide(this);
compound = comp;
_global.loc.addEventListener("onLocAccel", this);
setMenuContent();
_visible = true;
}
function hide() {
deselect();
_global.loc.events.dispatchEvent({type:"onFuelUpdate"});
_global.aim.show(this);
_global.timer.start();
_visible = false;
}
function onLocAccel() {
hide();
_global.loc.removeEventListener("onLocAccel", this);
}
function setMenuContent() {
deselect();
station_txt.text = compound.id;
damage_mc.setClips(false);
fuel_mc.setTotalCapacity();
setRepairMenu();
setFillMenu();
}
function setRepairMenu() {
totalrepaircost = 0;
var _local8 = damage_mc.unitClips.length;
var _local6 = 0;
while (_local6 < _local8) {
var _local5 = damage_mc.unitClips[_local6];
_local5.onPress = rr.utils.Delegate.create(this, selectUnit, _local5);
var _local4 = _local5.segment.parent;
totalrepaircost = totalrepaircost + (((_local4.damage / _local4.killlevel) * _local4.price) * 0.2);
var _local7 = _local4.weapons.length;
var _local3 = 0;
while (_local3 < _local7) {
totalrepaircost = totalrepaircost + (((_local4.weapons[_local3].damage / _local4.weapons[_local3].killlevel) * _local4.weapons[_local3].price) * 0.2);
_local3++;
}
_local6++;
}
totalrepaircost = Math.round(totalrepaircost);
totalrepaircost_txt.text = totalrepaircost.toString();
repairall_btn.enabled = true;
if (totalrepaircost > _global.player.cash) {
repairall_btn.enabled = false;
totalrepaircost_txt.text = totalrepaircost_txt.text + " (not enough cash)";
}
}
function setFillMenu() {
var _local5 = (_global.train.fuelcap - _global.loc.fuel) * _global.loc.fuelprice;
fillcost_txt.text = Math.round(_local5).toString();
var _local4 = 20;
while (_local4 <= 100) {
var _local3 = this[("fuel" + _local4) + "_btn"];
_local3.perc = _local4;
_local3._alpha = 100;
_local3.enabled = true;
_local3.fuelcost = (_local5 * _local4) / 100;
if ((_local3.fuelcost > _global.player.cash) || (_local3.perc <= fuel_mc.trainperc)) {
_local3.enabled = false;
_local3._alpha = 40;
}
_local4 = _local4 + 20;
}
}
function selectUnit(sel) {
selectedClip = sel;
var _local5 = selectedClip.segment.parent;
repaircost = ((_local5.damage / _local5.killlevel) * _local5.price) * 0.2;
var _local6 = _local5.weapons.length;
var _local4 = 0;
while (_local4 < _local6) {
repaircost = repaircost + (((_local5.weapons[_local4].damage / _local5.weapons[_local4].killlevel) * _local5.weapons[_local4].price) * 0.2);
_local4++;
}
repaircost = Math.round(repaircost);
repaircost_txt.text = "repaircost: " + repaircost.toString();
repair_btn.enabled = true;
if (repaircost > _global.player.cash) {
repair_btn.enabled = false;
repaircost_txt.text = repaircost_txt.text + " (not enough cash)";
}
repair_btn._x = ((selectedClip.segment._x + (selectedClip.segment._width / 2)) - (repair_btn._width / 2)) + damage_mc._x;
repaircost_txt._x = repair_btn._x + 60;
repair_btn._visible = true;
repaircost_txt._visible = true;
_local6 = damage_mc.unitClips.length;
_local4 = 0;
while (_local4 < _local6) {
var _local3 = damage_mc.unitClips[_local4];
if (_local3 == selectedClip) {
_local3._alpha = 100;
} else {
_local3._alpha = 50;
}
_local4++;
}
}
function deselect() {
selectedClip = undefined;
var _local3 = damage_mc.unitClips.length;
var _local2 = 0;
while (_local2 < _local3) {
damage_mc.unitClips[_local2]._alpha = 100;
_local2++;
}
repair_btn._visible = false;
repaircost_txt._visible = false;
}
function repair() {
var _local4 = selectedClip.segment.parent;
_local4.addDamage(-_local4.damage);
var _local5 = _local4.weapons.length;
var _local3 = 0;
while (_local3 < _local5) {
_local4.weapons[_local3].addDamage(-_local4.weapons[_local3].damage);
_local3++;
}
_global.player.addCash(-repaircost);
setMenuContent();
}
function repairAll() {
var _local4 = damage_mc.clips.length;
var _local3 = 0;
while (_local3 < _local4) {
damage_mc.clips[_local3].parent.addDamage(-damage_mc.clips[_local3].parent.damage);
_local3++;
}
_global.player.addCash(-totalrepaircost);
setMenuContent();
}
function addFuel(but) {
_global.player.addCash(-but.fuelcost);
_global.loc.fuel = (_global.loc.fueldef * but.perc) / 100;
var _local5 = _global.loc;
while (_local5.next) {
_local5 = _local5.next;
if (_local5.weapons) {
var _local4 = 0;
while (_local4 <= _local5.weapons.length) {
var _local3 = _local5.weapons[_local4];
if (_local3 instanceof rr.train.FuelLoad) {
_local3.fuel = (_local3.fueldef * but.perc) / 100;
_local3.addToLocFuel();
}
_local4++;
}
}
}
fuel_mc.setTotalCapacity();
setMenuContent();
}
}
Symbol 3480 MovieClip [__Packages.rr.control.DisabledMenu] Frame 0
class rr.control.DisabledMenu extends rr.BaseClip
{
var message_txt, _visible, continue_btn;
function DisabledMenu () {
super();
init();
}
function init() {
message_txt.autoSize = true;
_visible = false;
continue_btn.onPress = rr.utils.Delegate.create(this, hide);
}
function show(m) {
trace("m: " + m);
_global.sounds.stopAll();
_global.timer.stop();
_global.aim.hide(this);
if (m == "nocap") {
message_txt.text = "YOU DON'T HAVE ANY FUEL TO CONTINUE\r AND NOT ENOUGH CAPACITIY TO ADD A FUELWAGON";
}
if (m == "nocash") {
message_txt.text = "YOU DON'T HAVE ANY FUEL TO CONTINUE\r AND NOT ENOUGH CASH TO ADD A FUELWAGON";
}
_visible = true;
}
function hide() {
_visible = false;
_global.game.endLevel(false);
}
}
Symbol 3481 MovieClip [__Packages.rr.HighScoreTG] Frame 0
class rr.HighScoreTG extends rr.BaseClip
{
var bg_mc, container, createEmptyMovieClip, getNextHighestDepth, mcLoader, loaded, _visible;
function HighScoreTG () {
super();
_global.highscore = this;
bg_mc._visible = false;
}
function init() {
clear();
System.security.allowDomain("www.totallygame.com");
_root.hs_list = false;
_root.hs_requesturl = "www.totallygame.com";
container = createEmptyMovieClip("container", getNextHighestDepth());
mcLoader = new MovieClipLoader();
mcLoader.addListener(this);
}
function clear() {
hide();
loaded = false;
container.removeMovieClip();
}
function setHighScore() {
_root.gameflow = _global.leveltime;
if (_global.gametype == "railrage") {
_root.is_time = true;
var _local3 = rr.utils.StringUtils.getHighScoreTimeString(_global.player.time);
trace("hstime: " + _local3);
trace("Number(hstime: " + Number(_local3));
_root.hs_score = _local3;
if (_global.gameconf.ragelevelid == 1) {
_root.hs_gameid = 4;
}
if (_global.gameconf.ragelevelid == 2) {
_root.hs_gameid = 17;
}
} else {
_root.is_time = false;
_root.hs_score = _global.player.points;
_root.hs_gameid = 3;
}
}
function show() {
container._visible = false;
if (loaded) {
container._visible = true;
} else {
mcLoader.loadClip("http://www.totallygame.com/highscores/flash.php", container);
}
_visible = true;
}
function hide() {
_visible = false;
}
function onLoadComplete(target_mc, httpStatus) {
loaded = true;
container._visible = true;
}
}
Symbol 3482 MovieClip [__Packages.rr.control.LevelResult] Frame 0
class rr.control.LevelResult extends rr.BaseClip
{
var pages, stats_mc, highscore_btn, failed_mc, continue_btn, replay_btn, _visible, lvlsuccess, HighScore_mc, items_mc, statsoverall_mc, statsrailrage_mc, page;
function LevelResult () {
super();
_global.levelresult = this;
init();
}
function init() {
pages = [0, 2, 1];
stats_mc.save_btn.onPress = rr.utils.Delegate.create(this, doSave);
highscore_btn.onPress = rr.utils.Delegate.create(this, toggleHighScore);
failed_mc.main_btn.onPress = rr.utils.Delegate.create(this, goMain);
failed_mc.replay_btn.onPress = rr.utils.Delegate.create(this, replay);
failed_mc.highscore_btn.onPress = rr.utils.Delegate.create(this, toggleHighScore);
continue_btn.onPress = rr.utils.Delegate.create(this, nextPage);
replay_btn.onPress = rr.utils.Delegate.create(this, replay);
_visible = false;
}
function showResult(success) {
lvlsuccess = success;
HighScore_mc.init();
continue_btn._visible = false;
highscore_btn._visible = false;
replay_btn._visible = false;
failed_mc._visible = false;
failed_mc.highscore_btn._visible = false;
items_mc._visible = false;
stats_mc._visible = false;
statsoverall_mc._visible = false;
statsrailrage_mc._visible = false;
stats_mc.save_btn._visible = false;
if ((_global.gametype == "new mission") || (_global.gametype == "loaded mission")) {
if (_global.player.points > 0) {
failed_mc.highscore_btn._visible = true;
}
}
if (_global.gametype != "custom level") {
HighScore_mc.setHighScore();
}
if (success) {
page = 0;
replay_btn._visible = true;
if (_global.gametype == "railrage") {
highscore_btn._visible = _global.game.defaultrage;
statsrailrage_mc._visible = true;
continue_btn._visible = true;
} else {
if (_global.gametype == "custom level") {
continue_btn._visible = true;
}
stats_mc._visible = true;
}
if ((_global.gametype == "new mission") || (_global.gametype == "loaded mission")) {
if (_global.superlevel < 3) {
var _local3 = SharedObject.getLocal("superlevel");
_local3.data.levelid = _global.game.levelId + 1;
_local3.flush();
_global.superlevel = _local3.data.levelid;
}
if (_global.game.levelId < 2) {
highscore_btn._visible = true;
stats_mc.save_btn._visible = true;
} else {
continue_btn._visible = true;
}
}
setStats();
} else {
if ((_global.gametype == "new mission") || (_global.gametype == "loaded mission")) {
stats_mc._visible = true;
stats_mc.save_btn._visible = false;
setStats();
}
failed_mc._visible = true;
}
_visible = true;
}
function setStats() {
var _local6 = rr.conf.Config.getGameConf(_global.game.levelId);
var _local4 = rr.conf.Config.getGameConf(_global.game.levelId + 1);
var _local5 = (_local4 ? (_local4.startcash) : 0);
var _local3;
if (lvlsuccess) {
_local3 = _local6.levelpoints + Math.round((10000 * (_global.landshot + (_global.airshot * 3))) / (_global.leveltime / 1000));
} else {
_local3 = Math.round((1000 * (_global.landshot + (_global.airshot * 3))) / (_global.leveltime / 1000));
}
stats_mc.time_txt.text = rr.utils.StringUtils.getTimeString(_global.leveltime);
stats_mc.land_txt.text = _global.landshot.toString();
stats_mc.air_txt.text = _global.airshot.toString();
if (_global.gametype == "custom level") {
stats_mc.bonus_txt.text = "N.A.";
stats_mc.totalpoints_txt.text = "N.A.";
stats_mc.levelcash_txt.text = _global.player.bonus.toString();
} else {
stats_mc.bonus_txt.text = _local3.toString();
stats_mc.totalpoints_txt.text = _global.player.points.toString();
stats_mc.levelcash_txt.text = (lvlsuccess ? ((_global.player.bonus + _local5).toString()) : (_global.player.bonus.toString()));
}
stats_mc.cashtotal_txt.text = _global.player.cash.toString();
statsoverall_mc.time_txt.text = rr.utils.StringUtils.getTimeString(_global.player.time);
statsoverall_mc.land_txt.text = _global.player.landshot.toString();
statsoverall_mc.air_txt.text = _global.player.airshot.toString();
statsoverall_mc.totalpoints_txt.text = _global.player.points.toString();
statsoverall_mc.cashtotal_txt.text = _global.player.cash.toString();
statsrailrage_mc.time_txt.text = rr.utils.StringUtils.getTimeString(_global.player.time);
}
function doSave() {
replay_btn._visible = false;
var _local3 = SharedObject.getLocal("savedmission");
_global.savedmission = {levelid:_global.game.levelId + 1, cash:_global.player.cash, points:_global.player.points, landshot:_global.player.landshot, airshot:_global.player.airshot, time:_global.player.time};
_local3.data.savedmission = _global.savedmission;
var _local4 = _local3.flush();
if (_local4 == true) {
stats_mc.saveresult_mc.gotoAndPlay("success");
nextPage();
} else {
stats_mc.saveresult_mc.gotoAndPlay("failed");
}
}
function nextPage() {
HighScore_mc.hide();
if ((_global.gametype == "new mission") || (_global.gametype == "loaded mission")) {
if ((page == 0) && (_global.game.levelId == 2)) {
stats_mc._visible = false;
highscore_btn._visible = true;
statsoverall_mc._visible = true;
page = -1;
return(undefined);
}
if (page == -1) {
page = 0;
}
}
if ((_global.gametype == "railrage") || (_global.gametype == "custom level")) {
_global.root.gotoAndPlay("startmenu");
return(undefined);
}
page++;
if (page > pages[_global.game.levelId]) {
_visible = false;
if (_global.game.levelId == 2) {
_global.root.gotoAndPlay("hangar");
} else {
_global.game.nextLevel();
}
return(undefined);
}
if (page > 0) {
continue_btn._visible = true;
stats_mc._visible = false;
statsoverall_mc._visible = false;
items_mc.gotoAndStop((_global.game.levelId + "-") + page);
items_mc._visible = true;
}
}
function goMain() {
_global.root.gotoAndPlay("startmenu");
}
function replay() {
_visible = false;
_global.game.replayLevel();
}
function toggleHighScore() {
if (!HighScore_mc._visible) {
HighScore_mc.show();
highscore_btn._visible = false;
failed_mc.highscore_btn._visible = false;
}
}
}
Symbol 3483 MovieClip [__Packages.rr.control.TrainBuild] Frame 0
class rr.control.TrainBuild extends rr.BaseClip
{
var spacing, displayWidth, _x, xdef, loc, wagons, dropwagons, totalLoad, maxLoad, _parent, dropsadded, ingameadded, selectedWeapon, selectedWagon, events, attachMovie, getNextHighestDepth, _width, dir, shiftTarget, onEnterFrame;
function TrainBuild () {
super();
_global.trainbuild = this;
}
function init() {
clear();
spacing = 15;
displayWidth = 0;
_x = (xdef = -2210);
loc = new Object();
wagons = new Array();
dropwagons = new Array();
totalLoad = 0;
maxLoad = 0;
_global.control.setCash();
setLoadText();
_parent.left_btn.onPress = rr.utils.Delegate.create(this, shiftLeft);
_parent.right_btn.onPress = rr.utils.Delegate.create(this, shiftRight);
_parent.left_btn.onRelease = (_parent.left_btn.onDragOut = (_parent.right_btn.onRelease = (_parent.right_btn.onDragOut = rr.utils.Delegate.create(this, stopShift))));
_parent.left_btn._visible = false;
_parent.right_btn._visible = false;
_parent.selectbox_mc.hide();
dropsadded = false;
}
function setInGame() {
displayWidth = 0;
_x = xdef;
maxLoad = _global.loc.maxload;
totalLoad = _global.train.buildload;
ingameadded = undefined;
selectedWeapon = undefined;
selectedWagon = undefined;
updateBuild();
_parent.selectbox_mc.hide();
events.dispatchEvent({type:"onWeaponSelect"});
events.dispatchEvent({type:"onWagonSelect"});
events.dispatchEvent({type:"onUpdateBuild"});
}
function setLoadText() {
var _local3 = maxLoad - totalLoad;
if ((_local3 < 0) || (maxLoad == undefined)) {
_local3 = 0;
}
_global.control.setLoad(_local3);
}
function onCardSelect(c) {
if (c instanceof rr.control.TabCardLocomotive) {
setLoc(c);
}
if (c instanceof rr.control.TabCardWagon) {
addWagon(c);
}
if (c instanceof rr.control.TabCardWeapon) {
addWeapon(c);
}
}
function setLoc(c) {
_global.buildmenu.checkIndicator("loc");
_global.guide.showGuide(2);
if (loc.linkId) {
_global.player.addCash(rr.conf.Config.getObjectValue(loc.linkId, "price"));
}
loc.linkId = c.linkId;
loc.fueltype = c.fueltype;
loc.mov = attachMovie(loc.linkId + "Side", "loc", 10);
loc.xmargin = rr.conf.Config.getObjectValue(loc.linkId, "buildmarginleft");
loc.ymargin = rr.conf.Config.getObjectValue(loc.linkId, "buildmarginbottom");
_global.buildmenu.play_btn._visible = true;
_global.player.addCash(-c.price);
maxLoad = rr.conf.Config.getObjectValue(c.linkId, "maxload");
if (!dropsadded) {
setDropWagons();
}
updateBuild();
_parent.selectbox_mc.hide();
}
function addWagon(c) {
_global.buildmenu.checkIndicator("wagon");
_global.guide.showGuide(6);
_global.player.addCash(-c.price);
var _local3 = {linkId:c.linkId, uid:rr.utils.StringUtils.getUniqueName(), type:"wagon", weight:c.weight, load:0, spaces:c.spaces, freespaces:c.spaces};
_local3.mov = attachMovie(_local3.linkId + "Side", _local3.uid, getNextHighestDepth());
_local3.mov.onPress = rr.utils.Delegate.create(this, selectWagon, _local3);
_local3.xmargin = rr.conf.Config.getObjectValue(_local3.linkId, "buildmarginleft");
_local3.ymargin = rr.conf.Config.getObjectValue(_local3.linkId, "buildmarginbottom");
_local3.spacearray = new Array(c.spaces);
var _local4 = 0;
while (_local4 < _local3.spacearray.length) {
_local3.spacearray[_local4] = "free";
_local4++;
}
if (c.linkId == "HugeCannon") {
_local3.spacearray[1] = "taken";
_local3.spacearray[2] = "taken";
}
_local3.weapons = new Array();
wagons.push(_local3);
totalLoad = totalLoad + _local3.weight;
if (_global.buildmenu.mode == "ingame") {
ingameadded = _local3;
}
updateBuild();
_parent.selectbox_mc.hide();
selectWagon(_local3);
}
function setDropWagons() {
var _local4 = _global.game.dropoffs.length;
var _local3 = 0;
while (_local3 < _local4) {
addDropWagon(_global.game.dropoffs[_local3]);
_local3++;
}
dropsadded = true;
}
function addDropWagon(lid) {
var _local2 = {linkId:lid, uid:rr.utils.StringUtils.getUniqueName(), type:"wagon", weight:rr.conf.Config.getObjectValue(lid, "weight")};
_local2.mov = attachMovie(_local2.linkId + "Side", _local2.uid, getNextHighestDepth(), {parent:_local2});
_local2.xmargin = rr.conf.Config.getObjectValue(_local2.linkId, "buildmarginleft");
_local2.ymargin = rr.conf.Config.getObjectValue(_local2.linkId, "buildmarginbottom");
wagons.push(_local2);
totalLoad = totalLoad + _local2.weight;
_parent.selectbox_mc.hide();
updateBuild();
}
function addPickupWagon(lid) {
var _local2 = {linkId:lid, uid:rr.utils.StringUtils.getUniqueName(), type:"wagon"};
_local2.mov = attachMovie(_local2.linkId + "Side", _local2.uid, getNextHighestDepth(), {parent:_local2});
_local2.xmargin = rr.conf.Config.getObjectValue(_local2.linkId, "buildmarginleft");
_local2.ymargin = rr.conf.Config.getObjectValue(_local2.linkId, "buildmarginbottom");
wagons.push(_local2);
return(_local2);
}
function addWeapon(c) {
if (!selectedWagon) {
return(undefined);
}
if (selectedWagon.freespaces < c.spaces) {
return(undefined);
}
var _local4 = getFreeWagonSpace(c.spaces);
if (_local4 < 0) {
return(undefined);
}
_global.guide.showGuide(9);
_global.player.addCash(-c.price);
var _local6 = {linkId:c.linkId, type:"weapon", uid:rr.utils.StringUtils.getUniqueName(), weight:c.weight, spaces:c.spaces, spaceIndex:_local4, wagon:selectedWagon};
_local6.mov = attachMovie(_local6.linkId + "Side", _local6.uid, getNextHighestDepth());
_local6.mov.onPress = rr.utils.Delegate.create(this, selectWeapon, _local6);
selectedWagon.weapons.push(_local6);
var _local3 = _local4;
while (_local3 < (_local4 + c.spaces)) {
selectedWagon.spacearray[_local3] = "taken";
_local3++;
}
selectedWagon.load = selectedWagon.load + _local6.weight;
selectedWagon.freespaces = selectedWagon.freespaces - _local6.spaces;
totalLoad = totalLoad + _local6.weight;
updateBuild();
_parent.selectbox_mc.hide();
selectWeapon(_local6);
}
function selectWagon(wag) {
if (_global.buildmenu.mode == "ingame") {
if (wag != ingameadded) {
return(undefined);
}
}
_global.guide.showGuide(11);
selectedWagon = wag;
selectedWeapon = undefined;
_parent.selectbox_mc.select(wag);
if (_x < ((xdef + (_width - wag.mov._x)) - 600)) {
dir = "left";
shiftTarget = (xdef + (_width - wag.mov._x)) - 400;
setEnterFrame();
} else if (_x > (((xdef + _width) - wag.mov._x) - 300)) {
dir = "right";
shiftTarget = ((xdef + (_width - wag.mov._x)) + wag.mov._width) - 400;
setEnterFrame();
}
events.dispatchEvent({type:"onWagonSelect"});
}
function selectWeapon(weap) {
if (_global.buildmenu.mode == "ingame") {
if (weap.wagon != ingameadded) {
return(undefined);
}
}
selectedWeapon = weap;
selectedWagon = undefined;
_parent.selectbox_mc.select(weap);
events.dispatchEvent({type:"onWeaponSelect"});
}
function shiftLeft() {
dir = "left";
shiftTarget = (xdef + displayWidth) - 600;
setEnterFrame();
}
function shiftRight() {
dir = "right";
shiftTarget = xdef;
setEnterFrame();
}
function stopShift() {
dir = "";
delete onEnterFrame;
}
function setEnterFrame() {
onEnterFrame = function () {
if (this.dir == "left") {
if (this._x > ((this.xdef + this.displayWidth) - 600)) {
this.stopShift();
} else if (this._x > this.shiftTarget) {
this.stopShift();
} else {
this._x = this._x + 5;
this._parent.selectbox_mc._x = this._parent.selectbox_mc._x + 5;
}
} else if (this.dir == "right") {
if (this._x < this.xdef) {
this.stopShift();
} else if (this._x < this.shiftTarget) {
this.stopShift();
} else {
this._x = this._x - 5;
this._parent.selectbox_mc._x = this._parent.selectbox_mc._x - 5;
}
}
this._parent.left_btn._visible = this._x < ((this.xdef + this.displayWidth) - 600);
this._parent.right_btn._visible = this._x > this.xdef;
updateAfterEvent();
};
}
function updateBuild() {
if (_global.buildmenu.mode == "ingame") {
updateInGame();
return(undefined);
}
var _local7 = {mov:{_x:_width - 12}, xmargin:0};
if (loc) {
loc.mov._x = (_width - 12) - loc.mov._width;
loc.mov._y = (85 - loc.mov._height) + loc.ymargin;
displayWidth = _width - loc.mov._x;
_local7 = loc;
}
var _local8 = 0;
while (_local8 < wagons.length) {
var _local3 = wagons[_local8];
_local3.mov._x = ((_local7.mov._x + _local7.xmargin) - spacing) - _local3.mov._width;
_local3.mov._y = (85 - _local3.mov._height) + _local3.ymargin;
if (_local3.linkId == "HugeCannon") {
_local3.mov._x = _local3.mov._x + (_local3.flipped ? 0 : 32);
}
if (_local7.linkId == "HugeCannon") {
_local3.mov._x = _local3.mov._x + (_local7.flipped ? 32 : 0);
}
var _local5 = 0;
while (_local5 < _local3.weapons.length) {
var _local4 = _local3.weapons[_local5];
_local4.mov._x = ((_local3.mov._x + _local3.mov._width) - (_local4.spaceIndex * 43)) - _local4.mov._width;
var _local6 = rr.conf.Config.getObjectValue(_local4.linkId, "buildmarginleft");
if (_local6) {
_local4.mov._x = _local4.mov._x + (_local4.flipped ? 0 : (_local6));
}
_local4.mov._y = (_local3.mov._y + rr.conf.Config.getObjectValue(_local3.linkId, "buildmargintop")) - _local4.mov._height;
if (rr.conf.Config.getObjectValue(_local4.linkId, "buildmarginbottom")) {
_local4.mov._y = _local4.mov._y + rr.conf.Config.getObjectValue(_local4.linkId, "buildmarginbottom");
}
if (_local3.linkId == "HugeCannon") {
if (_local4.spaceIndex == 0) {
_local4.mov._x = (_local3.flipped ? (_local3.mov._x + 192) : (_local3.mov._x + 160));
} else {
_local4.mov._x = (_local3.flipped ? (_local3.mov._x + 37) : (_local3.mov._x + 5));
}
}
_local5++;
}
_local7 = _local3;
_local8++;
}
displayWidth = _width - _local3.mov._x;
_global.control.setCash();
setLoadText();
_parent.left_btn._visible = displayWidth > 600;
events.dispatchEvent({type:"onUpdateBuild"});
}
function updateInGame() {
var _local5;
var _local8 = new Array();
var _local3 = _global.loc;
_local8.push(_local3.uid);
_local3.bobj.mov._x = (_width - 12) - _local3.bobj.mov._width;
_local3.bobj.mov._y = (85 - _local3.bobj.mov._height) + _local3.bobj.ymargin;
displayWidth = _width - _local3.bobj.mov._x;
_local5 = _local3.bobj;
while (_local3.next) {
_local3 = _local3.next;
_local8.push(_local3.uid);
if (_local3.bobj) {
setWagon(_local3, _local5);
_local5 = _local3.bobj;
}
}
if (ingameadded != undefined) {
trace("ingameadded: " + ingameadded.linkId);
setInGameWagon({bobj:ingameadded, prev:true}, _local5);
_local5 = ingameadded;
}
var _local10 = _global.train.segments.length;
var _local7 = 0;
while (_local7 < _local10) {
_local3 = _global.train.segments[_local7];
var _local6 = false;
var _local9 = _local8.length;
var _local4 = 0;
while (_local4 < _local9) {
if (_local8[_local4] == _local3.uid) {
_local6 = true;
break;
}
_local4++;
}
if (!_local6) {
if (!_local3.prev) {
setWagon(_local3, _local5);
_local5 = _local3.bobj;
while (_local3.next) {
_local3 = _local3.next;
setWagon(_local3, _local5);
_local5 = _local3.bobj;
}
}
}
_local7++;
}
displayWidth = _width - _local5.mov._x;
_global.control.setCash();
setLoadText();
_parent.left_btn._visible = displayWidth > 600;
events.dispatchEvent({type:"onUpdateBuild"});
}
function setWagon(s, prevWagon) {
var _local3 = s.bobj;
_local3.mov._x = ((prevWagon.mov._x + prevWagon.xmargin) - spacing) - _local3.mov._width;
if (!s.prev) {
_local3.mov._x = _local3.mov._x - 30;
}
_local3.mov._y = (85 - _local3.mov._height) + _local3.ymargin;
if (_local3.linkId == "HugeCannon") {
_local3.movflip = _local3.flipped;
if (s.isreversed) {
_local3.movflip = !_local3.movflip;
}
_local3.mov._x = _local3.mov._x + (_local3.movflip ? 0 : 32);
_local3.mov.gotoAndStop(_local3.movflip.toString());
}
if (prevWagon.linkId == "HugeCannon") {
_local3.mov._x = _local3.mov._x + (prevWagon.movflip ? 32 : 0);
}
var _local4 = 0;
while (_local4 < s.weapons.length) {
var _local2 = s.weapons[_local4].bobj;
if (_local2.linkId == "HugeCannon") {
} else {
_local2.mov._x = ((_local3.mov._x + _local3.mov._width) - (_local2.spaceIndex * 43)) - _local2.mov._width;
var _local5 = rr.conf.Config.getObjectValue(_local2.linkId, "buildmarginleft");
if (_local5) {
_local2.mov._x = _local2.mov._x + (_local2.flipped ? 0 : (_local5));
}
_local2.mov._y = (_local3.mov._y + rr.conf.Config.getObjectValue(_local3.linkId, "buildmargintop")) - _local2.mov._height;
if (rr.conf.Config.getObjectValue(_local2.linkId, "buildmarginbottom")) {
_local2.mov._y = _local2.mov._y + rr.conf.Config.getObjectValue(_local2.linkId, "buildmarginbottom");
}
if (_local3.linkId == "HugeCannon") {
if (_local2.spaceIndex == 0) {
_local2.mov._x = (_local3.movflip ? (_local3.mov._x + 192) : (_local3.mov._x + 160));
} else {
_local2.mov._x = (_local3.movflip ? (_local3.mov._x + 37) : (_local3.mov._x + 5));
}
}
}
_local4++;
}
}
function setInGameWagon(s, prevWagon) {
var _local3 = s.bobj;
_local3.mov._x = ((prevWagon.mov._x + prevWagon.xmargin) - spacing) - _local3.mov._width;
_local3.mov._y = (85 - _local3.mov._height) + _local3.ymargin;
if (_local3.linkId == "HugeCannon") {
_local3.mov._x = _local3.mov._x + (_local3.flipped ? 0 : 32);
}
if (prevWagon.linkId == "HugeCannon") {
_local3.mov._x = _local3.mov._x + (prevWagon.flipped ? 32 : 0);
}
var _local4 = 0;
while (_local4 < _local3.weapons.length) {
var _local2 = _local3.weapons[_local4];
_local2.mov._x = ((_local3.mov._x + _local3.mov._width) - (_local2.spaceIndex * 43)) - _local2.mov._width;
var _local5 = rr.conf.Config.getObjectValue(_local2.linkId, "buildmarginleft");
if (_local5) {
_local2.mov._x = _local2.mov._x + (_local2.flipped ? 0 : (_local5));
}
_local2.mov._y = (_local3.mov._y + rr.conf.Config.getObjectValue(_local3.linkId, "buildmargintop")) - _local2.mov._height;
if (rr.conf.Config.getObjectValue(_local2.linkId, "buildmarginbottom")) {
_local2.mov._y = _local2.mov._y + rr.conf.Config.getObjectValue(_local2.linkId, "buildmarginbottom");
}
if (_local3.linkId == "HugeCannon") {
if (_local2.spaceIndex == 0) {
_local2.mov._x = (_local3.flipped ? (_local3.mov._x + 192) : (_local3.mov._x + 160));
} else {
_local2.mov._x = (_local3.flipped ? (_local3.mov._x + 37) : (_local3.mov._x + 5));
}
}
_local4++;
}
}
function removeObject(obj) {
if (obj == selectedWeapon) {
var _local4 = selectedWeapon.wagon;
var _local5 = 0;
while (_local5 < _local4.weapons.length) {
if (_local4.weapons[_local5] == obj) {
_global.player.addCash(rr.conf.Config.getObjectValue(obj.linkId, "price"));
_local4.load = _local4.load - obj.weight;
_local4.freespaces = _local4.freespaces + obj.spaces;
var _local7 = obj.spaceIndex;
while (_local7 < (obj.spaceIndex + obj.spaces)) {
_local4.spacearray[_local7] = "free";
_local7++;
}
totalLoad = totalLoad - obj.weight;
obj.mov.removeMovieClip();
delete _local4.weapons[_local5];
_local4.weapons.splice(_local5, 1);
selectedWeapon = undefined;
updateBuild();
return(undefined);
}
_local5++;
}
}
if (obj == selectedWagon) {
var _local8 = selectedWagon;
var _local7 = 0;
while (_local7 < _local8.weapons.length) {
var _local6 = _local8.weapons[_local7];
_global.player.addCash(rr.conf.Config.getObjectValue(_local6.linkId, "price"));
totalLoad = totalLoad - _local6.weight;
_local6.mov.removeMovieClip();
_local7++;
}
_local7 = 0;
while (_local7 < wagons.length) {
if (wagons[_local7] == obj) {
_global.player.addCash(rr.conf.Config.getObjectValue(obj.linkId, "price"));
totalLoad = totalLoad - obj.weight;
obj.mov.removeMovieClip();
wagons.splice(_local7, 1);
selectedWagon = undefined;
if (_global.buildmenu.mode == "ingame") {
ingameadded = undefined;
}
updateBuild();
return(undefined);
}
_local7++;
}
}
}
function moveObject(obj, dir) {
if (obj.type == "wagon") {
var _local4 = 0;
while (_local4 < wagons.length) {
if (wagons[_local4] == obj) {
if (dir == "right") {
if (_local4 > 0) {
var _local5 = wagons[_local4 - 1];
wagons[_local4 - 1] = wagons[_local4];
wagons[_local4] = _local5;
updateBuild();
selectWagon(obj);
return(undefined);
}
}
if (dir == "left") {
if (_local4 < (wagons.length - 1)) {
var _local5 = wagons[_local4 + 1];
wagons[_local4 + 1] = wagons[_local4];
wagons[_local4] = _local5;
updateBuild();
selectWagon(obj);
return(undefined);
}
}
}
_local4++;
}
}
if (obj.type == "weapon") {
var _local3 = obj.wagon;
if (dir == "right") {
if (obj.spaceIndex == 0) {
return(undefined);
}
if (_local3.linkId == "HugeCannon") {
if (_local3.spacearray[0] == "free") {
_local3.spacearray[3] = "free";
}
_local3.weapons[0].spaceIndex = ((_local3.weapons[0] == obj) ? 0 : 3);
_local3.weapons[1].spaceIndex = ((_local3.weapons[1] == obj) ? 0 : 3);
_local3.spacearray[0] == "taken";
updateBuild();
selectWeapon(obj);
return(undefined);
}
if (_local3.spacearray[obj.spaceIndex - 1] == "free") {
_local3.spacearray[(obj.spaceIndex + obj.spaces) - 1] = "free";
obj.spaceIndex = obj.spaceIndex - 1;
_local3.spacearray[obj.spaceIndex] = "taken";
updateBuild();
selectWeapon(obj);
return(undefined);
}
var _local4 = 0;
while (_local4 < _local3.weapons.length) {
if (_local3.weapons[_local4].spaceIndex == (obj.spaceIndex - _local3.weapons[_local4].spaces)) {
obj.spaceIndex = _local3.weapons[_local4].spaceIndex;
_local3.weapons[_local4].spaceIndex = obj.spaceIndex + obj.spaces;
updateBuild();
selectWeapon(obj);
return(undefined);
}
_local4++;
}
}
if (dir == "left") {
if ((obj.spaceIndex + obj.spaces) == _local3.spaces) {
return(undefined);
}
if (_local3.linkId == "HugeCannon") {
if (_local3.spacearray[3] == "free") {
_local3.spacearray[0] = "free";
}
_local3.weapons[0].spaceIndex = ((_local3.weapons[0] == obj) ? 3 : 0);
_local3.weapons[1].spaceIndex = ((_local3.weapons[1] == obj) ? 3 : 0);
_local3.spacearray[3] == "taken";
updateBuild();
selectWeapon(obj);
return(undefined);
}
if (_local3.spacearray[obj.spaceIndex + obj.spaces] == "free") {
_local3.spacearray[obj.spaceIndex] = "free";
obj.spaceIndex = obj.spaceIndex + 1;
_local3.spacearray[(obj.spaceIndex + obj.spaces) - 1] = "taken";
updateBuild();
selectWeapon(obj);
return(undefined);
}
var _local4 = 0;
while (_local4 < _local3.weapons.length) {
if (_local3.weapons[_local4].spaceIndex == (obj.spaceIndex + obj.spaces)) {
_local3.weapons[_local4].spaceIndex = obj.spaceIndex;
obj.spaceIndex = _local3.weapons[_local4].spaceIndex + _local3.weapons[_local4].spaces;
updateBuild();
selectWeapon(obj);
return(undefined);
}
_local4++;
}
}
}
}
function flipObject(obj) {
obj.flipped = !obj.flipped;
obj.mov.gotoAndStop(obj.flipped.toString());
updateBuild();
}
function getFreeWagonSpace(spaces) {
if (selectedWagon.freespaces < spaces) {
return(-1);
}
var _local2 = 0;
while (_local2 < selectedWagon.spacearray.length) {
if (selectedWagon.spacearray[_local2] == "free") {
if (checkFreeSpaceSize(_local2, spaces)) {
return(_local2);
}
}
_local2++;
}
return(-1);
}
function checkFreeSpaceSize(i, size) {
var _local2 = i;
while (_local2 < (i + size)) {
if (selectedWagon.spacearray[_local2] != "free") {
return(false);
}
_local2++;
}
return(true);
}
function onTrainObjectDestroy(evtObj) {
var _local6 = evtObj.target;
var _local7 = wagons.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = wagons[_local4];
if (_local3 == _local6.bobj) {
_local3.mov.removeMovieClip();
wagons.splice(_local4, 1);
break;
}
var _local5 = _local3.weapons.length;
var _local2 = 0;
while (_local2 < _local5) {
if (_local3.weapons[_local2] == _local6.bobj) {
_local3.weapons[_local2].mov.removeMovieClip();
_local3.weapons.splice(_local2, 1);
break;
}
_local2++;
}
_local4++;
}
updateBuild();
}
function clear() {
trace("clearin trainbuild: ");
loc.mov.removeMovieClip();
delete loc;
ingameadded = undefined;
for (var _local2 in this) {
if (this[_local2] instanceof MovieClip) {
this[_local2].removeMovieClip();
}
}
for (var _local2 in this) {
if (this[_local2] instanceof Object) {
delete this[_local2];
}
}
events.dispatchEvent({type:"onUpdateBuild"});
}
}
Symbol 3484 MovieClip [__Packages.rr.control.SelectBox] Frame 0
class rr.control.SelectBox extends rr.BaseClip
{
var rect, createEmptyMovieClip, left_btn, right_btn, deletewagon_btn, deleteweapon_btn, deleteload_btn, flip_btn, objSel, _parent, _x, _visible;
function SelectBox () {
super();
init();
}
function init() {
hide();
rect = createEmptyMovieClip("rect", 10);
rect._y = 64;
left_btn.onPress = rr.utils.Delegate.create(this, command, "moveleft");
right_btn.onPress = rr.utils.Delegate.create(this, command, "moveright");
deletewagon_btn.onPress = rr.utils.Delegate.create(this, command, "delete");
deleteweapon_btn.onPress = rr.utils.Delegate.create(this, command, "delete");
deleteload_btn.onPress = rr.utils.Delegate.create(this, command, "delete");
flip_btn.onPress = rr.utils.Delegate.create(this, command, "flip");
}
function select(obj) {
hide();
flip_btn._visible = false;
objSel = obj;
if (objSel == undefined) {
return(undefined);
}
var _local3 = objSel.mov;
var _local7;
var _local5;
if (objSel.type == "wagon") {
deletewagon_btn._visible = true;
deleteweapon_btn._visible = false;
deleteload_btn._visible = false;
_local7 = 13103871 /* 0xC7F2FF */;
_local5 = 76;
right_btn._visible = _global.trainbuild.wagons[0] != objSel;
left_btn._visible = _global.trainbuild.wagons[_global.trainbuild.wagons.length - 1] != objSel;
if (_global.buildmenu.mode == "ingame") {
right_btn._visible = (left_btn._visible = false);
}
}
if (objSel.type == "weapon") {
deletewagon_btn._visible = false;
if (((obj.linkId == "ColeCart") || (obj.linkId == "OilTank")) || (obj.linkId == "PowerGenerator")) {
deleteweapon_btn._visible = false;
deleteload_btn._visible = true;
} else {
deleteweapon_btn._visible = true;
deleteload_btn._visible = false;
}
_local7 = 6854565 /* 0x6897A5 */;
_local5 = (objSel.wagon.mov._y + rr.conf.Config.getObjectValue(objSel.wagon.linkId, "buildmargintop")) - 18;
right_btn._visible = objSel.spaceIndex != 0;
left_btn._visible = (objSel.spaceIndex + objSel.spaces) != objSel.wagon.spaces;
}
if (rr.conf.Config.getObjectValue(objSel.linkId, "buildflip")) {
trace("buildflip");
flip_btn._visible = true;
}
var _local4 = {x:_local3._x, y:_local3._y};
_parent.build_mc.localToGlobal(_local4);
_parent.globalToLocal(_local4);
_x = _local4.x + (_local3._width / 2);
rect.clear();
rect.lineStyle(1, _local7, 100);
rr.utils.DrawUtils.drawRect(rect, (-_local3._width) / 2, 0, _local3._width, _local5);
show();
}
function show() {
_visible = true;
}
function hide() {
objSel = undefined;
_visible = false;
}
function command(c) {
if (c == "delete") {
_global.trainbuild.removeObject(objSel);
hide();
}
if (c == "moveleft") {
_global.trainbuild.moveObject(objSel, "left");
}
if (c == "moveright") {
_global.trainbuild.moveObject(objSel, "right");
}
if (c == "flip") {
_global.trainbuild.flipObject(objSel);
}
}
}
Symbol 3485 MovieClip [__Packages.rr.control.WeaponSelect] Frame 0
class rr.control.WeaponSelect extends rr.BaseClip
{
var page1, SC_mc, MC_mc, SFC_mc, RL_mc, BB_mc, LC_mc, RR_mc, page2, EMP_mc, HC_mc, more_btn, back_btn, items, page;
function WeaponSelect () {
super();
_global.weaponselect = this;
init();
}
function init() {
hideAll();
page1 = [SC_mc, MC_mc, SFC_mc, RL_mc, BB_mc, LC_mc, RR_mc];
page2 = [EMP_mc, HC_mc];
more_btn.onPress = rr.utils.Delegate.create(this, showPage, 2);
back_btn.onPress = rr.utils.Delegate.create(this, showPage, 1);
showPage(1);
}
function showPage(p) {
var _local3 = 0;
if (items) {
var _local2 = items.length - 1;
while (_local2 >= 0) {
rr.utils.Delegate.callDelayed(this, hideItem, _local3, items[_local2]);
_local3 = _local3 + 50;
_local2--;
}
}
page = p;
more_btn._visible = page == 1;
back_btn._visible = page == 2;
items = this["page" + page];
var _local2 = 0;
while (_local2 < items.length) {
rr.utils.Delegate.callDelayed(this, showItem, _local3, items[_local2]);
_local3 = _local3 + 50;
_local2++;
}
}
function showItem(l) {
l._visible = true;
}
function hideItem(l) {
l._visible = false;
}
function hideAll() {
for (var _local2 in this) {
if (this[_local2] instanceof MovieClip) {
this[_local2]._visible = false;
}
}
}
}
Symbol 3486 MovieClip [__Packages.rr.control.BuildMenu] Frame 0
class rr.control.BuildMenu extends rr.BaseClip
{
var mode, tab, play_btn, cancel_btn, train_btn, indLocSet, indWagonSet, ind_weapon_mc, ind_wagon_mc, gotoAndStop, gotoAndPlay, nexttab, _visible;
function BuildMenu () {
super();
_global.buildmenu = this;
}
function init() {
mode = "";
tab = "";
play_btn.onPress = rr.utils.Delegate.create(this, endBuild);
cancel_btn.onPress = rr.utils.Delegate.create(this, cancelBuild);
play_btn._visible = false;
cancel_btn._visible = false;
train_btn._visible = true;
show();
indLocSet = (indWagonSet = false);
ind_wagon_mc._visible = (ind_weapon_mc._visible = false);
_global.guide.init();
_global.trainbuild.init();
(gotoAndStop(1));// not popped
rr.utils.Delegate.callDelayed(this, showTab, 500, "selecttrain");
}
function showTab(t) {
if (t != "selecttrain") {
if (!_global.trainbuild.loc.linkId) {
return(undefined);
}
} else {
_global.guide.showGuide(1);
}
if (t == "selectwagon") {
ind_wagon_mc._visible = false;
_global.guide.showGuide(5);
}
if (t == "selectweapon") {
ind_weapon_mc._visible = false;
_global.guide.showGuide(8);
}
if (tab == t) {
return(undefined);
}
if (tab == "") {
tab = t;
(gotoAndPlay(tab));// not popped
} else {
nexttab = t;
closeTab();
}
}
function checkIndicator(ind) {
if (!indLocSet) {
if (ind == "loc") {
indLocSet = true;
ind_wagon_mc._visible = true;
}
}
if (!indWagonSet) {
if (ind == "wagon") {
indWagonSet = true;
ind_weapon_mc._visible = true;
}
}
}
function closeTab() {
(gotoAndPlay(tab + "close"));// not popped
tab = "";
}
function afterCloseTab() {
showTab(nexttab);
nexttab = "";
}
function endBuild() {
_global.guide.clear();
hide();
if (mode == "ingame") {
_global.control.endBuildInGame();
} else {
_global.control.setLevelLoad(0, "creating map");
rr.utils.Delegate.callDelayed(_global.game, _global.game.initLevel, 200);
}
}
function cancelBuild() {
_global.trainbuild.selectedWagon = _global.trainbuild.ingameadded;
_global.trainbuild.removeObject(_global.trainbuild.ingameadded);
_global.trainbuild.ingameadded = undefined;
endBuild();
}
function show() {
_visible = true;
}
function hide() {
_visible = false;
}
function showInGameMenu() {
mode = "ingame";
_global.trainbuild.setInGame();
cancel_btn._visible = true;
train_btn._visible = false;
showTab("selectwagon");
show();
}
}
Symbol 3487 MovieClip [__Packages.rr.Guide] Frame 0
class rr.Guide extends rr.BaseClip
{
var arrB, arrA, fmt, filters, guides, curguide, x, y, _y, _x, tf, createTextField, arr_mc, createEmptyMovieClip, close_mc;
function Guide () {
super();
_global.guide = this;
}
function init() {
arrB = 18;
arrA = 13;
fmt = new TextFormat();
fmt.color = 16737792 /* 0xFF6600 */;
fmt.font = "myAlternateGothic2 BT";
fmt.size = 13;
fmt.leftMargin = 3;
fmt.rightMargin = 3;
var _local3 = new flash.filters.DropShadowFilter(7, 45, 0, 70);
var _local2 = filters;
_local2.push(_local3);
filters = _local2;
guides = [{id:1, x:200, y:40, text:"FIRST CLICK ON THE SADDLE TANK.\rFOR NOW IT'S THE ONLY AVAILABLE TRAIN.\rNEW TRAINS WILL BE UNLOCKED WHEN YOU PLAY THE MISSIONS.", arrows:[{d:"l", p:50, s:1}], shown:false}, {id:2, x:507, y:320, text:"GOOD JOB. THE SADDLE\rTANK IS SELECTED", arrows:[{d:"b", p:50, s:1}], next:3, shown:false}, {id:3, x:310, y:280, text:"DURING THE MISSIONS SOME WAGONS WILL APPEAR\rAUTOMATICALLY WHEN A TRAIN IS SELECTED\rTHESE ARE THE MISSION WAGONS AND THEY NEED TO\rBE DROPPED OFF ON SPECIFIC LOCATIONS ON THE MAP", arrows:[{d:"b", p:50, s:1}], next:4, shown:false}, {id:4, x:105, y:305, text:"NOW IT'S TIME TO ATTACH\rYOUR FIRST WAGON.\rCLICK THIS BUTTON", arrows:[{d:"l", p:50, s:1}], shown:false}, {id:5, x:280, y:80, text:"A WAGON HAS A PRICE, WEIGHT AND SLOT SIZE.\rSELECT THE 2 SLOTS WAGON.", arrows:[{d:"l", p:50, s:1}], shown:false}, {id:6, x:55, y:465, text:"THE WAGON IS NOW BEHIND YOUR TRAIN AND SELECTED.\rTHE WEIGHT IS SUBTRACTED FROM THE POSSIBLE EXTRA\rLOAD. THE PRICE IS SUBTRACTED FROM YOUR CASH.", arrows:[{d:"t", p:92, s:1}, {d:"r", p:35, s:0.5}], close:"l", next:7, shown:false}, {id:7, x:105, y:323, text:"NOW IT'S TIME TO SELECT\rYOUR FIRST WEAPON\rCLICK THIS BUTTON", arrows:[{d:"l", p:50, s:1}], shown:false}, {id:8, x:325, y:80, text:"A WEAPON HAS A PRICE, WEIGHT AND SLOT SPACE.\rTHIS 2 SLOTS CANNON CAN ONLY BE PLACED ON A 2\rSLOTS OR BIGGER WAGON. CLICK TO SELECT IT.", arrows:[{d:"l", p:50, s:1}], shown:false}, {id:9, x:55, y:465, text:"THE WEAPON IS NOW ON THE WAGON AND SELECTED.\rTHE WEIGHT IS SUBTRACTED FROM THE POSSIBLE EXTRA\rLOAD. THE PRICE IS SUBTRACTED FROM YOUR CASH.", arrows:[{d:"t", p:90, s:1}, {d:"r", p:35, s:0.5}], close:"l", next:10, shown:false}, {id:10, x:135, y:415, text:"NOW CLICK ON THE\rWAGON TO SELECT IT.", arrows:[{d:"r", p:50, s:1}], next:11, shown:false}, {id:11, x:390, y:415, text:"EXCELLENT! THESE ARE THE BASICS OF A TRAIN BUILD.\rYOU CAN MOVE YOUR WAGONS AND WEAPONS WITH THE\rAPPROPRIATE BUTTONS.\rATTACH AS MANY ITEMS AS LOAD AND CASH ALLOWS.\rTHEN CLICK ON THE START BUTTON TO START THE MISSION.", arrows:[{d:"b", p:90, s:1}], shown:false}, {id:12, x:280, y:40, text:"POSITION THE AIRCRANE AND IT'S LOAD BEHIND THE TRAIN IN THE CORRECT ANGLE.\rMAKE SURE THE LAST TRAIN WAGON IS NOT TOO CLOSE TO A STOPBLOCK.\rCLICK WHEN THE AIRCRANELOAD TURNS RED.", shown:false}, {id:13, x:360, y:400, text:"CLICK ON A BUTTON TO SPEED UP OR DOWN.\rSHORTCUTS ARE LEFT AND RIGHT ARROW KEYS\rRED BUTTON IS FULL STOP (KEY DOWN).", arrows:[{d:"b", p:10, s:0.5}, {d:"b", p:82, s:1}], shown:false}, {id:14, x:830, y:35, text:"A SWITCH. CLICK IT TO CHANGE\rDIRECTION. LOOK AT THE MINIMAP\rTO SEE WHICH DIRECTION IS BEST.", arrows:[{d:"r", p:50, s:1}], shown:false}, {id:15, x:700, y:320, text:"THE FIRST DROP OFF POINT. RIDE YOUR TRAIN OVER THIS\rICON TO DROP OFF THE PASSENGER WAGON. THIS HAS TO\rBE DONE IN ORDER TO MAKE IT TO THE NEXT MISSION!\rTHESE LOCATIONS ARE ALSO SHOWN ON THE MINIMAP.", arrows:[{d:"l", p:70, s:1}], shown:false}, {id:16, x:10, y:400, text:"CLICK HERE TO ATTACH A NEW WAGON\rAND WEAPONS. POSITION THEM WITH THE AIRCRANE.\rFIRST PRESS FULL STOP.", arrows:[{d:"b", p:50, s:1}], shown:false}];
}
function showGuide(id) {
var _local5 = getGuide(id);
if (_global.gametype != "new mission") {
return(undefined);
}
if (_global.buildmenu.mode == "ingame") {
if (id != 12) {
return(undefined);
}
}
if (_global.game.levelId > 1) {
return(undefined);
}
if (_local5.shown) {
return(undefined);
}
if (id == 11) {
var _local6 = getGuide(10);
if (!_local6.shown) {
return(undefined);
}
}
curguide = undefined;
close();
curguide = _local5;
curguide.shown = true;
x = curguide.x;
y = curguide.y - 480;
_y = y;
if ((id == 14) || (id == 15)) {
_x = x - _global.camera.left;
_global.timer.addEventListener("onTimerTick", this);
} else {
_x = x;
_global.timer.removeEventListener("onTimerTick", this);
}
tf = createTextField("tf", 100, 0, 0, 0, 0);
tf.autoSize = true;
tf.multiline = true;
tf.wordWrap = false;
tf.embedFonts = true;
tf.type = "dynamic";
tf.border = true;
tf.borderColor = 16737792 /* 0xFF6600 */;
tf.background = true;
tf.backgroundColor = 0;
tf.selectable = false;
tf.text = "GUIDE:\r" + curguide.text;
tf.setTextFormat(fmt);
arr_mc = createEmptyMovieClip("arr_mc", 50);
var _local3 = 0;
while (_local3 < curguide.arrows.length) {
drawArrow(curguide.arrows[_local3]);
_local3++;
}
drawCloseBox();
}
function getGuide(id) {
var _local2 = 0;
while (_local2 < guides.length) {
if (guides[_local2].id == id) {
return(guides[_local2]);
}
_local2++;
}
}
function drawArrow(a) {
var _local4 = (((a.d == "t") || (a.d == "b")) ? (tf._x + (tf._width * (a.p / 100))) : (((a.d == "l") ? (tf._x) : (tf._x + tf._width))));
var _local3 = (((a.d == "l") || (a.d == "r")) ? (tf._y + (tf._height * (a.p / 100))) : (((a.d == "t") ? (tf._y) : (tf._y + tf._height))));
switch (a.d) {
case "t" :
var _local5 = {x:_local4 + (a.s * arrB), y:_local3};
var _local7 = {x:_local4, y:_local3 - (a.s * arrA)};
var _local6 = {x:_local4 - (a.s * arrB), y:_local3};
break;
case "b" :
_local5 = {x:_local4 + (a.s * arrB), y:_local3};
_local7 = {x:_local4, y:_local3 + (a.s * arrA)};
_local6 = {x:_local4 - (a.s * arrB), y:_local3};
break;
case "l" :
_local5 = {x:_local4, y:_local3 + (a.s * arrB)};
_local7 = {x:_local4 - (a.s * arrA), y:_local3};
_local6 = {x:_local4, y:_local3 - (a.s * arrB)};
break;
case "r" :
_local5 = {x:_local4, y:_local3 + (a.s * arrB)};
_local7 = {x:_local4 + (a.s * arrA), y:_local3};
_local6 = {x:_local4, y:_local3 - (a.s * arrB)};
}
arr_mc.lineStyle(1, 16737792);
arr_mc.moveTo(_local5.x, _local5.y);
arr_mc.beginFill(16737792);
arr_mc.lineTo(_local7.x, _local7.y);
arr_mc.lineTo(_local6.x, _local6.y);
arr_mc.lineTo(_local5.x, _local5.y);
arr_mc.endFill();
}
function drawCloseBox() {
close_mc = createEmptyMovieClip("close_mc", 150);
close_mc.lineStyle(1, 16737792);
close_mc.moveTo(0, 0);
close_mc.beginFill(0);
close_mc.lineTo(15, 0);
close_mc.lineTo(15, 15);
close_mc.lineTo(0, 15);
close_mc.lineTo(0, 0);
close_mc.endFill();
if (curguide.next) {
close_mc.lineStyle(1, 0);
close_mc.moveTo(2, 2);
close_mc.beginFill(16737792);
close_mc.lineTo(13, 7.5);
close_mc.lineTo(2, 13);
close_mc.lineTo(2, 2);
close_mc.endFill();
} else {
close_mc.lineStyle(2, 16737792);
close_mc.moveTo(4, 4);
close_mc.lineTo(11, 11);
close_mc.moveTo(4, 11);
close_mc.lineTo(11, 4);
}
close_mc._x = ((tf._x + tf._width) - close_mc._width) + 1;
if (curguide.close == "l") {
close_mc._x = tf._x;
}
close_mc._y = (tf._y - close_mc._height) - 2;
close_mc.onPress = rr.utils.Delegate.create(this, close);
if (curguide.id >= 12) {
close_mc.onRollOver = rr.utils.Delegate.create(_global.aim, _global.aim.hide, this);
close_mc.onRollOut = (close_mc.onDragOut = rr.utils.Delegate.create(_global.aim, _global.aim.show, this));
}
}
function onTimerTick() {
_x = x - _global.camera.left;
updateAfterEvent();
}
function close() {
trace("close: " + close);
_global.aim.show(this);
tf.removeTextField();
arr_mc.removeMovieClip();
close_mc.removeMovieClip();
if (curguide.next) {
showGuide(curguide.next);
}
}
function closeById(id) {
if (curguide.id == id) {
close();
}
}
function clear() {
tf.removeTextField();
arr_mc.removeMovieClip();
close_mc.removeMovieClip();
var _local2 = 1;
while (_local2 <= 11) {
var _local3 = getGuide(_local2);
_local3.shown = true;
_local2++;
}
}
}
Symbol 3488 MovieClip [__Packages.rr.control.Control] Frame 0
class rr.control.Control extends rr.BaseClip
{
var _visible, levelload_mc, speedFactor, bottom_mc, lightzero, my_fmt, addEventListener, quit_btn, thorn, loadcash_mc, __get__displayspeed, selectedLight, events, compound_mc, disabled_mc;
function Control () {
super();
_global.control = this;
_visible = false;
levelload_mc._visible = false;
}
function init() {
speedFactor = 45;
var _local3 = -3;
while (_local3 <= 6) {
bottom_mc.speed_mc.lights_mc[("light" + _local3) + "_mc"].init();
_local3++;
}
lightzero = bottom_mc.speed_mc.lights_mc.light0_mc;
my_fmt = new TextFormat();
my_fmt.bold = true;
my_fmt.font = "myAlternateGothic2 BT";
my_fmt.size = 14;
my_fmt.align = "center";
bottom_mc.speed_mc.gage_mc.speed_txt.setTextFormat(my_fmt);
bottom_mc.speed_mc.gage_mc.speed_txt.embedFonts = true;
bottom_mc.speed_mc.gage_mc.speed_txt.text = 0;
bottom_mc.speed_mc.fullstop_btn.onPress = rr.utils.Delegate.create(this, fullStop);
_global.loc.addEventListener("onLocAccel", this);
addEventListener("onFullStop", _global.loc);
bottom_mc.quit_btn.onPress = rr.utils.Delegate.create(this, quitGame);
bottom_mc.addwagon_btn.onPress = rr.utils.Delegate.create(this, showBuildInGame);
bottom_mc.detach_btn.onPress = rr.utils.Delegate.create(this, showDetach);
bottom_mc.minimap_btn.onPress = rr.utils.Delegate.create(this, toggleMiniMap);
quit_btn._visible = false;
bottom_mc.fuel_mc.init();
bottom_mc._visible = true;
levelload_mc._visible = false;
thorn = getTimer();
Key.addListener(this);
}
function showBuild() {
quit_btn.onPress = rr.utils.Delegate.create(this, quitGame);
quit_btn._visible = true;
loadcash_mc._visible = true;
bottom_mc._visible = false;
_global.buildmenu.init();
_visible = true;
}
function showLevelResult(success) {
loadcash_mc._visible = false;
bottom_mc._visible = false;
_global.levelresult.showResult(success);
}
function setLevelLoad(perc, lbl) {
levelload_mc.ldr_txt.text = lbl.toUpperCase();
levelload_mc.gotoAndStop(perc);
levelload_mc._visible = true;
}
function set displayspeed(val) {
bottom_mc.speed_mc.gage_mc.speed_txt.text = Math.round(val * speedFactor);
//return(__get__displayspeed());
}
function onKeyDown() {
if (_global.loc.isdead || (_global.train.isCrashed)) {
return(undefined);
}
var _local3 = Key.getCode();
if (_local3 == 72) {
_global.sounds.playNewSound(_global.loc.hornsound);
}
if (_local3 == 77) {
toggleMiniMap();
}
if (_local3 == 40) {
fullStop();
}
}
function selectLight(sr) {
if (_global.loc.fuel <= 0) {
return(undefined);
}
if (_global.minimap._visible) {
return(undefined);
}
selectedLight.deselect();
selectedLight = bottom_mc.speed_mc.lights_mc[("light" + sr) + "_mc"];
selectedLight.select();
}
function fullStop() {
selectLight(0);
events.dispatchEvent({target:this, type:"onFullStop"});
}
function setDamageClips() {
bottom_mc.damage_mc.setClips(true);
}
function setCash() {
loadcash_mc.cash_txt.text = _global.player.cash.toString();
}
function setLoad(l) {
if (l < 0) {
l = 0;
}
loadcash_mc.load_txt.text = l.toString();
}
function quitGame() {
_global.game.clearGameObjects();
_global.root.gotoAndStop("startmenu");
}
function showBuildInGame() {
_global.guide.closeById(16);
if (_global.stage.crane != undefined) {
return(undefined);
}
if (_global.minimap._visible) {
return(undefined);
}
if (compound_mc._visible) {
return(undefined);
}
_global.sounds.stopAll();
_global.timer.stop();
_global.stage._visible = false;
bottom_mc._visible = false;
_global.buildmenu.showInGameMenu();
}
function endBuildInGame() {
if (_global.trainbuild.ingameadded) {
_global.stage.sendCrane();
}
_global.stage._visible = true;
bottom_mc._visible = true;
_global.timer.start();
}
function showDetach() {
_global.aim.showDetach();
}
function toggleMiniMap() {
if (_global.game.levelended) {
return(undefined);
}
if (compound_mc._visible) {
return(undefined);
}
if (_global.minimap._visible) {
_global.minimap.closeMap();
} else {
_global.minimap.showMap();
}
}
function showCompoundMenu(c) {
compound_mc.show(c);
}
function showDisabledMenu(m) {
disabled_mc.show(m);
}
}
Symbol 3489 MovieClip [__Packages.rr.Game] Frame 0
class rr.Game extends rr.BaseClip
{
var levelId, defaultrage, dropoffs, pickups, levelended;
function Game () {
super();
_global.game = this;
rr.utils.Delegate.callDelayed(this, init, 500);
}
function init() {
_global.player = new rr.Player();
levelId = 0;
loadSavedMission();
loadGame();
}
function loadSavedMission() {
var _local2 = SharedObject.getLocal("savedmission");
_global.savedmission = _local2.data.savedmission;
if (_global.savedmission == undefined) {
var _local3 = rr.conf.Config.getGameConf(1);
_global.savedmission = {levelid:1, cash:_local3.startcash, points:0, landshot:0, airshot:0, time:0};
_local2.data.savedmission = _global.savedmission;
_local2.flush();
}
trace("_global.savedmission.levelid: " + _global.savedmission.levelid);
}
function loadGame() {
if (_global.gametype == "custom level") {
levelId = _global.superlevel;
_global.gameconf = _global.loadedlevel;
_global.player.addCash(_global.loadedlevel.startcash);
rr.conf.Config.addMapValues();
startLevel();
} else if (_global.gametype == "railrage") {
levelId = _global.superlevel;
_global.gameconf = _global.loadedlevel;
if (_global.gameconf.isdefault) {
defaultrage = true;
} else {
defaultrage = false;
}
_global.player.addCash(_global.loadedlevel.startcash);
rr.conf.Config.addMapValues();
startLevel();
} else {
if (_global.gametype == "new mission") {
levelId = 1;
var _local3 = rr.conf.Config.getGameConf(1);
_global.player.addCash(_local3.startcash);
}
if (_global.gametype == "loaded mission") {
levelId = _global.savedmission.levelid;
_global.player.addCash(_global.savedmission.cash);
_global.player.addPoints(_global.savedmission.points);
_global.player.landshot = _global.savedmission.landshot;
_global.player.airshot = _global.savedmission.airshot;
_global.player.time = _global.savedmission.time;
}
_global.gameconf = rr.conf.Config.getGameConf(levelId);
rr.conf.Config.addMapValues();
_global.control._visible = false;
_global.missionmenu.playMission(levelId);
}
}
function startLevel() {
dropoffs = new Array();
pickups = new Array();
var _local4 = _global.gameconf.dp;
var _local7 = _local4.length;
var _local3 = 0;
while (_local3 < _local7) {
if (_local4[_local3].m == "d") {
dropoffs.push(rr.conf.Config.translateDropCode(_local4[_local3].t));
}
if (_local4[_local3].m == "p") {
pickups.push({linkid:rr.conf.Config.translateDropCode(_local4[_local3].t), done:false});
}
_local3++;
}
_global.leveltime = 0;
_global.landshot = 0;
_global.airshot = 0;
_global.player.initLevel();
_global.missionmenu._visible = false;
_global.control.showBuild();
_global.timer = new rr.Timer();
_global.map = new rr.Map();
_global.aim = new rr.Aim();
_global.camera = new rr.StageCam();
if (_global.gametype == "railrage") {
_global.clock = new rr.Clock();
}
}
function initLevel() {
_global.sounds.init();
_global.stage.init();
_global.map.init();
_global.stage.createObjects();
}
function play() {
trace("play: ");
levelended = false;
_global.aim.init();
_global.camera.init();
_global.control.init();
if (_global.gametype == "railrage") {
_global.clock.init();
}
_global.guide.showGuide(13);
_global.timer.start();
_global.stage._visible = true;
}
function nextLevel() {
clearGameObjects();
levelId++;
_global.gameconf = rr.conf.Config.getGameConf(levelId);
rr.conf.Config.addMapValues();
_global.control._visible = false;
_global.missionmenu.playMission(levelId);
}
function replayLevel() {
_global.player.getReplayStats();
startLevel();
}
function checkEndLevel() {
if (dropoffs.length > 0) {
return(undefined);
}
var _local5 = _global.loc;
while (_local5.next) {
_local5 = _local5.next;
var _local7 = pickups.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = pickups[_local4];
if ((_local3.linkid == _local5.linkId) && (!_local3.done)) {
_local3.done = true;
break;
}
_local4++;
}
}
var _local8 = pickups.length;
var _local6 = 0;
while (_local6 < _local8) {
if (!pickups[_local6].done) {
return(undefined);
}
_local6++;
}
endLevel(true);
}
function endLevel(success) {
if (levelended) {
return(undefined);
}
levelended = true;
_global.aim.clear();
_global.clock.clear();
if (success) {
rr.utils.Delegate.callDelayed(this, finishLevel, 500, success);
} else {
rr.utils.Delegate.callDelayed(this, finishLevel, 3000, success);
}
}
function finishLevel(success) {
trace("endLevel: ");
clearGameObjects();
_global.player.setMissionResult(success);
if (success) {
_global.sounds.playSound("Mission Accomplished.wav");
} else {
_global.sounds.playSound("Mission Failed.wav");
}
_global.control.showLevelResult(success);
}
function clearGameObjects() {
_global.sounds.stopAll();
_global.timer.stop();
_global.stage._visible = false;
delete _global.timer;
delete _global.map;
delete _global.aim;
delete _global.camera;
delete _global.loc;
delete _global.train;
delete _global.clock;
}
}
Symbol 3490 MovieClip [__Packages.rr.Player] Frame 0
class rr.Player extends rr.BaseClass
{
var cash, bonus, points, landshot, airshot, time, addEventListener, events, rpcash, rpbonus, rppoints, rplandshot, rpairshot, rptime;
function Player () {
super();
init();
}
function init() {
cash = 0;
bonus = 0;
points = 0;
landshot = 0;
airshot = 0;
time = 0;
addEventListener("setCash", _global.control);
}
function initLevel() {
bonus = 0;
setReplayStats();
}
function addCash(amount) {
cash = Math.round(cash + amount);
if (cash < 0) {
cash = 0;
}
events.dispatchEvent({type:"setCash"});
}
function addBonus(amount) {
bonus = Math.round(bonus + amount);
if (bonus < 0) {
bonus = 0;
}
addCash(amount);
}
function addPoints(amount) {
points = Math.round(points + amount);
if (points < 0) {
points = 0;
}
}
function setMissionResult(success) {
var _local4;
if (success) {
var _local3 = _global.game.levelId;
if ((_global.gametype == "new mission") || (_global.gametype == "loaded mission")) {
if (_local3 < 2) {
var _local5 = rr.conf.Config.getGameConf(_local3 + 1);
addCash(_local5.startcash);
}
}
var _local6 = rr.conf.Config.getGameConf(_local3);
_local4 = _local6.levelpoints + Math.round((10000 * (_global.landshot + (_global.airshot * 3))) / (_global.leveltime / 1000));
} else {
_local4 = Math.round((1000 * (_global.landshot + (_global.airshot * 3))) / (_global.leveltime / 1000));
}
addPoints(_local4);
landshot = landshot + _global.landshot;
airshot = airshot + _global.airshot;
time = time + _global.leveltime;
}
function setReplayStats() {
rpcash = cash;
rpbonus = bonus;
rppoints = points;
rplandshot = landshot;
rpairshot = airshot;
rptime = time;
}
function getReplayStats() {
cash = rpcash;
bonus = rpbonus;
points = rppoints;
landshot = rplandshot;
airshot = rpairshot;
time = rptime;
}
}
Symbol 3491 MovieClip [__Packages.rr.Timer] Frame 0
class rr.Timer extends rr.BaseClass
{
var stopped, ival, events;
function Timer () {
super();
}
function start() {
stopped = false;
clearInterval(ival);
ival = setInterval(this, "doTick", 40);
}
function stop() {
clearInterval(ival);
stopped = true;
}
function doTick() {
events.dispatchEvent({type:"onTimerTick", target:this});
updateAfterEvent();
}
}
Symbol 3492 MovieClip [__Packages.rr.Map] Frame 0
class rr.Map extends rr.BaseClass
{
var mapId, cols, rows, maptype, foreground, nightmap, collapsepoints, width, height, map_bmp, fg_bmp, cells, rc, rs;
function Map () {
super();
}
function init() {
trace("init: map ");
mapId = _global.gameconf.map.mapid;
cols = _global.gameconf.map.cols;
rows = _global.gameconf.map.rows;
maptype = _global.gameconf.map.maptype;
foreground = _global.gameconf.map.foreground;
nightmap = _global.gameconf.nightmap;
if (_global.gameconf.map.collapsepoints) {
collapsepoints = _global.gameconf.map.collapsepoints;
} else {
collapsepoints = new Array();
}
width = cols * 640;
height = rows * 480;
map_bmp = flash.display.BitmapData.loadBitmap("map_" + mapId);
if (foreground) {
fg_bmp = flash.display.BitmapData.loadBitmap(("map_" + mapId) + "_fore");
}
_global.minimap.init();
createMapCells();
createCompounds();
createRailConnections();
createRailSegments();
createBonuses();
createDrops();
initMapCells();
if (nightmap) {
rr.utils.ClipUtils.setTint(_global.stage.bg_mc, 0, 80);
rr.utils.ClipUtils.setTint(_global.stage.fg_mc, 0, 80);
}
}
function createMapCells() {
cells = [];
var _local3 = 1;
while (_local3 <= cols) {
var _local2 = 1;
while (_local2 <= rows) {
this[(("cell_" + _local3) + "_") + _local2] = new rr.MapCell(_local3, _local2);
cells.push(this[(("cell_" + _local3) + "_") + _local2].id);
_local2++;
}
_local3++;
}
}
function createCompounds() {
var _local3 = _global.gameconf.map.cp;
var _local5 = _local3.length;
var _local2 = 0;
while (_local2 < _local5) {
_local3[_local2].id = _local2 + 1;
var _local4 = _global.map.getCellByPos(_local3[_local2].x, _local3[_local2].y);
_local4.addCompound(_local3[_local2]);
_local2++;
}
}
function createRailConnections() {
var _local4 = _global.gameconf.map.rc;
rc = [];
var _local5 = _local4.length;
var _local3 = 0;
while (_local3 < _local5) {
rc.push(_local4[_local3].id);
this["rc" + _local4[_local3].id] = new rr.rail.RailConnection(_local4[_local3]);
_local3++;
}
}
function createRailSegments() {
var _local4 = _global.gameconf.map.rs;
rs = [];
var _local5 = _local4.length;
var _local3 = 0;
while (_local3 < _local5) {
rs.push(_local4[_local3].id);
this["rs" + _local4[_local3].id] = new rr.rail.RailSegment(_local4[_local3]);
_local3++;
}
_local5 = rc.length;
_local3 = 0;
while (_local3 < _local5) {
this["rc" + rc[_local3]].init();
_local3++;
}
}
function createBonuses() {
var _local3 = _global.gameconf.bs;
var _local5 = _local3.length;
var _local2 = 0;
while (_local2 < _local5) {
_local3[_local2].id = _local2;
var _local4 = _global.map.getCellByPos(_local3[_local2].x, _local3[_local2].y);
_local4.addBonus(_local3[_local2]);
_local2++;
}
}
function createDrops() {
var _local3 = _global.gameconf.dp;
var _local5 = _local3.length;
var _local2 = 0;
while (_local2 < _local5) {
_local3[_local2].id = _local2;
var _local4 = _global.map.getCellByPos(_local3[_local2].x, _local3[_local2].y);
_local4.addDrop(_local3[_local2]);
_local2++;
}
}
function initMapCells() {
drawMiniMap("bg");
var _local4 = rc.length;
var _local3 = 0;
while (_local3 < _local4) {
this["rc" + rc[_local3]].checkBlocks();
_local3++;
}
_local4 = rs.length;
_local3 = 0;
while (_local3 < _local4) {
this["rs" + rs[_local3]].checkBlocks();
rr.rail.RailUtils.draw(this["rs" + rs[_local3]], "rail_bg");
_local3++;
}
_local3 = 0;
while (_local3 < _local4) {
rr.rail.RailUtils.draw(this["rs" + rs[_local3]], "rail_beam");
_local3++;
}
_local3 = 0;
while (_local3 < _local4) {
rr.rail.RailUtils.draw(this["rs" + rs[_local3]], "rail");
_local3++;
}
drawMiniMap("fg");
_local4 = cells.length;
_local3 = 0;
while (_local3 < _local4) {
var _local2 = this["cell_" + cells[_local3]];
_local2.createNeighbours();
_local2.createBackground();
if (foreground) {
_local2.createForeground();
}
_local3++;
}
map_bmp.dispose();
fg_bmp.dispose();
delete map_bmp;
delete fg_bmp;
}
function drawMiniMap(layer) {
trace("layer: " + layer);
var _local3 = new flash.geom.Matrix();
var _local4 = _global.minimap.scale;
_local3.scale(_local4, _local4);
if (layer == "bg") {
_global.minimap.map_bmp.draw(map_bmp, _local3);
}
if (layer == "fg") {
_global.minimap.map_bmp.draw(fg_bmp, _local3);
}
}
function getCell(cId) {
var _local4 = cells.length;
var _local2 = 0;
while (_local2 < _local4) {
var _local3 = this["cell_" + cells[_local2]];
if (_local3.id == cId) {
return(_local3);
}
_local2++;
}
}
function getCellByPos(x, y) {
var _local6 = cells.length;
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = this["cell_" + cells[_local3]];
if ((((x >= _local2.left) && (x < _local2.right)) && (y >= _local2.top)) && (y < _local2.bottom)) {
return(_local2);
}
_local3++;
}
}
function addCompoundListeners() {
var _local3 = cells.length;
var _local2 = 0;
while (_local2 < _local3) {
this["cell_" + cells[_local2]].addCompoundListeners();
_local2++;
}
}
}
Symbol 3493 MovieClip [__Packages.rr.rail.RailUtils] Frame 0
class rr.rail.RailUtils
{
function RailUtils () {
}
static function draw(rs, element) {
if (rs.type == "line") {
drawLine(rs, element);
}
if (rs.type == "arc") {
drawArc(rs, element);
}
}
static function drawLine(rs, element) {
var _local9 = Math.PI;
var _local15 = Math.cos;
var _local14 = Math.sin;
var _local8 = flash.display.BitmapData.loadBitmap(element);
var _local12;
var _local11;
var _local10 = rr.utils.MathUtils.formatAngle(rs.ang);
var _local7 = new flash.geom.Point(_local8.width / 2, _local8.height / 2);
var _local2 = new flash.geom.Matrix();
var _local4 = 0;
while (_local4 <= rs.length) {
_local12 = _local15((_local10 * _local9) / 180) * _local4;
_local11 = (-_local14((_local10 * _local9) / 180)) * _local4;
_local2.identity();
_local2.translate(-_local7.x, -_local7.y);
_local2.rotate((rr.utils.MathUtils.formatAngle(-_local10) / 180) * _local9);
_local2.translate(rs.rcs.x + _local12, rs.rcs.y + _local11);
if (element == "rail_bg") {
_global.map.map_bmp.draw(_local8, _local2, null, "overlay");
} else {
_global.map.map_bmp.draw(_local8, _local2);
}
if (element == "rail") {
var _local6 = new flash.display.BitmapData(7, 7, false, _global.minimap.railcolor);
var _local3 = _global.minimap.scale;
_local2.identity();
_local2.scale(_local3, _local3);
_local2.translate((-_local7.x) * _local3, (-_local7.y) * _local3);
_local2.translate((rs.rcs.x + _local12) * _local3, (rs.rcs.y + _local11) * _local3);
_global.minimap.map_bmp.draw(_local6, _local2);
_local6.dispose();
}
_local4 = _local4 + _local8.width;
}
_local8.dispose();
}
static function drawArc(rs, element) {
var _local9 = Math.PI;
var _local17 = Math.cos;
var _local16 = Math.sin;
var _local10 = flash.display.BitmapData.loadBitmap(element);
var _local7 = new flash.geom.Point(_local10.width / 2, _local10.height / 2);
var _local2 = new flash.geom.Matrix();
var _local12;
var _local11;
var _local19 = rs.length / _local10.width;
var _local15 = rr.utils.MathUtils.formatAngle(rs.ang - 90);
var _local13 = new flash.geom.Point((-rs.dir) * (rs.radius * _local17((_local15 * _local9) / 180)), rs.dir * (rs.radius * _local16((_local15 * _local9) / 180)));
var _local18 = (rs.dir * 180) / ((rs.radius * _local9) / _local10.width);
var _local8;
var _local6 = 0;
while (_local6 <= _local19) {
_local8 = rr.utils.MathUtils.formatAngle(_local15 + (_local6 * _local18));
_local12 = _local13.x + ((rs.dir * rs.radius) * _local17((_local8 * _local9) / 180));
_local11 = _local13.y - ((rs.dir * rs.radius) * _local16((_local8 * _local9) / 180));
_local2.identity();
_local2.translate(-_local7.x, -_local7.y);
_local2.rotate((rr.utils.MathUtils.formatAngle((-_local8) - 90) / 180) * _local9);
_local2.translate(rs.rcs.x + _local12, rs.rcs.y + _local11);
if (element == "rail_bg") {
_global.map.map_bmp.draw(_local10, _local2, null, "overlay");
} else {
_global.map.map_bmp.draw(_local10, _local2, null);
}
if (element == "rail") {
var _local5 = new flash.display.BitmapData(7, 7, false, _global.minimap.railcolor);
var _local4 = _global.minimap.scale;
_local2.identity();
_local2.scale(_local4, _local4);
_local2.translate((-_local7.x) * _local4, (-_local7.y) * _local4);
_local2.translate((rs.rcs.x + _local12) * _local4, (rs.rcs.y + _local11) * _local4);
_global.minimap.map_bmp.draw(_local5, _local2);
_local5.dispose();
}
_local6++;
}
_local10.dispose();
}
}
Symbol 3494 MovieClip [__Packages.rr.StageCam] Frame 0
class rr.StageCam extends rr.BaseClass
{
var follow, width, height, left, x, right, top, y, bottom, minx, miny, maxx, maxy, xs, ys, xsprev, ysprev, cx, cy, cell, events, camRef, dist, xdif, ydif;
function StageCam () {
super();
}
function init() {
follow = "mouse";
width = _global.stage.width;
height = _global.stage.height;
left = x - (width / 2);
right = x + (width / 2);
top = y - (height / 2);
bottom = y + (height / 2);
minx = width / 2;
miny = height / 2;
maxx = _global.map.width - (width / 2);
maxy = _global.map.height - (height / 2);
x = _global.gameconf.map.firstrail.x;
y = _global.gameconf.map.firstrail.y;
x = ((x < minx) ? (minx) : (((x > maxx) ? (maxx) : (x))));
y = ((y < miny) ? (miny) : (((y > maxy) ? (maxy) : (y))));
xs = (ys = (xsprev = (ysprev = (cx = (cy = 0)))));
cell = _global.map.getCellByPos(x, y);
cell.isFocused = true;
events.dispatchEvent({type:"onCameraCellChange"});
cell.update();
}
function update() {
follow = "loc";
if (follow == "loc") {
camRef = _global.loc;
dist = rr.utils.MathUtils.getDistance(x, y, camRef.x, camRef.y);
xdif = camRef.x - x;
ydif = camRef.y - y;
xs = camRef.xspeed + (xdif / 100);
ys = camRef.yspeed + (ydif / 100);
}
if (follow == "mouse") {
if (_global.stage._ymouse > 480) {
xs = (ys = 0);
} else {
xdif = _global.stage._xmouse - (width / 2);
ydif = _global.stage._ymouse - (height / 2);
xs = xdif / 20;
ys = ydif / 20;
}
}
if (Math.abs(xs - xsprev) < 0.5) {
xs = xsprev;
}
if (Math.abs(ys - ysprev) < 0.5) {
ys = ysprev;
}
xsprev = xs;
ysprev = ys;
x = (((x + xs) < minx) ? (minx) : (((Math.round(x + xs) > maxx) ? (maxx) : (Math.round(x + xs)))));
y = (((y + ys) < miny) ? (miny) : (((Math.round(y + ys) > maxy) ? (maxy) : (Math.round(y + ys)))));
left = x - (width / 2);
right = x + (width / 2);
top = y - (height / 2);
bottom = y + (height / 2);
cell.checkFocus(x, y);
if (!cell.isFocused) {
cell = _global.map.getCellByPos(x, y);
cell.isFocused = true;
events.dispatchEvent({type:"onCameraCellChange"});
}
cell.update();
}
}
Symbol 3495 MovieClip [__Packages.rr.control.DamageClip] Frame 0
class rr.control.DamageClip extends rr.BaseClip
{
var _y, _height, parent, removeMovieClip;
function DamageClip () {
super();
init();
}
function init() {
_y = 19 - _height;
parent.addEventListener("onDamage", this);
parent.addEventListener("onTrainTargetDie", this);
onDamage();
}
function onDamage() {
var _local2 = Math.round(100 * (parent.damage / parent.killlevel));
rr.control.ControlUtils.setDamageColor(this, _local2);
}
function onTrainTargetDie() {
removeMovieClip();
}
}
Symbol 3496 MovieClip [__Packages.rr.control.ControlUtils] Frame 0
class rr.control.ControlUtils
{
function ControlUtils () {
}
static function setDamageColor(mc, perc) {
var _local2 = [65280, 2997504, 6859264, 10721024, 14450688, 16738048, 16732160, 16725504, 16719360, 16719360, 10027008];
var _local3 = new Color(mc);
var _local1 = (perc - (perc % 10)) / 10;
_local3.setRGB(_local2[_local1]);
}
}
Symbol 3497 MovieClip [__Packages.cr.map.MapStage] Frame 0
class cr.map.MapStage extends rr.BaseClip
{
var _visible, width, height, rsAdded, rcAdded, cpAdded, rs, rc, cp, confshow, bg_mc, createEmptyMovieClip, getNextHighestDepth, bg_bmp, rs_1, onEnterFrame, rc_1, rc_2, rc_9999, rc_10000, rs_10000, rcSel, rsSel, events;
function MapStage () {
super();
_global.stage = this;
_visible = false;
}
function init() {
width = 640;
height = 480;
rsAdded = (rcAdded = (cpAdded = 0));
rs = new Array();
rc = new Array();
cp = new Array();
confshow = false;
bg_mc = createEmptyMovieClip("bg_mc", getNextHighestDepth());
bg_bmp = new flash.display.BitmapData(width, height, false, 16777215);
bg_mc.attachBitmap(bg_bmp, bg_mc.getNextHighestDepth());
}
function startBuild() {
_global.createcontrol.load_mc._visible = false;
selectSegment(rs_1);
var _local3 = rc.length;
onEnterFrame = rr.utils.Delegate.create(this, update);
_global.railcontrol._visible = true;
_visible = true;
}
function update() {
_global.camera.update();
var _local4 = rs.length;
var _local3 = 0;
while (_local3 < _local4) {
this["rs_" + rs[_local3]].checkRender();
_local3++;
}
_local4 = rc.length;
_local3 = 0;
while (_local3 < _local4) {
this["rc_" + rc[_local3]].render();
_local3++;
}
_local4 = cp.length;
_local3 = 0;
while (_local3 < _local4) {
this["cp_" + cp[_local3]].render();
_local3++;
}
if (_global.railcontrol.snap_btn._visible) {
_global.railcontrol.snap_btn._x = _global.railcontrol.snap_btn.x - _global.camera.left;
_global.railcontrol.snap_btn._y = _global.railcontrol.snap_btn.y - _global.camera.top;
}
updateAfterEvent();
}
function addDefaultSegments() {
rc.push(1);
rc.push(2);
rc.push(9999);
rc.push(10000);
rc_1 = new cr.map.RailConnection({id:1});
rc_2 = new cr.map.RailConnection({id:2});
rc_9999 = new cr.map.RailConnection({id:9999});
rc_10000 = new cr.map.RailConnection({id:10000});
var _local4 = _global.map.firstrail;
rc_1.x = _local4.x;
rc_1.y = _local4.y;
rc_1.ang = _local4.ang;
rs.push(1);
rs_1 = new cr.map.RailSegment({id:1, cps:rc_1, cpe:rc_2, l:_local4.l, ang:_local4.ang, r:_local4.r, dir:_local4.dir});
rs_1.initDefault();
var _local3 = _global.map.lastrail;
rc_10000.x = _local3.x;
rc_10000.y = _local3.y;
rc_10000.ang = _local3.ang;
rs.push(10000);
rs_10000 = new cr.map.RailSegment({id:10000, cps:rc_10000, cpe:rc_9999, l:_local3.l, ang:_local3.ang, r:_local3.r, dir:_local3.dir});
rs_10000.initDefault();
rc_2.check();
rc_9999.check();
rsAdded = 1;
rcAdded = 2;
}
function addRailSegment(type) {
if (!rcSel) {
return(undefined);
}
if (!rcSel.possibleSegment(type)) {
return(undefined);
}
if (type == "line") {
_global.railcontrol.reset(100, null, null);
}
if (type == "arc") {
_global.railcontrol.reset(null, 100, null);
}
rsAdded++;
if (rsAdded == 10000) {
rsAdded = 10001;
}
rs.push(rsAdded);
this["rs_" + rsAdded] = new cr.map.RailSegment({id:rsAdded, type:type, cps:rcSel});
this["rs_" + rsAdded].initNew();
}
function deleteSegment() {
var _local4 = rsSel;
if ((_local4.id == 1) || (_local4.id == 10000)) {
return(undefined);
}
_global.railcontrol.snap_btn._visible = false;
selectSegment(null);
selectRailConnection(null);
_local4.remove();
var _local5 = rs.length;
var _local3 = 0;
while (_local3 < _local5) {
if (rs[_local3] == _local4.id) {
rs.splice(_local3, 1);
break;
}
_local3++;
}
delete this["rs_" + _local4.id];
events.dispatchEvent({type:"onDelete"});
}
function selectSegment(s) {
rsSel.deselect();
rsSel = s;
trace("rsSel: " + rsSel.id);
rsSel.select();
selectRailConnection(rsSel.cpe);
events.dispatchEvent({type:"onRailSegmentSelect"});
}
function addRailConnection() {
rcAdded++;
if (rcAdded == 9999) {
rcAdded = 10001;
}
rc.push(rcAdded);
this["rc_" + rcAdded] = new cr.map.RailConnection({id:rcAdded});
return(this["rc_" + rcAdded]);
}
function deleteRailConnection(c) {
c.remove();
var _local4 = rc.length;
var _local2 = 0;
while (_local2 < _local4) {
if (rc[_local2] == c.id) {
rc.splice(_local2, 1);
break;
}
_local2++;
}
delete this["rc_" + c.id];
events.dispatchEvent({type:"onDelete"});
}
function selectRailConnection(c) {
rcSel.deselect();
rcSel = c;
rcSel.select();
}
function addCompound() {
cpAdded++;
cp.push(cpAdded);
this["cp_" + cpAdded] = new cr.map.Compound(cpAdded);
}
function deleteCompound(c) {
c.remove();
var _local4 = cp.length;
var _local2 = 0;
while (_local2 < _local4) {
if (cp[_local2] == c.id) {
cp.splice(_local2, 1);
break;
}
_local2++;
}
delete this["cp_" + c.id];
}
function createLoadedMap() {
var _local4 = _global.createcontrol.confmap;
var _local5 = _local4.cp.length;
var _local3 = 0;
while (_local3 < _local5) {
cpAdded++;
cp.push(cpAdded);
this["cp_" + cpAdded] = new cr.map.Compound(cpAdded);
this["cp_" + cpAdded].x = _local4.cp[_local3].x;
this["cp_" + cpAdded].y = _local4.cp[_local3].y;
this["cp_" + cpAdded].rot = _local4.cp[_local3].rot;
_local3++;
}
addLoadedConnection(0);
}
function addLoadedConnection(idx) {
var _local4 = _global.createcontrol.confmap;
var _local3 = _local4.rc[idx];
_local3.idx = idx;
this["rc_" + _local3.id] = new cr.map.RailConnection(_local3);
rc.push(_local3.id);
rcAdded = Math.max(rcAdded, _local3.id);
this["rc_" + _local3.id].initLoaded();
}
function onConnectionLoaded(c) {
var _local3 = _global.createcontrol.confmap;
if (c.idx >= (_local3.rc.length - 1)) {
addLoadedSegment(0);
} else {
var _local5 = Math.round((50 * c.idx) / (_local3.rc.length - 1));
_global.createcontrol.setLoad(_local5, "creating railconnections");
rr.utils.Delegate.callDelayed(this, addLoadedConnection, 10, c.idx + 1);
}
}
function addLoadedSegment(idx) {
var _local4 = _global.createcontrol.confmap;
var _local3 = _local4.rs[idx];
_local3.idx = idx;
this["rs_" + _local3.id] = new cr.map.RailSegment(_local3);
rs.push(_local3.id);
rsAdded = Math.max(rsAdded, _local3.id);
this["rs_" + _local3.id].initLoaded();
}
function onSegmentLoaded(s) {
var _local3 = _global.createcontrol.confmap;
if (s.idx >= (_local3.rs.length - 1)) {
startBuild();
} else {
var _local5 = Math.round((50 * s.idx) / (_local3.rs.length - 1));
_global.createcontrol.setLoad(_local5, "creating railsegments");
rr.utils.Delegate.callDelayed(this, addLoadedSegment, 10, s.idx + 1);
}
}
}
Symbol 3498 MovieClip [__Packages.cr.map.RailSegment] Frame 0
class cr.map.RailSegment extends rr.BaseClass
{
var initObj, createtype, id, cps, cpe, type, length, radius, dir, idx, endout, toggled, ang, initialized, mm_mov, movx, movs, movy, mov, cos, pi, sin, selected, mov_bmp, mm_mov_bmp;
function RailSegment (iObj) {
super();
initObj = iObj;
}
function initDefault() {
createtype = "default";
id = initObj.id;
cps = initObj.cps;
cpe = initObj.cpe;
type = (initObj.r ? "arc" : "line");
length = initObj.l;
if (initObj.r) {
radius = initObj.r;
}
if (initObj.dir) {
dir = initObj.dir;
}
cps.addSegment(this);
cpe.addSegment(this);
initShared();
updateMov();
}
function initNew() {
createtype = "new";
id = initObj.id;
type = initObj.type;
cps = initObj.cps;
length = _global.railcontrol.length;
dir = _global.railcontrol.direction;
radius = _global.railcontrol.radius;
cpe = _global.stage.addRailConnection();
cps.addSegment(this);
cpe.addSegment(this);
initShared();
updateMov();
_global.stage.selectSegment(this);
}
function initLoaded() {
createtype = "loaded";
id = initObj.id;
idx = initObj.idx;
type = (initObj.r ? "arc" : "line");
cps = _global.stage["rc_" + initObj.s];
cpe = _global.stage["rc_" + initObj.e];
endout = initObj.eo;
toggled = initObj.t;
ang = (toggled ? (cps.ang + 180) : (cps.ang));
if (type == "line") {
length = rr.utils.MathUtils.getDistance(cps.x, cps.y, cpe.x, cpe.y);
}
if (type == "arc") {
radius = initObj.r;
dir = initObj.d;
length = initObj.l;
}
cps.addLoadedSegment(this);
cpe.addLoadedSegment(this);
initShared();
cr.map.RailUtils.draw(this);
}
function onDrawComplete() {
checkSelected();
if (!initialized) {
initialized = true;
if (createtype == "loaded") {
_global.stage.onSegmentLoaded(this);
}
}
}
function initShared() {
mm_mov = _global.minimap.createObjectClip(this);
_global.railcontrol.addEventListener("onLengthChanged", this);
_global.railcontrol.addEventListener("onInOutChanged", this);
if (type == "arc") {
_global.railcontrol.addEventListener("onRadiusChanged", this);
_global.railcontrol.addEventListener("onDirectionChanged", this);
}
}
function checkRender() {
if ((((movx > _global.camera.right) || ((movx + movs) < _global.camera.left)) || (movy > _global.camera.bottom)) || ((movy + movs) < _global.camera.top)) {
if (mov) {
mov._visible = false;
}
} else {
render();
}
}
function render() {
if (!mov) {
mov = _global.stage.createEmptyMovieClip("rsmov" + id, 1000 + id);
Mouse.addListener(mov);
mov.onMouseDown = rr.utils.Delegate.create(this, onMovDown);
cr.map.RailUtils.draw(this);
}
mov._x = movx - _global.camera.left;
mov._y = movy - _global.camera.top;
mov._visible = true;
}
function updateMov() {
setEndConnection();
cr.map.RailUtils.draw(this);
}
function setEndConnection() {
ang = (toggled ? (cps.ang + 180) : (cps.ang));
if (type == "line") {
var _local5 = cps.x + (cos((rr.utils.MathUtils.formatAngle(ang) * pi) / 180) * length);
var _local4 = cps.y - (sin((rr.utils.MathUtils.formatAngle(ang) * pi) / 180) * length);
var _local6 = ang;
cpe.update(_local5, _local4, _local6);
}
if (type == "arc") {
var _local3 = new flash.geom.Point(rr.utils.MathUtils.formatDecimals((-dir) * (radius * cos((rr.utils.MathUtils.formatAngle(ang - 90) * pi) / 180)), 2), rr.utils.MathUtils.formatDecimals(dir * (radius * sin((rr.utils.MathUtils.formatAngle(ang - 90) * pi) / 180)), 2));
var _local7 = (rr.utils.MathUtils.formatAngle(ang - 90) * pi) / 180;
var _local2 = _local7 - (((-dir) * length) / radius);
var _local5 = (cps.x + _local3.x) + ((dir * radius) * cos(_local2));
var _local4 = (cps.y + _local3.y) - ((dir * radius) * sin(_local2));
var _local6 = rr.utils.MathUtils.formatAngle((_local2 / (pi / 180)) + 90);
cpe.update(_local5, _local4, _local6);
}
}
function onLengthChanged() {
if (!selected) {
return(undefined);
}
if (length == _global.railcontrol.length) {
return(undefined);
}
if (cpe.blocked) {
return(undefined);
}
length = _global.railcontrol.length;
updateMov();
}
function onRadiusChanged() {
if (!selected) {
return(undefined);
}
if (radius == _global.railcontrol.radius) {
return(undefined);
}
if (cpe.blocked) {
return(undefined);
}
radius = _global.railcontrol.radius;
updateMov();
}
function onDirectionChanged() {
if (!selected) {
return(undefined);
}
if (cpe.blocked) {
return(undefined);
}
dir = _global.railcontrol.direction;
updateMov();
}
function onInOutChanged() {
if (!selected) {
return(undefined);
}
if (cpe.blocked) {
return(undefined);
}
cps.toggleSegment(this);
updateMov();
}
function onBlockChange(evtObj) {
if (evtObj.target == cps) {
cpe.checkBlock();
} else {
cps.checkBlock();
}
}
function select() {
selected = true;
_global.railcontrol.reset(length, radius, dir);
checkSelected();
}
function deselect() {
selected = false;
checkSelected();
}
function checkSelected() {
var _local2 = new flash.geom.ColorTransform();
if (selected) {
mov.swapDepths(10000 + id);
mov._alpha = 100;
_local2.redMultiplier = 2;
} else {
mov.swapDepths(1000 + id);
mov._alpha = 20;
_local2.redMultiplier = 1;
}
var _local3 = new flash.geom.Transform(mov);
_local3.colorTransform = _local2;
}
function remove() {
_global.railcontrol.removeEventListener("onLengthChanged", this);
_global.railcontrol.removeEventListener("onRadiusChanged", this);
_global.railcontrol.removeEventListener("onDirectionChanged", this);
Mouse.removeListener(mov);
cps.removeSegment(this);
cpe.removeSegment(this);
mov_bmp.dispose();
mm_mov_bmp.dispose();
delete mov_bmp;
delete mm_mov_bmp;
mov.removeMovieClip();
mm_mov.removeMovieClip();
}
function onMovDown() {
var _local3 = new flash.geom.Point(_xmouse, _ymouse);
if (_local3.y > _global.stage.height) {
return(undefined);
}
mov.globalToLocal(_local3);
if (mov_bmp.getPixel32(_local3.x, _local3.y) != 0) {
_global.stage.selectSegment(this);
}
}
function getPoint(d) {
if (d > length) {
d = length;
}
if (d < 0) {
d = 0;
}
if (type == "line") {
var _local5 = rr.utils.MathUtils.formatAngle(ang);
var _local9 = cps.x + (cos((_local5 * pi) / 180) * d);
var _local8 = cps.y - (sin((_local5 * pi) / 180) * d);
var _local7 = -_local5;
return({x:_local9, y:_local8, rot:_local7});
}
if (type == "arc") {
var _local5 = rr.utils.MathUtils.formatAngle(ang - 90);
var _local4 = new flash.geom.Point((-dir) * (radius * cos((_local5 * pi) / 180)), dir * (radius * sin((_local5 * pi) / 180)));
var _local6 = (rr.utils.MathUtils.formatAngle(ang - 90) * pi) / 180;
var _local3 = _local6 - (((-dir) * d) / radius);
var _local9 = (cps.x + _local4.x) + ((dir * radius) * cos(_local3));
var _local8 = (cps.y + _local4.y) - ((dir * radius) * sin(_local3));
var _local7 = -rr.utils.MathUtils.formatAngle((_local3 / (pi / 180)) + 90);
return({x:_local9, y:_local8, rot:_local7});
}
}
}
Symbol 3499 MovieClip [__Packages.cr.map.RailConnection] Frame 0
class cr.map.RailConnection extends rr.BaseClass
{
var initObj, id, linecount, ins, outs, blocked, mov, isopen, rswitch, addEventListener, idx, x, y, ang, possibleSnap, events, rsstart, selected, snapdir, removeEventListener;
function RailConnection (iObj) {
super();
initObj = iObj;
init();
}
function init() {
id = initObj.id;
trace("rc id: " + id);
linecount = 0;
ins = [];
outs = [];
if ((id == 1) || (id == 10000)) {
blocked = true;
mov._visible = false;
return(undefined);
}
mov = _global.stage.attachMovie("RailConnection", "rcmov" + id, 30000 + id);
mov._visible = false;
isopen = true;
linecount = 0;
ins = [];
outs = [];
rswitch = new cr.map.RailSwitchHolder(this);
var _local5 = _global.stage.rc.length;
var _local4 = 0;
while (_local4 < _local5) {
var _local3 = _global.stage["rc_" + _global.stage.rc[_local4]];
if (((_local3.id != 1) && (_local3.id != 10000)) && (_local3 != this)) {
_local3.addEventListener("onConnectionUpdate", this);
addEventListener("onConnectionUpdate", _local3);
}
_local4++;
}
_global.railcontrol.addEventListener("onSnap", this);
_global.stage.addEventListener("onDelete", this);
check();
}
function initLoaded() {
idx = initObj.idx;
x = initObj.x;
y = initObj.y;
ang = initObj.a;
possibleSnap = undefined;
if (initObj.s) {
rswitch.x = initObj.s.x;
rswitch.y = initObj.s.y;
var _local3 = 0;
while (_local3 <= 7) {
if (initObj.s.p[_local3] != -1) {
rswitch.positions[_local3].rsid = initObj.s.p[_local3];
}
_local3++;
}
rswitch.hidden = false;
}
_global.stage.onConnectionLoaded(this);
}
function update(px, py, pang) {
x = Math.round(px);
y = Math.round(py);
ang = Math.round(pang);
possibleSnap = undefined;
check();
events.dispatchEvent({type:"updateMov"});
events.dispatchEvent({type:"onConnectionUpdate", target:this});
}
function check() {
checkBlock();
checkMov();
rswitch.onToggleSwitch();
}
function possibleSegment(type) {
if ((type == "line") && (linecount > 1)) {
return(false);
}
if ((ins.length + outs.length) > 5) {
return(false);
}
return(true);
}
function addSegment(rs) {
if ((rs.cpe == this) && (!rsstart)) {
rsstart = rs;
ins.push(rs);
if (rs.type == "line") {
linecount++;
}
addEventListener("onBlockChange", rs);
return(undefined);
}
if (rs.type == "line") {
if (!hasLineOut()) {
outs.push(rs);
} else {
ins.push(rs);
rs.toggled = true;
}
linecount++;
}
if (rs.type == "arc") {
if (outs.length < 3) {
outs.push(rs);
} else {
ins.push(rs);
rs.toggled = true;
}
}
addEventListener("updateMov", rs);
addEventListener("onBlockChange", rs);
}
function addLoadedSegment(rs) {
if (rs.type == "line") {
linecount++;
}
if (rs.cpe == this) {
if (!rsstart) {
rsstart = rs;
}
if (rs.endout) {
outs.push(rs);
} else {
ins.push(rs);
}
}
if (rs.cps == this) {
if (rs.toggled) {
ins.push(rs);
} else {
outs.push(rs);
}
addEventListener("updateMov", rs);
}
addEventListener("onBlockChange", rs);
}
function removeSegment(rs) {
spliceSegment(rs, ins);
spliceSegment(rs, outs);
if (rs.type == "line") {
linecount--;
}
if ((ins.length + outs.length) == 0) {
_global.stage.deleteRailConnection(this);
}
check();
}
function spliceSegment(rs, arr) {
var _local3 = arr.length;
var _local1 = 0;
while (_local1 < _local3) {
if (arr[_local1] == rs) {
arr.splice(_local1, 1);
break;
}
_local1++;
}
}
function toggleSegment(rs) {
if ((rs.type == "line") && (linecount > 1)) {
return(undefined);
}
if (rs.toggled && (outs.length >= 3)) {
return(undefined);
}
if ((!rs.toggled) && (ins.length >= 3)) {
return(undefined);
}
if (rs.toggled) {
spliceSegment(rs, ins);
outs.push(rs);
} else {
spliceSegment(rs, outs);
ins.push(rs);
}
rs.toggled = !rs.toggled;
check();
}
function render() {
if ((id == 1) || (id == 10000)) {
return(undefined);
}
if (((x + mov._width) - _global.camera.left) < 0) {
mov._visible = false;
} else if (((x - mov._width) - _global.camera.left) > _global.stage.width) {
mov._visible = false;
} else if (((y + mov._height) - _global.camera.top) < 0) {
mov._visible = false;
} else if (((y - mov._height) - _global.camera.top) > _global.stage.height) {
mov._visible = false;
} else {
mov._visible = true;
}
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
rswitch.render();
}
function select() {
selected = true;
check();
}
function deselect() {
selected = false;
check();
}
function setBlock(val) {
if (blocked == val) {
return(undefined);
}
blocked = val;
events.dispatchEvent({type:"onBlockChange", target:this});
check();
}
function checkBlock() {
if ((outs.length + ins.length) > 2) {
setBlock(true);
return(undefined);
}
var _local3 = ins.length;
var _local2 = 0;
while (_local2 < _local3) {
if (ins[_local2] != rsstart) {
if (!ins[_local2].cpe.isopen) {
setBlock(true);
return(undefined);
}
}
_local2++;
}
_local3 = outs.length;
_local2 = 0;
while (_local2 < _local3) {
if (outs[_local2] != rsstart) {
if (!outs[_local2].cpe.isopen) {
setBlock(true);
return(undefined);
}
}
_local2++;
}
setBlock(false);
}
function checkMov() {
if (blocked) {
isopen = false;
mov.gotoAndStop("blocked");
} else if ((outs.length == 0) || (ins.length == 0)) {
isopen = true;
mov.gotoAndStop("open");
} else {
isopen = false;
mov.gotoAndStop("closed");
}
if (selected) {
possibleSnap = undefined;
mov._xscale = (mov._yscale = 200);
} else if (possibleSnap) {
mov._xscale = (mov._yscale = 400);
} else {
mov._xscale = (mov._yscale = 100);
}
}
function onConnectionUpdate(evtObj) {
var _local3 = evtObj.target;
if (!_local3.isopen) {
possibleSnap = undefined;
return(undefined);
}
var _local4;
if (rr.utils.MathUtils.getDistance(x, y, _local3.x, _local3.y) < 4) {
if (ins.length < 3) {
var _local6 = rr.utils.MathUtils.angDiff(ang, _local3.ang);
if (_local6 <= 4) {
_local4 = "in";
}
}
if (outs.length < 3) {
var _local7 = rr.utils.MathUtils.angDiff(ang, _local3.ang - 180);
if (_local7 <= 4) {
_local4 = "out";
}
}
}
if (!_local4) {
if (possibleSnap) {
possibleSnap = undefined;
_global.railcontrol.snap_btn._visible = false;
}
} else {
possibleSnap = _local3;
snapdir = _local4;
var _local5 = {x:x - 40, y:y + 30};
_global.railcontrol.snap_btn.x = _local5.x;
_global.railcontrol.snap_btn.y = _local5.y;
_global.railcontrol.snap_btn._visible = true;
}
check();
}
function onSnap() {
if (!possibleSnap) {
return(undefined);
}
var _local3 = possibleSnap.rsstart;
if (snapdir == "in") {
ins.push(_local3);
_local3.endout = false;
} else {
outs.push(_local3);
_local3.endout = true;
}
_local3.cpe = this;
if (_local3.type == "line") {
linecount++;
}
setBlock(true);
_global.stage.deleteRailConnection(possibleSnap);
possibleSnap = undefined;
_global.railcontrol.snap_btn._visible = false;
_global.stage.selectRailConnection(this);
events.dispatchEvent({type:"onConnectionUpdate", target:this});
}
function remove() {
rswitch.remove();
_global.railcontrol.removeEventListener("onSnap", this);
var _local5 = _global.stage.rc.length;
var _local4 = 0;
while (_local4 < _local5) {
var _local3 = _global.stage["rc_" + _global.stage.rc[_local4]];
if (_local3 != this) {
_local3.removeEventListener("onConnectionUpdate", this);
removeEventListener("onConnectionUpdate", _local3);
}
_local4++;
}
mov.removeMovieClip();
}
function onDelete() {
onConnectionUpdate();
check();
}
function hasLineOut() {
var _local3 = outs.length;
var _local2 = 0;
while (_local2 < _local3) {
if (outs[_local2].type == "line") {
return(true);
}
_local2++;
}
return(false);
}
}
Symbol 3500 MovieClip [__Packages.cr.map.RailSwitchHolder] Frame 0
class cr.map.RailSwitchHolder extends rr.BaseClass
{
var parent, pos, hidden, dragging, positions, mov, x, y, cos, pi, sin;
function RailSwitchHolder (rc) {
super();
parent = rc;
init();
}
function init() {
pos = 0;
hidden = true;
dragging = false;
positions = [{code:"n", rsid:null}, {code:"ne", rsid:null}, {code:"e", rsid:null}, {code:"se", rsid:null}, {code:"s", rsid:null}, {code:"sw", rsid:null}, {code:"w", rsid:null}, {code:"nw", rsid:null}];
mov = _global.stage.attachMovie("RailSwitchHolder", "rsh" + parent.id, 4000 + parent.id, {parent:this});
mov._visible = false;
mov.handle_mc.onPress = rr.utils.Delegate.create(this, startDrag);
mov.handle_mc.onRelease = (mov.handle_mc.onReleaseOutside = rr.utils.Delegate.create(this, stopDrag));
_global.stage.addEventListener("onRailSegmentSelect", this);
_global.railcontrol.addEventListener("onToggleSwitch", this);
parent.addEventListener("onConnectionUpdate", this);
onToggleSwitch();
}
function show() {
if ((parent.ins.length <= 1) && (parent.outs.length <= 1)) {
return(undefined);
}
hidden = false;
}
function hide() {
mov._visible = false;
hidden = true;
}
function startDrag() {
mov.switch_mc.gotoAndStop("over");
dragging = true;
mov.startDrag();
}
function stopDrag() {
mov.switch_mc.gotoAndStop("out");
dragging = false;
mov.stopDrag();
x = Math.round(mov._x + _global.camera.left);
y = Math.round(mov._y + _global.camera.top);
}
function onConnectionUpdate() {
x = Math.round(parent.x + (cos((rr.utils.MathUtils.formatAngle(parent.ang + 90) * pi) / 180) * 40));
y = Math.round(parent.y - (sin((rr.utils.MathUtils.formatAngle(parent.ang + 90) * pi) / 180) * 40));
}
function onRailSegmentSelect() {
var _local7;
var _local4 = _global.stage.rsSel;
var _local8 = (_local4.cps == parent) || (_local4.cpe == parent);
if (!_local8) {
_local7 = false;
} else {
var _local5;
var _local6 = parent.ins.length;
var _local3 = 0;
while (_local3 < _local6) {
if (parent.ins[_local3] == _local4) {
_local5 = true;
break;
}
_local3++;
}
if (_local5 && (parent.ins.length > 1)) {
_local7 = true;
} else if ((!_local5) && (parent.outs.length > 1)) {
_local7 = true;
} else {
_local7 = false;
}
}
if (_local7) {
setSelectionDir();
} else {
var _local3 = 0;
while (_local3 <= 7) {
mov.switch_mc[positions[_local3].code + "_mc"]._visible = false;
_local3++;
}
}
}
function setSelectionDir() {
var _local3 = 0;
while (_local3 <= 7) {
mov.switch_mc[positions[_local3].code + "_mc"]._visible = true;
if (positions[_local3].rsid == _global.stage.rsSel.id) {
mov.switch_mc[positions[_local3].code + "_mc"].gotoAndStop("on");
} else {
mov.switch_mc[positions[_local3].code + "_mc"].gotoAndStop("off");
}
_local3++;
}
}
function setDirection(dir) {
var _local4 = _global.stage.rsSel;
var _local3 = 0;
while (_local3 <= 7) {
if (positions[_local3].code == dir) {
positions[_local3].rsid = ((positions[_local3].rsid == _local4.id) ? null : (_local4.id));
break;
}
_local3++;
}
setSelectionDir();
}
function onToggleSwitch() {
hide();
if (_global.railcontrol.showswitch) {
show();
} else {
hide();
}
onRailSegmentSelect();
}
function render() {
if (x == undefined) {
onConnectionUpdate();
}
if (hidden || (dragging)) {
return(undefined);
}
if (((x + mov._width) - _global.camera.left) < 0) {
mov._visible = false;
} else if (((x - mov._width) - _global.camera.left) > _global.stage.width) {
mov._visible = false;
} else if (((y + mov._height) - _global.camera.top) < 0) {
mov._visible = false;
} else if (((y - mov._height) - _global.camera.top) > _global.stage.height) {
mov._visible = false;
} else {
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._visible = true;
}
}
function remove() {
_global.stage.removeEventListener("onRailSegmentSelect", this);
_global.railcontrol.removeEventListener("onToggleSwitch", this);
parent.removeEventListener("onConnectionUpdate", this);
mov.removeMovieClip();
}
}
Symbol 3501 MovieClip [__Packages.cr.map.RailUtils] Frame 0
class cr.map.RailUtils
{
function RailUtils () {
}
static function draw(rs) {
if (rs.mov) {
if (rs.type == "line") {
drawLine(rs);
}
if (rs.type == "arc") {
drawArc(rs);
}
} else {
if (rs.type == "line") {
setLine(rs);
}
if (rs.type == "arc") {
setArc(rs);
}
}
}
static function drawLine(rs) {
var _local12 = Math.PI;
var _local21 = Math.cos;
var _local23 = Math.acos;
var _local20 = Math.sin;
var _local25 = Math.asin;
var _local24 = Math.atan2;
var _local6 = 10 + (rs.length * 2);
var _local17 = new flash.display.BitmapData(_local6, _local6, true, 0);
var _local16 = new flash.display.BitmapData(_local6, _local6, true, 0);
var _local14 = flash.display.BitmapData.loadBitmap("rail");
var _local18 = flash.display.BitmapData.loadBitmap("railcreate_bg");
var _local3 = _global.minimap.scale;
var _local15 = new flash.display.BitmapData(_local6 * _local3, _local6 * _local3, true, 0);
var _local19 = new flash.display.BitmapData(7, 7, false, _global.minimap.railcolor);
var _local9;
var _local7;
var _local13 = rr.utils.MathUtils.formatAngle(rs.ang);
var _local4 = new flash.geom.Point(_local14.width / 2, _local14.height / 2);
var _local2 = new flash.geom.Matrix();
var _local11;
var _local10;
var _local5 = 0;
while (_local5 < rs.length) {
_local9 = _local21((_local13 * _local12) / 180) * _local5;
_local7 = (-_local20((_local13 * _local12) / 180)) * _local5;
_local9 = rr.utils.MathUtils.formatDecimals(_local9, 2);
_local7 = rr.utils.MathUtils.formatDecimals(_local7, 2);
_local11 = ((_local6 / 2) + _local9) + _local4.x;
_local10 = ((_local6 / 2) + _local7) + _local4.y;
_local2.identity();
_local2.translate(-_local4.x, -_local4.y);
_local2.rotate((rr.utils.MathUtils.formatAngle(-_local13) / 180) * _local12);
_local2.translate(_local11, _local10);
_local17.draw(_local14, _local2);
_local16.draw(_local18, _local2);
_local2.identity();
_local2.scale(_local3, _local3);
_local2.translate((-_local4.x) * _local3, (-_local4.y) * _local3);
_local2.translate(_local11 * _local3, _local10 * _local3);
_local15.draw(_local19, _local2);
_local5 = _local5 + _local14.width;
}
var _local22 = new flash.geom.Rectangle(0, 0, _local6, _local6);
rs.mov_bmp = new flash.display.BitmapData(_local6, _local6, true, 0);
rs.mov.attachBitmap(rs.mov_bmp, 10);
rs.mov_bmp.copyPixels(_local16, _local22, new flash.geom.Point(0, 0), null, null, true);
rs.mov_bmp.copyPixels(_local17, _local22, new flash.geom.Point(0, 0), null, null, true);
rs.movx = (rs.cps.x - _local11) + _local9;
rs.movy = (rs.cps.y - _local10) + _local7;
rs.movs = _local6;
_local22 = new flash.geom.Rectangle(0, 0, _local6 * _local3, _local6 * _local3);
rs.mm_mov_bmp = new flash.display.BitmapData(_local6 * _local3, _local6 * _local3, true, 0);
rs.mm_mov.attachBitmap(rs.mm_mov_bmp, 10);
rs.mm_mov_bmp.copyPixels(_local15, _local22, new flash.geom.Point(0, 0), null, null, true);
rs.mm_mov._x = _local3 * ((rs.cps.x - _local11) + _local9);
rs.mm_mov._y = (_local3 * ((rs.cps.y - _local10) + _local7)) + _global.minimap.map_mc._y;
_local17.dispose();
_local14.dispose();
_local16.dispose();
_local18.dispose();
_local19.dispose();
_local15.dispose();
rs.onDrawComplete();
}
static function setLine(rs) {
var _local12 = Math.PI;
var _local18 = Math.cos;
var _local22 = Math.acos;
var _local17 = Math.sin;
var _local24 = Math.asin;
var _local23 = Math.atan2;
var _local9 = 10 + (rs.length * 2);
var _local19 = flash.display.BitmapData.loadBitmap("rail");
var _local16 = _local19.width;
var _local20 = _local19.height;
_local19.dispose();
var _local7 = new flash.geom.Point(_local16 / 2, _local20 / 2);
var _local2 = _global.minimap.scale;
var _local14 = new flash.display.BitmapData(_local9 * _local2, _local9 * _local2, true, 0);
var _local15 = new flash.display.BitmapData(7, 7, false, _global.minimap.railcolor);
var _local4 = new flash.geom.Matrix();
var _local6;
var _local5;
var _local13 = rr.utils.MathUtils.formatAngle(rs.ang);
var _local11;
var _local10;
var _local3 = 0;
while (_local3 < rs.length) {
_local6 = _local18((_local13 * _local12) / 180) * _local3;
_local5 = (-_local17((_local13 * _local12) / 180)) * _local3;
_local6 = rr.utils.MathUtils.formatDecimals(_local6, 2);
_local5 = rr.utils.MathUtils.formatDecimals(_local5, 2);
_local11 = ((_local9 / 2) + _local6) + _local7.x;
_local10 = ((_local9 / 2) + _local5) + _local7.y;
_local4.identity();
_local4.scale(_local2, _local2);
_local4.translate((-_local7.x) * _local2, (-_local7.y) * _local2);
_local4.translate(_local11 * _local2, _local10 * _local2);
_local14.draw(_local15, _local4);
_local3 = _local3 + _local16;
}
rs.movx = (rs.cps.x - _local11) + _local6;
rs.movy = (rs.cps.y - _local10) + _local5;
rs.movs = _local9;
var _local21 = new flash.geom.Rectangle(0, 0, _local9 * _local2, _local9 * _local2);
rs.mm_mov_bmp = new flash.display.BitmapData(_local9 * _local2, _local9 * _local2, true, 0);
rs.mm_mov.attachBitmap(rs.mm_mov_bmp, 10);
rs.mm_mov_bmp.copyPixels(_local14, _local21, new flash.geom.Point(0, 0), null, null, true);
rs.mm_mov._x = _local2 * ((rs.cps.x - _local11) + _local6);
rs.mm_mov._y = (_local2 * ((rs.cps.y - _local10) + _local5)) + _global.minimap.map_mc._y;
_local15.dispose();
_local14.dispose();
rs.onDrawComplete();
}
static function drawArc(rs) {
var _local12 = Math.PI;
var _local23 = Math.cos;
var _local27 = Math.acos;
var _local22 = Math.sin;
var _local29 = Math.asin;
var _local28 = Math.atan2;
var _local7 = 20 + (rs.radius * 4);
var _local18 = new flash.display.BitmapData(_local7, _local7, true, 0);
var _local17 = new flash.display.BitmapData(_local7, _local7, true, 0);
var _local15 = flash.display.BitmapData.loadBitmap("rail");
var _local19 = flash.display.BitmapData.loadBitmap("railcreate_bg");
var _local4 = _global.minimap.scale;
var _local16 = new flash.display.BitmapData(_local7 * _local4, _local7 * _local4, true, 0);
var _local21 = new flash.display.BitmapData(7, 7, false, _global.minimap.railcolor);
var _local5 = new flash.geom.Point(_local15.width / 2, _local15.height / 2);
var _local2 = new flash.geom.Matrix();
var _local9;
var _local8;
var _local25 = rs.length / _local15.width;
var _local20 = rr.utils.MathUtils.formatAngle(rs.ang - 90);
var _local10 = new flash.geom.Point(rr.utils.MathUtils.formatDecimals((-rs.dir) * (rs.radius * _local23((_local20 * _local12) / 180)), 2), rr.utils.MathUtils.formatDecimals(rs.dir * (rs.radius * _local22((_local20 * _local12) / 180)), 2));
var _local24 = (rs.dir * 180) / ((rs.radius * _local12) / _local15.width);
var _local11;
var _local14;
var _local13;
var _local6 = 0;
while (_local6 < _local25) {
_local11 = rr.utils.MathUtils.formatAngle(_local20 + (_local6 * _local24));
_local9 = _local10.x + ((rs.dir * rs.radius) * _local23((_local11 * _local12) / 180));
_local8 = _local10.y - ((rs.dir * rs.radius) * _local22((_local11 * _local12) / 180));
_local9 = rr.utils.MathUtils.formatDecimals(_local9, 2);
_local8 = rr.utils.MathUtils.formatDecimals(_local8, 2);
_local14 = (((_local7 / 2) + _local9) + _local5.x) - _local10.x;
_local13 = (((_local7 / 2) + _local8) + _local5.y) - _local10.y;
_local2.identity();
_local2.translate(-_local5.x, -_local5.y);
_local2.rotate((rr.utils.MathUtils.formatAngle((-_local11) - 90) / 180) * _local12);
_local2.translate(_local14, _local13);
_local18.draw(_local15, _local2);
_local17.draw(_local19, _local2);
_local2.identity();
_local2.scale(_local4, _local4);
_local2.translate((-_local5.x) * _local4, (-_local5.y) * _local4);
_local2.translate(_local14 * _local4, _local13 * _local4);
_local16.draw(_local21, _local2);
_local6++;
}
var _local26 = new flash.geom.Rectangle(0, 0, _local7, _local7);
rs.mov_bmp = new flash.display.BitmapData(_local7, _local7, true, 0);
rs.mov.attachBitmap(rs.mov_bmp, 10);
rs.mov_bmp.copyPixels(_local17, _local26, new flash.geom.Point(0, 0), null, null, true);
rs.mov_bmp.copyPixels(_local18, _local26, new flash.geom.Point(0, 0), null, null, true);
rs.movx = (rs.cps.x - _local14) + _local9;
rs.movy = (rs.cps.y - _local13) + _local8;
rs.movs = _local7;
_local26 = new flash.geom.Rectangle(0, 0, _local7 * _local4, _local7 * _local4);
rs.mm_mov_bmp = new flash.display.BitmapData(_local7 * _local4, _local7 * _local4, true, 0);
rs.mm_mov.attachBitmap(rs.mm_mov_bmp, 10);
rs.mm_mov_bmp.copyPixels(_local16, _local26, new flash.geom.Point(0, 0), null, null, true);
rs.mm_mov._x = _local4 * ((rs.cps.x - _local14) + _local9);
rs.mm_mov._y = (_local4 * ((rs.cps.y - _local13) + _local8)) + _global.minimap.map_mc._y;
_local18.dispose();
_local15.dispose();
_local17.dispose();
_local19.dispose();
_local21.dispose();
_local16.dispose();
rs.onDrawComplete();
}
static function setArc(rs) {
var _local12 = Math.PI;
var _local19 = Math.cos;
var _local26 = Math.acos;
var _local18 = Math.sin;
var _local28 = Math.asin;
var _local27 = Math.atan2;
var _local10 = 20 + (rs.radius * 4);
var _local22 = flash.display.BitmapData.loadBitmap("rail");
var _local23 = _local22.width;
var _local24 = _local22.height;
_local22.dispose();
var _local9 = new flash.geom.Point(_local23 / 2, _local24 / 2);
var _local3 = _global.minimap.scale;
var _local15 = new flash.display.BitmapData(_local10 * _local3, _local10 * _local3, true, 0);
var _local17 = new flash.display.BitmapData(7, 7, false, _global.minimap.railcolor);
var _local4 = new flash.geom.Matrix();
var _local7;
var _local6;
var _local21 = rs.length / _local23;
var _local16 = rr.utils.MathUtils.formatAngle(rs.ang - 90);
var _local8 = new flash.geom.Point(rr.utils.MathUtils.formatDecimals((-rs.dir) * (rs.radius * _local19((_local16 * _local12) / 180)), 2), rr.utils.MathUtils.formatDecimals(rs.dir * (rs.radius * _local18((_local16 * _local12) / 180)), 2));
var _local20 = (rs.dir * 180) / ((rs.radius * _local12) / _local23);
var _local11;
var _local14;
var _local13;
var _local5 = 0;
while (_local5 < _local21) {
_local11 = rr.utils.MathUtils.formatAngle(_local16 + (_local5 * _local20));
_local7 = _local8.x + ((rs.dir * rs.radius) * _local19((_local11 * _local12) / 180));
_local6 = _local8.y - ((rs.dir * rs.radius) * _local18((_local11 * _local12) / 180));
_local7 = rr.utils.MathUtils.formatDecimals(_local7, 2);
_local6 = rr.utils.MathUtils.formatDecimals(_local6, 2);
_local14 = (((_local10 / 2) + _local7) + _local9.x) - _local8.x;
_local13 = (((_local10 / 2) + _local6) + _local9.y) - _local8.y;
_local4.identity();
_local4.scale(_local3, _local3);
_local4.translate((-_local9.x) * _local3, (-_local9.y) * _local3);
_local4.translate(_local14 * _local3, _local13 * _local3);
_local15.draw(_local17, _local4);
_local5++;
}
rs.movx = (rs.cps.x - _local14) + _local7;
rs.movy = (rs.cps.y - _local13) + _local6;
rs.movs = _local10;
var _local25 = new flash.geom.Rectangle(0, 0, _local10 * _local3, _local10 * _local3);
rs.mm_mov_bmp = new flash.display.BitmapData(_local10 * _local3, _local10 * _local3, true, 0);
rs.mm_mov.attachBitmap(rs.mm_mov_bmp, 10);
rs.mm_mov_bmp.copyPixels(_local15, _local25, new flash.geom.Point(0, 0), null, null, true);
rs.mm_mov._x = _local3 * ((rs.cps.x - _local14) + _local7);
rs.mm_mov._y = (_local3 * ((rs.cps.y - _local13) + _local6)) + _global.minimap.map_mc._y;
_local17.dispose();
_local15.dispose();
rs.onDrawComplete();
}
}
Symbol 3502 MovieClip [__Packages.cr.map.Compound] Frame 0
class cr.map.Compound extends rr.BaseClass
{
var id, x, y, type, rot, mov, mm_mov, isdragging;
function Compound (pid) {
super();
id = pid;
init();
}
function init() {
x = Math.round(_global.camera.x);
y = Math.round(_global.camera.y);
type = _global.map.maptype;
rot = 0;
mov = _global.stage.attachMovie("CompoundHolder", "comp" + id, 100 + id);
mov.gotoAndStop(type);
mov.press_btn.onPress = rr.utils.Delegate.create(this, drag);
mov.press_btn.onRelease = (mov.press_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopdrag));
mov.rot_btn.onPress = rr.utils.Delegate.create(this, startRotate);
mov.rot_btn.onRelease = (mov.rot_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopRotate));
mov.delete_btn.onPress = rr.utils.Delegate.create(_global.stage, _global.stage.deleteCompound, this);
mm_mov = _global.minimap.createObjectClip(this);
_global.minimap.setObjectClip(this, {x:x, y:y, rot:rot, w:120, h:120});
render();
}
function drag() {
isdragging = true;
mov.swapDepths(50000 + id);
mov.startDrag();
}
function stopdrag() {
mov.stopDrag();
mov.swapDepths(100 + id);
x = Math.round(mov._x + _global.camera.left);
y = Math.round(mov._y + _global.camera.top);
isdragging = false;
}
function startRotate() {
mov.swapDepths(50000 + id);
mov.onMouseMove = rr.utils.Delegate.create(this, doRotate);
}
function stopRotate() {
mov.swapDepths(100 + id);
delete mov.onMouseMove;
}
function doRotate() {
var _local4;
var _local3;
_local4 = _root._xmouse - mov._x;
_local3 = _root._ymouse - mov._y;
rot = Math.round(((180 * Math.atan2(_local3, _local4)) / Math.PI) + 45);
}
function render() {
if (((x + mov._width) - _global.camera.left) < 0) {
mov._visible = false;
} else if (((x - mov._width) - _global.camera.left) > _global.stage.width) {
mov._visible = false;
} else if (((y + mov._height) - _global.camera.top) < 0) {
mov._visible = false;
} else if (((y - mov._height) - _global.camera.top) > _global.stage.height) {
mov._visible = false;
} else {
if (!isdragging) {
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov._rotation = rot;
}
mov._visible = true;
}
_global.minimap.setObjectClip(this, {x:x, y:y, rot:rot, w:120, h:120});
}
function remove() {
mov.removeMovieClip();
mm_mov.removeMovieClip();
}
}
Symbol 3503 MovieClip [__Packages.cr.level.LevelStage] Frame 0
class cr.level.LevelStage extends rr.BaseClip
{
var width, height, combinations, areas, objecttypes, areasAdded, combAdded, startcash, isnightlevel, bg_mc, createEmptyMovieClip, getNextHighestDepth, bg_bmp, areaSel, events, objSel;
function LevelStage () {
super();
_global.stage = this;
}
function init() {
width = 640;
height = 480;
combinations = [];
areas = [];
objecttypes = ["AirField", "Bunker", "RocketBase", "Bonus", "Drop"];
areasAdded = (combAdded = 0);
startcash = 5500;
isnightlevel = false;
var _local4 = objecttypes.length;
var _local2 = 0;
while (_local2 < _local4) {
var _local3 = objecttypes[_local2];
this[_local3 + "count"] = 0;
this[_local3 + "arr"] = [];
_local2++;
}
bg_mc = createEmptyMovieClip("bg_mc", getNextHighestDepth());
bg_bmp = new flash.display.BitmapData(width, height, false, 16777215);
bg_mc.attachBitmap(bg_bmp, bg_mc.getNextHighestDepth());
}
function onEnterFrame() {
_global.camera.update();
var _local7 = areas.length;
var _local5 = 0;
while (_local5 < _local7) {
this["area_" + areas[_local5]].render();
_local5++;
}
_local7 = objecttypes.length;
_local5 = 0;
while (_local5 < _local7) {
var _local4 = objecttypes[_local5];
var _local6 = this[_local4 + "arr"].length;
var _local3 = 0;
while (_local3 < _local6) {
this[_local4 + this[_local4 + "arr"][_local3]].render();
_local3++;
}
_local5++;
}
updateAfterEvent();
}
function addArea() {
areasAdded++;
this["area_" + areasAdded] = new cr.level.EnemyArea(areasAdded);
areas.push(areasAdded);
return(this["area_" + areasAdded]);
}
function selectArea(a) {
areaSel = a;
if (a) {
selectObject(undefined);
}
events.dispatchEvent({type:"onAreaSelect"});
}
function deleteArea(a) {
a.mov.removeMovieClip();
var _local4 = areas.length;
var _local2 = 0;
while (_local2 < _local4) {
if (areas[_local2] == a.id) {
areas.splice(_local2, 1);
break;
}
_local2++;
}
delete this["area_" + a.id];
selectArea(undefined);
}
function addCombination() {
combAdded++;
combinations.push(combAdded);
this["comb_" + combAdded] = new cr.level.AreaCombination(combAdded);
return(this["comb_" + combAdded]);
}
function deleteCombination(c) {
var _local3 = combinations.length;
var _local2 = 0;
while (_local2 < _local3) {
if (combinations[_local2] == c.id) {
combinations.splice(_local2, 1);
break;
}
_local2++;
}
delete this["comb_" + c.id];
}
function addObject(t) {
this[t + "count"]++;
this[t + "arr"].push(this[t + "count"]);
this[t + this[t + "count"]] = createObj(t);
return(this[t + this[t + "count"]]);
}
function createObj(t) {
var _local2;
switch (t) {
case "AirField" :
_local2 = new cr.level.AirField(this[t + "count"]);
break;
case "Bunker" :
_local2 = new cr.level.Bunker(this[t + "count"]);
break;
case "RocketBase" :
_local2 = new cr.level.RocketBase(this[t + "count"]);
break;
case "Bonus" :
_local2 = new cr.level.Bonus(this[t + "count"]);
break;
case "Drop" :
_local2 = new cr.level.Drop(this[t + "count"]);
}
return(_local2);
}
function selectObject(obj) {
objSel = obj;
if (obj) {
selectArea(undefined);
}
events.dispatchEvent({type:"onObjectSelect"});
}
function deleteObject(obj) {
obj.mov.removeMovieClip();
var _local3 = this[obj.linkId + "arr"];
var _local5 = _local3.length;
var _local2 = 0;
while (_local2 < _local5) {
if (_local3[_local2] == obj.id) {
_local3.splice(_local2, 1);
break;
}
_local2++;
}
delete this[obj.linkId + obj.id];
selectObject(undefined);
}
function createLoadedLevel() {
var _local5 = _global.createcontrol.conflevel;
isnightlevel = _local5.nightmap;
startcash = _local5.startcash;
_global.levelcontrol.checkNightLevel();
_global.levelcontrol.startcash_txt.text = startcash.toString();
var _local6 = _local5.ea.length;
var _local8 = 0;
while (_local8 < _local6) {
var _local4 = _local5.ea[_local8];
if (_local4.a) {
var _local7 = addCombination();
_local7.enemies = rr.conf.Config.translateEnemyCodes(_local4.e);
var _local9 = _local4.a.length;
var _local3 = 0;
while (_local3 < _local9) {
var _local12 = addArea();
_local12.initLoaded(_local4.a[_local3]);
_local7.addArea(_local12);
_local3++;
}
} else {
var _local12 = addArea();
_local12.initLoaded(_local4);
}
_local8++;
}
selectArea(null);
_local6 = _local5.af.length;
_local8 = 0;
while (_local8 < _local6) {
var _local13 = _local5.af[_local8];
var _local12 = addObject("AirField");
_local12.initLoaded(_local13);
_local8++;
}
_local6 = _local5.bk.length;
_local8 = 0;
while (_local8 < _local6) {
var _local17 = _local5.bk[_local8];
var _local11 = addObject("Bunker");
_local11.initLoaded(_local17);
_local8++;
}
_local6 = _local5.rb.length;
_local8 = 0;
while (_local8 < _local6) {
var _local15 = _local5.rb[_local8];
var _local11 = addObject("RocketBase");
_local11.initLoaded(_local15);
_local8++;
}
_local6 = _local5.bs.length;
_local8 = 0;
while (_local8 < _local6) {
var _local14 = _local5.bs[_local8];
var _local11 = addObject("Bonus");
_local11.initLoaded(_local14);
_local8++;
}
_local6 = _local5.dp.length;
_local8 = 0;
while (_local8 < _local6) {
var _local16 = _local5.dp[_local8];
var _local10 = addObject("Drop");
_local10.initLoaded(_local16);
_local8++;
}
selectObject(null);
_global.createcontrol.load_mc._visible = false;
}
function toggleNight() {
isnightlevel = !isnightlevel;
_global.levelcontrol.checkNightLevel();
}
function setStartCash() {
trace("setStartCash: ");
var _local3;
var _local4 = _global.levelcontrol.startcash_txt.text;
if (_local4 == "") {
_local3 = 5500;
} else {
_local3 = Number(_local4);
}
if (_local3 > 25000) {
_local3 = 25000;
}
startcash = _local3;
_global.levelcontrol.startcash_txt.text = startcash.toString();
}
}
Symbol 3504 MovieClip [__Packages.cr.level.EnemyArea] Frame 0
class cr.level.EnemyArea
{
var id, w, minw, h, minh, x, y, area, maxenemies, enemies, mov, mm_mov, combination, lcol, scol, selected, isdragging, combiselected;
function EnemyArea (pid) {
id = pid;
init();
}
function init() {
w = (minw = 85);
h = (minh = 85);
x = _global.camera.x - (w / 2);
y = _global.camera.y - (h / 2);
area = w * h;
maxenemies = Math.floor(area / 7000);
enemies = [];
mov = _global.stage.attachMovie("EnemyArea", "ea" + id, 1000 + id);
mov.count_txt.autoSize = true;
mov.count_txt.text = ((enemies.length + " ENEMIES IN AREA\r(MAX. ") + maxenemies) + ")";
mov.area_mc.onPress = rr.utils.Delegate.create(this, drag);
mov.area_mc.onRelease = (mov.area_mc.onReleaseOutside = rr.utils.Delegate.create(this, stopdrag));
mov.delete_btn.onPress = rr.utils.Delegate.create(this, remove);
mov.handle_btn.onPress = rr.utils.Delegate.create(this, startResize);
mov.handle_btn.onRelease = (mov.handle_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopResize));
mm_mov = _global.minimap.createObjectClip(this);
_global.minimap.setObjectClip(this, {x:x, y:y, w:w, h:h});
_global.stage.addEventListener("onAreaSelect", this);
select();
render();
}
function initLoaded(initObj) {
x = initObj.x;
y = initObj.y;
w = initObj.w;
h = initObj.h;
if (initObj.e) {
enemies = rr.conf.Config.translateEnemyCodes(initObj.e);
}
area = w * h;
maxenemies = Math.floor(area / 7000);
onEnemyUpdate();
drawArea();
render();
}
function addEnemy(lid) {
if (combination) {
return(combination.addEnemy(lid));
}
if (enemies.length >= maxenemies) {
return(false);
}
enemies.push(lid);
onEnemyUpdate();
return(true);
}
function removeEnemy(lid) {
if (combination) {
return(combination.removeEnemy(lid));
}
var _local3 = enemies.length;
var _local2 = 0;
while (_local2 < _local3) {
if (enemies[_local2] == lid) {
enemies.splice(_local2, 1);
onEnemyUpdate();
return(true);
}
_local2++;
}
return(false);
}
function onEnemyUpdate() {
if (combination) {
mov.count_txt.text = ((((("COMBINED AREA (" + combination.areas.length) + " AREAS)\r") + combination.enemies.length) + " ENEMIES IN AREAS\r(MAX. ") + combination.maxenemies) + ")";
} else {
mov.count_txt.text = ((enemies.length + " ENEMIES IN AREA\r(MAX. ") + maxenemies) + ")";
}
}
function drawArea() {
mov.area_mc.clear();
mov.area_mc.lineStyle(2, lcol, 100);
mov.area_mc.moveTo(0, 0);
mov.area_mc.lineTo(w, 0);
mov.area_mc.lineTo(w, h);
mov.area_mc.lineTo(0, h);
mov.area_mc.lineTo(0, 0);
mov.area_mc.lineStyle(0, 0, 0);
mov.area_mc.beginFill(scol, 40);
mov.area_mc.moveTo(4, 4);
mov.area_mc.lineTo(w - 4, 4);
mov.area_mc.lineTo(w - 4, h - 4);
mov.area_mc.lineTo(4, h - 4);
mov.area_mc.lineTo(4, 4);
mov.area_mc.endFill();
mov.delete_btn._y = h + 4;
mov.handle_btn._x = w;
mov.handle_btn._y = h;
mov.count_txt._y = h - mov.count_txt._height;
}
function drag() {
if (!selected) {
select();
}
isdragging = true;
mov.startDrag();
}
function stopdrag() {
mov.stopDrag();
x = mov._x + _global.camera.left;
y = mov._y + _global.camera.top;
isdragging = false;
}
function startResize() {
mov.onMouseMove = rr.utils.Delegate.create(this, doResize);
}
function stopResize() {
delete mov.onMouseMove;
}
function doResize() {
var _local3 = {x:_global.stage._xmouse, y:_global.stage._ymouse};
mov.globalToLocal(_local3);
w = Math.max(_local3.x, minw);
h = Math.max(_local3.y, minh);
area = w * h;
combination.updateArea();
maxenemies = Math.floor(area / 7000);
onEnemyUpdate();
drawArea();
updateAfterEvent();
}
function select() {
if (Key.isDown(16)) {
var _local3 = _global.stage.areaSel;
if (_local3) {
if (_local3 == this) {
if (combination) {
combination.removeArea(this);
onEnemyUpdate();
}
} else {
if (!_local3.combination) {
var _local4 = _global.stage.addCombination();
_local4.addArea(_local3);
} else {
var _local4 = _local3.combination;
}
_local4.addArea(this);
}
}
}
_global.stage.selectArea(this);
}
function onAreaSelect() {
selected = (combiselected = false);
scol = (lcol = ((_global.map.maptype == "ice") ? 29845 : 13103871));
if (_global.stage.areaSel == this) {
selected = (combiselected = true);
scol = (lcol = 13724672);
mov.swapDepths(10000 + id);
mov.handle_btn._visible = true;
mov.delete_btn._visible = true;
mov.click_txt.text = "";
drawArea();
return(undefined);
}
if (combination && (_global.stage.areaSel.combination == combination)) {
lcol = 13724672 /* 0xD16C00 */;
combiselected = true;
}
mov.swapDepths(1000 + id);
mov.handle_btn._visible = false;
mov.delete_btn._visible = false;
mov.click_txt.text = "CLICK AREA TO ACTIVATE\rAND FILL WITH ENEMIES";
drawArea();
}
function remove() {
mm_mov.removeMovieClip();
combination.removeArea(this);
_global.stage.deleteArea(this);
}
function render() {
if (((x + mov._width) - _global.camera.left) < 0) {
mov._visible = false;
} else if ((x - _global.camera.left) > _global.stage.width) {
mov._visible = false;
} else if (((y + mov._height) - _global.camera.top) < 0) {
mov._visible = false;
} else if ((y - _global.camera.top) > _global.stage.height) {
mov._visible = false;
} else {
if (!isdragging) {
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
}
mov._visible = true;
}
_global.minimap.setObjectClip(this, {x:x + (w / 2), y:y + (h / 2), w:w, h:h});
}
}
Symbol 3505 MovieClip [__Packages.cr.level.AreaCombination] Frame 0
class cr.level.AreaCombination extends rr.BaseClass
{
var id, areas, enemies, addEventListener, removeEventListener, events, area, maxenemies;
function AreaCombination (pid) {
super();
id = pid;
init();
}
function init() {
areas = [];
enemies = [];
}
function addArea(a) {
if (a.combination) {
if (a.combination == this) {
return(undefined);
}
a.combination.removeArea(a);
} else {
enemies = enemies.concat(a.enemies);
a.enemies = [];
}
areas.push(a);
a.combination = this;
addEventListener("onEnemyUpdate", a);
updateArea();
}
function removeArea(a) {
var _local3 = 0;
while (_local3 < areas.length) {
if (areas[_local3] == a) {
areas.splice(_local3, 1);
break;
}
_local3++;
}
updateArea();
removeEventListener("onEnemyUpdate", a);
a.combination = undefined;
checkEnemies();
if (areas.length < 2) {
areas[0].enemies = areas[0].enemies.concat(enemies);
areas[0].combination = undefined;
events.dispatchEvent({type:"onEnemyUpdate"});
removeEventListener("onEnemyUpdate", areas[0]);
_global.stage.deleteCombination(this);
}
}
function updateArea() {
area = 0;
var _local2 = 0;
while (_local2 < areas.length) {
area = area + (areas[_local2].w * areas[_local2].h);
_local2++;
}
maxenemies = Math.floor(area / 7000);
events.dispatchEvent({type:"onEnemyUpdate"});
}
function checkEnemies() {
if (enemies.length > maxenemies) {
enemies.splice(maxenemies);
events.dispatchEvent({type:"onEnemyUpdate"});
}
}
function addEnemy(lid) {
if (enemies.length >= maxenemies) {
return(false);
}
enemies.push(lid);
events.dispatchEvent({type:"onEnemyUpdate"});
return(true);
}
function removeEnemy(lid) {
var _local4 = enemies.length;
var _local2 = 0;
while (_local2 < _local4) {
if (enemies[_local2] == lid) {
enemies.splice(_local2, 1);
events.dispatchEvent({type:"onEnemyUpdate"});
return(true);
}
_local2++;
}
return(false);
}
}
Symbol 3506 MovieClip [__Packages.cr.level.AirField] Frame 0
class cr.level.AirField extends rr.BaseClass
{
var linkId, id, x, y, rot, maxenemies, enemies, bdepth, mov, mm_mov, isdragging;
function AirField (pid) {
super();
linkId = "AirField";
id = pid;
init();
}
function init() {
x = _global.camera.x;
y = _global.camera.y;
rot = 0;
maxenemies = 15;
enemies = [];
bdepth = 2000;
mov = _global.stage.attachMovie("AirFieldHolder", "air" + id, bdepth + id);
mov.count_txt.text = ((enemies.length + " PLANES IN AIRFIELD\r(MAX. ") + maxenemies) + ")";
mov.press_btn.onPress = rr.utils.Delegate.create(this, drag);
mov.press_btn.onRelease = (mov.press_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopdrag));
mov.image_mc.rot_btn.onPress = rr.utils.Delegate.create(this, startRotate);
mov.image_mc.rot_btn.onRelease = (mov.image_mc.rot_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopRotate));
mov.delete_btn.onPress = rr.utils.Delegate.create(this, remove);
mm_mov = _global.minimap.createObjectClip(this);
_global.minimap.setObjectClip(this, {x:x, y:y, rot:rot, w:190, h:180});
_global.stage.addEventListener("onObjectSelect", this);
_global.stage.selectObject(this);
render();
}
function initLoaded(initObj) {
x = initObj.x;
y = initObj.y;
rot = initObj.r;
if (initObj.e) {
enemies = rr.conf.Config.translateEnemyCodes(initObj.e);
}
mov.count_txt.text = ((enemies.length + " PLANES IN AIRFIELD\r(MAX. ") + maxenemies) + ")";
render();
}
function addEnemy(lid) {
if (enemies.length >= maxenemies) {
return(false);
}
enemies.push(lid);
mov.count_txt.text = ((enemies.length + " PLANES IN AIRFIELD\r(MAX. ") + maxenemies) + ")";
return(true);
}
function removeEnemy(lid) {
var _local3 = enemies.length;
var _local2 = 0;
while (_local2 < _local3) {
if (enemies[_local2] == lid) {
enemies.splice(_local2, 1);
mov.count_txt.text = ((enemies.length + " PLANES IN AIRFIELD\r(MAX. ") + maxenemies) + ")";
return(true);
}
_local2++;
}
return(false);
}
function drag() {
_global.stage.selectObject(this);
isdragging = true;
mov.startDrag();
}
function stopdrag() {
mov.stopDrag();
x = mov._x + _global.camera.left;
y = mov._y + _global.camera.top;
isdragging = false;
}
function startRotate() {
mov.onMouseMove = rr.utils.Delegate.create(this, doRotate);
}
function stopRotate() {
delete mov.onMouseMove;
}
function doRotate() {
var _local4;
var _local3;
_local4 = _root._xmouse - mov._x;
_local3 = _root._ymouse - mov._y;
rot = ((180 * Math.atan2(_local3, _local4)) / Math.PI) + 45;
}
function onObjectSelect() {
if (_global.stage.objSel == this) {
mov.swapDepths((bdepth + 10000) + id);
mov.press_btn._alpha = 20;
mov.image_mc.rot_btn._visible = true;
mov.click_txt.text = "";
mov.delete_btn._visible = true;
} else {
mov.swapDepths(bdepth + id);
mov.press_btn._alpha = 0;
mov.image_mc.rot_btn._visible = false;
mov.click_txt.text = "CLICK AIRFIELD TO ACTIVATE\rAND FILL WITH AIRUNITS";
mov.delete_btn._visible = false;
}
}
function remove() {
mm_mov.removeMovieClip();
_global.stage.deleteObject(this);
}
function render() {
if (((x + mov._width) - _global.camera.left) < 0) {
mov._visible = false;
} else if (((x - mov._width) - _global.camera.left) > _global.stage.width) {
mov._visible = false;
} else if (((y + mov._height) - _global.camera.top) < 0) {
mov._visible = false;
} else if (((y - mov._height) - _global.camera.top) > _global.stage.height) {
mov._visible = false;
} else {
if (!isdragging) {
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov.image_mc._rotation = rot;
}
mov._visible = true;
}
_global.minimap.setObjectClip(this, {x:x, y:y, rot:rot, w:190, h:180});
}
}
Symbol 3507 MovieClip [__Packages.cr.level.Bunker] Frame 0
class cr.level.Bunker extends rr.BaseClass
{
var linkId, id, x, y, rot, scale, bdepth, mov, mm_mov, isdragging;
function Bunker (pid) {
super();
linkId = "Bunker";
id = pid;
init();
}
function init() {
x = _global.camera.x;
y = _global.camera.y;
rot = 0;
scale = 100;
bdepth = 5000;
mov = _global.stage.attachMovie("BunkerHolder", "bunk" + id, bdepth + id);
mov.press_btn.onPress = rr.utils.Delegate.create(this, drag);
mov.press_btn.onRelease = (mov.press_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopdrag));
mov.image_mc.rot_btn.onPress = rr.utils.Delegate.create(this, startRotate);
mov.image_mc.rot_btn.onRelease = (mov.image_mc.rot_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopRotate));
mov.image_mc.scale_btn.onPress = rr.utils.Delegate.create(this, startScale);
mov.image_mc.scale_btn.onRelease = (mov.image_mc.scale_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopScale));
mov.delete_btn.onPress = rr.utils.Delegate.create(this, remove);
mm_mov = _global.minimap.createObjectClip(this);
_global.minimap.setObjectClip(this, {x:x, y:y, rot:rot, w:50, h:50, scale:scale});
_global.stage.addEventListener("onObjectSelect", this);
_global.stage.selectObject(this);
render();
}
function initLoaded(initObj) {
x = Math.round(initObj.x);
y = Math.round(initObj.y);
rot = Math.round(initObj.r);
scale = Math.round(initObj.s);
render();
}
function drag() {
_global.stage.selectObject(this);
isdragging = true;
mov.startDrag();
}
function stopdrag() {
mov.stopDrag();
x = mov._x + _global.camera.left;
y = mov._y + _global.camera.top;
isdragging = false;
}
function startRotate() {
mov.onMouseMove = rr.utils.Delegate.create(this, doRotate);
}
function stopRotate() {
delete mov.onMouseMove;
}
function doRotate() {
var _local4;
var _local3;
_local4 = _root._xmouse - mov._x;
_local3 = _root._ymouse - mov._y;
rot = Math.round(((180 * Math.atan2(_local3, _local4)) / Math.PI) + 45);
}
function startScale() {
mov.onMouseMove = rr.utils.Delegate.create(this, doScale);
}
function stopScale() {
delete mov.onMouseMove;
}
function doScale() {
var _local5;
var _local4;
_local5 = _root._xmouse - mov._x;
_local4 = _root._ymouse - mov._y;
var _local3 = rr.utils.MathUtils.getDistance(_root._xmouse, _root._ymouse, mov._x, mov._y);
scale = Math.round((100 * _local3) / 49.5);
if (scale > 100) {
scale = 100;
}
if (scale < 40) {
scale = 40;
}
}
function onObjectSelect() {
if (_global.stage.objSel == this) {
mov.swapDepths((bdepth + 10000) + id);
mov.press_btn._alpha = 20;
mov.image_mc.rot_btn._visible = true;
mov.image_mc.scale_btn._visible = true;
mov.delete_btn._visible = true;
} else {
mov.swapDepths(bdepth + id);
mov.press_btn._alpha = 0;
mov.image_mc.rot_btn._visible = false;
mov.image_mc.scale_btn._visible = false;
mov.delete_btn._visible = false;
}
}
function remove() {
mm_mov.removeMovieClip();
_global.stage.deleteObject(this);
}
function render() {
if (((x + mov._width) - _global.camera.left) < 0) {
mov._visible = false;
} else if (((x - mov._width) - _global.camera.left) > _global.stage.width) {
mov._visible = false;
} else if (((y + mov._height) - _global.camera.top) < 0) {
mov._visible = false;
} else if (((y - mov._height) - _global.camera.top) > _global.stage.height) {
mov._visible = false;
} else {
if (!isdragging) {
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov.image_mc._rotation = rot;
mov.image_mc._xscale = (mov.image_mc._yscale = scale);
}
mov._visible = true;
}
_global.minimap.setObjectClip(this, {x:x, y:y, rot:rot, w:50, h:50, scale:scale});
}
}
Symbol 3508 MovieClip [__Packages.cr.level.RocketBase] Frame 0
class cr.level.RocketBase extends rr.BaseClass
{
var linkId, id, x, y, rot, bdepth, mov, mm_mov, isdragging;
function RocketBase (pid) {
super();
linkId = "RocketBase";
id = pid;
init();
}
function init() {
x = _global.camera.x;
y = _global.camera.y;
rot = 0;
bdepth = 3000;
mov = _global.stage.attachMovie("RocketBaseHolder", "rocketbase" + id, bdepth + id);
mov.press_btn.onPress = rr.utils.Delegate.create(this, drag);
mov.press_btn.onRelease = (mov.press_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopdrag));
mov.image_mc.rot_btn.onPress = rr.utils.Delegate.create(this, startRotate);
mov.image_mc.rot_btn.onRelease = (mov.image_mc.rot_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopRotate));
mov.delete_btn.onPress = rr.utils.Delegate.create(this, remove);
mm_mov = _global.minimap.createObjectClip(this);
_global.minimap.setObjectClip(this, {x:x, y:y, rot:rot, w:110, h:70});
_global.stage.addEventListener("onObjectSelect", this);
_global.stage.selectObject(this);
render();
}
function initLoaded(initObj) {
x = initObj.x;
y = initObj.y;
rot = initObj.r;
render();
}
function drag() {
_global.stage.selectObject(this);
isdragging = true;
mov.startDrag();
}
function stopdrag() {
mov.stopDrag();
x = mov._x + _global.camera.left;
y = mov._y + _global.camera.top;
isdragging = false;
}
function startRotate() {
mov.onMouseMove = rr.utils.Delegate.create(this, doRotate);
}
function stopRotate() {
delete mov.onMouseMove;
}
function doRotate() {
var _local4;
var _local3;
_local4 = _root._xmouse - mov._x;
_local3 = _root._ymouse - mov._y;
rot = ((180 * Math.atan2(_local3, _local4)) / Math.PI) + 45;
}
function onObjectSelect() {
if (_global.stage.objSel == this) {
mov.swapDepths((bdepth + 10000) + id);
mov.press_btn._alpha = 20;
mov.image_mc.rot_btn._visible = true;
mov.delete_btn._visible = true;
} else {
mov.swapDepths(bdepth + id);
mov.press_btn._alpha = 0;
mov.image_mc.rot_btn._visible = false;
mov.delete_btn._visible = false;
}
}
function remove() {
mm_mov.removeMovieClip();
_global.stage.deleteObject(this);
}
function render() {
if (((x + mov._width) - _global.camera.left) < 0) {
mov._visible = false;
} else if (((x - mov._width) - _global.camera.left) > _global.stage.width) {
mov._visible = false;
} else if (((y + mov._height) - _global.camera.top) < 0) {
mov._visible = false;
} else if (((y - mov._height) - _global.camera.top) > _global.stage.height) {
mov._visible = false;
} else {
if (!isdragging) {
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
mov.image_mc._rotation = rot;
}
mov._visible = true;
}
_global.minimap.setObjectClip(this, {x:x, y:y, rot:rot, w:110, h:70});
}
}
Symbol 3509 MovieClip [__Packages.cr.level.Bonus] Frame 0
class cr.level.Bonus extends rr.BaseClass
{
var linkId, id, type, idx, x, y, types, bdepth, mov, mm_mov, title, tdrag, isdragging;
function Bonus (pid) {
super();
linkId = "Bonus";
id = pid;
init();
}
function init() {
type = "e";
idx = 1;
x = _global.camera.x;
y = _global.camera.y;
types = ["m", "e", "r"];
bdepth = 4000;
mov = _global.stage.attachMovie("BonusHolder", "bonus" + id, bdepth + id);
mm_mov = _global.minimap.createIcon(this, "b");
_global.minimap.setIcon(this, "b");
setTitle();
mov.press_btn.onPress = rr.utils.Delegate.create(this, drag);
mov.press_btn.onRelease = (mov.press_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopdrag));
mov.delete_btn.onPress = rr.utils.Delegate.create(this, remove);
_global.stage.addEventListener("onObjectSelect", this);
_global.stage.selectObject(this);
render();
}
function initLoaded(initObj) {
x = initObj.x;
y = initObj.y;
type = initObj.t;
var _local2 = 0;
while (_local2 < types.length) {
if (types[_local2] == type) {
idx = _local2;
break;
}
_local2++;
}
setTitle();
mov.image_mc.gotoAndStop(type);
if (type == "m") {
mov.image_mc.cash_txt.text = initObj.c;
mov.image_mc.cash_txt.maxChars = 5;
mov.image_mc.cash_txt.restrict = "0-9";
}
render();
}
function setTitle() {
if (type == "m") {
title = "CASH BONUS";
}
if (type == "e") {
title = "FUEL BONUS";
}
if (type == "r") {
title = "REPAIR BONUS";
}
mov.title_txt.autoSize = true;
mov.title_txt.text = title;
}
function nextBonus() {
if (idx == undefined) {
idx = 0;
} else {
idx++;
}
if (idx > (types.length - 1)) {
idx = 0;
}
type = types[idx];
setTitle();
mov.image_mc.gotoAndStop(type);
if (type == "m") {
mov.image_mc.cash_txt.text = 10000;
mov.image_mc.cash_txt.maxChars = 5;
mov.image_mc.cash_txt.restrict = "0-9";
}
}
function drag() {
if (_global.stage.objSel != this) {
_global.stage.selectObject(this);
} else {
tdrag = getTimer();
}
isdragging = true;
mov.startDrag();
}
function stopdrag() {
if ((getTimer() - tdrag) < 400) {
nextBonus();
}
mov.stopDrag();
x = mov._x + _global.camera.left;
y = mov._y + _global.camera.top;
isdragging = false;
}
function onObjectSelect() {
if (_global.stage.objSel == this) {
mov.swapDepths((bdepth + 10000) + id);
mov.press_btn._alpha = 100;
mov.delete_btn._visible = true;
mov.title_txt._visible = true;
} else {
mov.swapDepths(bdepth + id);
mov.press_btn._alpha = 0;
mov.delete_btn._visible = false;
mov.title_txt._visible = false;
}
}
function remove() {
mm_mov.removeMovieClip();
_global.stage.deleteObject(this);
}
function render() {
if (((x + mov._width) - _global.camera.left) < 0) {
mov._visible = false;
} else if (((x - mov._width) - _global.camera.left) > _global.stage.width) {
mov._visible = false;
} else if (((y + mov._height) - _global.camera.top) < 0) {
mov._visible = false;
} else if (((y - mov._height) - _global.camera.top) > _global.stage.height) {
mov._visible = false;
} else {
if (!isdragging) {
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
}
mov._visible = true;
}
_global.minimap.setIcon(this, "b");
}
}
Symbol 3510 MovieClip [__Packages.cr.level.Drop] Frame 0
class cr.level.Drop extends rr.BaseClass
{
var linkId, id, type, mode, idx, x, y, types, bdepth, mov, mm_mov, title, tdrag, isdragging;
function Drop (pid) {
super();
linkId = "Drop";
id = pid;
init();
}
function init() {
type = "f";
mode = "d";
idx = 0;
x = _global.camera.x;
y = _global.camera.y;
types = ["f", "p", "a", "t", "b"];
bdepth = 6000;
mov = _global.stage.attachMovie("DropHolder", "drop" + id, bdepth + id);
mm_mov = _global.minimap.createIcon(this, mode);
_global.minimap.setIcon(this, mode);
setTitle();
mov.press_btn.onPress = rr.utils.Delegate.create(this, drag);
mov.press_btn.onRelease = (mov.press_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopdrag));
mov.delete_btn.onPress = rr.utils.Delegate.create(this, remove);
mov.pickup_btn.onPress = rr.utils.Delegate.create(this, toggleMode);
mov.dropoff_btn.onPress = rr.utils.Delegate.create(this, toggleMode);
_global.stage.addEventListener("onObjectSelect", this);
_global.stage.selectObject(this);
toggleMode();
render();
}
function initLoaded(initObj) {
x = initObj.x;
y = initObj.y;
type = initObj.t;
mode = initObj.m;
var _local2 = 0;
while (_local2 < types.length) {
if (types[_local2] == type) {
idx = _local2;
break;
}
_local2++;
}
setTitle();
mov.pickup_btn._visible = mode == "p";
mov.dropoff_btn._visible = mode == "d";
mov.image_mc.gotoAndStop(type);
render();
}
function toggleMode() {
mode = ((mode == "d") ? "p" : "d");
mov.pickup_btn._visible = mode == "p";
mov.dropoff_btn._visible = mode == "d";
}
function setTitle() {
if (type == "f") {
title = "FUEL TANK";
}
if (type == "p") {
title = "PASSENGERWAGON";
}
if (type == "a") {
title = "ARMORED\rPASSENGERWAGON";
}
if (type == "t") {
title = "TANK TRAILER";
}
if (type == "b") {
title = "ATOMIC BOMB";
}
mov.title_txt.autoSize = true;
mov.title_txt.text = title;
}
function nextType() {
if (idx == undefined) {
idx = 0;
} else {
idx++;
}
if (idx > (types.length - 1)) {
idx = 0;
}
type = types[idx].toString();
setTitle();
mov.image_mc.gotoAndStop(type);
}
function drag() {
if (_global.stage.objSel != this) {
_global.stage.selectObject(this);
} else {
tdrag = getTimer();
}
isdragging = true;
mov.startDrag();
}
function stopdrag() {
if ((getTimer() - tdrag) < 400) {
nextType();
}
mov.stopDrag();
x = mov._x + _global.camera.left;
y = mov._y + _global.camera.top;
isdragging = false;
}
function onObjectSelect() {
if (_global.stage.objSel == this) {
mov.swapDepths((bdepth + 10000) + id);
mov.press_btn._alpha = 100;
mov.delete_btn._visible = true;
mov.pickup_btn._visible = mode == "p";
mov.dropoff_btn._visible = mode == "d";
mov.title_txt._visible = true;
} else {
mov.swapDepths(bdepth + id);
mov.press_btn._alpha = 0;
mov.delete_btn._visible = false;
mov.pickup_btn._visible = false;
mov.dropoff_btn._visible = false;
mov.title_txt._visible = false;
}
}
function remove() {
mm_mov.removeMovieClip();
_global.stage.deleteObject(this);
}
function render() {
if (((x + mov._width) - _global.camera.left) < 0) {
mov._visible = false;
} else if (((x - mov._width) - _global.camera.left) > _global.stage.width) {
mov._visible = false;
} else if (((y + mov._height) - _global.camera.top) < 0) {
mov._visible = false;
} else if (((y - mov._height) - _global.camera.top) > _global.stage.height) {
mov._visible = false;
} else {
if (!isdragging) {
mov._x = x - _global.camera.left;
mov._y = y - _global.camera.top;
}
mov._visible = true;
}
_global.minimap.setIcon(this, mode);
}
}
Symbol 3511 MovieClip [__Packages.cr.MiniMap] Frame 0
class cr.MiniMap extends rr.BaseClip
{
var _visible, map_bmp, container_mc, margin, scale, w, h, railcolor, createEmptyMovieClip, getNextHighestDepth, map_mc, label_mc, legenda_mc, icons_mc, edge_mc, cam_mc, onEnterFrame, events;
function MiniMap () {
super();
_global.minimap = this;
_visible = false;
}
function init() {
map_bmp.dispose();
delete map_bmp;
container_mc.removeMovieClip();
margin = 5;
var _local3 = _global.map.width;
var _local4 = _global.map.height;
scale = ((_local3 > _local4) ? ((640 - (2 * margin)) / _local3) : ((480 - (2 * margin)) / _local4));
w = _local3 * scale;
h = _local4 * scale;
railcolor = 13103871 /* 0xC7F2FF */;
if ((_global.map.mapId == 2) || (_global.map.mapId == 3)) {
railcolor = 11836;
}
container_mc = createEmptyMovieClip("container_mc", getNextHighestDepth());
map_mc = container_mc.createEmptyMovieClip("map_mc", container_mc.getNextHighestDepth());
map_bmp = new flash.display.BitmapData(w, h, true, 0);
map_mc.attachBitmap(map_bmp, map_mc.getNextHighestDepth());
label_mc = container_mc.attachMovie("MiniMapLabel", "label_mc", container_mc.getNextHighestDepth());
label_mc.mission_txt.autoSize = true;
label_mc.mission_txt.wordWrap = false;
setMissionText();
legenda_mc = container_mc.attachMovie("MiniMapLegenda", "legenda_mc", container_mc.getNextHighestDepth());
icons_mc = container_mc.createEmptyMovieClip("icons_mc", container_mc.getNextHighestDepth());
if (w > h) {
map_mc._y = label_mc._height;
label_mc._x = 0;
legenda_mc._x = w - legenda_mc._width;
legenda_mc._y = (label_mc._height - legenda_mc._height) - margin;
} else {
map_mc._y = 0;
label_mc._x = w;
legenda_mc._x = w;
legenda_mc._y = h - legenda_mc._height;
}
container_mc._y = ((480 - margin) - h) - map_mc._y;
edge_mc = container_mc.createEmptyMovieClip("edge_mc", container_mc.getNextHighestDepth());
edge_mc.lineStyle(1, 202014);
rr.utils.DrawUtils.drawRect(edge_mc, 0, map_mc._y, w, h);
cam_mc = container_mc.createEmptyMovieClip("cam_mc", container_mc.getNextHighestDepth());
cam_mc._x = 0;
cam_mc._y = 0 + map_mc._y;
cam_mc.lineStyle(1, 16711680);
rr.utils.DrawUtils.drawFillRect(cam_mc, 0, 0, 640 * scale, 480 * scale, 16777215, 30);
cam_mc.onPress = rr.utils.Delegate.create(this, startCamDrag);
cam_mc.onRelease = (cam_mc.onReleaseOutside = rr.utils.Delegate.create(this, stopCamDrag));
}
function showMap() {
setCam();
container_mc._x = 650 + margin;
_visible = true;
onEnterFrame = rr.utils.Delegate.create(this, shiftShow);
}
function createIcon(obj, frame) {
var _local2 = icons_mc.attachMovie("MiniMapIcon", rr.utils.StringUtils.getUniqueName(), icons_mc.getNextHighestDepth());
_local2.gotoAndPlay(frame);
return(_local2);
}
function setIcon(obj, frame) {
var _local2 = obj.mm_mov;
_local2.gotoAndPlay(frame);
_local2._x = obj.x * scale;
_local2._y = (obj.y * scale) + map_mc._y;
}
function createObjectClip(obj) {
var _local2 = container_mc.createEmptyMovieClip(rr.utils.StringUtils.getUniqueName(), container_mc.getNextHighestDepth());
return(_local2);
}
function setObjectClip(obj, iObj) {
var _local3 = obj.mm_mov;
_local3.clear();
_local3.lineStyle(1, 29845);
rr.utils.DrawUtils.drawFillRect(_local3, ((-scale) * iObj.w) / 2, ((-scale) * iObj.h) / 2, iObj.w * scale, iObj.h * scale, 29845, 50);
_local3._x = iObj.x * scale;
_local3._y = (iObj.y * scale) + map_mc._y;
if (iObj.rot != undefined) {
_local3._rotation = iObj.rot;
}
if (iObj.scale != undefined) {
_local3._xscale = (_local3._yscale = iObj.scale);
}
}
function shiftShow() {
if (container_mc._x > margin) {
container_mc._x = container_mc._x - 50;
updateAfterEvent();
} else {
delete onEnterFrame;
}
}
function closeMap() {
_visible = false;
}
function startCamDrag() {
_global.stage.selectSegment(null);
cam_mc.startDrag(false, 0, map_mc._y, w - (640 * scale), (map_mc._y + h) - (480 * scale));
}
function stopCamDrag() {
cam_mc.stopDrag();
events.dispatchEvent({type:"onMiniMapCamReset"});
}
function setCam() {
cam_mc._x = _global.camera.left * scale;
cam_mc._y = (_global.camera.top * scale) + map_mc._y;
}
function setMissionText() {
label_mc.mission_txt.text = "";
}
}
Symbol 3512 MovieClip [__Packages.cr.map.RailControl] Frame 0
class cr.map.RailControl extends rr.BaseClip
{
var _visible, length, radius, direction, showswitch, snap_btn, all_mc, curve_mc, line_btn, curve_btn, conf_btn, load_btn, save_btn, main_btn, minimap_btn, lengthStep, radStep, lplus, lmin, rplus, rmin, events, isButtonDown, ivalIncreaseStep;
function RailControl () {
super();
_global.railcontrol = this;
_visible = false;
}
function init() {
length = (radius = (direction = 1));
showswitch = true;
snap_btn._visible = false;
all_mc.lmin_btn.onRelease = rr.utils.Delegate.create(this, doAction, "lmin");
all_mc.lplus_btn.onRelease = rr.utils.Delegate.create(this, doAction, "lplus");
curve_mc.rmin_btn.onRelease = rr.utils.Delegate.create(this, doAction, "rmin");
curve_mc.rplus_btn.onRelease = rr.utils.Delegate.create(this, doAction, "rplus");
all_mc.lminmin_btn.onPress = rr.utils.Delegate.create(this, startIncrease, "lminmin");
all_mc.lplusplus_btn.onPress = rr.utils.Delegate.create(this, startIncrease, "lplusplus");
curve_mc.rminmin_btn.onPress = rr.utils.Delegate.create(this, startIncrease, "rminmin");
curve_mc.rplusplus_btn.onPress = rr.utils.Delegate.create(this, startIncrease, "rplusplus");
curve_mc.flip_btn.onPress = rr.utils.Delegate.create(this, doAction, "flip");
all_mc.inout_btn.onPress = rr.utils.Delegate.create(this, doAction, "inout");
line_btn.onRelease = rr.utils.Delegate.create(_global.stage, _global.stage.addRailSegment, "line");
curve_btn.onRelease = rr.utils.Delegate.create(_global.stage, _global.stage.addRailSegment, "arc");
all_mc.compound_btn.onRelease = rr.utils.Delegate.create(_global.stage, _global.stage.addCompound);
all_mc.del_btn.onRelease = rr.utils.Delegate.create(_global.stage, _global.stage.deleteSegment);
conf_btn.onRelease = rr.utils.Delegate.create(_global.xmlcontrol, _global.xmlcontrol.showMapXml);
load_btn.onRelease = rr.utils.Delegate.create(_global.stage, _global.stage.loadRailSegments);
save_btn.onRelease = rr.utils.Delegate.create(_global.savecontrol, _global.savecontrol.showMapSave);
main_btn.onRelease = rr.utils.Delegate.create(_global.createcontrol, _global.createcontrol.init);
snap_btn.onRelease = rr.utils.Delegate.create(this, onSnap);
minimap_btn.onPress = rr.utils.Delegate.create(this, toggleMiniMap);
all_mc.lminmin_btn.onRelease = (all_mc.lminmin_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopIncrease));
all_mc.lplusplus_btn.onRelease = (all_mc.lplusplus_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopIncrease));
curve_mc.rminmin_btn.onRelease = (curve_mc.rminmin_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopIncrease));
curve_mc.rplusplus_btn.onRelease = (curve_mc.rplusplus_btn.onReleaseOutside = rr.utils.Delegate.create(this, stopIncrease));
all_mc._visible = (curve_mc._visible = (all_mc.switch_mc._visible = (all_mc.switch_mc.show_btn._visible = false)));
_global.stage.addEventListener("onRailSegmentSelect", this);
_global.stage.addEventListener("onRailConnectionSelect", this);
}
function reset(l, r, d) {
if (l != null) {
length = Math.round(l);
}
if (r != null) {
radius = Math.round(r);
if (l == null) {
length = (radius * 90) * (Math.PI/180);
}
}
if (d != null) {
direction = d;
}
lengthStep = 1;
radStep = 1;
curve_mc.r_txt.text = radius;
all_mc.l_txt.text = length.toString();
}
function doAction(btn) {
lengthStep = 1;
radStep = 1;
lplus = (lmin = (rplus = (rmin = false)));
if (btn == "lmin") {
lmin = true;
doStep();
}
if (btn == "lplus") {
lplus = true;
doStep();
}
if (btn == "rmin") {
rmin = true;
doStep();
}
if (btn == "rplus") {
rplus = true;
doStep();
}
if (btn == "flip") {
direction = -direction;
events.dispatchEvent({type:"onDirectionChanged", target:this});
}
if (btn == "inout") {
events.dispatchEvent({type:"onInOutChanged", target:this});
}
}
function startIncrease(btn) {
lengthStep = 1;
radStep = 1;
lplus = (lmin = (rplus = (rmin = false)));
isButtonDown = true;
if (btn == "lminmin") {
lmin = true;
ivalIncreaseStep = setInterval(this, "increaseStep", 500);
}
if (btn == "rminmin") {
rmin = true;
ivalIncreaseStep = setInterval(this, "increaseStep", 500);
}
if (btn == "lplusplus") {
lplus = true;
ivalIncreaseStep = setInterval(this, "increaseStep", 500);
}
if (btn == "rplusplus") {
rplus = true;
ivalIncreaseStep = setInterval(this, "increaseStep", 500);
}
}
function stopIncrease() {
clearInterval(ivalIncreaseStep);
isButtonDown = false;
}
function onEnterFrame() {
curve_mc.r_txt.text = radius;
all_mc.l_txt.text = length.toString();
if (isButtonDown) {
doStep();
}
}
function doStep() {
if (lmin) {
length = length - lengthStep;
length = ((length < 8) ? 8 : (((length > 1000) ? 1000 : (length))));
events.dispatchEvent({type:"onLengthChanged", target:this});
}
if (lplus) {
length = length + lengthStep;
length = ((length < 8) ? 8 : (((length > 1000) ? 1000 : (length))));
events.dispatchEvent({type:"onLengthChanged", target:this});
}
if (rmin) {
radius = radius - radStep;
radius = ((radius < 100) ? 100 : (((radius > 700) ? 700 : (radius))));
events.dispatchEvent({type:"onRadiusChanged", target:this});
}
if (rplus) {
radius = radius + radStep;
radius = ((radius < 100) ? 100 : (((radius > 700) ? 700 : (radius))));
events.dispatchEvent({type:"onRadiusChanged", target:this});
}
}
function increaseStep() {
if (lengthStep < 10) {
lengthStep++;
}
if (radStep < 10) {
radStep++;
}
}
function onSnap() {
events.dispatchEvent({type:"onSnap", target:this});
}
function onRailSegmentSelect() {
var _local3 = _global.stage.rsSel;
if (!_local3) {
line_btn._visible = (curve_btn._visible = false);
all_mc._visible = false;
curve_mc._visible = false;
all_mc.switch_mc._visible = false;
all_mc.compound_mc._visible = false;
return(undefined);
}
line_btn._visible = (curve_btn._visible = true);
curve_mc._visible = _local3.type == "arc";
all_mc._visible = true;
all_mc.switch_mc._visible = true;
all_mc.del_btn._visible = true;
if ((_local3.id == 1) || (_local3.id == 10000)) {
all_mc._visible = false;
curve_mc._visible = false;
}
if (!_local3.cpe.isopen) {
}
}
function toggleSwitch() {
showswitch = !showswitch;
all_mc.switch_mc.hide_btn._visible = showswitch;
all_mc.switch_mc.show_btn._visible = !showswitch;
events.dispatchEvent({type:"onToggleSwitch", target:this});
}
function toggleMiniMap() {
if (_global.minimap._visible) {
_global.minimap.closeMap();
} else {
_global.minimap.showMap();
}
}
}
Symbol 3513 MovieClip [__Packages.cr.level.LevelControl] Frame 0
class cr.level.LevelControl extends rr.BaseClip
{
var startcash_txt, area_btn, airfield_btn, bunker_btn, rocketbase_btn, bonus_btn, drop_btn, conf_btn, save_btn, main_btn, togglenight_mc, minimap_btn;
function LevelControl () {
super();
_global.levelcontrol = this;
}
function init() {
startcash_txt.restrict = "0-9";
startcash_txt.maxChars = 5;
startcash_txt.text = _global.stage.startcash.toString();
startcash_txt.onChanged = rr.utils.Delegate.create(_global.stage, _global.stage.setStartCash);
area_btn.onRelease = rr.utils.Delegate.create(_global.stage, _global.stage.addArea);
airfield_btn.onRelease = rr.utils.Delegate.create(_global.stage, _global.stage.addObject, "AirField");
bunker_btn._alpha = 50;
rocketbase_btn._alpha = 50;
bonus_btn.onRelease = rr.utils.Delegate.create(_global.stage, _global.stage.addObject, "Bonus");
drop_btn.onRelease = rr.utils.Delegate.create(_global.stage, _global.stage.addObject, "Drop");
conf_btn.onRelease = rr.utils.Delegate.create(_global.xmlcontrol, _global.xmlcontrol.showLevelXml);
save_btn.onRelease = rr.utils.Delegate.create(this, save);
main_btn.onRelease = rr.utils.Delegate.create(_global.createcontrol, _global.createcontrol.init);
togglenight_mc._alpha = 50;
minimap_btn.onPress = rr.utils.Delegate.create(this, toggleMiniMap);
}
function save() {
_global.savecontrol.showLevelSave();
}
function toggleMiniMap() {
if (_global.minimap._visible) {
_global.minimap.closeMap();
} else {
_global.minimap.showMap();
}
}
}
Symbol 3514 MovieClip [__Packages.rr.DemoAlert] Frame 0
class rr.DemoAlert extends rr.BaseClip
{
var message_txt, _visible, continue_btn, onMouseDown;
function DemoAlert () {
super();
_global.demoalert = this;
init();
}
function init() {
message_txt.autoSize = true;
message_txt.wordWrap = false;
_visible = false;
continue_btn.onPress = rr.utils.Delegate.create(this, hide);
}
function show(m) {
if ((!m) || (m == "")) {
m = "THIS FEATURE IS AVAILABLE IN THE FULL VERSION ONLY";
}
message_txt.text = m.toUpperCase();
_visible = true;
onMouseDown = function () {
trace("DemoAlert onMouseDown: ");
this.hide();
};
}
function hide() {
_visible = false;
delete onMouseDown;
}
}
Symbol 3515 MovieClip [__Packages.cr.CreateControl] Frame 0
class cr.CreateControl extends rr.BaseClip
{
var load_mc, gotoAndPlay, main_btn, create_btn, import_btn, import_mc, menu_mc, mapId, mapTitle, gotoAndStop, confmap, levelTitle, conflevel;
function CreateControl () {
super();
_global.createcontrol = this;
init();
}
function init() {
load_mc._visible = false;
(gotoAndPlay(1));// not popped
showMenu();
main_btn.onPress = function () {
_global.root.gotoAndPlay("startmenu");
};
create_btn.onPress = rr.utils.Delegate.create(this, showMenu);
import_btn.onPress = rr.utils.Delegate.create(this, showImport);
}
function showMenu() {
import_mc._visible = false;
menu_mc.gotoAndStop(1);
menu_mc._visible = true;
}
function showImport() {
menu_mc._visible = false;
import_mc._visible = true;
import_mc.showImport();
}
function createMap(mId) {
mapId = mId;
mapTitle = "";
(gotoAndStop("map"));// not popped
rr.utils.Delegate.callDelayed(this, initCreateMap, 500);
}
function initCreateMap() {
new cr.map.Map();
new cr.map.StageCam();
_global.stage.init();
_global.map.init();
_global.camera.init();
_global.railcontrol.init();
_global.stage.addDefaultSegments();
_global.stage.startBuild();
}
function loadMap(mapConfig) {
confmap = mapConfig;
mapId = confmap.mapid;
mapTitle = confmap.title;
(gotoAndStop("map"));// not popped
rr.utils.Delegate.callDelayed(this, initLoadMap, 500);
}
function initLoadMap() {
new cr.map.Map();
new cr.map.StageCam();
setLoad(0, "creating map");
_global.stage.init();
_global.map.init();
_global.camera.init();
_global.railcontrol.init();
_global.stage.createLoadedMap();
}
function createLevel(mapConfig) {
confmap = mapConfig;
mapId = confmap.mapid;
mapTitle = confmap.title;
levelTitle = "";
(gotoAndStop("level"));// not popped
rr.utils.Delegate.callDelayed(this, initCreateLevel, 500);
}
function initCreateLevel() {
new cr.level.LevelMap();
new cr.level.LevelCam();
_global.stage.init();
_global.map.init();
_global.camera.init();
_global.levelcontrol.init();
}
function loadLevel(levelConfig) {
conflevel = levelConfig;
confmap = levelConfig.map;
levelTitle = conflevel.title;
(gotoAndStop("level"));// not popped
rr.utils.Delegate.callDelayed(this, initLoadLevel, 500);
}
function initLoadLevel() {
new cr.level.LevelMap();
new cr.level.LevelCam();
setLoad(0, "creating level");
_global.stage.init();
_global.map.init();
_global.camera.init();
_global.levelcontrol.init();
_global.stage.createLoadedLevel();
}
function setLoad(perc, lbl) {
if (perc == 50) {
} else {
load_mc.ldr_txt.text = lbl.toUpperCase();
load_mc.gotoAndStop(perc);
load_mc._visible = true;
}
}
}
Symbol 3516 MovieClip [__Packages.cr.map.Map] Frame 0
class cr.map.Map extends rr.BaseClass
{
var mapId, cols, rows, width, height, maptype, map_bmp, firstrail, lastrail, cells;
function Map () {
super();
_global.map = this;
}
function init() {
mapId = _global.createcontrol.mapId;
cols = rr.conf.Config.getMapValue(mapId, "cols");
rows = rr.conf.Config.getMapValue(mapId, "rows");
width = cols * 640;
height = rows * 480;
maptype = rr.conf.Config.getMapValue(mapId, "maptype");
map_bmp = flash.display.BitmapData.loadBitmap("map_" + mapId);
firstrail = rr.conf.Config.getMapValue(mapId, "firstrail");
lastrail = rr.conf.Config.getMapValue(mapId, "lastrail");
createMapCells();
initMapCells();
}
function createMapCells() {
cells = [];
var _local3 = 1;
while (_local3 <= cols) {
var _local2 = 1;
while (_local2 <= rows) {
cells.push(new cr.map.MapCell(_local3, _local2));
_local2++;
}
_local3++;
}
}
function initMapCells() {
drawMiniMap();
var _local3 = cells.length;
var _local2 = 0;
while (_local2 < _local3) {
cells[_local2].createNeighbours();
cells[_local2].createBackground();
_local2++;
}
map_bmp.dispose();
delete map_bmp;
}
function drawMiniMap() {
_global.minimap.init();
_global.minimap.label_mc._visible = false;
_global.minimap.legenda_mc._visible = false;
var _local4 = new flash.geom.Matrix();
var _local3 = _global.minimap.scale;
_local4.scale(_local3, _local3);
_global.minimap.map_bmp.draw(map_bmp, _local4);
}
function getCell(cId) {
var _local3 = cells.length;
var _local2 = 0;
while (_local2 < _local3) {
if (cells[_local2].id == cId) {
return(cells[_local2]);
}
_local2++;
}
}
function getCellByPos(x, y) {
var _local6 = cells.length;
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = cells[_local3];
if ((((x >= _local2.left) && (x < _local2.right)) && (y >= _local2.top)) && (y < _local2.bottom)) {
return(_local2);
}
_local3++;
}
}
}
Symbol 3517 MovieClip [__Packages.cr.map.MapCell] Frame 0
class cr.map.MapCell extends rr.BaseClass
{
var colId, rowId, width, height, id, left, right, top, bottom, center, bg_bmp, nb, da, rectX, rectY, rectW, rectH, pX, pY, isFocused;
function MapCell (cId, rId) {
super();
colId = cId;
rowId = rId;
init();
}
function init() {
width = 640;
height = 480;
id = (colId + "_") + rowId;
left = (colId - 1) * width;
right = colId * width;
top = (rowId - 1) * height;
bottom = rowId * height;
center = new flash.geom.Point(left + (width / 2), top + (height / 2));
}
function createBackground() {
var _local3 = new flash.geom.Rectangle(left, top, width, height);
bg_bmp = new flash.display.BitmapData(width, height, true, 0);
bg_bmp.copyPixels(_global.map.map_bmp, _local3, new flash.geom.Point(0, 0), null, null, true);
}
function createNeighbours() {
nb = [];
nb[1] = (((colId > 1) && (rowId > 1)) ? (_global.map.getCell(((colId - 1) + "_") + (rowId - 1))) : undefined);
nb[2] = ((rowId > 1) ? (_global.map.getCell((colId + "_") + (rowId - 1))) : undefined);
nb[3] = (((colId < _global.map.cols) && (rowId > 1)) ? (_global.map.getCell(((colId + 1) + "_") + (rowId - 1))) : undefined);
nb[4] = ((colId > 1) ? (_global.map.getCell(((colId - 1) + "_") + rowId)) : undefined);
nb[5] = ((colId < _global.map.cols) ? (_global.map.getCell(((colId + 1) + "_") + rowId)) : undefined);
nb[6] = (((colId > 1) && (rowId < _global.map.rows)) ? (_global.map.getCell(((colId - 1) + "_") + (rowId + 1))) : undefined);
nb[7] = ((rowId < _global.map.rows) ? (_global.map.getCell((colId + "_") + (rowId + 1))) : undefined);
nb[8] = (((colId < _global.map.cols) && (rowId < _global.map.rows)) ? (_global.map.getCell(((colId + 1) + "_") + (rowId + 1))) : undefined);
}
function update() {
var _local5 = _global.camera.left;
var _local7 = _global.camera.right;
var _local6 = _global.camera.top;
var _local8 = _global.camera.bottom;
if ((((_local7 < left) || (_local5 > right)) || (_local8 < top)) || (_local6 > bottom)) {
da = undefined;
} else {
rectX = ((left > _local5) ? 0 : (_local5 - left));
rectY = ((top < _local6) ? 0 : (_local6 - top));
rectW = ((rectX == 0) ? (_local7 - left) : (right - _local5));
rectH = ((rectY == 0) ? (_local8 - top) : (bottom - _local6));
pX = ((rectX == 0) ? (_global.stage.width - rectW) : 0);
pY = ((rectY == 0) ? (_global.stage.height - rectH) : 0);
da = {rect:new flash.geom.Rectangle(rectX, rectY, rectW, rectH), point:new flash.geom.Point(pX, pY)};
}
if (da) {
_global.stage.bg_bmp.copyPixels(bg_bmp, da.rect, da.point, null, null, true);
}
if (isFocused) {
var _local4 = nb.length;
var _local3 = 0;
while (_local3 < _local4) {
nb[_local3].update();
_local3++;
}
}
}
function checkFocus(x, y) {
if ((((x >= left) && (x < right)) && (y >= top)) && (y < bottom)) {
return(undefined);
}
isFocused = false;
}
}
Symbol 3518 MovieClip [__Packages.cr.map.StageCam] Frame 0
class cr.map.StageCam extends rr.BaseClass
{
var follow, width, height, minx, miny, maxx, maxy, x, y, left, right, top, bottom, xs, ys, xsprev, ysprev, cell, xdif, ydif, rcfollowx, rcfollowy;
function StageCam () {
super();
_global.camera = this;
}
function init() {
follow = "mouse";
width = _global.stage.width;
height = _global.stage.height;
minx = width / 2;
miny = height / 2;
maxx = _global.map.width - (width / 2);
maxy = _global.map.height - (height / 2);
x = _global.map.firstrail.x;
y = _global.map.firstrail.y;
x = ((x < minx) ? (minx) : (((x > maxx) ? (maxx) : (x))));
y = ((y < miny) ? (miny) : (((y > maxy) ? (maxy) : (y))));
left = x - (width / 2);
right = x + (width / 2);
top = y - (height / 2);
bottom = y + (height / 2);
_global.minimap.addEventListener("onMiniMapCamReset", this);
xs = (ys = (xsprev = (ysprev = 0)));
cell = _global.map.getCellByPos(x, y);
cell.isFocused = true;
cell.update();
}
function update() {
if (_global.railcontrol.isButtonDown) {
return(undefined);
}
follow = (Key.isDown(17) ? "mouse" : "");
if (follow == "mouse") {
if (_global.stage._ymouse > 480) {
xs = (ys = 0);
} else {
xdif = _global.stage._xmouse - (width / 2);
ydif = _global.stage._ymouse - (height / 2);
xs = xdif / 20;
ys = ydif / 20;
}
} else if (_global.stage.rsSel) {
var _local3 = _global.stage.rsSel.getPoint((_global.stage.rsSel.length * 3) / 4);
xdif = _local3.x - x;
ydif = _local3.y - y;
if (Math.abs(xdif) > 150) {
rcfollowx = true;
} else if (Math.abs(xdif) < 50) {
rcfollowx = false;
}
if (Math.abs(ydif) > 150) {
rcfollowy = true;
} else if (Math.abs(ydif) < 10) {
rcfollowy = false;
}
xs = (rcfollowx ? (xdif / 20) : 0);
ys = (rcfollowy ? (ydif / 20) : 0);
} else {
return(undefined);
}
if (Math.abs(xs - xsprev) < 0.5) {
xs = xsprev;
}
if (Math.abs(ys - ysprev) < 0.5) {
ys = ysprev;
}
xsprev = xs;
ysprev = ys;
x = (((x + xs) < minx) ? (minx) : (((Math.round(x + xs) > maxx) ? (maxx) : (Math.round(x + xs)))));
y = (((y + ys) < miny) ? (miny) : (((Math.round(y + ys) > maxy) ? (maxy) : (Math.round(y + ys)))));
_global.minimap.setCam();
left = x - (width / 2);
right = x + (width / 2);
top = y - (height / 2);
bottom = y + (height / 2);
cell.checkFocus(x, y);
if (!cell.isFocused) {
cell = _global.map.getCellByPos(x, y);
cell.isFocused = true;
}
cell.update();
}
function onMiniMapCamReset() {
left = _global.minimap.cam_mc._x / _global.minimap.scale;
top = (_global.minimap.cam_mc._y - _global.minimap.map_mc._y) / _global.minimap.scale;
x = left + (width / 2);
y = top + (height / 2);
right = x + (width / 2);
bottom = y + (height / 2);
cell.checkFocus(x, y);
cell = _global.map.getCellByPos(x, y);
cell.isFocused = true;
cell.update();
}
}
Symbol 3519 MovieClip [__Packages.cr.level.LevelMap] Frame 0
class cr.level.LevelMap extends rr.BaseClass
{
var confmap, mapId, maptype, cols, rows, width, height, map_bmp, pi, rc, rs, cells;
function LevelMap () {
super();
_global.map = this;
}
function init() {
confmap = _global.createcontrol.confmap;
mapId = confmap.mapid;
maptype = rr.conf.Config.getMapValue(mapId, "maptype");
cols = rr.conf.Config.getMapValue(mapId, "cols");
rows = rr.conf.Config.getMapValue(mapId, "rows");
width = cols * 640;
height = rows * 480;
map_bmp = flash.display.BitmapData.loadBitmap("map_" + mapId);
createCompounds();
createMapCells();
createRailConnections();
createRailSegments();
initMapCells();
}
function createCompounds() {
var _local3 = confmap.cp;
var _local4 = _local3.length;
var _local2 = 0;
while (_local2 < _local4) {
drawCompound(_local3[_local2], "base");
drawCompound(_local3[_local2], "top");
_local2++;
}
}
function drawCompound(conf, part) {
var _local2 = flash.display.BitmapData.loadBitmap("grass1_" + part);
var _local3 = new flash.display.BitmapData(500, 500, true, 0);
var _local6 = new flash.geom.Rectangle(0, 0, 500, 500);
var _local4 = new flash.geom.Matrix();
_local4.translate((-_local2.width) / 2, (-_local2.height) / 2);
_local4.rotate((rr.utils.MathUtils.formatAngle(conf.rot) / 180) * pi);
_local4.translate((_local2.width / 2) + 250, (_local2.height / 2) + 250);
_local3.draw(_local2, _local4);
map_bmp.copyPixels(_local3, _local6, new flash.geom.Point((conf.x - 250) - (_local2.width / 2), (conf.y - 250) - (_local2.height / 2)), null, null, true);
_local2.dispose();
_local3.dispose();
}
function createRailConnections() {
var _local3 = confmap.rc;
rc = [];
var _local4 = _local3.length;
var _local2 = 0;
while (_local2 < _local4) {
rc.push(_local3[_local2].id);
this["rc" + _local3[_local2].id] = new cr.level.LevelRailConnection(_local3[_local2]);
_local2++;
}
}
function createRailSegments() {
var _local3 = confmap.rs;
rs = [];
var _local4 = _local3.length;
var _local2 = 0;
while (_local2 < _local4) {
rs.push(_local3[_local2].id);
this["rs" + _local3[_local2].id] = new cr.level.LevelRailSegment(_local3[_local2]);
_local2++;
}
}
function createMapCells() {
cells = [];
var _local3 = 1;
while (_local3 <= cols) {
var _local2 = 1;
while (_local2 <= rows) {
cells.push(new cr.level.LevelMapCell(_local3, _local2));
_local2++;
}
_local3++;
}
}
function initMapCells() {
drawMiniMap();
var _local3 = rs.length;
var _local2 = 0;
while (_local2 < _local3) {
cr.level.LevelUtils.draw(this["rs" + rs[_local2]], "rail_bg");
_local2++;
}
_local2 = 0;
while (_local2 < _local3) {
cr.level.LevelUtils.draw(this["rs" + rs[_local2]], "rail_beam");
_local2++;
}
_local2 = 0;
while (_local2 < _local3) {
cr.level.LevelUtils.draw(this["rs" + rs[_local2]], "rail");
_local2++;
}
_local3 = cells.length;
_local2 = 0;
while (_local2 < _local3) {
cells[_local2].createNeighbours();
cells[_local2].createBackground();
_local2++;
}
map_bmp.dispose();
delete map_bmp;
}
function drawMiniMap() {
_global.minimap.init();
var _local4 = new flash.geom.Matrix();
var _local3 = _global.minimap.scale;
_local4.scale(_local3, _local3);
_global.minimap.map_bmp.draw(map_bmp, _local4);
}
function getCell(cId) {
var _local3 = cells.length;
var _local2 = 0;
while (_local2 < _local3) {
if (cells[_local2].id == cId) {
return(cells[_local2]);
}
_local2++;
}
}
function getCellByPos(x, y) {
var _local6 = cells.length;
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = cells[_local3];
if ((((x >= _local2.left) && (x < _local2.right)) && (y >= _local2.top)) && (y < _local2.bottom)) {
return(_local2);
}
_local3++;
}
}
}
Symbol 3520 MovieClip [__Packages.cr.level.LevelRailConnection] Frame 0
class cr.level.LevelRailConnection
{
var id, x, y, ang, s, ins, outs;
function LevelRailConnection (initObj) {
id = initObj.id;
x = initObj.x;
y = initObj.y;
ang = initObj.a;
s = initObj.s;
ins = [];
outs = [];
}
}
Symbol 3521 MovieClip [__Packages.cr.level.LevelRailSegment] Frame 0
class cr.level.LevelRailSegment
{
var id, type, rcs, rce, eo, t, ang, length, radius, dir;
function LevelRailSegment (initObj) {
id = initObj.id;
type = (initObj.r ? "arc" : "line");
rcs = _global.map["rc" + initObj.s];
rce = _global.map["rc" + initObj.e];
eo = initObj.eo;
t = initObj.t;
if (t) {
rcs.ins.push(id);
ang = rcs.ang + 180;
} else {
rcs.outs.push(id);
ang = rcs.ang;
}
if (eo) {
rce.outs.push(id);
} else {
rce.ins.push(id);
}
if (type == "line") {
length = rr.utils.MathUtils.getDistance(rcs.x, rcs.y, rce.x, rce.y);
}
if (type == "arc") {
radius = initObj.r;
dir = initObj.d;
length = initObj.l;
}
}
var pi = Math.PI;
var cos = Math.cos;
var acos = Math.acos;
var sin = Math.sin;
var asin = Math.asin;
var atan2 = Math.atan2;
}
Symbol 3522 MovieClip [__Packages.cr.level.LevelMapCell] Frame 0
class cr.level.LevelMapCell extends rr.BaseClass
{
var colId, rowId, width, height, id, left, right, top, bottom, center, bg_bmp, nb, da, rectX, rectY, rectW, rectH, pX, pY, isFocused;
function LevelMapCell (cId, rId) {
super();
colId = cId;
rowId = rId;
init();
}
function init() {
width = 640;
height = 480;
id = (colId + "_") + rowId;
left = (colId - 1) * width;
right = colId * width;
top = (rowId - 1) * height;
bottom = rowId * height;
center = new flash.geom.Point(left + (width / 2), top + (height / 2));
}
function createBackground() {
var _local3 = new flash.geom.Rectangle(left, top, width, height);
bg_bmp = new flash.display.BitmapData(width, height, true, 0);
bg_bmp.copyPixels(_global.map.map_bmp, _local3, new flash.geom.Point(0, 0), null, null, true);
}
function createNeighbours() {
nb = [];
nb[1] = (((colId > 1) && (rowId > 1)) ? (_global.map.getCell(((colId - 1) + "_") + (rowId - 1))) : undefined);
nb[2] = ((rowId > 1) ? (_global.map.getCell((colId + "_") + (rowId - 1))) : undefined);
nb[3] = (((colId < _global.map.cols) && (rowId > 1)) ? (_global.map.getCell(((colId + 1) + "_") + (rowId - 1))) : undefined);
nb[4] = ((colId > 1) ? (_global.map.getCell(((colId - 1) + "_") + rowId)) : undefined);
nb[5] = ((colId < _global.map.cols) ? (_global.map.getCell(((colId + 1) + "_") + rowId)) : undefined);
nb[6] = (((colId > 1) && (rowId < _global.map.rows)) ? (_global.map.getCell(((colId - 1) + "_") + (rowId + 1))) : undefined);
nb[7] = ((rowId < _global.map.rows) ? (_global.map.getCell((colId + "_") + (rowId + 1))) : undefined);
nb[8] = (((colId < _global.map.cols) && (rowId < _global.map.rows)) ? (_global.map.getCell(((colId + 1) + "_") + (rowId + 1))) : undefined);
}
function update() {
var _local5 = _global.camera.left;
var _local7 = _global.camera.right;
var _local6 = _global.camera.top;
var _local8 = _global.camera.bottom;
if ((((_local7 < left) || (_local5 > right)) || (_local8 < top)) || (_local6 > bottom)) {
da = undefined;
} else {
rectX = ((left > _local5) ? 0 : (_local5 - left));
rectY = ((top < _local6) ? 0 : (_local6 - top));
rectW = ((rectX == 0) ? (_local7 - left) : (right - _local5));
rectH = ((rectY == 0) ? (_local8 - top) : (bottom - _local6));
pX = ((rectX == 0) ? (_global.stage.width - rectW) : 0);
pY = ((rectY == 0) ? (_global.stage.height - rectH) : 0);
da = {rect:new flash.geom.Rectangle(rectX, rectY, rectW, rectH), point:new flash.geom.Point(pX, pY)};
}
if (da) {
_global.stage.bg_bmp.copyPixels(bg_bmp, da.rect, da.point, null, null, true);
}
if (isFocused) {
var _local4 = nb.length;
var _local3 = 0;
while (_local3 < _local4) {
nb[_local3].update();
_local3++;
}
}
}
function checkFocus(x, y) {
if ((((x >= left) && (x < right)) && (y >= top)) && (y < bottom)) {
return(undefined);
}
isFocused = false;
}
}
Symbol 3523 MovieClip [__Packages.cr.level.LevelUtils] Frame 0
class cr.level.LevelUtils
{
function LevelUtils () {
}
static function draw(rs, element) {
if (rs.type == "line") {
drawLine(rs, element);
}
if (rs.type == "arc") {
drawArc(rs, element);
}
}
static function drawLine(rs, element) {
var _local9 = Math.PI;
var _local15 = Math.cos;
var _local14 = Math.sin;
var _local8 = flash.display.BitmapData.loadBitmap(element);
var _local12;
var _local11;
var _local10 = rr.utils.MathUtils.formatAngle(rs.ang);
var _local7 = new flash.geom.Point(_local8.width / 2, _local8.height / 2);
var _local2 = new flash.geom.Matrix();
var _local4 = 0;
while (_local4 <= rs.length) {
_local12 = _local15((_local10 * _local9) / 180) * _local4;
_local11 = (-_local14((_local10 * _local9) / 180)) * _local4;
_local2.identity();
_local2.translate(-_local7.x, -_local7.y);
_local2.rotate((rr.utils.MathUtils.formatAngle(-_local10) / 180) * _local9);
_local2.translate(rs.rcs.x + _local12, rs.rcs.y + _local11);
if (element == "rail_bg") {
_global.map.map_bmp.draw(_local8, _local2, null, "overlay");
} else {
_global.map.map_bmp.draw(_local8, _local2);
}
if (element == "rail") {
var _local6 = new flash.display.BitmapData(7, 7, false, _global.minimap.railcolor);
var _local3 = _global.minimap.scale;
_local2.identity();
_local2.scale(_local3, _local3);
_local2.translate((-_local7.x) * _local3, (-_local7.y) * _local3);
_local2.translate((rs.rcs.x + _local12) * _local3, (rs.rcs.y + _local11) * _local3);
_global.minimap.map_bmp.draw(_local6, _local2);
_local6.dispose();
}
_local4 = _local4 + _local8.width;
}
_local8.dispose();
}
static function drawArc(rs, element) {
var _local9 = Math.PI;
var _local17 = Math.cos;
var _local16 = Math.sin;
var _local10 = flash.display.BitmapData.loadBitmap(element);
var _local7 = new flash.geom.Point(_local10.width / 2, _local10.height / 2);
var _local2 = new flash.geom.Matrix();
var _local12;
var _local11;
var _local19 = rs.length / _local10.width;
var _local15 = rr.utils.MathUtils.formatAngle(rs.ang - 90);
var _local13 = new flash.geom.Point((-rs.dir) * (rs.radius * _local17((_local15 * _local9) / 180)), rs.dir * (rs.radius * _local16((_local15 * _local9) / 180)));
var _local18 = (rs.dir * 180) / ((rs.radius * _local9) / _local10.width);
var _local8;
var _local6 = 0;
while (_local6 <= _local19) {
_local8 = rr.utils.MathUtils.formatAngle(_local15 + (_local6 * _local18));
_local12 = _local13.x + ((rs.dir * rs.radius) * _local17((_local8 * _local9) / 180));
_local11 = _local13.y - ((rs.dir * rs.radius) * _local16((_local8 * _local9) / 180));
_local2.identity();
_local2.translate(-_local7.x, -_local7.y);
_local2.rotate((rr.utils.MathUtils.formatAngle((-_local8) - 90) / 180) * _local9);
_local2.translate(rs.rcs.x + _local12, rs.rcs.y + _local11);
if (element == "rail_bg") {
_global.map.map_bmp.draw(_local10, _local2, null, "overlay");
} else {
_global.map.map_bmp.draw(_local10, _local2, null);
}
if (element == "rail") {
var _local5 = new flash.display.BitmapData(7, 7, false, _global.minimap.railcolor);
var _local4 = _global.minimap.scale;
_local2.identity();
_local2.scale(_local4, _local4);
_local2.translate((-_local7.x) * _local4, (-_local7.y) * _local4);
_local2.translate((rs.rcs.x + _local12) * _local4, (rs.rcs.y + _local11) * _local4);
_global.minimap.map_bmp.draw(_local5, _local2);
_local5.dispose();
}
_local6++;
}
_local10.dispose();
}
}
Symbol 3524 MovieClip [__Packages.cr.level.LevelCam] Frame 0
class cr.level.LevelCam extends rr.BaseClass
{
var follow, width, height, minx, miny, maxx, maxy, x, y, left, right, top, bottom, cell, xs, ys, xdif, ydif, xsprev, ysprev;
function LevelCam () {
super();
_global.camera = this;
}
function init() {
follow = "mouse";
width = _global.stage.width;
height = _global.stage.height;
minx = width / 2;
miny = height / 2;
maxx = _global.map.width - (width / 2);
maxy = _global.map.height - (height / 2);
x = (rr.conf.Config.getMapValue(_global.map.mapId, "startcol") * _global.stage.width) - (_global.stage.width / 2);
y = (rr.conf.Config.getMapValue(_global.map.mapId, "startrow") * _global.stage.height) - (_global.stage.height / 2);
x = ((x < minx) ? (minx) : (((x > maxx) ? (maxx) : (x))));
y = ((y < miny) ? (miny) : (((y > maxy) ? (maxy) : (y))));
left = x - (width / 2);
right = x + (width / 2);
top = y - (height / 2);
bottom = y + (height / 2);
_global.minimap.addEventListener("onMiniMapCamReset", this);
cell = _global.map.getCellByPos(x, y);
cell.isFocused = true;
cell.update();
}
function update() {
follow = (Key.isDown(17) ? "mouse" : "");
if (follow == "mouse") {
if (_global.stage._ymouse > 480) {
xs = (ys = 0);
} else {
xdif = _global.stage._xmouse - (width / 2);
ydif = _global.stage._ymouse - (height / 2);
xs = xdif / 20;
ys = ydif / 20;
}
} else {
return(undefined);
}
if (Math.abs(xs - xsprev) < 0.5) {
xs = xsprev;
}
if (Math.abs(ys - ysprev) < 0.5) {
ys = ysprev;
}
xsprev = xs;
ysprev = ys;
x = (((x + xs) < minx) ? (minx) : (((Math.round(x + xs) > maxx) ? (maxx) : (Math.round(x + xs)))));
y = (((y + ys) < miny) ? (miny) : (((Math.round(y + ys) > maxy) ? (maxy) : (Math.round(y + ys)))));
_global.minimap.setCam();
left = x - (width / 2);
right = x + (width / 2);
top = y - (height / 2);
bottom = y + (height / 2);
cell.checkFocus(x, y);
if (!cell.isFocused) {
cell = _global.map.getCellByPos(x, y);
cell.isFocused = true;
}
cell.update();
}
function onMiniMapCamReset() {
left = _global.minimap.cam_mc._x / _global.minimap.scale;
top = (_global.minimap.cam_mc._y - _global.minimap.map_mc._y) / _global.minimap.scale;
x = left + (width / 2);
y = top + (height / 2);
right = x + (width / 2);
bottom = y + (height / 2);
cell.checkFocus(x, y);
cell = _global.map.getCellByPos(x, y);
cell.isFocused = true;
cell.update();
}
}
Symbol 3525 MovieClip [__Packages.rr.Hangar] Frame 0
class rr.Hangar extends rr.BaseClip
{
var locs, levelId;
function Hangar () {
super();
init();
}
function init() {
locs = ["SaddleTank", "BulpFrog", "Rhino", "Loewy", "Pennsylvania", "SuperChief", "Dragon", "ICE"];
levelId = _global.superlevel;
setLocs();
}
function setLocs() {
var _local8 = locs.length;
var _local4 = 0;
while (_local4 < _local8) {
var _local3 = locs[_local4].toString();
var _local7 = rr.conf.Config.getObjectValue(_local3, "availabilityLevel");
var _local2 = this[_local3 + "_mc"];
var _local5 = this[_local3 + "_btn"];
var _local6 = this[_local3 + "_lock"];
if ((levelId >= _local7) && (_local4 < 2)) {
_local2._alpha = 100;
_local2.tar = 100;
_local5.onPress = rr.utils.Delegate.create(this, toggleLoc, _local2);
_local6._visible = false;
} else {
_local2._visible = false;
_local5._alpha = 20;
_local6._visible = true;
}
_local4++;
}
}
function toggleLoc(mc) {
mc.tar = ((mc.tar == 100) ? 0 : 100);
if (mc.onEnterFrame == undefined) {
mc.onEnterFrame = rr.utils.Delegate.create(this, fade, mc);
}
}
function fade(mc) {
if (mc._alpha > mc.tar) {
mc._alpha = Math.round(mc._alpha - 2);
} else if (mc._alpha < mc.tar) {
mc._alpha = Math.round(mc._alpha + 2);
} else {
delete mc.onEnterFrame;
}
}
}
Symbol 3526 MovieClip [__Packages.rr.MissionMenu] Frame 0
class rr.MissionMenu extends rr.BaseClip
{
var _visible;
function MissionMenu () {
super();
_global.missionmenu = this;
_visible = false;
}
function playMission(id) {
trace("miss id: " + id);
var _local2 = 0;
while (_local2 <= 10) {
this[("mission" + _local2) + "_mc"]._visible = false;
this[("mission" + _local2) + "_mc"].gotoAndStop(1);
_local2++;
}
this[("mission" + id) + "_mc"]._visible = true;
_visible = true;
this[("mission" + id) + "_mc"].gotoAndPlay(1);
}
}
Symbol 53 MovieClip [MiniMapIcon] Frame 1
stop();
Symbol 53 MovieClip [MiniMapIcon] Frame 2
stop();
Symbol 53 MovieClip [MiniMapIcon] Frame 3
stop();
Symbol 61 Button
on (press) {
this.gotoAndStop(224);
}
Symbol 82 Button
on (press) {
this.gotoAndPlay(this._currentframe + 1);
}
Symbol 110 Button
on (release) {
_global.game.startLevel();
}
Symbol 111 MovieClip Frame 73
stop();
Symbol 111 MovieClip Frame 121
stop();
Symbol 111 MovieClip Frame 224
stop();
Symbol 112 Button
on (press) {
this.gotoAndStop(155);
}
Symbol 140 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 52
stop();
Symbol 160 MovieClip Frame 155
stop();
Symbol 165 Button
on (press) {
_global.control.quitGame();
}
Symbol 166 MovieClip [MissionMenu] Frame 1
#initclip 331
Object.registerClass("MissionMenu", rr.MissionMenu);
#endinitclip
Symbol 173 MovieClip [AirCraneLoad] Frame 1
stop();
Symbol 178 MovieClip [MiniMap] Frame 1
#initclip 254
Object.registerClass("MiniMap", rr.control.MiniMap);
#endinitclip
Symbol 195 MovieClip [Card ICE] Frame 1
#initclip 255
Object.registerClass("Card ICE", rr.control.TabCardLocomotive);
#endinitclip
Symbol 204 MovieClip [Card Dragon] Frame 1
#initclip 256
Object.registerClass("Card Dragon", rr.control.TabCardLocomotive);
#endinitclip
Symbol 212 MovieClip [Card SuperChief] Frame 1
#initclip 257
Object.registerClass("Card SuperChief", rr.control.TabCardLocomotive);
#endinitclip
Symbol 221 MovieClip [Card Pennsylvania] Frame 1
#initclip 258
Object.registerClass("Card Pennsylvania", rr.control.TabCardLocomotive);
#endinitclip
Symbol 229 MovieClip [Card Loewy] Frame 1
#initclip 259
Object.registerClass("Card Loewy", rr.control.TabCardLocomotive);
#endinitclip
Symbol 237 MovieClip [Card Rhino] Frame 1
#initclip 260
Object.registerClass("Card Rhino", rr.control.TabCardLocomotive);
#endinitclip
Symbol 253 MovieClip [Card BulpFrog] Frame 1
#initclip 261
Object.registerClass("Card BulpFrog", rr.control.TabCardLocomotive);
#endinitclip
Symbol 265 MovieClip [Card SaddleTank] Frame 1
#initclip 262
Object.registerClass("Card SaddleTank", rr.control.TabCardLocomotive);
#endinitclip
Symbol 276 MovieClip [TrainSelect] Frame 1
#initclip 263
Object.registerClass("TrainSelect", rr.control.TrainSelect);
#endinitclip
Instance of Symbol 195 MovieClip [Card ICE] "IC_mc" in Symbol 276 MovieClip [TrainSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "ICE";
}
Instance of Symbol 204 MovieClip [Card Dragon] "DR_mc" in Symbol 276 MovieClip [TrainSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Dragon";
}
Instance of Symbol 212 MovieClip [Card SuperChief] "SC_mc" in Symbol 276 MovieClip [TrainSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "SuperChief";
}
Instance of Symbol 221 MovieClip [Card Pennsylvania] "PN_mc" in Symbol 276 MovieClip [TrainSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Pennsylvania";
}
Instance of Symbol 229 MovieClip [Card Loewy] "LW_mc" in Symbol 276 MovieClip [TrainSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Loewy";
}
Instance of Symbol 237 MovieClip [Card Rhino] "RH_mc" in Symbol 276 MovieClip [TrainSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Rhino";
}
Instance of Symbol 253 MovieClip [Card BulpFrog] "BF_mc" in Symbol 276 MovieClip [TrainSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "BulpFrog";
}
Instance of Symbol 265 MovieClip [Card SaddleTank] "ST_mc" in Symbol 276 MovieClip [TrainSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "SaddleTank";
}
Symbol 286 MovieClip [Card PowerGenerator] Frame 1
#initclip 264
Object.registerClass("Card PowerGenerator", rr.control.TabCardWeapon);
#endinitclip
Symbol 293 MovieClip [Card Oiltank] Frame 1
#initclip 265
Object.registerClass("Card Oiltank", rr.control.TabCardWeapon);
#endinitclip
Symbol 300 MovieClip [Card ColeCart] Frame 1
#initclip 266
Object.registerClass("Card ColeCart", rr.control.TabCardWeapon);
#endinitclip
Symbol 307 MovieClip [Card Size4 Wagon] Frame 1
#initclip 267
Object.registerClass("Card Size4 Wagon", rr.control.TabCardWagon);
#endinitclip
Symbol 314 MovieClip [Card Size3 Wagon] Frame 1
#initclip 268
Object.registerClass("Card Size3 Wagon", rr.control.TabCardWagon);
#endinitclip
Symbol 323 MovieClip [Card Size2 Wagon] Frame 1
#initclip 269
Object.registerClass("Card Size2 Wagon", rr.control.TabCardWagon);
#endinitclip
Symbol 333 MovieClip [Card Size1 Wagon] Frame 1
#initclip 270
Object.registerClass("Card Size1 Wagon", rr.control.TabCardWagon);
#endinitclip
Symbol 334 MovieClip [WagonSelect] Frame 1
#initclip 271
Object.registerClass("WagonSelect", rr.control.WagonSelect);
#endinitclip
Instance of Symbol 286 MovieClip [Card PowerGenerator] "PG_mc" in Symbol 334 MovieClip [WagonSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "PowerGenerator";
}
Instance of Symbol 293 MovieClip [Card Oiltank] "OT_mc" in Symbol 334 MovieClip [WagonSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "OilTank";
}
Instance of Symbol 300 MovieClip [Card ColeCart] "CC_mc" in Symbol 334 MovieClip [WagonSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "ColeCart";
}
Instance of Symbol 307 MovieClip [Card Size4 Wagon] "W4_mc" in Symbol 334 MovieClip [WagonSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Wagon4";
}
Instance of Symbol 314 MovieClip [Card Size3 Wagon] "W3_mc" in Symbol 334 MovieClip [WagonSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Wagon3";
}
Instance of Symbol 323 MovieClip [Card Size2 Wagon] "W2_mc" in Symbol 334 MovieClip [WagonSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Wagon2";
}
Instance of Symbol 333 MovieClip [Card Size1 Wagon] "W1_mc" in Symbol 334 MovieClip [WagonSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Wagon1";
}
Symbol 344 MovieClip [XmlControl] Frame 1
#initclip 272
Object.registerClass("XmlControl", cr.XmlControl);
#endinitclip
Symbol 377 MovieClip [XmlImport] Frame 1
#initclip 273
Object.registerClass("XmlImport", cr.XmlImport);
#endinitclip
Symbol 570 MovieClip Frame 26
stop();
Symbol 571 MovieClip [BellHuey] Frame 1
stop();
Symbol 571 MovieClip [BellHuey] Frame 35
stop();
Symbol 581 MovieClip [DropHolderImage] Frame 1
stop();
Symbol 597 MovieClip [CompoundHolder] Frame 1
stop();
Symbol 597 MovieClip [CompoundHolder] Frame 2
stop();
Symbol 597 MovieClip [CompoundHolder] Frame 3
stop();
Symbol 630 MovieClip Frame 1
stop();
Symbol 633 MovieClip Frame 1
stop();
Symbol 640 MovieClip [MapContainer] Frame 1
#initclip 274
Object.registerClass("MapContainer", cr.map.MapContainer);
#endinitclip
Symbol 641 MovieClip [NewMapContainer] Frame 1
#initclip 275
Object.registerClass("NewMapContainer", cr.map.NewMapContainer);
#endinitclip
Symbol 644 MovieClip [LevelContainer] Frame 1
#initclip 276
Object.registerClass("LevelContainer", cr.level.LevelContainer);
#endinitclip
Symbol 647 MovieClip [GameContainer] Frame 1
#initclip 277
Object.registerClass("GameContainer", rr.GameContainer);
#endinitclip
Symbol 652 Button
on (press) {
gotoAndPlay ("savebox");
}
Symbol 659 Button
on (press) {
submit();
}
Symbol 660 MovieClip [SaveControl] Frame 1
#initclip 278
Object.registerClass("SaveControl", cr.SaveControl);
#endinitclip
result_txt._visible = false;
stop();
Symbol 660 MovieClip [SaveControl] Frame 14
title_txt.restrict = "a-zA-Z0-9";
header_txt.text = header;
title_txt.text = title;
Symbol 660 MovieClip [SaveControl] Frame 16
stop();
Symbol 660 MovieClip [SaveControl] Frame 23
result_txt._visible = true;
Symbol 660 MovieClip [SaveControl] Frame 24
result_txt._visible = false;
Symbol 660 MovieClip [SaveControl] Frame 25
result_txt._visible = true;
Symbol 660 MovieClip [SaveControl] Frame 26
result_txt._visible = false;
Symbol 660 MovieClip [SaveControl] Frame 27
result_txt._visible = true;
Symbol 660 MovieClip [SaveControl] Frame 28
result_txt._visible = false;
Symbol 660 MovieClip [SaveControl] Frame 29
result_txt._visible = true;
Symbol 660 MovieClip [SaveControl] Frame 44
result_txt._visible = false;
Symbol 660 MovieClip [SaveControl] Frame 51
Symbol 667 MovieClip Frame 1
stop();
Symbol 670 MovieClip Frame 1
stop();
Instance of Symbol 667 MovieClip "ne_mc" in Symbol 670 MovieClip Frame 1
on (press) {
_parent._parent.parent.setDirection("ne");
}
Instance of Symbol 667 MovieClip "se_mc" in Symbol 670 MovieClip Frame 1
on (press) {
_parent._parent.parent.setDirection("se");
}
Instance of Symbol 667 MovieClip "e_mc" in Symbol 670 MovieClip Frame 1
on (press) {
_parent._parent.parent.setDirection("e");
}
Instance of Symbol 667 MovieClip "nw_mc" in Symbol 670 MovieClip Frame 1
on (press) {
_parent._parent.parent.setDirection("nw");
}
Instance of Symbol 667 MovieClip "sw_mc" in Symbol 670 MovieClip Frame 1
on (press) {
_parent._parent.parent.setDirection("sw");
}
Instance of Symbol 667 MovieClip "w_mc" in Symbol 670 MovieClip Frame 1
on (press) {
_parent._parent.parent.setDirection("w");
}
Instance of Symbol 667 MovieClip "n_mc" in Symbol 670 MovieClip Frame 1
on (press) {
_parent._parent.parent.setDirection("n");
}
Instance of Symbol 667 MovieClip "s_mc" in Symbol 670 MovieClip Frame 1
on (press) {
_parent._parent.parent.setDirection("s");
}
Symbol 675 MovieClip [RailConnection] Frame 1
stop();
Symbol 676 MovieClip [Sounds] Frame 1
#initclip 279
Object.registerClass("Sounds", rr.Sounds);
#endinitclip
Symbol 677 MovieClip [Stage] Frame 1
#initclip 280
Object.registerClass("Stage", rr.Stage);
#endinitclip
Symbol 693 MovieClip [DamageMeter] Frame 1
#initclip 281
Object.registerClass("DamageMeter", rr.control.Damage);
#endinitclip
Symbol 707 MovieClip [Fuel meter] Frame 1
#initclip 282
Object.registerClass("Fuel meter", rr.control.FuelMeter);
#endinitclip
Symbol 723 MovieClip [Green Light] Frame 1
#initclip 283
Object.registerClass("Green Light", rr.control.SpeedLight);
#endinitclip
stop();
Symbol 723 MovieClip [Green Light] Frame 2
stop();
Symbol 723 MovieClip [Green Light] Frame 15
gotoAndPlay ("blink");
Symbol 731 MovieClip [Red light] Frame 1
#initclip 284
Object.registerClass("Red light", rr.control.SpeedLight);
#endinitclip
stop();
Symbol 731 MovieClip [Red light] Frame 2
stop();
Symbol 731 MovieClip [Red light] Frame 15
gotoAndPlay ("blink");
Symbol 739 MovieClip [Orange light] Frame 1
#initclip 285
Object.registerClass("Orange light", rr.control.SpeedLight);
#endinitclip
stop();
Symbol 739 MovieClip [Orange light] Frame 2
stop();
Symbol 739 MovieClip [Orange light] Frame 15
gotoAndPlay ("blink");
Instance of Symbol 723 MovieClip [Green Light] "light6_mc" in Symbol 740 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
speedref = 6;
}
Instance of Symbol 731 MovieClip [Red light] "light0_mc" in Symbol 740 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
speedref = 0;
}
Instance of Symbol 723 MovieClip [Green Light] "light5_mc" in Symbol 740 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
speedref = 5;
}
Instance of Symbol 723 MovieClip [Green Light] "light4_mc" in Symbol 740 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
speedref = 4;
}
Instance of Symbol 723 MovieClip [Green Light] "light3_mc" in Symbol 740 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
speedref = 3;
}
Instance of Symbol 723 MovieClip [Green Light] "light2_mc" in Symbol 740 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
speedref = 2;
}
Instance of Symbol 723 MovieClip [Green Light] "light1_mc" in Symbol 740 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
speedref = 1;
}
Instance of Symbol 739 MovieClip [Orange light] "light-2_mc" in Symbol 740 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
speedref = -2;
}
Instance of Symbol 739 MovieClip [Orange light] "light-1_mc" in Symbol 740 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
speedref = -1;
}
Instance of Symbol 739 MovieClip [Orange light] "light-3_mc" in Symbol 740 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
speedref = -3;
}
Symbol 793 MovieClip [CompoundMenu] Frame 1
#initclip 286
Object.registerClass("CompoundMenu", rr.control.CompoundMenu);
#endinitclip
Symbol 795 MovieClip [DisabledMenu] Frame 1
#initclip 287
Object.registerClass("DisabledMenu", rr.control.DisabledMenu);
#endinitclip
Symbol 828 MovieClip [Card Small Fast Cannon] Frame 1
#initclip 288
Object.registerClass("Card Small Fast Cannon", rr.control.TabCardWeapon);
#endinitclip
Symbol 837 MovieClip [Card RocketLauncher] Frame 1
#initclip 289
Object.registerClass("Card RocketLauncher", rr.control.TabCardWeapon);
#endinitclip
Symbol 848 Button
on (press) {
_root.gotoAndStop("buyfull");
}
Symbol 853 MovieClip Frame 1
stop();
Instance of Symbol 253 MovieClip [Card BulpFrog] in Symbol 853 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "BulpFrog";
}
Instance of Symbol 828 MovieClip [Card Small Fast Cannon] in Symbol 853 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "SmallFastCannon";
}
Instance of Symbol 837 MovieClip [Card RocketLauncher] in Symbol 853 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "RocketLauncher";
}
Symbol 858 Button
on (press) {
gotoAndStop (2);
}
Symbol 901 MovieClip Frame 1
stop();
Symbol 901 MovieClip Frame 30
gotoAndPlay (1);
Symbol 905 MovieClip [HighScoreTG] Frame 1
#initclip 290
Object.registerClass("HighScoreTG", rr.HighScoreTG);
#endinitclip
Symbol 906 MovieClip [LevelResult] Frame 1
#initclip 291
Object.registerClass("LevelResult", rr.control.LevelResult);
#endinitclip
Symbol 919 MovieClip [TrainBuild] Frame 1
#initclip 292
Object.registerClass("TrainBuild", rr.control.TrainBuild);
#endinitclip
Symbol 961 MovieClip [SelectBox] Frame 1
#initclip 293
Object.registerClass("SelectBox", rr.control.SelectBox);
#endinitclip
Symbol 967 Button
on (press) {
showTab("selectweapon");
}
Symbol 972 Button
on (press) {
showTab("selectwagon");
}
Symbol 977 Button
on (press) {
showTab("selecttrain");
}
Symbol 1016 MovieClip [Card Huge Cannon] Frame 1
#initclip 294
Object.registerClass("Card Huge Cannon", rr.control.TabCardWagon);
#endinitclip
Symbol 1023 MovieClip [Card EMP] Frame 1
#initclip 295
Object.registerClass("Card EMP", rr.control.TabCardWeapon);
#endinitclip
Symbol 1030 MovieClip [Card Large Cannon] Frame 1
#initclip 296
Object.registerClass("Card Large Cannon", rr.control.TabCardWeapon);
#endinitclip
Symbol 1037 MovieClip [Card BunkerBuster] Frame 1
#initclip 297
Object.registerClass("Card BunkerBuster", rr.control.TabCardWeapon);
#endinitclip
Symbol 1043 MovieClip [Card RailRockets] Frame 1
#initclip 298
Object.registerClass("Card RailRockets", rr.control.TabCardWeapon);
#endinitclip
Symbol 1052 MovieClip [Card Medium Cannon] Frame 1
#initclip 299
Object.registerClass("Card Medium Cannon", rr.control.TabCardWeapon);
#endinitclip
Symbol 1059 MovieClip [Card Small Cannon] Frame 1
#initclip 300
Object.registerClass("Card Small Cannon", rr.control.TabCardWeapon);
#endinitclip
Symbol 1060 MovieClip [WeaponSelect] Frame 1
#initclip 301
Object.registerClass("WeaponSelect", rr.control.WeaponSelect);
#endinitclip
Instance of Symbol 1016 MovieClip [Card Huge Cannon] "HC_mc" in Symbol 1060 MovieClip [WeaponSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "HugeCannon";
}
Instance of Symbol 1023 MovieClip [Card EMP] "EMP_mc" in Symbol 1060 MovieClip [WeaponSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "EMP";
}
Instance of Symbol 1030 MovieClip [Card Large Cannon] "LC_mc" in Symbol 1060 MovieClip [WeaponSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "LargeCannon";
}
Instance of Symbol 1037 MovieClip [Card BunkerBuster] "BB_mc" in Symbol 1060 MovieClip [WeaponSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "BunkerBuster";
}
Instance of Symbol 1043 MovieClip [Card RailRockets] "RR_mc" in Symbol 1060 MovieClip [WeaponSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "RailRockets";
}
Instance of Symbol 837 MovieClip [Card RocketLauncher] "RL_mc" in Symbol 1060 MovieClip [WeaponSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "RocketLauncher";
}
Instance of Symbol 828 MovieClip [Card Small Fast Cannon] "SFC_mc" in Symbol 1060 MovieClip [WeaponSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "SmallFastCannon";
}
Instance of Symbol 1052 MovieClip [Card Medium Cannon] "MC_mc" in Symbol 1060 MovieClip [WeaponSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "MediumCannon";
}
Instance of Symbol 1059 MovieClip [Card Small Cannon] "SC_mc" in Symbol 1060 MovieClip [WeaponSelect] Frame 1
//component parameters
onClipEvent (construct) {
linkId = "SmallCannon";
}
Symbol 1067 MovieClip [BuildMenu] Frame 1
#initclip 302
Object.registerClass("BuildMenu", rr.control.BuildMenu);
#endinitclip
stop();
Symbol 1067 MovieClip [BuildMenu] Frame 36
stop();
Symbol 1067 MovieClip [BuildMenu] Frame 49
afterCloseTab();
Symbol 1067 MovieClip [BuildMenu] Frame 70
stop();
Symbol 1067 MovieClip [BuildMenu] Frame 83
afterCloseTab();
Symbol 1067 MovieClip [BuildMenu] Frame 101
stop();
Symbol 1067 MovieClip [BuildMenu] Frame 115
afterCloseTab();
Symbol 1077 MovieClip Frame 1
stop();
Symbol 1078 MovieClip [Guide] Frame 1
#initclip 303
Object.registerClass("Guide", rr.Guide);
#endinitclip
Symbol 1079 MovieClip [Control] Frame 1
#initclip 304
Object.registerClass("Control", rr.control.Control);
#endinitclip
Symbol 1080 MovieClip [Game] Frame 1
#initclip 305
Object.registerClass("Game", rr.Game);
#endinitclip
Symbol 1109 MovieClip Frame 1
stop();
Symbol 1134 MovieClip [AmmoFockeWolf1] Frame 6
stop();
Symbol 1135 MovieClip [AmmoFockeWolf2] Frame 6
stop();
Symbol 1182 MovieClip Frame 24
stop();
Symbol 1183 MovieClip [AmmoPotTank] Frame 13
stop();
Symbol 1184 MovieClip [AmmoPanther] Frame 13
stop();
Symbol 1185 MovieClip [AmmoAbrahams] Frame 25
stop();
Symbol 1186 MovieClip [AmmoElephant] Frame 25
stop();
Symbol 1211 MovieClip Frame 13
stop();
Symbol 1212 MovieClip [AmmoC47] Frame 32
stop();
Symbol 1247 MovieClip Frame 18
stop();
Symbol 1248 MovieClip [AmmoBasilisk] Frame 25
stop();
Symbol 1249 MovieClip [AmmoGatlingSingle] Frame 20
stop();
Symbol 1250 MovieClip [AmmoGatlingDouble] Frame 15
stop();
Symbol 1251 MovieClip [AmmoOldJeep] Frame 13
stop();
Symbol 1272 MovieClip Frame 11
stop();
Symbol 1273 MovieClip [AmmoGunTruck] Frame 13
stop();
Symbol 1298 MovieClip Frame 13
stop();
Symbol 1299 MovieClip [AmmoArmoredJeep] Frame 15
stop();
Symbol 1300 MovieClip [AmmoBunker] Frame 25
stop();
Symbol 1305 MovieClip Frame 1
gotoAndStop(_global.map.maptype);
stop();
Symbol 1318 MovieClip [Aim] Frame 1
stop();
Symbol 1318 MovieClip [Aim] Frame 2
stop();
Symbol 1318 MovieClip [Aim] Frame 3
stop();
Symbol 1327 MovieClip [AmmoSaddleTank] Frame 1
stop();
Symbol 1327 MovieClip [AmmoSaddleTank] Frame 5
stop();
Symbol 1328 MovieClip [AmmoMediumCannon] Frame 1
stop();
Symbol 1328 MovieClip [AmmoMediumCannon] Frame 5
stop();
Symbol 1331 MovieClip [damage_saddletank] Frame 1
#initclip 306
Object.registerClass("damage_saddletank", rr.control.DamageClip);
#endinitclip
Symbol 1334 MovieClip [damage_bulpfrog] Frame 1
#initclip 307
Object.registerClass("damage_bulpfrog", rr.control.DamageClip);
#endinitclip
Symbol 1337 MovieClip [damage_passenger] Frame 1
#initclip 308
Object.registerClass("damage_passenger", rr.control.DamageClip);
#endinitclip
Symbol 1340 MovieClip [damage_colecart] Frame 1
#initclip 309
Object.registerClass("damage_colecart", rr.control.DamageClip);
#endinitclip
Symbol 1343 MovieClip [damage_powergenerator] Frame 1
#initclip 310
Object.registerClass("damage_powergenerator", rr.control.DamageClip);
#endinitclip
Symbol 1346 MovieClip [damage_smallcannon] Frame 1
#initclip 311
Object.registerClass("damage_smallcannon", rr.control.DamageClip);
#endinitclip
Symbol 1349 MovieClip [damage_rocketlauncher] Frame 1
#initclip 312
Object.registerClass("damage_rocketlauncher", rr.control.DamageClip);
#endinitclip
Symbol 1352 MovieClip [damage_smallfastcannon] Frame 1
#initclip 313
Object.registerClass("damage_smallfastcannon", rr.control.DamageClip);
#endinitclip
Symbol 1355 MovieClip [damage_oiltank] Frame 1
#initclip 314
Object.registerClass("damage_oiltank", rr.control.DamageClip);
#endinitclip
Symbol 1358 MovieClip [damage_fueltank] Frame 1
#initclip 315
Object.registerClass("damage_fueltank", rr.control.DamageClip);
#endinitclip
Symbol 1361 MovieClip [damage_mediumcannon] Frame 1
#initclip 316
Object.registerClass("damage_mediumcannon", rr.control.DamageClip);
#endinitclip
Symbol 1364 MovieClip [damage_wagon1] Frame 1
#initclip 317
Object.registerClass("damage_wagon1", rr.control.DamageClip);
#endinitclip
Symbol 1367 MovieClip [damage_tanktrailer] Frame 1
#initclip 318
Object.registerClass("damage_tanktrailer", rr.control.DamageClip);
#endinitclip
Symbol 1369 MovieClip [damage_wagon2] Frame 1
#initclip 319
Object.registerClass("damage_wagon2", rr.control.DamageClip);
#endinitclip
Symbol 1370 MovieClip [AmmoSmallCannon] Frame 1
stop();
Symbol 1370 MovieClip [AmmoSmallCannon] Frame 5
stop();
Symbol 1371 MovieClip [AmmoSmallFastCannon] Frame 1
stop();
Symbol 1371 MovieClip [AmmoSmallFastCannon] Frame 5
stop();
Symbol 1378 MovieClip [Compound] Frame 1
stop();
Symbol 1378 MovieClip [Compound] Frame 2
stop();
Symbol 1378 MovieClip [Compound] Frame 3
stop();
Symbol 1378 MovieClip [Compound] Frame 4
stop();
Symbol 1378 MovieClip [Compound] Frame 5
stop();
Symbol 1378 MovieClip [Compound] Frame 6
stop();
Symbol 1384 MovieClip [AmmoBulpFrog] Frame 1
stop();
Symbol 1384 MovieClip [AmmoBulpFrog] Frame 5
stop();
Symbol 1385 MovieClip [MapStage] Frame 1
#initclip 320
Object.registerClass("MapStage", cr.map.MapStage);
#endinitclip
Symbol 1386 MovieClip [LevelStage] Frame 1
#initclip 321
Object.registerClass("LevelStage", cr.level.LevelStage);
#endinitclip
Symbol 1423 Button
on (press) {
_global.railcontrol.toggleSwitch();
}
Symbol 1428 Button
on (press) {
_global.railcontrol.toggleSwitch();
}
Symbol 1468 MovieClip [MiniMapCreate] Frame 1
#initclip 322
Object.registerClass("MiniMapCreate", cr.MiniMap);
#endinitclip
Symbol 1469 MovieClip [RailControl] Frame 1
#initclip 323
Object.registerClass("RailControl", cr.map.RailControl);
#endinitclip
Symbol 1490 MovieClip Frame 1
stop();
Symbol 1560 MovieClip [EnemySelectorLeft] Frame 1
#initclip 324
Object.registerClass("EnemySelectorLeft", cr.level.EnemySelector);
#endinitclip
Symbol 1564 MovieClip [EnemySelector] Frame 1
#initclip 325
Object.registerClass("EnemySelector", cr.level.EnemySelector);
#endinitclip
Instance of Symbol 1560 MovieClip [EnemySelectorLeft] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "ArmoredJeep";
type = "left";
}
Instance of Symbol 1564 MovieClip [EnemySelector] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Basilisk";
type = "right";
}
Instance of Symbol 1560 MovieClip [EnemySelectorLeft] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "GunTruck";
type = "left";
}
Instance of Symbol 1560 MovieClip [EnemySelectorLeft] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "OldJeep";
type = "left";
}
Instance of Symbol 1560 MovieClip [EnemySelectorLeft] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "PotTank";
type = "left";
}
Instance of Symbol 1564 MovieClip [EnemySelector] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "GatlingSingle";
type = "right";
}
Instance of Symbol 1564 MovieClip [EnemySelector] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "GatlingDouble";
type = "right";
}
Instance of Symbol 1564 MovieClip [EnemySelector] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Abrahams";
type = "right";
}
Instance of Symbol 1560 MovieClip [EnemySelectorLeft] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Elephant";
type = "left";
}
Instance of Symbol 1564 MovieClip [EnemySelector] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "BullDozer";
type = "right";
}
Instance of Symbol 1560 MovieClip [EnemySelectorLeft] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Panther";
type = "left";
}
Instance of Symbol 1564 MovieClip [EnemySelector] in Symbol 1565 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Rocketeer";
type = "right";
}
Symbol 1571 MovieClip [AirUnitSelector] Frame 1
#initclip 326
Object.registerClass("AirUnitSelector", cr.level.AirUnitSelector);
#endinitclip
Instance of Symbol 1571 MovieClip [AirUnitSelector] in Symbol 1572 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "FockeWolf";
}
Instance of Symbol 1571 MovieClip [AirUnitSelector] in Symbol 1572 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "MesserSchmidt";
}
Instance of Symbol 1571 MovieClip [AirUnitSelector] in Symbol 1572 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "WartHog";
}
Instance of Symbol 1571 MovieClip [AirUnitSelector] in Symbol 1572 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "C47";
}
Instance of Symbol 1571 MovieClip [AirUnitSelector] in Symbol 1572 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "B2";
}
Instance of Symbol 1571 MovieClip [AirUnitSelector] in Symbol 1572 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "BellHuey";
}
Instance of Symbol 1571 MovieClip [AirUnitSelector] in Symbol 1572 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
linkId = "Apache";
}
Symbol 1573 MovieClip [LevelControl] Frame 1
#initclip 327
Object.registerClass("LevelControl", cr.level.LevelControl);
#endinitclip
Symbol 1578 Button
on (press) {
gotoAndPlay ("newlevel");
}
Symbol 1579 Button
on (press) {
gotoAndPlay ("loadlevel");
}
Symbol 1584 Button
on (press) {
gotoAndPlay ("newmap");
}
Symbol 1585 Button
on (press) {
gotoAndPlay ("loadmap");
}
Symbol 1603 Button
on (press) {
clickedbut = "newlevel";
gotoAndPlay ("loadmapclose");
}
Symbol 1604 Button
on (press) {
clickedbut = "loadlevel";
gotoAndPlay ("loadmapclose");
}
Symbol 1605 Button
on (press) {
clickedbut = "newmap";
gotoAndPlay ("loadmapclose");
}
Symbol 1621 Button
on (press) {
clickedbut = "newlevel";
gotoAndPlay ("newmapclose");
}
Symbol 1622 Button
on (press) {
clickedbut = "loadlevel";
gotoAndPlay ("newmapclose");
}
Symbol 1625 Button
on (press) {
clickedbut = "loadmap";
gotoAndPlay ("newmapclose");
}
Symbol 1637 Button
on (press) {
clickedbut = "newlevel";
gotoAndPlay ("loadlevelclose");
}
Symbol 1639 Button
on (press) {
clickedbut = "newmap";
gotoAndPlay ("loadlevelclose");
}
Symbol 1640 Button
on (press) {
clickedbut = "loadmap";
gotoAndPlay ("loadlevelclose");
}
Symbol 1653 Button
on (press) {
clickedbut = "loadlevel";
gotoAndPlay ("newlevelclose");
}
Symbol 1654 Button
on (press) {
clickedbut = "newmap";
gotoAndPlay ("newlevelclose");
}
Symbol 1655 Button
on (press) {
clickedbut = "loadmap";
gotoAndPlay ("newlevelclose");
}
Symbol 1662 MovieClip Frame 1
stop();
Symbol 1662 MovieClip Frame 5
_global.createaction = "loadmap";
Symbol 1662 MovieClip Frame 24
stop();
Symbol 1662 MovieClip Frame 38
if (clickedbut == "newmap") {
gotoAndPlay ("newmap");
} else if (clickedbut == "loadlevel") {
gotoAndPlay ("loadlevel");
} else if (clickedbut == "newlevel") {
gotoAndPlay ("newlevel");
}
Symbol 1662 MovieClip Frame 56
stop();
Symbol 1662 MovieClip Frame 67
if (clickedbut == "loadmap") {
gotoAndPlay ("loadmap");
} else if (clickedbut == "loadlevel") {
gotoAndPlay ("loadlevel");
} else if (clickedbut == "newlevel") {
gotoAndPlay ("newlevel");
}
Symbol 1662 MovieClip Frame 83
stop();
Symbol 1662 MovieClip Frame 99
if (clickedbut == "loadmap") {
gotoAndPlay ("loadmap");
} else if (clickedbut == "newmap") {
gotoAndPlay ("newmap");
} else if (clickedbut == "newlevel") {
gotoAndPlay ("newlevel");
}
Symbol 1662 MovieClip Frame 100
_global.createaction = "newlevel";
Symbol 1662 MovieClip Frame 115
stop();
Symbol 1662 MovieClip Frame 124
if (clickedbut == "loadmap") {
gotoAndPlay ("loadmap");
} else if (clickedbut == "newmap") {
gotoAndPlay ("newmap");
} else if (clickedbut == "loadlevel") {
gotoAndPlay ("loadlevel");
}
Symbol 1674 MovieClip [DemoAlert] Frame 1
#initclip 328
Object.registerClass("DemoAlert", rr.DemoAlert);
#endinitclip
Symbol 1675 MovieClip [CreateControl] Frame 1
#initclip 329
Object.registerClass("CreateControl", cr.CreateControl);
#endinitclip
stop();
Symbol 1685 MovieClip Frame 1
stop();
Symbol 1686 MovieClip [RailSwitch] Frame 1
stop();
Symbol 1706 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 1706 MovieClip Frame 3
nightglow_mc._visible = _global.map.nightmap;
Symbol 1767 MovieClip Frame 26
stop();
Symbol 1768 MovieClip [SaddleTank] Frame 1
stop();
Symbol 1768 MovieClip [SaddleTank] Frame 32
stop();
Symbol 1804 MovieClip Frame 17
stop();
Symbol 1805 MovieClip [Wagon2] Frame 1
stop();
Symbol 1805 MovieClip [Wagon2] Frame 23
stop();
Symbol 1809 MovieClip [Wagon1] Frame 1
stop();
Symbol 1809 MovieClip [Wagon1] Frame 23
stop();
Symbol 1859 MovieClip Frame 24
stop();
Symbol 1860 MovieClip [ColeCart] Frame 1
stop();
Symbol 1860 MovieClip [ColeCart] Frame 30
stop();
Symbol 1910 MovieClip Frame 24
stop();
Symbol 1911 MovieClip [OilTank] Frame 1
stop();
Symbol 1911 MovieClip [OilTank] Frame 30
stop();
Symbol 1963 MovieClip Frame 25
stop();
Symbol 1964 MovieClip [Passenger] Frame 1
stop();
Symbol 1964 MovieClip [Passenger] Frame 35
stop();
Symbol 1968 MovieClip [FuelTank] Frame 1
stop();
Symbol 1968 MovieClip [FuelTank] Frame 31
stop();
Symbol 2018 MovieClip Frame 24
stop();
Symbol 2019 MovieClip [ABomb] Frame 1
stop();
Symbol 2019 MovieClip [ABomb] Frame 40
stop();
Symbol 2023 MovieClip [PowerGenerator] Frame 1
stop();
Symbol 2023 MovieClip [PowerGenerator] Frame 40
stop();
Symbol 2067 MovieClip Frame 21
stop();
Symbol 2068 MovieClip [TankTrailer] Frame 1
stop();
Symbol 2068 MovieClip [TankTrailer] Frame 30
stop();
Symbol 2136 MovieClip Frame 33
stop();
Symbol 2137 MovieClip [PassengerArmored] Frame 1
stop();
Symbol 2137 MovieClip [PassengerArmored] Frame 40
stop();
Symbol 2146 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2146 MovieClip Frame 3
nightglow_mc._visible = _global.map.nightmap;
Symbol 2195 MovieClip Frame 25
stop();
Symbol 2196 MovieClip [MediumCannon] Frame 1
stop();
Symbol 2196 MovieClip [MediumCannon] Frame 35
stop();
Symbol 2204 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2204 MovieClip Frame 3
nightglow_mc._visible = _global.map.nightmap;
Symbol 2269 MovieClip Frame 33
stop();
Symbol 2270 MovieClip [SmallCannon] Frame 1
stop();
Symbol 2270 MovieClip [SmallCannon] Frame 40
parent.destroy();
stop();
Symbol 2278 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2278 MovieClip Frame 3
nightglow_mc._visible = _global.map.nightmap;
Symbol 2279 MovieClip [SmallFastCannon] Frame 1
stop();
Symbol 2279 MovieClip [SmallFastCannon] Frame 40
parent.destroy();
stop();
Symbol 2283 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2283 MovieClip Frame 2
nightglow_mc._visible = _global.map.nightmap;
Symbol 2283 MovieClip Frame 7
nightglow_mc._visible = _global.map.nightmap;
Symbol 2284 MovieClip [RocketLauncher] Frame 1
stop();
Symbol 2284 MovieClip [RocketLauncher] Frame 40
parent.destroy();
stop();
Symbol 2296 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2296 MovieClip Frame 3
nightglow_mc._visible = _global.map.nightmap;
Symbol 2304 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2304 MovieClip Frame 3
nightglow_mc._visible = _global.map.nightmap;
Symbol 2305 MovieClip [BulpFrog] Frame 1
stop();
Symbol 2305 MovieClip [BulpFrog] Frame 31
stop();
Symbol 2308 MovieClip [SmokeTrail] Frame 1
onEnterFrame = function () {
_x = (x - _global.camera.left);
_y = (y - _global.camera.top);
};
Symbol 2308 MovieClip [SmokeTrail] Frame 6
this.removeMovieClip();
Symbol 2367 MovieClip Frame 1
stop();
Symbol 2367 MovieClip Frame 5
Symbol 2370 MovieClip Frame 1
stop();
Symbol 2370 MovieClip Frame 5
Symbol 2372 MovieClip [FockeWolf] Frame 1
stop();
Symbol 2372 MovieClip [FockeWolf] Frame 30
stop();
Symbol 2407 MovieClip [C47] Frame 1
stop();
Symbol 2407 MovieClip [C47] Frame 30
stop();
Symbol 2418 MovieClip Frame 1
stop();
Symbol 2418 MovieClip Frame 2
stop();
Symbol 2418 MovieClip Frame 3
stop();
Symbol 2418 MovieClip Frame 4
stop();
Symbol 2418 MovieClip Frame 5
stop();
Symbol 2418 MovieClip Frame 6
stop();
Symbol 2419 MovieClip [AirField] Frame 1
stop();
Symbol 2419 MovieClip [AirField] Frame 37
stop();
Symbol 2424 MovieClip Frame 1
gotoAndStop(_global.map.maptype);
stop();
Symbol 2429 MovieClip Frame 1
gotoAndStop(_global.map.maptype);
stop();
Symbol 2430 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2437 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2437 MovieClip Frame 2
nightglow_mc._visible = _global.map.nightmap;
Symbol 2438 MovieClip [Pottank] Frame 1
stop();
Symbol 2438 MovieClip [Pottank] Frame 35
stop();
Symbol 2443 MovieClip Frame 1
stop();
Symbol 2446 MovieClip Frame 1
stop();
Symbol 2451 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2451 MovieClip Frame 2
base_mc.gotoAndPlay("shoot");
Symbol 2451 MovieClip Frame 3
nightglow_mc._visible = _global.map.nightmap;
Symbol 2452 MovieClip [Basilisk] Frame 1
stop();
Symbol 2452 MovieClip [Basilisk] Frame 20
stop();
Symbol 2452 MovieClip [Basilisk] Frame 21
stop();
Symbol 2457 MovieClip Frame 1
gotoAndStop(_global.map.maptype);
stop();
Symbol 2465 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2465 MovieClip Frame 2
nightglow_mc._visible = _global.map.nightmap;
Symbol 2466 MovieClip [OldJeep] Frame 1
stop();
Symbol 2466 MovieClip [OldJeep] Frame 31
stop();
Symbol 2471 MovieClip Frame 1
gotoAndStop(_global.map.maptype);
stop();
Symbol 2475 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2480 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2480 MovieClip Frame 2
base_mc.gotoAndPlay("shoot");
nightglow_mc._visible = _global.map.nightmap;
Symbol 2481 MovieClip [GunTruck] Frame 1
stop();
Symbol 2481 MovieClip [GunTruck] Frame 37
stop();
Symbol 2486 MovieClip Frame 1
gotoAndStop(_global.map.maptype);
stop();
Symbol 2490 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2495 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2495 MovieClip Frame 2
nightglow_mc._visible = _global.map.nightmap;
Symbol 2496 MovieClip [ArmoredJeep] Frame 1
stop();
Symbol 2496 MovieClip [ArmoredJeep] Frame 26
stop();
Symbol 2501 MovieClip Frame 1
gotoAndStop(_global.map.maptype);
stop();
Symbol 2502 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2507 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2507 MovieClip Frame 2
nightglow_mc._visible = _global.map.nightmap;
Symbol 2508 MovieClip [Elephant] Frame 1
stop();
Symbol 2508 MovieClip [Elephant] Frame 40
stop();
Symbol 2513 MovieClip Frame 1
gotoAndStop(_global.map.maptype);
stop();
Symbol 2514 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2519 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2519 MovieClip Frame 2
nightglow_mc._visible = _global.map.nightmap;
Symbol 2520 MovieClip [Panther] Frame 1
stop();
Symbol 2520 MovieClip [Panther] Frame 40
stop();
Symbol 2529 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2529 MovieClip Frame 3
nightglow_mc._visible = _global.map.nightmap;
Symbol 2530 MovieClip [Bunker] Frame 1
stop();
Symbol 2530 MovieClip [Bunker] Frame 30
stop();
Symbol 2545 MovieClip Frame 1
stop();
Symbol 2545 MovieClip Frame 9
stop();
Symbol 2545 MovieClip Frame 23
stop();
Symbol 2546 MovieClip [BullDozer] Frame 1
stop();
Symbol 2546 MovieClip [BullDozer] Frame 31
stop();
Symbol 2551 MovieClip Frame 1
gotoAndStop(_global.map.maptype);
stop();
Symbol 2556 MovieClip Frame 1
gotoAndStop(_global.map.maptype);
stop();
Symbol 2557 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2562 MovieClip Frame 1
_parent.parent.checkNightMode();
stop();
Symbol 2562 MovieClip Frame 2
nightglow_mc._visible = _global.map.nightmap;
Symbol 2563 MovieClip [Abrahams] Frame 1
stop();
Symbol 2563 MovieClip [Abrahams] Frame 35
stop();
Symbol 2571 MovieClip [Heatseeker] Frame 1
if (parent.status != "exploded") {
stop();
}
Symbol 2571 MovieClip [Heatseeker] Frame 31
stop();
Symbol 2573 MovieClip [AmmoBellHuey] Frame 1
if (parent.status != "exploded") {
stop();
}
Symbol 2573 MovieClip [AmmoBellHuey] Frame 31
stop();
Symbol 2604 MovieClip Frame 1
_parent._parent.parent.checkNightMode();
_parent._parent._parent.parent.checkNightMode();
stop();
Symbol 2611 MovieClip Frame 1
stop();
Symbol 2612 MovieClip [GatlingSingle] Frame 1
stop();
Symbol 2612 MovieClip [GatlingSingle] Frame 30
stop();
Symbol 2615 MovieClip [GatlingDouble] Frame 1
stop();
Symbol 2615 MovieClip [GatlingDouble] Frame 30
stop();
Symbol 2627 MovieClip Frame 23
gotoAndPlay (1);
Symbol 2777 MovieClip [DropPassenger] Frame 1
stop();
Symbol 2777 MovieClip [DropPassenger] Frame 2
stop();
Symbol 2780 MovieClip [DropPassengerArmored] Frame 1
stop();
Symbol 2780 MovieClip [DropPassengerArmored] Frame 2
stop();
Symbol 2783 MovieClip [DropTankTrailer] Frame 1
stop();
Symbol 2783 MovieClip [DropTankTrailer] Frame 2
stop();
Symbol 2787 MovieClip [DropABomb] Frame 1
stop();
Symbol 2787 MovieClip [DropABomb] Frame 2
stop();
Symbol 2790 MovieClip [DropFuelTank] Frame 1
stop();
Symbol 2790 MovieClip [DropFuelTank] Frame 2
stop();
Symbol 2815 MovieClip [Explode04] Frame 13
stop();
Symbol 2862 Button
on (press) {
_global.root.gotoAndStop("startmenu");
}
Symbol 2863 MovieClip [Hangar] Frame 1
#initclip 330
Object.registerClass("Hangar", rr.Hangar);
#endinitclip
Symbol 2926 Button
on (rollOver, dragOver) {
guidetext.gotoAndPlay("newgame");
}
on (rollOut, dragOut) {
guidetext.gotoAndPlay("welcome");
}
on (press) {
_global.gametype = "new mission";
_parent.gotoAndPlay("game");
}
Symbol 2931 Button
on (rollOver, dragOver) {
guidetext.gotoAndPlay("loadgame");
}
on (rollOut, dragOut) {
guidetext.gotoAndPlay("welcome");
}
Symbol 2936 Button
on (rollOver, dragOver) {
guidetext.gotoAndPlay("createlevel");
}
on (rollOut, dragOut) {
guidetext.gotoAndPlay("welcome");
}
on (press) {
_parent.gotoAndPlay("createlevel");
}
Symbol 2941 Button
on (rollOver, dragOver) {
guidetext.gotoAndPlay("railrage");
}
on (rollOut, dragOut) {
guidetext.gotoAndPlay("welcome");
}
on (press) {
_global.gametype = "railrage";
_parent.gotoAndPlay("loadlevel");
}
Symbol 2946 Button
on (rollOver, dragOver) {
guidetext.gotoAndPlay("hangar");
}
on (rollOut, dragOut) {
guidetext.gotoAndPlay("welcome");
}
on (press) {
_parent.gotoAndPlay("hangar");
}
Symbol 2951 Button
on (rollOver, dragOver) {
guidetext.gotoAndPlay("instructions");
}
on (rollOut, dragOut) {
guidetext.gotoAndPlay("welcome");
}
on (press) {
_parent.gotoAndPlay("instructions");
}
Symbol 2956 Button
on (rollOver, dragOver) {
guidetext.gotoAndPlay("getfullversion");
}
on (rollOut, dragOut) {
guidetext.gotoAndPlay("welcome");
}
on (press) {
_parent.gotoAndPlay("buyfull");
}
Symbol 2961 Button
on (rollOver, dragOver) {
guidetext.gotoAndPlay("playlevel");
}
on (rollOut, dragOut) {
guidetext.gotoAndPlay("welcome");
}
on (press) {
_global.gametype = "custom level";
_parent.gotoAndPlay("loadlevel");
}
Symbol 2966 Button
on (rollOver, dragOver) {
guidetext.gotoAndPlay("playmoregames");
}
on (rollOut, dragOut) {
guidetext.gotoAndPlay("welcome");
}
on (press) {
getURL ("http://www.totallygame.com", "_blank");
}
Symbol 2977 MovieClip Frame 1
stop();
Symbol 2977 MovieClip Frame 2
stop();
Symbol 2977 MovieClip Frame 3
stop();
Symbol 2977 MovieClip Frame 4
stop();
Symbol 2977 MovieClip Frame 5
stop();
Symbol 2977 MovieClip Frame 6
stop();
Symbol 2977 MovieClip Frame 7
stop();
Symbol 2977 MovieClip Frame 8
stop();
Symbol 2977 MovieClip Frame 9
stop();
Symbol 2977 MovieClip Frame 10
stop();
Symbol 2980 Button
on (press) {
getURL ("http://www.totallygame.com", "_blank");
}
Symbol 2985 Button
on (press) {
getURL ("http://www.totallygame.com/productinfo.php?type=game&id=2201", "_blank");
}
Symbol 2989 MovieClip Frame 1
var soMission = SharedObject.getLocal("savedmission");
var sm = soMission.data.savedmission;
if ((sm == undefined) || (sm.levelid < 2)) {
but_continuegame._alpha = 50;
delete but_continuegame.onPress;
} else {
but_continuegame._alpha = 100;
but_continuegame.onPress = function () {
_global.gametype = "loaded mission";
_parent.gotoAndPlay("game");
};
}
stop();
Symbol 3065 MovieClip Frame 1
stop();
Instance of Symbol 723 MovieClip [Green Light] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
speedref = 0;
}
Instance of Symbol 731 MovieClip [Red light] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
speedref = 0;
}
Instance of Symbol 739 MovieClip [Orange light] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
speedref = 0;
}
Instance of Symbol 1564 MovieClip [EnemySelector] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
type = "";
}
Instance of Symbol 1560 MovieClip [EnemySelectorLeft] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
type = "";
}
Instance of Symbol 1571 MovieClip [AirUnitSelector] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 293 MovieClip [Card Oiltank] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 300 MovieClip [Card ColeCart] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 286 MovieClip [Card PowerGenerator] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 307 MovieClip [Card Size4 Wagon] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 2595 MovieClip [Card TankTrailer] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 314 MovieClip [Card Size3 Wagon] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 323 MovieClip [Card Size2 Wagon] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 333 MovieClip [Card Size1 Wagon] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 265 MovieClip [Card SaddleTank] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 253 MovieClip [Card BulpFrog] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 195 MovieClip [Card ICE] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 212 MovieClip [Card SuperChief] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 204 MovieClip [Card Dragon] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 237 MovieClip [Card Rhino] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 229 MovieClip [Card Loewy] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 221 MovieClip [Card Pennsylvania] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 1023 MovieClip [Card EMP] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 1043 MovieClip [Card RailRockets] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 1016 MovieClip [Card Huge Cannon] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 1030 MovieClip [Card Large Cannon] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 1037 MovieClip [Card BunkerBuster] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 1052 MovieClip [Card Medium Cannon] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 1059 MovieClip [Card Small Cannon] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 837 MovieClip [Card RocketLauncher] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Instance of Symbol 828 MovieClip [Card Small Fast Cannon] in Symbol 3065 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
linkId = "";
}
Symbol 3085 MovieClip Frame 1
Symbol 3085 MovieClip Frame 34
stop();
Symbol 3085 MovieClip Frame 52
stop();
Symbol 3140 Button
on (press) {
_global.gametype = "new mission";
_parent.gotoAndPlay("game");
}
Symbol 3141 Button
on (press) {
_global.gametype = "railrage";
_parent.gotoAndPlay("loadlevel");
}
Symbol 3142 Button
on (press) {
_parent.gotoAndPlay("createlevel");
}
Symbol 3162 Button
on (press) {
getURL ("http://www.totallygame.com", "_blank");
}
Symbol 3167 MovieClip Frame 155
stop();
Symbol 3181 Button
on (press) {
gotoAndStop (2);
}
Symbol 3215 Button
on (press) {
gotoAndStop (3);
}
Symbol 3240 Button
on (press) {
gotoAndStop (4);
}
Symbol 3254 Button
on (press) {
gotoAndStop (5);
}
Symbol 3272 Button
on (press) {
gotoAndStop (1);
}
Symbol 3273 MovieClip Frame 1
stop();
Symbol 3273 MovieClip Frame 2
stop();
Symbol 3273 MovieClip Frame 3
stop();
Symbol 3273 MovieClip Frame 4
stop();
Symbol 3273 MovieClip Frame 5
stop();