Frame 1
var YoudaLoader = new YoudaLoader();
stop();
Frame 4
stop();
Frame 6
Stage.showMenu = false;
fscommand ("allowscale", "false");
var game = _root.attachMovie("Game", "Game", 0);
topBorder.swapDepths(52000);
bottomBorder.swapDepths(53000);
rightBorder.swapDepths(54000);
leftBorder.swapDepths(55000);
Symbol 61 MovieClip [dirt] Frame 1
stop();
Symbol 61 MovieClip [dirt] Frame 2
stop();
Symbol 61 MovieClip [dirt] Frame 3
stop();
Symbol 68 MovieClip [paved] Frame 1
stop();
Symbol 68 MovieClip [paved] Frame 2
stop();
Symbol 68 MovieClip [paved] Frame 3
stop();
Symbol 75 MovieClip [cyckling] Frame 1
stop();
Symbol 75 MovieClip [cyckling] Frame 2
stop();
Symbol 75 MovieClip [cyckling] Frame 3
stop();
Symbol 2796 MovieClip [__Packages.YoudaLoader] Frame 0
class YoudaLoader
{
var loaderMc, loadedBar, loadedText, loaderMcWidth, loaderMcHeight;
function YoudaLoader () {
loadMe();
}
function loadMe() {
loaderMc = _root.attachMovie(loaderMcName, loaderMcName, _root.getNextHighestDepth());
loadedBar = loaderMc.percentloaded_bar_mc;
loadedText = loaderMc.loaded_txt;
loadedBar._xscale = 0;
loaderMcWidth = loaderMc._width;
loaderMcHeight = loaderMc._height;
loaderMc._x = (stageWidth / 2) - (loaderMcWidth / 2);
loaderMc._y = (stageHeight / 2) - (loaderMcHeight / 2);
_root.classRef = this;
_root.onEnterFrame = function () {
this.percent = Math.round((this.getBytesLoaded() / this.getBytesTotal()) * 100);
this.classRef.loadedText.text = this.percent.toString() + "%";
if (this.classRef.loadedText._x < 235) {
this.classRef.loadedText._x = this.classRef.loadedBar._x + this.classRef.loadedBar._width;
}
this.classRef.loadedBar._xscale = this.percent;
if (this.percent >= 100) {
this.classRef.loaderMc.removeMovieClip();
this.classRef = undefined;
_root.play();
delete this.onEnterFrame;
}
};
}
var loaderMcName = "gameloader_mc";
var stageWidth = Stage.width;
var stageHeight = Stage.height;
}
Symbol 2797 MovieClip [__Packages.utils.Delegate] Frame 0
class 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);
if (utils.Delegate != undefined) {
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 2798 MovieClip [__Packages.Constants] Frame 0
class Constants
{
function Constants () {
}
static function getObjectPositions(type, rot) {
switch (type) {
case hugeTent :
if (rot == 0) {
return({x:-26, y:-24});
}
if (rot == 90) {
return({x:-48, y:-17});
}
if (rot == 180) {
return({x:-56, y:-51});
}
if (rot == -90) {
return({x:-24, y:-55});
}
case basicBungalow :
if (rot == 0) {
return({x:-24, y:-21});
}
if (rot == 90) {
return({x:-50, y:-24});
}
if (rot == 180) {
return({x:-54, y:-51});
}
if (rot == -90) {
return({x:-23, y:-55});
}
case bigBungalow :
if (rot == 0) {
return({x:-11, y:-18});
}
if (rot == 90) {
return({x:-77, y:-12});
}
if (rot == 180) {
return({x:-68, y:-78});
}
if (rot == -90) {
return({x:-17, y:-67});
}
case normalUnmovableCaravan :
if (rot == 0) {
return({x:-33, y:-65});
}
if (rot == 90) {
return({x:-38, y:-33});
}
if (rot == 180) {
return({x:-71, y:-41});
}
if (rot != -90) {
break;
}
return({x:-64, y:-66});
}
}
static function getDesiredObjectTypes(type) {
var _local1 = new Array();
switch (type) {
case singleTeenager :
_local1.push(basicTent);
_local1.push(largeTent);
_local1.push(familyTent);
_local1.push(hugeTent);
_local1.push(basicBungalow);
_local1.push(bigBungalow);
_local1.push(villaBungalow);
_local1.push(normalCaravanSpot);
_local1.push(bigCaravanSpot);
_local1.push(motorHomeSpot);
_local1.push(bigMotorHomeSpot);
_local1.push(normalUnmovableCaravan);
_local1.push(bigUnmovableCaravan);
_local1.push(tableTennis);
_local1.push(restaurant);
_local1.push(smallSupermarket);
_local1.push(bigSupermarket);
_local1.push(bar);
_local1.push(arcade);
_local1.push(disco);
_local1.push(smallOutdoorPool);
_local1.push(bigOutdoorPool);
_local1.push(footballField);
_local1.push(hugeWaterPark);
break;
case singleAdult :
_local1.push(basicTent);
_local1.push(largeTent);
_local1.push(familyTent);
_local1.push(hugeTent);
_local1.push(basicBungalow);
_local1.push(bigBungalow);
_local1.push(villaBungalow);
_local1.push(normalCaravanSpot);
_local1.push(bigCaravanSpot);
_local1.push(motorHomeSpot);
_local1.push(bigMotorHomeSpot);
_local1.push(normalUnmovableCaravan);
_local1.push(bigUnmovableCaravan);
_local1.push(tableTennis);
_local1.push(restaurant);
_local1.push(smallSupermarket);
_local1.push(bigSupermarket);
_local1.push(bar);
_local1.push(bigOutdoorPool);
_local1.push(footballField);
_local1.push(tennisField);
_local1.push(hugeWaterPark);
break;
case teenageCouple :
_local1.push(basicTent);
_local1.push(largeTent);
_local1.push(familyTent);
_local1.push(hugeTent);
_local1.push(basicBungalow);
_local1.push(bigBungalow);
_local1.push(villaBungalow);
_local1.push(normalCaravanSpot);
_local1.push(bigCaravanSpot);
_local1.push(motorHomeSpot);
_local1.push(bigMotorHomeSpot);
_local1.push(normalUnmovableCaravan);
_local1.push(bigUnmovableCaravan);
_local1.push(arcade);
_local1.push(bar);
_local1.push(smallOutdoorPool);
_local1.push(bigOutdoorPool);
_local1.push(tableTennis);
_local1.push(restaurant);
_local1.push(smallSupermarket);
_local1.push(bigSupermarket);
_local1.push(disco);
_local1.push(footballField);
_local1.push(hugeWaterPark);
break;
case adultCouple :
_local1.push(basicTent);
_local1.push(largeTent);
_local1.push(familyTent);
_local1.push(hugeTent);
_local1.push(basicBungalow);
_local1.push(bigBungalow);
_local1.push(villaBungalow);
_local1.push(normalCaravanSpot);
_local1.push(bigCaravanSpot);
_local1.push(motorHomeSpot);
_local1.push(bigMotorHomeSpot);
_local1.push(normalUnmovableCaravan);
_local1.push(bigUnmovableCaravan);
_local1.push(restaurant);
_local1.push(smallSupermarket);
_local1.push(bigSupermarket);
_local1.push(smallPark);
_local1.push(mediumPark);
_local1.push(bigPark);
_local1.push(tableTennis);
_local1.push(bigOutdoorPool);
_local1.push(footballField);
_local1.push(tennisField);
_local1.push(hugeWaterPark);
break;
case olderCouple :
_local1.push(basicTent);
_local1.push(largeTent);
_local1.push(familyTent);
_local1.push(hugeTent);
_local1.push(basicBungalow);
_local1.push(bigBungalow);
_local1.push(villaBungalow);
_local1.push(normalCaravanSpot);
_local1.push(bigCaravanSpot);
_local1.push(motorHomeSpot);
_local1.push(bigMotorHomeSpot);
_local1.push(normalUnmovableCaravan);
_local1.push(bigUnmovableCaravan);
_local1.push(bingoHall);
_local1.push(tableTennis);
_local1.push(restaurant);
_local1.push(smallSupermarket);
_local1.push(bigSupermarket);
_local1.push(indoorPool);
_local1.push(tennisField);
break;
case teenageThreesome :
_local1.push(largeTent);
_local1.push(familyTent);
_local1.push(hugeTent);
_local1.push(basicBungalow);
_local1.push(bigBungalow);
_local1.push(villaBungalow);
_local1.push(normalCaravanSpot);
_local1.push(bigCaravanSpot);
_local1.push(motorHomeSpot);
_local1.push(bigMotorHomeSpot);
_local1.push(normalUnmovableCaravan);
_local1.push(bigUnmovableCaravan);
_local1.push(arcade);
_local1.push(bar);
_local1.push(disco);
_local1.push(smallOutdoorPool);
_local1.push(bigOutdoorPool);
_local1.push(tableTennis);
_local1.push(restaurant);
_local1.push(smallSupermarket);
_local1.push(bigSupermarket);
_local1.push(footballField);
_local1.push(hugeWaterPark);
break;
case threePersonFamily :
_local1.push(largeTent);
_local1.push(familyTent);
_local1.push(hugeTent);
_local1.push(basicBungalow);
_local1.push(bigBungalow);
_local1.push(villaBungalow);
_local1.push(normalCaravanSpot);
_local1.push(bigCaravanSpot);
_local1.push(motorHomeSpot);
_local1.push(bigMotorHomeSpot);
_local1.push(normalUnmovableCaravan);
_local1.push(bigUnmovableCaravan);
_local1.push(restaurant);
_local1.push(smallSupermarket);
_local1.push(bigSupermarket);
_local1.push(smallPark);
_local1.push(mediumPark);
_local1.push(bigPark);
_local1.push(smallOutdoorPool);
_local1.push(bigOutdoorPool);
_local1.push(playground);
_local1.push(bigPlayarena);
_local1.push(tableTennis);
_local1.push(footballField);
_local1.push(tennisField);
_local1.push(hugeWaterPark);
_local1.push(bar);
break;
case fourPersonFamily :
_local1.push(familyTent);
_local1.push(hugeTent);
_local1.push(basicBungalow);
_local1.push(bigBungalow);
_local1.push(villaBungalow);
_local1.push(bigCaravanSpot);
_local1.push(motorHomeSpot);
_local1.push(bigMotorHomeSpot);
_local1.push(bigUnmovableCaravan);
_local1.push(restaurant);
_local1.push(smallSupermarket);
_local1.push(bigSupermarket);
_local1.push(smallPark);
_local1.push(mediumPark);
_local1.push(bigPark);
_local1.push(smallOutdoorPool);
_local1.push(bigOutdoorPool);
_local1.push(playground);
_local1.push(bigPlayarena);
_local1.push(tableTennis);
_local1.push(footballField);
_local1.push(tennisField);
_local1.push(hugeWaterPark);
_local1.push(bar);
break;
case largeTeenageGroup :
_local1.push(hugeTent);
_local1.push(villaBungalow);
_local1.push(arcade);
_local1.push(bar);
_local1.push(disco);
_local1.push(smallOutdoorPool);
_local1.push(bigOutdoorPool);
_local1.push(tableTennis);
_local1.push(restaurant);
_local1.push(smallSupermarket);
_local1.push(bigSupermarket);
_local1.push(footballField);
_local1.push(hugeWaterPark);
break;
case largeFamilyGroup :
_local1.push(hugeTent);
_local1.push(villaBungalow);
_local1.push(restaurant);
_local1.push(smallSupermarket);
_local1.push(bigSupermarket);
_local1.push(smallPark);
_local1.push(mediumPark);
_local1.push(bigPark);
_local1.push(smallOutdoorPool);
_local1.push(bigOutdoorPool);
_local1.push(playground);
_local1.push(bigPlayarena);
_local1.push(tableTennis);
_local1.push(footballField);
_local1.push(tennisField);
_local1.push(hugeWaterPark);
_local1.push(bar);
}
return(_local1);
}
static function getObjectName(type) {
var _local1;
switch (type) {
case basicTent :
_local1 = "Basic tent";
break;
case largeTent :
_local1 = "Large tent";
break;
case familyTent :
_local1 = "Family tent";
break;
case hugeTent :
_local1 = "Huge tent";
break;
case normalCaravanSpot :
_local1 = "Normal caravan spot";
break;
case bigCaravanSpot :
_local1 = "Big caravan spot";
break;
case motorHomeSpot :
_local1 = "Motorhome spot";
break;
case bigMotorHomeSpot :
_local1 = "Big motorhome spot";
break;
case basicBungalow :
_local1 = "Basic bungalow";
break;
case bigBungalow :
_local1 = "Big bungalow";
break;
case villaBungalow :
_local1 = "Villa bungalow";
break;
case normalUnmovableCaravan :
_local1 = "Unmovable caravan";
break;
case bigUnmovableCaravan :
_local1 = "Big unmovable caravan";
break;
case trashcan :
_local1 = "Trashcan";
break;
case woodenToilet :
_local1 = "Wooden toilet";
break;
case stoneToilet :
_local1 = "Stone toilet";
break;
case stoneToiletShower :
_local1 = "Stone shower toilet";
break;
case bigSanitaryHouse :
_local1 = "Big sanitary house";
break;
case washingMachineUnit :
_local1 = "Washing machine unit";
break;
case allInOneSanitary :
_local1 = "All in one sanitary";
break;
case tableTennis :
_local1 = "Table tennis";
break;
case playground :
_local1 = "Playground";
break;
case bigPlayarena :
_local1 = "Big playarena";
break;
case smallSupermarket :
_local1 = "Small supermarket";
break;
case bigSupermarket :
_local1 = "Big supermarket";
break;
case bingoHall :
_local1 = "Bingo hall";
break;
case restaurant :
_local1 = "Restaurant";
break;
case bar :
_local1 = "Bar";
break;
case arcade :
_local1 = "Arcade";
break;
case disco :
_local1 = "Disco";
break;
case smallOutdoorPool :
_local1 = "Small outdoor pool";
break;
case bigOutdoorPool :
_local1 = "Big outdoor pool";
break;
case indoorPool :
_local1 = "Indoor pool";
break;
case footballField :
_local1 = "Football field";
break;
case tennisField :
_local1 = "Tennis field";
break;
case hugeWaterPark :
_local1 = "Huge water park";
}
return(_local1);
}
static function getGroupName(type) {
switch (type) {
case singleTeenager :
return("Single teenager");
case singleAdult :
return("Single adult");
case teenageCouple :
return("Teenage couple");
case adultCouple :
return("Adult couple");
case olderCouple :
return("Older couple");
case teenageThreesome :
return("Teenage threesome");
case threePersonFamily :
return("3-person family");
case fourPersonFamily :
return("4-person family");
case largeTeenageGroup :
return("Large teenage group");
case largeFamilyGroup :
return("Large family group");
}
}
static var UNMOVABLE_OBJECT = 1;
static var RESERVATION_SPOT = 2;
static var ENTERTAINMENT = 3;
static var SANITARY = 4;
static var PLEASURE = 5;
static var PARKING = 6;
static var RECEPTION = 7;
static var standardReception = 1;
static var normalReception = 2;
static var bigReception = 3;
static var hedge = 4;
static var tree = 5;
static var smallPark = 6;
static var mediumPark = 7;
static var bigPark = 8;
static var campFire = 9;
static var electricalLamp = 10;
static var basicTent = 11;
static var largeTent = 12;
static var familyTent = 13;
static var hugeTent = 14;
static var normalCaravanSpot = 15;
static var bigCaravanSpot = 16;
static var motorHomeSpot = 17;
static var bigMotorHomeSpot = 18;
static var basicBungalow = 19;
static var bigBungalow = 20;
static var villaBungalow = 21;
static var normalUnmovableCaravan = 22;
static var bigUnmovableCaravan = 23;
static var trashcan = 24;
static var woodenToilet = 25;
static var stoneToilet = 26;
static var stoneToiletShower = 27;
static var bigSanitaryHouse = 28;
static var washingMachineUnit = 29;
static var allInOneSanitary = 30;
static var tableTennis = 31;
static var playground = 32;
static var bigPlayarena = 33;
static var smallSupermarket = 34;
static var bigSupermarket = 35;
static var bingoHall = 36;
static var restaurant = 37;
static var bar = 38;
static var arcade = 39;
static var disco = 40;
static var smallOutdoorPool = 41;
static var bigOutdoorPool = 42;
static var indoorPool = 43;
static var footballField = 44;
static var tennisField = 45;
static var hugeWaterPark = 46;
static var dirtParking = 47;
static var pavedParking = 48;
static var asphaltParking = 49;
static var singleTeenager = 1;
static var teenageCouple = 2;
static var teenageThreesome = 3;
static var largeTeenageGroup = 4;
static var singleAdult = 5;
static var adultCouple = 6;
static var threePersonFamily = 7;
static var fourPersonFamily = 8;
static var largeFamilyGroup = 9;
static var olderCouple = 10;
static var teenageLinkIds = ["boy", "girl", "man", "woman"];
static var adultLinkIds = ["midAgeMan", "midAgeWoman"];
static var elderLinkIds = ["oldMan", "oldWoman"];
}
Symbol 2799 MovieClip [__Packages.mcs.MovieClipProps] Frame 0
class mcs.MovieClipProps
{
var linkID, x, y, rot, xscale, yscale, currentFrame, tint, clip, depth;
function MovieClipProps (linkID, x, y, rot, xs, ys) {
this.linkID = linkID;
this.x = x;
this.y = y;
this.rot = rot;
xscale = xs;
yscale = ys;
currentFrame = 1;
tint = 0;
}
function attachClip(target) {
var _local2 = target.translateCameraToStage(x, y);
clip = target.attachMovie(linkID, utils.StringUtils.getUniqueName(), depth, {_x:_local2.x, _y:_local2.y, _rotation:rot});
clip.gotoAndStop(currentFrame);
setTint(tint);
}
function setTint(tnt) {
tint = tnt;
utils.ClipUtils.setTint(clip, 0, tint);
}
function removeClip() {
currentFrame = clip._currentframe;
clip.removeMovieClip();
clip = undefined;
}
function getClip() {
return(clip);
}
}
Symbol 2800 MovieClip [__Packages.utils.StringUtils] Frame 0
class 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 2801 MovieClip [__Packages.utils.ClipUtils] Frame 0
class utils.ClipUtils
{
function ClipUtils () {
}
static function getFreeDepthNum(mc, dep) {
var _local1 = 0;
while (mc.getInstanceAtDepth(dep + _local1)) {
_local1++;
}
return(dep + _local1);
}
static function setTint(mc, rgb, percent) {
var _local1 = new flash.geom.ColorTransform();
var _local4 = new flash.geom.Transform(mc);
var _local6 = rgb >> 16;
var _local7 = (rgb >> 8) & 255;
var _local5 = rgb & 255;
var _local2 = percent / 100;
_local1.redOffset = _local6 * _local2;
_local1.greenOffset = _local7 * _local2;
_local1.blueOffset = _local5 * _local2;
_local1.redMultiplier = (_local1.greenMultiplier = (_local1.blueMultiplier = (100 - percent) / 100));
_local4.colorTransform = _local1;
}
static function setBmpTint(bmp, rgb, percent) {
var _local2 = getTintTransform(rgb, percent);
var _local1 = bmp.clone();
bmp.draw(_local1, new flash.geom.Matrix(), _local2);
_local1.dispose();
}
static function getTintTransform(rgb, percent) {
var _local1 = new flash.geom.ColorTransform();
var _local5 = rgb >> 16;
var _local6 = (rgb >> 8) & 255;
var _local4 = rgb & 255;
var _local2 = percent / 100;
_local1.redOffset = _local5 * _local2;
_local1.greenOffset = _local6 * _local2;
_local1.blueOffset = _local4 * _local2;
_local1.redMultiplier = (_local1.greenMultiplier = (_local1.blueMultiplier = (100 - percent) / 100));
return(_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 2802 MovieClip [__Packages.mcs.Building] Frame 0
class mcs.Building extends mcs.MovieClipProps
{
var depth, _people, _state, teenCoef, adultCoef, oldCoef, overAllIncome, isReserved, buldozerOnStage, isDestroying, level, squares, fireman, repairSound, congradulation, hasAnimation, numOfSquares, kind, _cost, _luxuryPoints, timeToBuild, _visitors, _rent, _type, chance, repairExpence, stormEff, fireEff, floodEff, camperGroup, clip, currentFrame, loader, intervalID, popUp, rot, linkID, bmpWidth, bmpHieght, fireState, setTint, animation, buldozer, x, y, _defaultRent, distruction, construction, flame;
function Building (linkId, x, y, rot, depth) {
super(linkId, x, y, rot);
this.depth = depth;
_people = 0;
_state = 0;
teenCoef = 0;
adultCoef = 0;
oldCoef = 0;
overAllIncome = 0;
isReserved = false;
buldozerOnStage = false;
isDestroying = false;
level = _global.game.LevelClip;
squares = new Array();
fireman = false;
repairSound = false;
congradulation = false;
hasAnimation = false;
}
function setProperties(nos, kind_, cost, lux, ttb, spots, type, rent, chn, repairExpence_) {
numOfSquares = nos;
kind = kind_;
_cost = cost;
_luxuryPoints = lux;
timeToBuild = ttb;
_visitors = spots;
_rent = rent;
_type = type;
chance = chn;
repairExpence = repairExpence_;
}
function setEntertainProperties(teen, adult, old) {
teenCoef = teen;
adultCoef = adult;
oldCoef = old;
}
function setEffectsValues(storm, fire, flood) {
stormEff = storm;
fireEff = fire;
floodEff = flood;
}
function getState() {
return(_state);
}
function setState(s) {
_state = s;
if (_state <= 0) {
_state = 0;
if (_people > 0) {
camperGroup.happiness = 0;
camperGroup.departure();
}
disappearing();
}
if (_state > 100) {
_state = 100;
}
if (clip && (currentFrame == 3)) {
clip.durt._alpha = (100 - _state) * 2;
}
}
function getRent() {
return(_rent);
}
function setRent(r) {
_rent = r;
}
function getCost() {
return(_cost);
}
function setCost(c) {
_cost = c;
}
function getType() {
return(_type);
}
function stormEffect() {
if ((currentFrame == 7) || (currentFrame == 3)) {
setState(_state - (stormEff + int(Math.random() * stormEff)));
}
}
function fireEffect(c) {
if (!level.pause) {
setState(_state - fireEff);
_state = Math.round(_state);
currentFrame = 5;
_global.game.sndCtrl.stopSound("fire");
_global.game.sndCtrl.playSound("fire", -1, this);
attachFire();
attachLoader();
loader.clip.mask._xscale = _state;
loader.clip.percent.text = _state.toString();
clip.object._alpha = _state;
clip.Shadow.gotoAndStop(findSide());
clip.Shadow._rotation = -clip._rotation;
clearInterval(intervalID);
intervalID = setInterval(this, "burning", timeToBuild / 10);
if (_people > 0) {
camperGroup.setComplain("The object is on fire. Alarm the Fire Department or this group will leave the camp. \n", 22);
}
}
}
function floodEffect() {
if ((currentFrame == 7) || (currentFrame == 3)) {
setState(_state - (floodEff + int(Math.random() * 10)));
}
}
function loading() {
if (!level.pause) {
loader.clip.mask._xscale = ++_state;
loader.clip.percent.text = _state.toString();
clip.object._alpha = _state;
if (_state >= 100) {
_state = 100;
done();
_global.game.sndCtrl.stopSound("bulldozer", this);
_global.game.sndCtrl.stopSound("crane", this);
_global.game.sndCtrl.stopSound("hamer_construction", this);
_global.game.sndCtrl.stopSound("building_finished");
_global.game.sndCtrl.playSound("building_finished", -1);
resetCamperParameters();
utils.Delegate.callDelayed(this, playJazzyMusic, 60000);
clearInterval(intervalID);
}
}
}
function destroying() {
if (!level.pause) {
loader.clip.mask._xscale = --_state;
loader.clip.percent.text = Math.round(_state).toString();
clip.object._alpha = _state;
clip.Shadow._alpha = _state;
if (_state <= 0) {
_state = 0;
removeBuldozer();
_global.game.sndCtrl.stopSound("demolishion_building", this);
removeDistruction();
disappearing();
clearInterval(intervalID);
}
}
}
function repairing() {
if (!level.pause) {
loader.clip.mask._xscale = ++_state;
loader.clip.percent.text = Math.round(_state).toString();
if (popUp) {
if (_state >= 100) {
popUp.loader.percent.text = "100";
} else {
popUp.loader.mask._xscale = _state;
popUp.loader.percent.text = Math.round(_state).toString();
}
}
if (currentFrame == 4) {
clip.durt._alpha = (100 - _state) * 2;
}
if (clip.object._alpha < _state) {
clip.object._alpha = _state;
clip.Shadow._alpha = _state;
}
if (_state >= 100) {
_state = 100;
_global.game.repairingSound = false;
done();
_global.game.sndCtrl.stopSound("fire_alarm", this);
_global.game.sndCtrl.stopSound("fire_extinguishers", this);
if (kind == Constants.RESERVATION_SPOT) {
if (_people > 0) {
currentFrame = 7;
var _local6 = flash.display.BitmapData.loadBitmap(linkID + rot);
bmpWidth = _local6.width;
bmpHieght = _local6.height;
var _local8 = new flash.geom.Rectangle(0, 0, _local6.width, _local6.height);
var _local7 = _local6.clone();
var _local9 = level.findSquere(this);
var _local5 = {x:_local9.x - 15, y:_local9.y - 15};
level.mapFog.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapWithoutRoads.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsLake.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsRiver.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
}
} else if (kind == Constants.PARKING) {
if (isReserved) {
var _local3 = 0;
while (_local3 < level.camperGroups.length) {
var _local4 = level.camperGroups[_local3];
if (_local4.car.parkSpot == this) {
_local4.car.parkCar(this);
break;
}
_local3++;
}
}
}
clearInterval(intervalID);
}
}
}
function burning() {
if (!level.pause) {
currentFrame = 5;
loader.clip.mask._xscale = --_state;
loader.clip.percent.text = _state.toString();
clip.object._alpha = _state;
clip.Shadow._alpha = _state;
if (_state <= 50) {
camperGroup.happiness = 0;
if (kind == Constants.ENTERTAINMENT) {
if (hasAnimation) {
removeAnimation();
currentFrame = 5;
hasAnimation = false;
if (_type == Constants.tennisField) {
_global.game.sndCtrl.stopSound("tennis_field");
}
if (_type == Constants.tableTennis) {
_global.game.sndCtrl.stopSound("table_tennis");
}
if (_type == Constants.footballField) {
_global.game.sndCtrl.stopSound("football_field");
}
if (((_type == Constants.hugeWaterPark) || (_type == Constants.bigOutdoorPool)) || (_type == Constants.smallOutdoorPool)) {
_global.game.sndCtrl.stopSound("water_splash");
_global.game.sndCtrl.stopSound("people_swimm");
}
}
}
}
if (_state <= 0) {
_state = 0;
removeFire();
disappearing();
clearInterval(intervalID);
}
}
}
function disappearing() {
if (popUp) {
popUp.removeMovieClip();
}
var _local3 = 0;
while (_local3 < squares.length) {
var _local5 = int(squares[_local3].x / level.spacing);
var _local4 = int(squares[_local3].y / level.spacing);
level.grid[_local4][_local5].setState(level.grid[_local4][_local5].BUYED);
_local3++;
}
level.removeFromStageClipsArray(this);
_local3 = 0;
while (_local3 < level.buildings.length) {
if (level.buildings[_local3] == this) {
level.buildings.splice(_local3, 1);
break;
}
_local3++;
}
_local3 = 0;
while (_local3 < level.parkingTiles.length) {
if (level.parkingTiles[_local3] == this) {
level.parkingTiles.splice(_local3, 1);
break;
}
_local3++;
}
_local3 = 0;
while (_local3 < level.sanitary.length) {
if (level.sanitary[_local3] == this) {
level.sanitary.splice(_local3, 1);
break;
}
_local3++;
}
if (getType() == Constants.trashcan) {
_local3 = 0;
while (_local3 < level.trashcans.length) {
if (level.trashcans[_local3] == this) {
level.trashcans.splice(_local3, 1);
break;
}
_local3++;
}
}
if (kind == Constants.RECEPTION) {
level.hasReception = false;
level.receptionObject = undefined;
}
clip.removeMovieClip();
if ((kind == Constants.PLEASURE) || (kind == Constants.ENTERTAINMENT)) {
removeAnimation();
hasAnimation = false;
}
var _local8 = level.findSquere(this);
var _local6 = {x:_local8.x - 15, y:_local8.y - 15};
var _local7 = new flash.geom.Rectangle(_local6.x, _local6.y, bmpWidth, bmpHieght);
level.mapFog.copyPixels(level.onlyRoads, _local7, new flash.geom.Point(_local6.x, _local6.y), undefined, new flash.geom.Point(0, 0), false);
level.mapWithoutRoads.copyPixels(level.mapBought, _local7, new flash.geom.Point(_local6.x, _local6.y), undefined, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(level.onlyRoadsLake, _local7, new flash.geom.Point(_local6.x, _local6.y), undefined, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsLake.copyPixels(level.mapLakeBrigth, _local7, new flash.geom.Point(_local6.x, _local6.y), undefined, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(level.onlyRoadsRiver, _local7, new flash.geom.Point(_local6.x, _local6.y), undefined, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsRiver.copyPixels(level.mapRiverBrigth, _local7, new flash.geom.Point(_local6.x, _local6.y), undefined, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
removeLoader();
delete playAnimation;
delete stopAnimation;
if (getType() == Constants.disco) {
_global.game.sndCtrl.stopSound("disco_music");
} else if (getType() == Constants.bar) {
_global.game.sndCtrl.stopSound("bar_music");
} else if (getType() == Constants.restaurant) {
_global.game.sndCtrl.stopSound("restaurant_music");
}
}
function build() {
currentFrame = 2;
clip.gotoAndStop("build");
attachConstruction();
attachLoader();
_state = Math.round(_state);
loader.clip.mask._xscale = _state;
loader.clip.percent.text = _state.toString();
clip.object._alpha = _state;
clearInterval(intervalID);
intervalID = setInterval(this, "loading", timeToBuild / 100);
}
function firefighting() {
if (!level.pause) {
fireState++;
if (fireState >= 100) {
fireState = 100;
done();
clearInterval(intervalID);
camperGroup.servComplain(22);
_global.game.sndCtrl.stopSound("vacum_cleaner", this);
_global.game.sndCtrl.stopSound("fire", this);
_global.game.sndCtrl.stopSound("fire_alarm", this);
_global.game.sndCtrl.stopSound("fire_extinguishers", this);
_global.game.sndCtrl.stopSound("bulldozer", this);
_global.game.sndCtrl.stopSound("crane", this);
_global.game.sndCtrl.stopSound("hamer_construction", this);
removeFire();
if (kind == Constants.RESERVATION_SPOT) {
if (_people > 0) {
currentFrame = 7;
var _local4 = flash.display.BitmapData.loadBitmap(linkID + rot);
bmpWidth = _local4.width;
bmpHieght = _local4.height;
var _local6 = new flash.geom.Rectangle(0, 0, _local4.width, _local4.height);
var _local5 = _local4.clone();
var _local7 = level.findSquere(this);
var _local3 = {x:_local7.x - 15, y:_local7.y - 15};
level.mapFog.copyPixels(_local4, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.mapWithoutRoads.copyPixels(_local4, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(_local4, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsLake.copyPixels(_local4, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(_local4, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsRiver.copyPixels(_local4, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
}
}
}
}
}
function firefight() {
if (_state < 100) {
clearInterval(intervalID);
fireman = true;
_global.game.sndCtrl.stopSound("fire_alarm");
_global.game.sndCtrl.playSound("fire_alarm", -1, this);
_global.game.sndCtrl.stopSound("fire_extinguishers");
_global.game.sndCtrl.playSound("fire_extinguishers", -1, this);
if (clip) {
clip.fireman.gotoAndStop(2);
}
_state = Math.round(_state);
fireState = _state;
level.changeBudget((-(100 - _state)) * (getCost() / 200));
level.expences = level.expences + ((100 - _state) * (getCost() / 200));
if (level.exploitationCost[linkID] != undefined) {
level.exploitationCost[linkID] = level.exploitationCost[linkID] + ((100 - _state) * (getCost() / 200));
} else {
level.exploitationCost[linkID] = (100 - _state) * (getCost() / 200);
}
intervalID = setInterval(this, "firefighting", timeToBuild / 100);
if (popUp) {
}
}
}
function done() {
clearInterval(intervalID);
clip.gotoAndStop("done");
currentFrame = 3;
var _local14 = Constants.getObjectPositions(getType(), rot);
var _local8 = flash.display.BitmapData.loadBitmap((linkID + "Img") + rot);
bmpWidth = _local8.width;
bmpHieght = _local8.height;
var _local7 = new flash.geom.Rectangle(0, 0, _local8.width, _local8.height);
var _local11 = _local8.clone();
var _local13 = level.findSquere(this);
var _local5 = {x:_local13.x - 15, y:_local13.y - 15};
var _local12 = new flash.geom.Rectangle(_local5.x, _local5.y, _local8.width, _local8.height);
level.mapFog.copyPixels(level.onlyRoads, _local12, new flash.geom.Point(_local5.x, _local5.y), undefined, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(level.onlyRoadsLake, _local12, new flash.geom.Point(_local5.x, _local5.y), undefined, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(level.onlyRoadsRiver, _local12, new flash.geom.Point(_local5.x, _local5.y), undefined, new flash.geom.Point(0, 0), false);
level.mapFog.copyPixels(_local8, _local7, new flash.geom.Point(_local5.x, _local5.y), _local11, new flash.geom.Point(0, 0), false);
level.mapWithoutRoads.copyPixels(_local8, _local7, new flash.geom.Point(_local5.x, _local5.y), _local11, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(_local8, _local7, new flash.geom.Point(_local5.x, _local5.y), _local11, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsLake.copyPixels(_local8, _local7, new flash.geom.Point(_local5.x, _local5.y), _local11, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(_local8, _local7, new flash.geom.Point(_local5.x, _local5.y), _local11, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsRiver.copyPixels(_local8, _local7, new flash.geom.Point(_local5.x, _local5.y), _local11, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
if (_global.game.repairingSound == false) {
_global.game.sndCtrl.stopSound("bulldozer", this);
_global.game.sndCtrl.stopSound("crane", this);
_global.game.sndCtrl.stopSound("hamer_construction", this);
}
fireman = false;
_global.game.sndCtrl.stopSound("fire", this);
_global.game.sndCtrl.stopSound("fire_alarm", this);
_global.game.sndCtrl.stopSound("fire_extinguishers", this);
removeLoader();
removeConstruction();
if (kind != Constants.RESERVATION_SPOT) {
clip.Shadow.gotoAndStop(findSide());
clip.Shadow._rotation = -clip._rotation;
}
if (clip && (currentFrame == 3)) {
clip.durt._alpha = (100 - _state) * 2;
}
if (kind == Constants.PARKING) {
var _local3 = 0;
while (_local3 < level.camperGroups.length) {
if (level.camperGroups[_local3].car.state == 2) {
_local5 = {x:level.camperGroups[_local3].car.parkSpot.x - 15, y:level.camperGroups[_local3].car.parkSpot.y - 15};
_local7 = new flash.geom.Rectangle(_local5.x, _local5.y, level.camperGroups[_local3].car.bmpWidth, level.camperGroups[_local3].car.bmpHieght);
level.mapFog.copyPixels(level.mapWithoutRoads, _local7, new flash.geom.Point(_local5.x, _local5.y), undefined, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(level.mapWithoutRoadsLake, _local7, new flash.geom.Point(_local5.x, _local5.y), undefined, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(level.mapWithoutRoadsRiver, _local7, new flash.geom.Point(_local5.x, _local5.y), undefined, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
level.camperGroups[_local3].car.parkSpot.setState(level.camperGroups[_local3].car.parkSpot.BUYED);
level.camperGroups[_local3].car.parkCar(this);
var _local4 = 0;
while (_local4 < level.camperGroups[_local3].car.campers.length) {
var _local6 = level.camperGroups[_local3].car.campers[_local4];
_local6.setHappiness(-20);
_local4++;
}
level.camperGroups[_local3].setHappiness(-20);
level.camperGroups[_local3].servComplain(1);
break;
}
_local3++;
}
}
if (getType() == Constants.electricalLamp) {
setTint(0);
if (level.isDay) {
} else {
attachAnimation();
animation.setTint(0);
}
}
if (getType() == Constants.campFire) {
setTint(0);
if (level.isDay) {
} else {
attachAnimation();
animation.setTint(0);
}
}
}
function repair() {
if (getType() != Constants.tree) {
_state = Math.round(_state);
if (_state < 100) {
clearInterval(intervalID);
clip.gotoAndStop("clean");
currentFrame = 4;
clip.Shadow.gotoAndStop(findSide());
clip.Shadow._rotation = -clip._rotation;
attachLoader();
repairSound = true;
if (_global.game.repairingSound == false) {
_global.game.sndCtrl.stopSound("bulldozer");
_global.game.sndCtrl.stopSound("crane");
_global.game.sndCtrl.stopSound("hamer_construction");
_global.game.sndCtrl.playSound("bulldozer", -1, this);
_global.game.sndCtrl.playSound("crane", -1, this);
_global.game.sndCtrl.playSound("hamer_construction", -1, this);
_global.game.repairingSound = true;
}
loader.clip.mask._xscale = _state;
loader.clip.percent.text = _state.toString();
clip.durt._alpha = (100 - _state) * 2;
level.changeBudget(-Math.ceil((100 - _state) * (getCost() / 200)));
level.expences = level.expences + Math.ceil((100 - _state) * (getCost() / 200));
if (level.exploitationCost[linkID] != undefined) {
level.exploitationCost[linkID] = level.exploitationCost[linkID] + Math.ceil((100 - _state) * (getCost() / 200));
} else {
level.exploitationCost[linkID] = Math.ceil((100 - _state) * (getCost() / 200));
}
intervalID = setInterval(this, "repairing", timeToBuild / 100);
if (popUp) {
}
}
}
}
function destroy() {
if (_people == 0) {
isDestroying = true;
hireBuldozer();
currentFrame = 6;
clip.gotoAndStop("destroy");
attachDistruction();
attachLoader();
_state = Math.round(_state);
loader.clip.mask._xscale = _state;
loader.clip.percent.text = _state.toString();
clip.object._alpha = _state;
clip.Shadow.gotoAndStop(findSide());
clip.Shadow._rotation = -clip._rotation;
if (kind == Constants.RECEPTION) {
level.hasReception = false;
_global.game.sndCtrl.stopSound("demolishion_building");
_global.game.sndCtrl.playSound("demolishion_building", -1, this);
}
level.changeBudget(-Math.ceil(_state * (getCost() / 500)));
level.expences = level.expences + Math.ceil(_state * (getCost() / 500));
if (level.exploitationCost[linkID] != undefined) {
level.exploitationCost[linkID] = level.exploitationCost[linkID] + Math.ceil(_state * (getCost() / 500));
} else {
level.exploitationCost[linkID] = Math.ceil(_state * (getCost() / 500));
}
intervalID = setInterval(this, "destroying", timeToBuild / 100);
} else {
_global.game.LevelClip.helpTips[52].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[52], _global.game.LevelClip.helpTips[52].hidePopUp, 5000);
}
}
function hireBuldozer() {
if (!buldozer) {
var _local4 = findFreeCell();
if (_local4 != undefined) {
if (kind == Constants.RESERVATION_SPOT) {
var _local6 = ((level.depthCtrl.buldozerOverDepth < level.depthCtrl.animationDepth) ? (level.depthCtrl.buldozerOverDepth++) : ((level.depthCtrl.buldozerOverDepth = 36900)));
} else {
var _local6 = ((level.depthCtrl.buldozerUnderDepth < level.depthCtrl.shadowDepth) ? (level.depthCtrl.buldozerUnderDepth++) : ((level.depthCtrl.buldozerUnderDepth = 34200)));
}
var _local3 = (buldozer = new mcs.Buldozer("buldozer", x, y, _local4.rotation, _local6));
_global.game.sndCtrl.stopSound("bulldozer");
_global.game.sndCtrl.playSound("bulldozer", -1, buldozer);
var _local5 = level.translateCameraToStage(_local3.x, _local3.y);
_local3.clip = level.attachMovie(_local3.linkID, utils.StringUtils.getUniqueName(), _local3.depth, {_x:_local5.x, _y:_local5.y, _rotation:_local3.rot});
buldozer.cell = _local4.cell;
level.clipsAttached.push(_local3);
buldozerOnStage = true;
}
}
}
function removeBuldozer() {
level.removeFromStageClipsArray(buldozer);
_global.game.sndCtrl.stopSound("bulldozer", buldozer);
buldozer.clip.removeMovieClip();
buldozer = undefined;
buldozerOnStage = false;
}
function findFreeCell() {
var _local4 = 1;
while (_local4 <= 40) {
var _local5 = 0;
while (_local5 < squares.length) {
var _local3 = int(squares[_local5].x / level.spacing);
var _local2 = int(squares[_local5].y / level.spacing);
if ((level.grid[_local2][_local3 + _local4] instanceof mcs.Cell) && (level.grid[_local2][_local3 + _local4].getState() < level.grid[_local2][_local3].ROAD)) {
return({cell:level.grid[_local2][_local3 + _local4], rotation:0});
}
if ((level.grid[_local2][_local3 - _local4] instanceof mcs.Cell) && (level.grid[_local2][_local3 - _local4].getState() < level.grid[_local2][_local3].ROAD)) {
return({cell:level.grid[_local2][_local3 - _local4], rotation:180});
}
if ((level.grid[_local2 + _local4][_local3] instanceof mcs.Cell) && (level.grid[_local2 + _local4][_local3].getState() < level.grid[_local2][_local3].ROAD)) {
return({cell:level.grid[_local2 + _local4][_local3], rotation:90});
}
if ((level.grid[_local2 - _local4][_local3] instanceof mcs.Cell) && (level.grid[_local2 - _local4][_local3].getState() < level.grid[_local2][_local3].ROAD)) {
return({cell:level.grid[_local2 - _local4][_local3], rotation:-90});
}
_local5++;
}
_local4++;
}
return(undefined);
}
function getDailyIncome() {
if ((((((_type == Constants.hugeWaterPark) || (_type == Constants.tennisField)) || (_type == Constants.tableTennis)) || (_type == Constants.footballField)) || (_type == Constants.bigOutdoorPool)) || (_type == Constants.smallOutdoorPool)) {
currentFrame = 3;
removeAnimation();
hasAnimation = false;
if (_type == Constants.tennisField) {
_global.game.sndCtrl.stopSound("tennis_field");
}
if (_type == Constants.tableTennis) {
_global.game.sndCtrl.stopSound("table_tennis");
}
if (_type == Constants.footballField) {
_global.game.sndCtrl.stopSound("football_field");
}
if (((_type == Constants.hugeWaterPark) || (_type == Constants.bigOutdoorPool)) || (_type == Constants.smallOutdoorPool)) {
_global.game.sndCtrl.stopSound("water_splash");
_global.game.sndCtrl.stopSound("people_swimm");
}
}
var _local11 = ((_visitors < level.characters.length) ? (_visitors) : (level.characters.length));
var _local10 = int(Math.random() * _local11);
var _local5 = 0;
var _local6 = 0;
var _local7 = 0;
var _local4 = 0;
while (_local4 < level.characters.length) {
var _local3 = level.characters[_local4];
if (_local3.age == 0) {
_local5 = _local5 + _local3.getHappiness();
} else if (_local3.age == 1) {
_local6 = _local6 + _local3.getHappiness();
} else if (_local3.age == 2) {
_local7 = _local7 + _local3.getHappiness();
}
_local4++;
}
_local5 = ((level.teenagers > 0) ? (_local5 / level.teenagers) : 0);
_local6 = ((level.adult > 0) ? (_local6 / level.adult) : 0);
_local7 = ((level.old > 0) ? (_local7 / level.old) : 0);
var _local8 = getTripleFrom(level.teenagers, level.adult, level.old, _local10);
var _local9 = int((((teenCoef * _local8[0]) * _local5) + ((adultCoef * _local8[1]) * _local6)) + ((oldCoef * _local8[2]) * _local7));
overAllIncome = overAllIncome + _local9;
return(_local9);
}
function getTripleFrom(a, b, c, sum) {
if (((a + b) + c) >= sum) {
var _local1;
var _local2;
do {
_local1 = int(Math.random() * (a + 1));
while (_local1 > sum) {
_local1 = int(Math.random() * (a + 1));
}
_local2 = int(Math.random() * (b + 1));
while (_local2 > (sum - _local1)) {
_local2 = int(Math.random() * (b + 1));
}
} while ((sum - (_local1 + _local2)) > c);
var _local7 = sum - (_local1 + _local2);
return([_local1, _local2, _local7]);
}
return(undefined);
}
function accomodateCampers() {
if ((level.hasAGroup && (currentFrame == 3)) && (kind <= 2)) {
var _local18 = level.cars[level.cars.length - 1];
if (!camperGroup) {
camperGroup = new mcs.Group(_local18, level.clock.toSeconds(), 80);
var _local17 = 0;
if (_local18.campers.length <= _visitors) {
_local17 = 1;
}
var _local15 = 0;
if (camperGroup.desiredObjectType == getType()) {
_local15 = 1;
}
if (getState() < 40) {
_local15 = 0;
}
var _local6 = 0;
var _local4 = 0;
while (_local4 < level.clipsOnStage.length) {
if (level.clipsOnStage[_local4] instanceof mcs.Building) {
if (level.clipsOnStage[_local4]._luxuryPoints != undefined) {
_local6 = _local6 + level.clipsOnStage[_local4]._luxuryPoints;
}
} else if (level.clipsOnStage[_local4] instanceof mcs.RoadTile) {
if (level.clipsOnStage[_local4]._luxuryPoints != undefined) {
_local6 = _local6 + level.clipsOnStage[_local4]._luxuryPoints;
}
}
_local4++;
}
var _local20 = 0;
if (level.advertisement != undefined) {
if (level.advertisement.type != undefined) {
_local20 = level.advertisement.type;
}
}
var _local9 = int((((_local15 * 75) + 25) + (((_local6 - 64.25) * (1 + _local20)) / 12)) + ((2 - (_rent / _defaultRent)) * 100));
_root.texts.acceptedText2.text = _local9;
_local9 = ((_local9 > 200) ? 200 : (_local9));
_local9 = ((_local9 < 0) ? 0 : (_local9));
var _local19 = Math.random() * 200;
_root.texts.luxuryText.text = _local6;
_root.texts.acceptedText.text = _local9;
_root.texts.AccRejText.text = _local19;
var _local13 = false;
if ((camperGroup.desiredObjectType == Constants.motorHomeSpot) && (getType() != Constants.motorHomeSpot)) {
_local13 = true;
} else if ((camperGroup.desiredObjectType == Constants.bigMotorHomeSpot) && (getType() != Constants.bigMotorHomeSpot)) {
_local13 = true;
} else if ((camperGroup.desiredObjectType == Constants.normalCaravanSpot) && (getType() != Constants.normalCaravanSpot)) {
_local13 = true;
} else if ((camperGroup.desiredObjectType == Constants.bigCaravanSpot) && (getType() != Constants.bigCaravanSpot)) {
_local13 = true;
}
var _local10 = level.depthCtrl.infScreens;
while (level.getInstanceAtDepth(_local10++)) {
}
level.attention.removeMovieClip();
var _local16 = level.attachMovie("AcceptReject", "attention", _local10, {_x:400, _y:300});
if (((_local17 == 1) && (_local19 <= _local9)) && (!_local13)) {
_local16.accrej.text = "Campers have accepted your offer !!! ";
camperGroup.accomodateCamers(this);
_people = _people + camperGroup.getCampers().length;
var _local14 = int((_people * getRent()) * Math.ceil(camperGroup.getTimeOfStaying() / level.daynightLasting));
if (level.relizedTurnover[linkID] != undefined) {
level.relizedTurnover[linkID] = level.relizedTurnover[linkID] + _local14;
} else {
level.relizedTurnover[linkID] = _local14;
}
level.changeBudget(_local14);
camperGroup.expenses = _local14;
level.refreshClips();
level.hasAGroup = false;
level.availableSpots = level.availableSpots - _visitors;
_local4 = 0;
while (_local4 < level.camperGroups.length) {
var _local5 = level.camperGroups[_local4];
_local5.calculateDistances();
_local4++;
}
if (kind == Constants.RESERVATION_SPOT) {
currentFrame = 7;
var _local8 = flash.display.BitmapData.loadBitmap(linkID + rot);
bmpWidth = _local8.width;
bmpHieght = _local8.height;
var _local12 = new flash.geom.Rectangle(0, 0, _local8.width, _local8.height);
var _local11 = _local8.clone();
var _local21 = level.findSquere(this);
var _local7 = {x:_local21.x - 15, y:_local21.y - 15};
level.mapFog.copyPixels(_local8, _local12, new flash.geom.Point(_local7.x, _local7.y), _local11, new flash.geom.Point(0, 0), false);
level.mapWithoutRoads.copyPixels(_local8, _local12, new flash.geom.Point(_local7.x, _local7.y), _local11, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(_local8, _local12, new flash.geom.Point(_local7.x, _local7.y), _local11, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsLake.copyPixels(_local8, _local12, new flash.geom.Point(_local7.x, _local7.y), _local11, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(_local8, _local12, new flash.geom.Point(_local7.x, _local7.y), _local11, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsRiver.copyPixels(_local8, _local12, new flash.geom.Point(_local7.x, _local7.y), _local11, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
}
if (popUp) {
popUp.people.text = _people.toString();
popUp.state.text = _state.toString();
}
} else {
_local16.accrej.text = "THESE CAMPERS HAVE ASKED FOR SOMETHING ELSE. THIS OFFER HAS BEEN REJECTED. ";
camperGroup = undefined;
}
} else {
_global.game.LevelClip.helpTips[30].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[30], _global.game.LevelClip.helpTips[30].hidePopUp, 10000);
}
}
}
function onClick() {
if ((!level.pause) && (!level.attention)) {
_global.game.LevelClip.cancelRoadConstaruction();
if (_people == 0) {
if (level.campBuilding && (!isDestroying)) {
if (popUp) {
popUp.removeMovieClip();
popUp = undefined;
}
level.building = undefined;
if (kind != Constants.RECEPTION) {
if ((level.budget - getCost()) >= 0) {
level.building = new mcs.Building(linkID, level._xmouse, level._ymouse, 0, level.depthCtrl.tempBuildnigDepth);
level.building.setProperties(numOfSquares, kind, _cost, _luxuryPoints, timeToBuild, _visitors, getType(), getRent(), chance, repairExpence);
level.building.setEffectsValues(stormEff, fireEff, floodEff);
level.building._defaultRent = _defaultRent;
if (kind == Constants.ENTERTAINMENT) {
level.building.setEntertainProperties(teenCoef, adultCoef, oldCoef);
}
} else {
var _local3 = level.depthCtrl.infScreens;
while (level.getInstanceAtDepth(_local3++)) {
}
level.attention.removeMovieClip();
var _local4 = level.attachMovie("buildMoney", "attention", _local3, {_x:400, _y:300});
}
}
if (level.building) {
level.building.clip = level.attachMovie(level.building.linkID, utils.StringUtils.getUniqueName(), level.building.depth, {_x:level.building.x, _y:level.building.y});
level.checkCellAvaiblility(level.building);
level.mouse.building = true;
}
}
} else if (_people > 0) {
level.mouse.clip = level.attachMovie("charIcon", "charIcon", level.depthCtrl.tempBuildnigDepth, {_x:level._xmouse, _y:level._ymouse, _xscale:200, _yscale:200});
level.replacingGroup = camperGroup;
startDrag (level.mouse.clip, true);
_global.game.LevelClip.mouse.replace = true;
}
}
}
function RollOver() {
if (level.building == undefined) {
if ((((kind == Constants.UNMOVABLE_OBJECT) || (kind == Constants.RESERVATION_SPOT)) || (kind == Constants.ENTERTAINMENT)) || (kind == Constants.SANITARY)) {
if ((!popUp) && ((currentFrame == 7) || (currentFrame == 3))) {
var _local4 = x + 200;
var _local5 = y + 200;
var _local7 = 0;
var _local8 = 0;
if (_local4 > 1200) {
_local7 = 1200 - _local4;
}
if (_local5 > 1200) {
_local8 = 1200 - _local5;
}
var _local3 = "popUp";
if ((kind == Constants.ENTERTAINMENT) || (kind == Constants.SANITARY)) {
_local3 = "popUp_S_E";
}
popUp = level.attachMovie(_local3, "popUp", level.depthCtrl.objectPopUpDepth);
var _local6 = level.translateCameraToStage(x, y);
popUp._x = _local6.x + _local7;
popUp._y = _local6.y + _local8;
popUp._alpha = 80;
if ((kind == Constants.UNMOVABLE_OBJECT) || (kind == Constants.RESERVATION_SPOT)) {
popUp.rent.text = getRent().toString() + "$";
if (!camperGroup) {
popUp.group.text = "AVAILABLE";
}
}
popUp.visitors.text = _visitors.toString();
popUp.loader.mask._xscale = _state;
popUp.loader.percent.text = Math.round(_state).toString();
if (camperGroup) {
popUp.group.text = Constants.getGroupName(camperGroup.car.groupType);
popUp.woman.text = camperGroup.car.woman;
popUp.man.text = camperGroup.car.man;
popUp.boy.text = camperGroup.car.boy;
popUp.girl.text = camperGroup.car.girl;
var _local2 = Math.ceil(camperGroup.getTimeOfStaying() / level.daynightLasting);
var _local9 = ((_local2 > 1) ? (_local2.toString() + " days") : (_local2.toString() + " day"));
popUp.comment.text = ((((Constants.getGroupName(camperGroup.car.groupType) + ", ") + Constants.getObjectName(getType())) + ", ") + _local9) + " remaining";
popUp.happyness.text = int(camperGroup.happiness).toString() + "%";
} else {
popUp.comment.text = Constants.getObjectName(getType());
}
}
}
}
}
function RollOut() {
if (popUp) {
popUp.removeMovieClip();
popUp = undefined;
}
}
function addEvents() {
clip.onRollOver = function () {
};
clip.onRollOut = function () {
};
clip.onDragOut = function () {
if (!this.level.pause) {
if (this.popUp) {
this.popUp.removeMovieClip();
this.popUp = undefined;
}
}
};
}
function replaceGroup() {
if ((level.replacingGroup.campingObject.getType() == getType()) && (currentFrame == 3)) {
if ((_people == 0) && (level.replacingGroup.campers.length <= _visitors)) {
if (level.replacingGroup.campingObject.popUp) {
level.replacingGroup.campingObject.popUp.removeMovieClip();
level.replacingGroup.campingObject.popUp = undefined;
}
level.replacingGroup.removeExclamation();
var _local5 = 0;
while (_local5 <= level.replacingGroup.complainReason.length) {
if ((_local5 != 2) && (_local5 != 22)) {
level.replacingGroup.complainReason[_local5].exists = false;
level.replacingGroup.complainReason[_local5].txt = "";
level.replacingGroup.complainReason[_local5].whereToFind = "";
}
_local5++;
}
if (level.replacingGroup.campingObject.currentFrame == 5) {
level.replacingGroup.servComplain(22);
level.replacingGroup.campingObject.removeFire();
level.replacingGroup.campingObject.done();
}
level.replacingGroup.campingObject.camperGroup = undefined;
level.replacingGroup.campingObject._people = 0;
clip.gotoAndStop(level.replacingGroup.campingObject.currentFrame);
currentFrame = level.replacingGroup.campingObject.currentFrame;
clip.Shadow.gotoAndStop(findSide());
clip.Shadow._rotation = -clip._rotation;
level.replacingGroup.campingObject.done();
level.replacingGroup.campingObject.currentFrame = 3;
level.replacingGroup.campingObject = this;
if (kind == Constants.RESERVATION_SPOT) {
currentFrame = 7;
var _local11 = flash.display.BitmapData.loadBitmap(linkID + rot);
bmpWidth = _local11.width;
bmpHieght = _local11.height;
var _local13 = new flash.geom.Rectangle(0, 0, _local11.width, _local11.height);
var _local12 = _local11.clone();
var _local15 = level.findSquere(this);
var _local10 = {x:_local15.x - 15, y:_local15.y - 15};
level.mapFog.copyPixels(_local11, _local13, new flash.geom.Point(_local10.x, _local10.y), _local12, new flash.geom.Point(0, 0), false);
level.mapWithoutRoads.copyPixels(_local11, _local13, new flash.geom.Point(_local10.x, _local10.y), _local12, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(_local11, _local13, new flash.geom.Point(_local10.x, _local10.y), _local12, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsLake.copyPixels(_local11, _local13, new flash.geom.Point(_local10.x, _local10.y), _local12, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(_local11, _local13, new flash.geom.Point(_local10.x, _local10.y), _local12, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsRiver.copyPixels(_local11, _local13, new flash.geom.Point(_local10.x, _local10.y), _local12, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
}
camperGroup = level.replacingGroup;
_people = level.replacingGroup.campers.length;
_local5 = 0;
while (_local5 < camperGroup.getCampers().length) {
var _local3 = camperGroup.getCampers()[_local5];
_local3.camperGroup = camperGroup;
var _local4 = findFreeCell();
var _local7 = int(_local4.cell.x / level.spacing);
var _local6 = int(_local4.cell.y / level.spacing);
_local3.startPoint = [_local7, _local6];
if (!_local3.inMovement) {
_local3.x = _local4.cell.x + (15 - int(Math.random() * 30));
_local3.y = _local4.cell.y + (15 - int(Math.random() * 30));
_local3.setClip();
}
_local5++;
}
_local5 = 0;
while (_local5 < level.camperGroups.length) {
var _local8 = level.camperGroups[_local5];
_local8.calculateDistances();
_local5++;
}
camperGroup.calculateSanitary();
camperGroup.calculateTrash();
camperGroup.calculateEntertainment();
camperGroup.calculateRoads();
camperGroup.calculateLanscape();
if (camperGroup.car.state == 2) {
camperGroup.car.removeCar();
camperGroup.car.parkCar(findFreeCell().cell);
_local5 = 0;
while (_local5 < camperGroup.campers.length) {
var _local9 = camperGroup.campers[_local5];
_local9.setHappiness(25);
_local5++;
}
if (level.parkingFlag == 0) {
level.parkingFlag = 1;
}
camperGroup.setComplain("This group is furious that you have placed their car near the tent spot and they urged us to build a new parking space so that they can enjoy our environment in peace. Hurry up\u2026 They are losing their patience. \n", 1);
}
var _local14 = getState();
if ((((camperGroup.age == 0) && (_local14 <= 30)) || ((camperGroup.age == 1) && (_local14 <= 60))) || ((camperGroup.age == 2) && (_local14 <= 85))) {
if (camperGroup.stateFlag == 0) {
camperGroup.stateFlag = 1;
}
camperGroup.complainReason[2].exists = false;
camperGroup.setComplain("You need to repair this object because its condition is very bad. This group doesn\u2019t like that. Click on the repair button to automatically repair this object. \n", 2);
} else {
camperGroup.servComplain(2);
}
}
} else if (level.replacingGroup.campingObject.getType() != getType()) {
_global.game.LevelClip.helpTips[46].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[46], _global.game.LevelClip.helpTips[46].hidePopUp, 10000);
}
level.replacingGroup = undefined;
}
function changeState() {
var _local6 = 0.1;
var _local13 = 0.2;
switch (kind) {
case Constants.SANITARY :
if (getType() != Constants.trashcan) {
var _local14 = 0;
var _local7 = 1;
var _local4 = 0;
while (_local4 <= level.buildings.length) {
var _local3 = level.buildings[_local4];
if (((_local3.kind == Constants.SANITARY) || (_local3.kind == Constants.RESERVATION_SPOT)) || (_local3.kind == Constants.UNMOVABLE_OBJECT)) {
var _local5 = utils.MathUtils.getDistance(x, y, _local3.x, _local3.y);
if (_local5 <= 180) {
if (_local3._people > 0) {
var _local12 = 0;
switch (_local3.camperGroup.age) {
case 0 :
_local12 = 0;
break;
case 1 :
_local12 = 7;
break;
case 2 :
_local12 = 5;
}
var _local2 = 0;
switch (getType()) {
case Constants.woodenToilet :
_local2 = 6;
break;
case Constants.stoneToilet :
_local2 = 2;
break;
case Constants.stoneToiletShower :
_local2 = 2;
break;
case Constants.bigSanitaryHouse :
_local2 = 2;
break;
case Constants.washingMachineUnit :
_local2 = 3;
break;
case Constants.allInOneSanitary :
_local2 = 0;
}
_local14 = _local14 + (((_local6 * _local12) * _local2) / 5);
}
if (_local3.kind == Constants.SANITARY) {
if ((_local3 != this) && (_local3.getType() != Constants.trashcan)) {
_local7++;
}
}
}
}
_local4++;
}
if (_local7 == 0) {
_local14 = 0;
} else {
_local14 = _local14 / _local7;
}
_local14 = _local14 + _local13;
setState(getState() - _local14);
}
break;
case Constants.ENTERTAINMENT :
var _local10 = 0;
var _local8 = 0;
var _local11 = 0;
var _local4 = 0;
while (_local4 <= level.buildings.length) {
var _local3 = level.buildings[_local4];
var _local5 = utils.MathUtils.getDistance(x, y, _local3.x, _local3.y);
if (_local5 <= 450) {
if (_local3._people > 0) {
switch (_local3.camperGroup.age) {
case 0 :
_local10 = _local10 + 7;
break;
case 1 :
_local8 = _local8 + 2;
break;
case 2 :
_local11 = _local11 + 0;
}
}
}
_local4++;
}
var _local14 = (_local6 * ((_local10 + _local8) + _local11)) * 0.1;
setState(getState() - _local14);
break;
case Constants.UNMOVABLE_OBJECT :
if (_people > 0) {
var _local12 = 0;
switch (camperGroup.age) {
case 0 :
_local12 = 7;
break;
case 1 :
_local12 = 2;
break;
case 2 :
_local12 = 0;
}
_local14 = (_local6 * _local12) * 10;
setState(getState() - _local14);
} else {
setState(getState() - _local13);
}
break;
case Constants.RESERVATION_SPOT :
if (_people > 0) {
var _local12 = 0;
switch (camperGroup.age) {
case 0 :
_local12 = 7;
break;
case 1 :
_local12 = 2;
break;
case 2 :
_local12 = 0;
}
_local14 = (_local6 * _local12) * 10;
setState(getState() - _local14);
} else {
setState(getState() - _local13);
}
break;
case Constants.PARKING :
var _local9 = true;
_local4 = 0;
while (_local4 < level.camperGroups.length) {
if (level.camperGroups[_local4].car.parkSpot == this) {
_local9 = false;
break;
}
_local4++;
}
if (!(_local9 && (linkID == "dirtParking"))) {
break;
}
setState(getState() - 7);
}
}
function nearestObjectDistance(obj) {
if (obj.length > 0) {
var _local5 = utils.MathUtils.getDistance(x, y, obj[0].x, obj[0].y);
var _local2 = 1;
while (_local2 < obj.length) {
var _local3 = utils.MathUtils.getDistance(x, y, obj[_local2].x, obj[_local2].y);
if (_local5 > _local3) {
_local5 = _local3;
}
_local2++;
}
return(_local5);
}
return(Number.MAX_VALUE);
}
function findSide() {
switch (clip._rotation) {
case 0 :
return("bottom");
case 90 :
return("left");
case 180 :
return("top");
case -90 :
return("right");
}
}
function playAnimation() {
var _local4 = true;
var _local3 = 0;
while (_local3 < _global.game.LevelClip.buildings.length) {
if (_global.game.LevelClip.buildings[_local3] == this) {
_local4 = false;
break;
}
_local3++;
}
if ((((!_local4) && (kind == Constants.ENTERTAINMENT)) && (!hasAnimation)) && (currentFrame == 3)) {
if (!level.pause) {
if ((level.characters.length > 0) && (level.isDay)) {
currentFrame = 7;
clip.gotoAndStop("anim");
attachAnimation();
hasAnimation = true;
}
utils.Delegate.callDelayed(this, stopAnimation, 50000);
} else {
utils.Delegate.callDelayed(this, playAnimation, 10000);
}
}
}
function stopAnimation() {
var _local4 = true;
var _local3 = 0;
while (_local3 < _global.game.LevelClip.buildings.length) {
if (_global.game.LevelClip.buildings[_local3] == this) {
_local4 = false;
break;
}
_local3++;
}
if (!_local4) {
if (!level.pause) {
if (kind == Constants.ENTERTAINMENT) {
currentFrame = 3;
clip.gotoAndStop("done");
removeAnimation();
hasAnimation = false;
if (_type == Constants.tennisField) {
_global.game.sndCtrl.stopSound("tennis_field");
}
if (_type == Constants.tableTennis) {
_global.game.sndCtrl.stopSound("table_tennis");
}
if (_type == Constants.footballField) {
_global.game.sndCtrl.stopSound("football_field");
}
if (((_type == Constants.hugeWaterPark) || (_type == Constants.bigOutdoorPool)) || (_type == Constants.smallOutdoorPool)) {
_global.game.sndCtrl.stopSound("water_splash");
_global.game.sndCtrl.stopSound("people_swimm");
}
utils.Delegate.callDelayed(this, playAnimation, 30000);
}
} else {
utils.Delegate.callDelayed(this, stopAnimation, 10000);
}
}
}
function attachClip() {
if (((currentFrame == 2) || (currentFrame == 4)) || (currentFrame == 6)) {
attachLoader();
loader.clip.mask._xscale = _state;
loader.clip.percent.text = _state.toString();
}
if (buldozerOnStage && (!buldozer)) {
hireBuldozer();
}
if (currentFrame == 3) {
clip.durt._alpha = (100 - _state) * 2;
}
clip.Shadow.gotoAndStop(findSide());
clip.Shadow._rotation = -clip._rotation;
if (fireman) {
clip.fireman.gotoAndStop(2);
}
addEvents();
if ((getType() == Constants.tree) && (squares.length == 0)) {
var _local3 = 1;
while (_local3 <= numOfSquares) {
var _local5 = clip;
var _local6 = _local5["sq" + _local3];
var _local2 = {x:0, y:0};
_local6.localToGlobal(_local2);
var _local4 = level.translateStageToCamera(_local2.x, _local2.y);
squares.push({x:_local4.x, y:_local4.y});
_local3++;
}
}
}
function removeClip() {
super.removeClip();
removeLoader();
}
function attachLoader() {
var _local3 = ((level.depthCtrl.loaderDepth < level.depthCtrl.riverFloodDepth) ? (level.depthCtrl.loaderDepth++) : ((level.depthCtrl.loaderDepth = 44350)));
loader = new mcs.LoaderClip("loader", x, y, 0, _local3);
loader.attachClip();
level.clipsAttached.push(loader);
var _local2 = loader;
_local2.clip.mask._xscale = _state;
_local2.clip.percent.text = _state.toString();
}
function removeLoader() {
level.removeFromStageClipsArray(loader);
loader.removeClip();
}
function attachAnimation() {
currentFrame = 7;
var _local3 = "";
switch (_type) {
case Constants.tennisField :
_global.game.sndCtrl.playSound("tennis_field", 32768);
_local3 = "tennisGame_mc" + rot;
break;
case Constants.tableTennis :
_global.game.sndCtrl.playSound("table_tennis", 32768);
_local3 = "pingPong_mc" + rot;
break;
case Constants.footballField :
_global.game.sndCtrl.playSound("football_field", 32768);
_local3 = "footballGame_mc" + rot;
break;
case Constants.hugeWaterPark :
_global.game.sndCtrl.playSound("water_splash", 32768);
_global.game.sndCtrl.playSound("people_swimm", 32768);
_local3 = "hugeWaterParkAnim_mc" + rot;
break;
case Constants.bigOutdoorPool :
_global.game.sndCtrl.playSound("water_splash", 32768);
_global.game.sndCtrl.playSound("people_swimm", 32768);
_local3 = "bigPoolAnim_mc" + rot;
break;
case Constants.smallOutdoorPool :
_global.game.sndCtrl.playSound("water_splash", 32768);
_global.game.sndCtrl.playSound("people_swimm", 32768);
_local3 = "smallPoolAnim_mc" + rot;
break;
case Constants.campFire :
_global.game.sndCtrl.stopSound("camp_fire");
_global.game.sndCtrl.playSound("camp_fire", 32768);
_local3 = "fireAnim";
break;
case Constants.electricalLamp :
_local3 = "lightOn" + rot;
}
var _local4 = level.findSquere(this);
var _local5 = ((level.depthCtrl.animationDepth < level.depthCtrl.stormDepth) ? (level.depthCtrl.animationDepth++) : ((level.depthCtrl.animationDepth = 43600)));
animation = new mcs.Animation(_local3, _local4.x, _local4.y, 0, _local5);
animation.tint = level.tint;
animation.attachClip();
level.clipsAttached.push(animation);
}
function removeAnimation() {
currentFrame = 3;
level.removeFromStageClipsArray(animation);
animation.removeClip();
}
function attachDistruction() {
var _local2 = level.findSquere(this);
var _local3 = ((level.depthCtrl.loaderDepth < level.depthCtrl.riverFloodDepth) ? (level.depthCtrl.loaderDepth++) : ((level.depthCtrl.loaderDepth = 44350)));
distruction = new mcs.DistructionClip("distruction_mc", (_local2.x - 15) + (bmpWidth / 2), (_local2.y - 15) + (bmpHieght / 2), 0, _local3);
distruction.tint = level.tint;
distruction.attachClip();
level.clipsAttached.push(distruction);
}
function removeDistruction() {
level.removeFromStageClipsArray(distruction);
distruction.removeClip();
}
function attachConstruction() {
var _local2 = flash.display.BitmapData.loadBitmap((linkID + "Img") + rot);
var _local3 = level.findSquere(this);
var _local4 = ((level.depthCtrl.loaderDepth < level.depthCtrl.riverFloodDepth) ? (level.depthCtrl.loaderDepth++) : ((level.depthCtrl.loaderDepth = 44350)));
construction = new mcs.ConstructionClip("construction_mc", (_local3.x - 15) + (_local2.width / 2), (_local3.y - 15) + (_local2.height / 2), 0, _local4);
construction.tint = level.tint;
construction.attachClip();
level.clipsAttached.push(construction);
}
function removeConstruction() {
level.removeFromStageClipsArray(construction);
construction.removeClip();
}
function attachFire() {
var _local2 = level.findSquere(this);
var _local3 = ((level.depthCtrl.loaderDepth < level.depthCtrl.riverFloodDepth) ? (level.depthCtrl.loaderDepth++) : ((level.depthCtrl.loaderDepth = 44350)));
flame = new mcs.FlameClip("flames_mc", (_local2.x - 15) + (bmpWidth / 2), (_local2.y - 15) + (bmpHieght / 2), 0, _local3);
flame.attachClip();
level.clipsAttached.push(flame);
}
function removeFire() {
level.removeFromStageClipsArray(flame);
flame.removeClip();
}
function resetCamperParameters() {
var _local3 = 0;
while (_local3 < level.camperGroups.length) {
var _local2 = level.camperGroups[_local3];
switch (kind) {
case Constants.ENTERTAINMENT :
_local2.calculateEntertainment();
_local2.calculateRoads();
break;
case Constants.PLEASURE :
_local2.calculateLanscape();
break;
case Constants.SANITARY :
_local2.calculateSanitary();
}
_local3++;
}
}
function playJazzyMusic() {
var _local4 = true;
var _local3 = 0;
while (_local3 < _global.game.LevelClip.buildings.length) {
if (_global.game.LevelClip.buildings[_local3] == this) {
_local4 = false;
break;
}
_local3++;
}
if (!_local4) {
if (!level.pause) {
if (getType() == Constants.disco) {
if (_global.game.JazzyMusic == false) {
_global.game.JazzyMusic = true;
_global.game.sndCtrl.playSound("disco_music", -1, this);
}
utils.Delegate.callDelayed(this, stopJazzyMusic, 60000);
} else if (getType() == Constants.bar) {
if (_global.game.JazzyMusic == false) {
_global.game.JazzyMusic = true;
_global.game.sndCtrl.playSound("bar_music", -1, this);
}
utils.Delegate.callDelayed(this, stopJazzyMusic, 60000);
} else if (getType() == Constants.restaurant) {
if (_global.game.JazzyMusic == false) {
_global.game.JazzyMusic = true;
_global.game.sndCtrl.playSound("restaurant_music", -1, this);
}
utils.Delegate.callDelayed(this, stopJazzyMusic, 60000);
}
} else {
utils.Delegate.callDelayed(this, playJazzyMusic, 10000);
}
}
}
function stopJazzyMusic() {
if (!level.pause) {
if (getType() == Constants.disco) {
_global.game.sndCtrl.stopSound("disco_music", this);
_global.game.JazzyMusic = false;
} else if (getType() == Constants.bar) {
_global.game.sndCtrl.stopSound("bar_music", this);
_global.game.JazzyMusic = false;
} else if (getType() == Constants.restaurant) {
_global.game.sndCtrl.stopSound("restaurant_music", this);
_global.game.JazzyMusic = false;
}
utils.Delegate.callDelayed(this, playJazzyMusic, 60000);
} else {
utils.Delegate.callDelayed(this, stopJazzyMusic, 10000);
}
}
function getEntireState() {
var _local2 = new Object();
_local2.linkID = linkID;
_local2.x = x;
_local2.y = y;
_local2.rot = rot;
_local2.depth = depth;
_local2.currentFrame = currentFrame;
_local2._state = _state;
_local2._cost = _cost;
_local2._type = _type;
_local2._rent = _rent;
_local2.bmpWidth = bmpWidth;
_local2.bmpHieght = bmpHieght;
_local2._defaultRent = _defaultRent;
_local2._people = _people;
_local2._visitors = _visitors;
_local2._luxuryPoints = _luxuryPoints;
_local2.teenCoef = teenCoef;
_local2.adultCoef = adultCoef;
_local2.oldCoef = oldCoef;
_local2.timeToBuild = timeToBuild;
_local2.numOfSquares = numOfSquares;
_local2.isDestroying = isDestroying;
_local2.chance = chance;
_local2.stormEff = stormEff;
_local2.fireEff = fireEff;
_local2.floodEff = floodEff;
_local2.repairExpence = repairExpence;
_local2.overAllIncome = overAllIncome;
_local2.congradulation = congradulation;
_local2.hasAnimation = hasAnimation;
if (buldozer) {
_local2.buldozer = true;
} else {
_local2.buldozer = false;
}
_local2.squares = new Array();
var _local3 = 0;
while (_local3 < squares.length) {
_local2.squares[_local3] = squares[_local3];
_local3++;
}
_local2.kind = kind;
_local2.isReserved = isReserved;
_local2.fireState = fireState;
return(_local2);
}
function restoreEntireState(es) {
linkID = es.linkID;
x = es.x;
y = es.y;
rot = es.rot;
depth = es.depth;
currentFrame = es.currentFrame;
_state = es._state;
_cost = es._cost;
_type = es._type;
_rent = es._rent;
_defaultRent = es._defaultRent;
_people = es._people;
_visitors = es._visitors;
_luxuryPoints = es._luxuryPoints;
teenCoef = es.teenCoef;
adultCoef = es.adultCoef;
oldCoef = es.oldCoef;
timeToBuild = es.timeToBuild;
numOfSquares = es.numOfSquares;
isDestroying = es.isDestroying;
chance = es.chance;
stormEff = es.stormEff;
fireEff = es.fireEff;
floodEff = es.floodEff;
repairExpence = es.repairExpence;
fireState = es.fireState;
overAllIncome = es.overAllIncome;
kind = es.kind;
bmpWidth = es.bmpWidth;
bmpHieght = es.bmpHieght;
isReserved = es.isReserved;
congradulation = es.congradulation;
hasAnimation = es.hasAnimation;
if (es.buldozer != undefined) {
buldozerOnStage = es.buldozer;
}
squares = new Array();
var _local4 = 0;
while (_local4 < es.squares.length) {
squares[_local4] = es.squares[_local4];
_local4++;
}
if (currentFrame == 2) {
build();
}
if (currentFrame == 3) {
done();
}
if (currentFrame == 4) {
repair();
}
if (currentFrame == 5) {
fireEffect();
setState(_state + fireEff);
}
if (currentFrame == 6) {
var _local6 = flash.display.BitmapData.loadBitmap((linkID + "Img") + rot);
var _local8 = new flash.geom.Rectangle(0, 0, _local6.width, _local6.height);
var _local7 = _local6.clone();
var _local10 = level.findSquere(this);
var _local5 = {x:_local10.x - 15, y:_local10.y - 15};
var _local9 = new flash.geom.Rectangle(_local5.x, _local5.y, _local6.width, _local6.height);
level.mapFog.copyPixels(level.onlyRoads, _local9, new flash.geom.Point(_local5.x, _local5.y), undefined, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(level.onlyRoadsLake, _local9, new flash.geom.Point(_local5.x, _local5.y), undefined, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(level.onlyRoadsRiver, _local9, new flash.geom.Point(_local5.x, _local5.y), undefined, new flash.geom.Point(0, 0), false);
level.mapFog.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapWithoutRoads.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsLake.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsRiver.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
destroy();
}
if ((currentFrame == 7) && (kind == Constants.RESERVATION_SPOT)) {
var _local6 = flash.display.BitmapData.loadBitmap(linkID + rot);
var _local8 = new flash.geom.Rectangle(0, 0, _local6.width, _local6.height);
var _local7 = _local6.clone();
var _local10 = level.findSquere(this);
var _local5 = {x:_local10.x - 15, y:_local10.y - 15};
level.mapFog.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapWithoutRoads.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsLake.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsRiver.copyPixels(_local6, _local8, new flash.geom.Point(_local5.x, _local5.y), _local7, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
}
if ((currentFrame == 7) && (kind == Constants.ENTERTAINMENT)) {
done();
if ((((((getType() == Constants.hugeWaterPark) || (getType() == Constants.tennisField)) || (getType() == Constants.tableTennis)) || (getType() == Constants.footballField)) || (getType() == Constants.bigOutdoorPool)) || (getType() == Constants.smallOutdoorPool)) {
if (hasAnimation) {
currentFrame = 7;
clip.gotoAndStop("anim");
attachAnimation();
}
utils.Delegate.callDelayed(this, stopAnimation, 50000);
}
}
if (kind == Constants.ENTERTAINMENT) {
if (_global.game.LevelClip == level) {
if (getType() == Constants.disco) {
utils.Delegate.callDelayed(this, playJazzyMusic, 10000);
} else if (getType() == Constants.bar) {
utils.Delegate.callDelayed(this, playJazzyMusic, 50000);
} else if (getType() == Constants.restaurant) {
utils.Delegate.callDelayed(this, playJazzyMusic, 80000);
}
if (currentFrame != 7) {
if ((((((getType() == Constants.hugeWaterPark) || (getType() == Constants.tennisField)) || (getType() == Constants.tableTennis)) || (getType() == Constants.footballField)) || (getType() == Constants.bigOutdoorPool)) || (getType() == Constants.smallOutdoorPool)) {
utils.Delegate.callDelayed(this, playAnimation, (chance + 10) * 1000);
}
}
}
}
if ((currentFrame == 7) && (kind == Constants.PLEASURE)) {
done();
}
}
}
Symbol 2803 MovieClip [__Packages.mcs.Group] Frame 0
class mcs.Group
{
var happiness, noisiness, car, campers, type, desiredObjectType, timeOfArrival, timeOfStaying, level, typesDesiredObjects, complained, hasExclamation, complainReason, additionalText, complainText, moneyBack, age, toiletnum210, showernum210, washingnum210, trashnum210, entertainnum450, entertainnum130, entertainnum600, entertainnum300, entertainnum90, roadsNum450, roadsNum300, lampnum90, landscapenum120, camfirenum210, distanceToQC, numberOfQC60, distanceToNC, numberOfNC60, stateFlag, toiletFlag, wMachineFlag, showerFlag, entertainmentFlag, roadsFlag, parkingFlag, campfireFlag, lampFlag, landscapeFlag, trashFlag, campingObject, complains, exclamation, jumpPopUp, expenses;
function Group (car_, toa, noise) {
happiness = 100;
noisiness = noise;
car = car_;
campers = car.campers;
type = car.groupType;
desiredObjectType = car.desiredObjectType;
timeOfArrival = toa;
timeOfStaying = car.timeOfStaying;
level = _global.game.LevelClip;
typesDesiredObjects = Constants.getDesiredObjectTypes(type).slice();
complained = false;
hasExclamation = false;
complainReason = new Array();
var _local3 = 0;
while (_local3 <= 22) {
complainReason[_local3] = new Object();
complainReason[_local3].exists = false;
complainReason[_local3].txt = "";
complainReason[_local3].whereToFind = "";
_local3++;
}
additionalText = "";
complainText = "";
moneyBack = 0;
if (type < 5) {
age = 0;
} else if (type < 10) {
age = 1;
} else {
age = 2;
}
toiletnum210 = 0;
showernum210 = 0;
washingnum210 = 0;
trashnum210 = 0;
entertainnum450 = 0;
entertainnum130 = 0;
entertainnum600 = 0;
entertainnum300 = 0;
entertainnum90 = 0;
roadsNum450 = 0;
roadsNum300 = 0;
lampnum90 = 0;
landscapenum120 = 0;
camfirenum210 = 0;
distanceToQC = 0;
numberOfQC60 = 0;
distanceToNC = 0;
numberOfNC60 = 0;
stateFlag = 0;
toiletFlag = 0;
wMachineFlag = 0;
showerFlag = 0;
entertainmentFlag = 0;
roadsFlag = 0;
parkingFlag = 0;
campfireFlag = 0;
lampFlag = 0;
landscapeFlag = 0;
trashFlag = 0;
}
function getCampingObject() {
return(campingObject);
}
function setCampingObject(co) {
campingObject = co;
}
function getCampers() {
return(campers);
}
function getTimeOfStaying() {
return(timeOfStaying);
}
function accomodateCamers(co) {
campingObject = co;
if (level.firstTwo < 2) {
level.firstTwo++;
timeOfStaying = 1 * level.daynightLasting;
}
if (level.firstCampers) {
level.firstCampers = false;
}
if ((_global.game.LevelClip.currentPopUp == 13) || (_global.game.LevelClip.currentPopUp == 14)) {
_global.game.LevelClip.helpTips[15].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[15], _global.game.LevelClip.helpTips[15].hidePopUp, 10000);
}
var _local4 = 0;
while (_local4 < getCampers().length) {
var _local3 = getCampers()[_local4];
if (_local3.age == 0) {
level.teenagers++;
} else if (_local3.age == 1) {
level.adult++;
} else if (_local3.age == 2) {
level.old++;
}
_local3.camperGroup = this;
level.clipsAttached.push(_local3);
level.characters.push(_local3);
_local3.setMcProps(co.x, co.y, 0, level.depthCtrl.characterDepth++, level);
_local3.setTint(level.tint);
_local3.accomodated = true;
_local3.changeActivity();
_local4++;
}
calculateSanitary();
calculateTrash();
calculateEntertainment();
calculateRoads();
calculateLanscape();
level.camperGroups.push(this);
if (car.state == 0) {
var _local11 = int(car.x / level.spacing);
var _local10 = int(car.y / level.spacing);
}
if ((car.desiredObjectType != Constants.motorHomeSpot) && (car.desiredObjectType != Constants.bigMotorHomeSpot)) {
var _local5 = level.parkingTiles;
var _local8 = false;
_local4 = 0;
while (_local4 < _local5.length) {
if (!_local5[_local4].isReserved) {
car.parkCar(_local5[_local4]);
_local8 = true;
break;
}
_local4++;
}
if (!_local8) {
car.parkCar(co.findFreeCell().cell);
_local4 = 0;
while (_local4 < campers.length) {
var _local6 = campers[_local4];
_local6.setHappiness(25);
_local4++;
}
setHappiness(25);
if (parkingFlag == 0) {
parkingFlag = 1;
}
setComplain("This group is furious that you have placed their car near the tent spot and they urged us to build a new parking space so that they can enjoy our environment in peace. Hurry up\u2026 They are losing their patience. \n", 1);
}
} else {
car.removeCar();
car.state = 1;
}
var _local9 = co.getState();
if ((((age == 0) && (_local9 <= 30)) || ((age == 1) && (_local9 <= 60))) || ((age == 2) && (_local9 <= 85))) {
setHappiness(10);
if (stateFlag == 0) {
stateFlag = 1;
}
setComplain("You need to repair this object because its condition is very bad. This group doesn\u2019t like that. Click on the repair button to automatically repair this object. \n", 2);
}
}
function setTimeOfStaying() {
timeOfStaying--;
if (timeOfStaying == 0) {
_global.game.sndCtrl.stopSound("happy_campers_leaving");
_global.game.sndCtrl.playSound("happy_campers_leaving", -1, this);
departure();
}
}
function departure() {
campingObject._people = campingObject._people - campers.length;
var _local15 = campers.length;
removeExclamation();
var _local5 = 0;
while (_local5 < level.characters.length) {
var _local4 = 0;
while (_local4 < campers.length) {
if (level.characters[_local5] == campers[_local4]) {
var _local3 = level.characters[_local5];
_local3.removeClip();
if (_local3.age == 0) {
level.teenagers--;
} else if (_local3.age == 1) {
level.adult--;
} else if (_local3.age == 2) {
level.old--;
}
level.removeFromStageClipsArray(_local3);
}
_local4++;
}
_local5++;
}
var _local4 = 0;
while (_local4 < campers.length) {
_local5 = 0;
while (_local5 < level.characters.length) {
if (level.characters[_local5] == campers[_local4]) {
level.characters.splice(_local5, 1);
break;
}
_local5++;
}
_local4++;
}
_local5 = 0;
while (_local5 < level.camperGroups.length) {
if (level.camperGroups[_local5] == this) {
level.camperGroups.splice(_local5, 1);
break;
}
_local5++;
}
car.removeCar();
car = undefined;
campingObject.camperGroup = undefined;
if (campingObject.currentFrame != 5) {
campingObject.done();
}
if (campingObject.kind == Constants.RESERVATION_SPOT) {
var _local10 = campingObject.findFreeCell().cell;
var _local11 = true;
_local5 = 0;
while (_local5 < level.trashcans.length) {
var _local6 = level.trashcans[_local5];
var _local9 = utils.MathUtils.getDistance(_local10.x, _local10.y, _local6.x, _local6.y);
if (_local9 <= 180) {
_local11 = false;
break;
}
_local5++;
}
if (_local11) {
var _local17 = ((level.depthCtrl.trashDepth < level.depthCtrl.roadFrameDepth) ? (level.depthCtrl.trashDepth++) : ((level.depthCtrl.trashDepth = 2000)));
var _local14 = new mcs.Trash("trash", _local10.x, _local10.y, 0, _local17);
_local14.setTint(level.tint);
level.trash.push(_local14);
level.clipsOnStage.push(_local14);
_local14.attachClip();
_local5 = 0;
while (_local5 < level.camperGroups.length) {
var _local7 = level.camperGroups[_local5];
if (_local7 != this) {
_local7.calculateTrash();
}
_local5++;
}
}
}
timeOfStaying = 0;
if (level.mouse.replace) {
if (this == level.replacingGroup) {
level.replacingGroup = undefined;
level.mouse.clip.removeMovieClip();
level.mouse.replace = false;
}
}
_global.game.sndCtrl.stopSound("happysound");
_global.game.sndCtrl.playSound("happysound", -1, this);
var _local13 = "";
if (happiness > 50) {
level.increaseNumberOfCampersServed(_local15);
_local13 = "plus";
} else {
_local13 = "minus";
}
var _local16 = level.translateCameraToStage(campingObject.x, campingObject.y);
var _local18 = level.attachMovie(_local13 + _local15.toString(), _local13 + _local15.toString(), 44920, {_x:_local16.x, _y:_local16.y});
attachJumpPopUp(_local13 + _local15.toString());
utils.Delegate.callDelayed(this, removeJumpPopUp, 1000);
if (_local13 == "plus") {
if (!level.firstDeparture) {
level.firstDeparture = true;
_global.game.interface_.getLevelInterface().congratulation("Congratulations!", 1);
level.statScrText = "You have served your first campers. \n";
}
}
var _local12 = 0;
_local5 = 0;
while (_local5 < _global.game.LevelClip.camperGroups.length) {
var _local8 = _global.game.LevelClip.camperGroups[_local5];
if (_local8.getComplainText() != "") {
_local12++;
}
_local5++;
}
if ((_local12 == 0) && (_global.game.interface_.getLevelInterface().complainClip.shown)) {
_global.game.interface_.getLevelInterface().complainClip.gotoAndStop("show");
}
}
function getTimeOfArrival() {
return(timeOfArrival);
}
function distanceToNoisyCampers() {
if (level.camperGroups.length > 0) {
var _local4 = Number.MAX_VALUE;
var _local2 = 0;
while (_local2 < level.camperGroups.length) {
if ((level.camperGroups[_local2] != this) && (level.camperGroups[_local2].type <= 4)) {
var _local3 = utils.MathUtils.getDistance(campingObject.x, campingObject.y, level.camperGroups[_local2].getCampingObject().x, level.camperGroups[_local2].getCampingObject().y);
if (_local4 > _local3) {
_local4 = _local3;
}
}
_local2++;
}
if (_local4 < Number.MAX_VALUE) {
return(_local4);
}
}
return(Number.MAX_VALUE);
}
function numberOfNoisyCampers(radius) {
if (level.camperGroups.length > 0) {
var _local4 = 0;
var _local2 = 0;
while (_local2 < level.camperGroups.length) {
if ((level.camperGroups[_local2] != this) && (level.camperGroups[_local2].type <= 4)) {
var _local3 = utils.MathUtils.getDistance(campingObject.x, campingObject.y, level.camperGroups[_local2].getCampingObject().x, level.camperGroups[_local2].getCampingObject().y);
if (_local3 <= radius) {
_local4++;
}
}
_local2++;
}
}
return(_local4);
}
function distanceToQuietCampers() {
if (level.camperGroups.length > 0) {
var _local4 = Number.MAX_VALUE;
var _local2 = 0;
while (_local2 < level.camperGroups.length) {
if ((level.camperGroups[_local2] != this) && (level.camperGroups[_local2].type == 10)) {
var _local3 = utils.MathUtils.getDistance(campingObject.x, campingObject.y, level.camperGroups[_local2].getCampingObject().x, level.camperGroups[_local2].getCampingObject().y);
if (_local4 > _local3) {
_local4 = _local3;
}
}
_local2++;
}
if (_local4 < Number.MAX_VALUE) {
return(_local4);
}
}
return(Number.MAX_VALUE);
}
function numberOfQuietCampers(radius) {
if (level.camperGroups.length > 0) {
var _local4 = 0;
var _local2 = 0;
while (_local2 < level.camperGroups.length) {
if ((level.camperGroups[_local2] != this) && (level.camperGroups[_local2].type == 10)) {
var _local3 = utils.MathUtils.getDistance(campingObject.x, campingObject.y, level.camperGroups[_local2].getCampingObject().x, level.camperGroups[_local2].getCampingObject().y);
if (_local3 <= radius) {
_local4++;
}
}
_local2++;
}
}
return(_local4);
}
function numOfObjectsOfTypeWithinRadius(type, radius) {
var _local5 = 0;
var _local3 = 0;
while (_local3 < level.clipsOnStage.length) {
var _local2 = level.clipsOnStage[_local3];
if (_local2.getType() == type) {
var _local4 = utils.MathUtils.getDistance(campingObject.x, campingObject.y, _local2.x, _local2.y);
if (_local4 <= radius) {
_local5++;
}
}
_local3++;
}
return(_local5);
}
function numOfObjectsOfKindWithinRadius(kind_, radius) {
var _local5 = 0;
var _local3 = 0;
while (_local3 < level.clipsOnStage.length) {
var _local2 = level.clipsOnStage[_local3];
if (_local2.kind == kind_) {
var _local4 = utils.MathUtils.getDistance(campingObject.x, campingObject.y, _local2.x, _local2.y);
if (_local4 <= radius) {
_local5++;
}
}
_local3++;
}
return(_local5);
}
function numOfTrashWithinRadius(radius) {
var _local5 = 0;
var _local2 = 0;
while (_local2 < level.trash.length) {
var _local3 = level.trash[_local2];
var _local4 = utils.MathUtils.getDistance(campingObject.x, campingObject.y, _local3.x, _local3.y);
if (_local4 <= radius) {
_local5++;
}
_local2++;
}
return(_local5);
}
function numOfRoadsOfInterest(radius, desObjRadius) {
var _local6 = 0;
var _local2 = campingObject.nearestObjectDistance(level.road);
if (_local2 <= radius) {
_local6++;
var _local3 = 0;
while (_local3 < typesDesiredObjects.length) {
var _local4 = 0;
while (_local4 < level.buildings.length) {
var _local5 = level.buildings[_local4];
if ((_local5.kind == Constants.ENTERTAINMENT) && (_local5.getType() == typesDesiredObjects[_local3])) {
var _local8 = utils.MathUtils.getDistance(campingObject.x, campingObject.y, _local5.x, _local5.y);
if (_local8 <= desObjRadius) {
_local2 = _local5.nearestObjectDistance(level.road);
if (_local2 <= radius) {
_local6++;
}
}
}
_local4++;
}
_local3++;
}
}
var _local4 = 1;
while (_local4 < level.trash.length) {
var _local5 = level.trash[_local4];
var _local8 = utils.MathUtils.getDistance(campingObject.x, campingObject.y, _local5.x, _local5.y);
if (_local8 <= radius) {
_local6++;
}
_local4++;
}
return(_local6);
}
function calculateSanitary() {
if (age > 0) {
toiletnum210 = (((numOfObjectsOfTypeWithinRadius(Constants.woodenToilet, 210) + numOfObjectsOfTypeWithinRadius(Constants.stoneToilet, 210)) + numOfObjectsOfTypeWithinRadius(Constants.stoneToiletShower, 210)) + numOfObjectsOfTypeWithinRadius(Constants.bigSanitaryHouse, 210)) + numOfObjectsOfTypeWithinRadius(Constants.allInOneSanitary, 210);
showernum210 = (numOfObjectsOfTypeWithinRadius(Constants.stoneToiletShower, 210) + numOfObjectsOfTypeWithinRadius(Constants.bigSanitaryHouse, 210)) + numOfObjectsOfTypeWithinRadius(Constants.allInOneSanitary, 210);
washingnum210 = numOfObjectsOfTypeWithinRadius(Constants.washingMachineUnit, 210) + numOfObjectsOfTypeWithinRadius(Constants.allInOneSanitary, 210);
}
}
function calculateTrash() {
if (age > 0) {
trashnum210 = numOfTrashWithinRadius(210);
}
}
function calculateEntertainment() {
switch (age) {
case 0 :
entertainnum600 = numOfObjectsOfKindWithinRadius(Constants.ENTERTAINMENT, 600);
break;
case 1 :
entertainnum450 = numOfObjectsOfKindWithinRadius(Constants.ENTERTAINMENT, 450);
entertainnum130 = numOfObjectsOfKindWithinRadius(Constants.ENTERTAINMENT, 130);
break;
case 2 :
entertainnum300 = numOfObjectsOfKindWithinRadius(Constants.ENTERTAINMENT, 300);
entertainnum90 = numOfObjectsOfKindWithinRadius(Constants.ENTERTAINMENT, 90);
}
}
function calculateDistances() {
switch (age) {
case 0 :
distanceToQC = distanceToQuietCampers();
numberOfQC60 = numberOfQuietCampers(60);
break;
case 1 :
break;
case 2 :
distanceToNC = distanceToNoisyCampers();
numberOfNC60 = numberOfNoisyCampers(60);
}
}
function calculateRoads() {
switch (age) {
case 0 :
break;
case 1 :
if (entertainnum450 > 0) {
roadsNum450 = numOfRoadsOfInterest(120, 450);
}
break;
case 2 :
if (entertainnum300 <= 0) {
break;
}
roadsNum300 = numOfRoadsOfInterest(60, 300);
}
}
function calculateLanscape() {
switch (age) {
case 0 :
camfirenum210 = numOfObjectsOfTypeWithinRadius(Constants.campFire, 210);
break;
case 1 :
landscapenum120 = (((numOfObjectsOfTypeWithinRadius(Constants.bigPark, 120) + numOfObjectsOfTypeWithinRadius(Constants.mediumPark, 120)) + numOfObjectsOfTypeWithinRadius(Constants.smallPark, 120)) + numOfObjectsOfTypeWithinRadius(Constants.tree, 120)) + numOfObjectsOfTypeWithinRadius(Constants.hedge, 120);
break;
case 2 :
lampnum90 = numOfObjectsOfTypeWithinRadius(Constants.electricalLamp, 90);
}
}
function changeHappiness() {
var _local4 = 0.1;
var _local6 = Math.ceil((level.clock.toSeconds() - timeOfArrival) / level.daynightLasting);
var _local9 = campingObject.getState();
var _local5 = hasComplained();
switch (age) {
case 0 :
var _local16 = 1;
if (_local9 <= 30) {
_local16 = 0;
}
if (!_local5) {
setHappiness((_local4 * (1 - _local16)) * 2);
}
if (_local6 >= 2) {
var _local7 = camfirenum210;
var _local21 = ((_local7 > 0) ? 1 : 0);
var _local18 = (level.isDay ? 0 : 1);
if (!_local5) {
setHappiness((_local4 * (0.5 - (_local18 * _local21))) * 2);
}
if ((_local7 == 0) && (!level.isDay)) {
if (campfireFlag == 0) {
campfireFlag = 1;
}
setComplain("The teenagers want some campfire within 6 squares distance. Build a fireplace. \n", 3);
} else if (_local7 > 0) {
servComplain(3);
}
var _local22 = happiness;
if (!_local5) {
setHappiness((_local4 * (60 - distanceToQC)) * (numberOfQC60 / 60));
}
if ((_local22 > 66) && (happiness <= 66)) {
setComplain("These teenage campers don\u2019t like the fact that they are surrounded with quiet and old campers. Their happiness is decreasing rapidly. They have threatened to leave our camp. One of the things you can try is to move them to an area with younger campers. \n", 4);
}
}
if (_local6 >= 3) {
var _local26 = entertainnum600;
if (!_local5) {
setHappiness((_local4 * (0.5 - _local26)) * 2);
}
if (_local26 == 0) {
if (entertainmentFlag == 0) {
entertainmentFlag = 1;
}
setComplain("This group wants some entertainment. Build some entertainment objects that would be of interest of this group. (e.g. disco, table tennis, football field, an outdoor pool, an arcade and a tennis field) \n", 5);
} else {
servComplain(5);
}
}
break;
case 1 :
_local16 = 1;
if (_local9 <= 60) {
_local16 = 0;
}
if (!_local5) {
setHappiness((_local4 * (1 - _local16)) * 2);
}
if ((level.clock.toSeconds() - timeOfArrival) > (level.daynightLasting / 2)) {
if (((campingObject.getType() != Constants.basicBungalow) && (campingObject.getType() != Constants.bigBungalow)) && (campingObject.getType() != Constants.villaBungalow)) {
var _local11 = toiletnum210;
var _local20 = ((_local11 > 0) ? 1 : 0);
if (!_local5) {
setHappiness((_local4 * (0.5 - _local20)) * 2);
}
if (_local11 == 0) {
if (toiletFlag == 0) {
toiletFlag = 1;
}
setComplain("This group wants a toilet within 6 squares distance. Build one. \n", 6);
} else {
servComplain(6);
}
}
var _local15 = trashnum210;
var _local23 = ((_local15 > 0) ? 1 : 0);
if (!_local5) {
setHappiness((_local4 * (0.5 - _local23)) * 2);
}
if (_local15 > 5) {
if (trashFlag == 0) {
trashFlag = 1;
}
setComplain("The thrash around these campers has piled up. Put Trashcans within 6 squares of distance from the trash and click on it to clean it. You can also use the automatic clean button. \n", 7);
} else {
servComplain(7);
}
}
if (_local6 >= 2) {
var _local14 = landscapenum120;
if (!_local5) {
setHappiness((_local4 * (0.5 - _local14)) * 2);
}
if (_local14 == 0) {
if (landscapeFlag == 0) {
landscapeFlag = 1;
}
setComplain("This group of adult campers don\u2019t like the surroundings and they have threatened to leave our camp. Improve the landscape around them by placing some hedges, trees or parks within 3 squares distance. \n", 8);
} else {
servComplain(8);
}
}
if (_local6 >= 3) {
var _local26 = entertainnum450;
if (!_local5) {
setHappiness((_local4 * (0.5 - _local26)) * 2);
}
if (_local26 == 0) {
if (entertainmentFlag == 0) {
entertainmentFlag = 1;
}
setComplain("This group wants some entertainment. Build some entertainment objects that would be of interest of this group. (e.g. restaurant,a playground, a play arena, a supermarket, a pool and a bar) \n", 10);
} else {
servComplain(10);
}
}
if (_local6 >= 4) {
var _local26 = entertainnum450;
var _local27 = entertainnum130;
var _local8 = 0;
if (_local26 > 0) {
_local8 = roadsNum450;
if (!_local5) {
setHappiness((_local4 * (0.5 - _local8)) * 2);
}
}
if ((_local8 == 0) && (_local27 == 0)) {
if (roadsFlag == 0) {
roadsFlag = 1;
}
setComplain("This group has interest in the entertainment objects that you built but it seems the road structure is not good. Roads within 4 squares for adults are the most helpful. Build suitable roads. \n", 11);
} else {
servComplain(11);
}
}
if (_local6 >= 5) {
var _local13 = showernum210;
var _local25 = ((_local13 > 0) ? 1 : 0);
if (!_local5) {
setHappiness((_local4 * (0.5 - _local25)) * 2);
}
if (_local13 == 0) {
if (showerFlag == 0) {
showerFlag = 1;
}
setComplain("This group wants a shower within 6 squares distance. Build one. \n", 12);
} else {
servComplain(12);
}
}
if (_local6 >= 6) {
var _local12 = washingnum210;
var _local17 = ((_local12 > 0) ? 1 : 0);
if (!_local5) {
setHappiness((_local4 * (0.5 - _local17)) * 2);
}
if (_local12 == 0) {
if (wMachineFlag == 0) {
wMachineFlag = 1;
}
setComplain("This group wants a washing machine unit within 6 squares distance. Build one. \n", 13);
} else {
servComplain(13);
}
}
break;
case 2 :
_local16 = 1;
if (_local9 <= 85) {
_local16 = 0;
}
if (!_local5) {
setHappiness((_local4 * (1 - _local16)) * 2);
}
if ((level.clock.toSeconds() - timeOfArrival) > (level.daynightLasting / 2)) {
if (((campingObject.getType() != Constants.basicBungalow) && (campingObject.getType() != Constants.bigBungalow)) && (campingObject.getType() != Constants.villaBungalow)) {
var _local11 = toiletnum210;
var _local20 = ((_local11 > 0) ? 1 : 0);
if (!_local5) {
setHappiness((_local4 * (0.5 - _local20)) * 2);
}
if (_local11 == 0) {
if (toiletFlag == 0) {
toiletFlag = 1;
}
setComplain("This group wants a toilet within 6 squares distance. Build one. \n", 14);
} else {
servComplain(14);
}
}
var _local15 = trashnum210;
var _local23 = ((_local15 > 0) ? 1 : 0);
if (!_local5) {
setHappiness((_local4 * (0.5 - _local23)) * 2);
}
if (_local15 > 5) {
if (trashFlag == 0) {
trashFlag = 1;
}
setComplain("The thrash around these campers has piled up. Put Trashcans within 6 squares of distance from the trash and click on it to clean it. You can also use the automatic clean button. \n", 15);
} else {
servComplain(15);
}
}
if (_local6 >= 2) {
var _local10 = lampnum90;
var _local19 = ((_local10 > 0) ? 1 : 0);
var _local18 = (level.isDay ? 0 : 1);
if (!_local5) {
setHappiness((_local4 * (0.5 - (_local18 * _local19))) * 2);
}
if ((_local10 == 0) && (!level.isDay)) {
if (lampFlag == 0) {
lampFlag = 1;
}
setComplain("The older campers need electric lamps within 2 squares distance. Place electric lamps near older campers. \n", 16);
} else if (_local10 > 0) {
servComplain(16);
}
var _local22 = happiness;
if (!_local5) {
setHappiness((_local4 * (60 - distanceToNoisyCampers())) * (numberOfNoisyCampers(60) / 60));
}
if ((_local22 > 66) && (happiness <= 66)) {
setComplain("This group of elderly people don\u2019t like the fact that they are surrounded with the noisy teenagers and their happiness is decreasing rapidly. They have threatened to leave our camp. One of the things you can try is to move them to a more quiet area. \n", 17);
}
}
if (_local6 >= 3) {
var _local26 = entertainnum300;
if (!_local5) {
setHappiness((_local4 * (0.5 - _local26)) * 2);
}
if (_local26 == 0) {
if (entertainmentFlag == 0) {
entertainmentFlag = 1;
}
setComplain("This group wants some entertainment. Build some entertainment objects that would be of interest of this group. (e.g. A bingo hall, a restaurant, an indoor pool, a supermarket, table tennis and a tennis field) \n", 18);
} else {
servComplain(18);
}
}
if (_local6 >= 4) {
var _local26 = entertainnum300;
var _local24 = entertainnum90;
var _local8 = 0;
if (_local26 > 0) {
_local8 = roadsNum300;
if (!_local5) {
setHappiness((_local4 * (0.5 - _local8)) * 2);
}
}
if ((_local8 == 0) && (_local24 == 0)) {
if (roadsFlag == 0) {
roadsFlag = 1;
}
setComplain("This group has interest in the entertainment objects that you built but the road structure is not good. Roads within 2 squares are the most helpful. Build suitable roads. \n", 19);
} else {
servComplain(19);
}
}
if (_local6 >= 5) {
var _local13 = showernum210;
var _local25 = ((_local13 > 0) ? 1 : 0);
if (!_local5) {
setHappiness((_local4 * (0.5 - _local25)) * 2);
}
if (_local13 == 0) {
if (showerFlag == 0) {
showerFlag = 1;
}
setComplain("This group wants a shower within 6 squares distance. Build one. \n", 20);
} else {
servComplain(20);
}
}
if (_local6 < 6) {
break;
}
var _local12 = washingnum210;
var _local17 = ((_local12 > 0) ? 1 : 0);
if (!_local5) {
setHappiness((_local4 * (0.5 - _local17)) * 2);
}
if (_local12 == 0) {
if (wMachineFlag == 0) {
wMachineFlag = 1;
}
setComplain("This group wants a washing machine unit within 6 squares distance. Build one. \n", 21);
} else {
servComplain(21);
}
}
if (hasComplained()) {
setHappiness(_local4);
}
if (happiness <= 50) {
moneyBack = int((int(timeOfStaying / level.daynightLasting) * campingObject.getRent()) * (1 + Math.random()));
level.changeBudget(-moneyBack);
if (level.relizedTurnover[campingObject.linkID] != undefined) {
level.relizedTurnover[campingObject.linkID] = level.relizedTurnover[campingObject.linkID] - moneyBack;
} else {
level.relizedTurnover[campingObject.linkID] = -moneyBack;
}
additionalText = ("(This group has left the camp. We had to give them " + moneyBack) + "$ back.)";
var _local3 = 0;
while (_local3 < level.complains.length) {
if (complains == level.complains[_local3]) {
level.complains[_local3].reasons = level.complains[_local3].reasons + additionalText;
break;
}
_local3++;
}
_global.game.sndCtrl.stopSound("angry_campers_leaving");
_global.game.sndCtrl.playSound("angry_campers_leaving", -1, this);
departure();
}
if ((happiness <= 65) && (!complained)) {
}
}
function setHappiness(value) {
happiness = happiness - value;
happiness = ((happiness > 100) ? 100 : (happiness));
happiness = ((happiness < 0) ? 0 : (happiness));
}
function getHappiness() {
(servComplain);// not popped
return(happiness);
}
function hasComplained() {
for (var _local2 in complainReason) {
if (complainReason[_local2].exists) {
return(true);
}
}
return(false);
}
function setComplain(txt, reason) {
if (timeOfStaying > 10) {
if (!complainReason[reason].exists) {
complainReason[reason].exists = true;
complainReason[reason].txt = txt;
if (stateFlag == 1) {
if (level.stateFlag == 0) {
level.stateFlag = 1;
}
stateFlag = 2;
complainReason[reason].whereToFind = " Go in the tools menu and use the repair tool to repair objects individually. If you want to repair every object in the camp, click on automatic repair. ";
}
if (toiletFlag == 1) {
if (level.toiletFlag == 0) {
level.toiletFlag = 1;
}
toiletFlag = 2;
complainReason[reason].whereToFind = " Go in the construction menu and click on the sanitary tab to locate the toilet. ";
}
if (wMachineFlag == 1) {
if (level.wMachineFlag == 0) {
level.wMachineFlag = 1;
}
wMachineFlag = 2;
complainReason[reason].whereToFind = " Go in the construction menu and click on the sanitary tab to locate the washing machine unit. ";
}
if (showerFlag == 1) {
if (level.showerFlag == 0) {
level.showerFlag = 1;
}
showerFlag = 2;
complainReason[reason].whereToFind = " Go in the construction menu and click on the sanitary tab to locate the shower.";
}
if (entertainmentFlag == 1) {
if (level.entertainmentFlag == 0) {
level.entertainmentFlag = 1;
}
entertainmentFlag = 2;
complainReason[reason].whereToFind = " Go in the construction menu and click on the stores/entertainment tab to get the list of available entertainment objects. ";
}
if (roadsFlag == 1) {
if (level.roadsFlag == 0) {
level.roadsFlag = 1;
}
roadsFlag = 2;
complainReason[reason].whereToFind = " Go in the construction menu and click on the roads tab to choose from different types of roads. Select the road and click and drag on the map to build it. ";
}
if (parkingFlag == 1) {
if (level.parkingFlag == 0) {
level.parkingFlag = 1;
}
parkingFlag = 2;
complainReason[reason].whereToFind = " Go in the construction menu and click on the roads tab to choose from different types of parking spots. ";
}
if (campfireFlag == 1) {
if (level.campfireFlag == 0) {
level.campfireFlag = 1;
}
campfireFlag = 2;
complainReason[reason].whereToFind = " Go in the landscaping menu to locate the fireplace. ";
}
if (lampFlag == 1) {
if (level.lampFlag == 0) {
level.lampFlag = 1;
}
lampFlag = 2;
complainReason[reason].whereToFind = " Go in the landscaping menu to locate the El. Lamp. ";
}
if (landscapeFlag == 1) {
if (level.landscapeFlag == 0) {
level.landscapeFlag = 1;
}
landscapeFlag = 2;
complainReason[reason].whereToFind = " Go in the landscaping menu to locate the available landscape objects. ";
}
if (trashFlag == 1) {
if (level.trashFlag == 0) {
level.trashFlag = 1;
}
trashFlag = 2;
complainReason[reason].whereToFind = " Go in the construction menu and click on the sanitary tab to locate the trashcan. If you want to spend some money you can also use the clean entire camp option in the tools menu. ";
}
_global.game.interface_.getLevelInterface().complaints();
attachExclamation();
}
}
}
function getComplainText() {
var _local3 = "";
var _local5 = "";
var _local4 = 1;
var _local2 = 0;
while (_local2 < complainReason.length) {
if (complainReason[_local2].exists) {
if (complainReason[_local2].txt != "") {
_local3 = _local3 + ((("COMPLAINT #" + _local4) + " : ") + complainReason[_local2].txt);
_local3 = _local3 + newline;
if (complainReason[_local2].whereToFind != "") {
_local3 = _local3 + ((("HINT #" + _local4) + " : ") + complainReason[_local2].whereToFind);
_local3 = _local3 + newline;
}
_local4++;
}
}
_local2++;
}
if (_local3 != "") {
}
if (_local5 != "") {
_local5 = "HINT : " + _local5;
}
complainText = _local3;
return(_local3);
}
function servComplain(reason) {
if (complainReason[reason].exists) {
complainReason[reason].exists = false;
removeExclamation();
complainReason[reason].txt = "";
complainReason[reason].whereToFind = "";
var _local4 = false;
var _local5 = level.translateCameraToStage(campingObject.x, campingObject.y);
if (reason == 8) {
_local4 = true;
attachJumpPopUp("nice");
utils.Delegate.callDelayed(this, removeJumpPopUp, 1000);
} else if ((reason == 3) || (reason == 16)) {
_local4 = true;
attachJumpPopUp("nice");
utils.Delegate.callDelayed(this, removeJumpPopUp, 1000);
} else if ((reason == 11) || (reason == 19)) {
_local4 = true;
attachJumpPopUp("nice");
utils.Delegate.callDelayed(this, removeJumpPopUp, 1000);
} else if ((((reason == 1) || (reason == 5)) || (reason == 10)) || (reason == 18)) {
_local4 = true;
attachJumpPopUp("welldone");
utils.Delegate.callDelayed(this, removeJumpPopUp, 1000);
} else if (((((((((reason == 2) || (reason == 6)) || (reason == 7)) || (reason == 12)) || (reason == 13)) || (reason == 14)) || (reason == 15)) || (reason == 20)) || (reason == 21)) {
_local4 = true;
attachJumpPopUp("godjob");
utils.Delegate.callDelayed(this, removeJumpPopUp, 1000);
}
if (_local4) {
_global.game.sndCtrl.stopSound("goodjob");
_global.game.sndCtrl.playSound("goodjob", -1, this);
if (_global.game.interface_.getLevelInterface().complainClip.shown) {
_global.game.interface_.getLevelInterface().complainClip.gotoAndPlay("hide");
}
}
}
}
function attachExclamation() {
if (!hasExclamation) {
exclamation = new mcs.Exclamation("exclamation", campingObject.x, campingObject.y, 0, campingObject.depth);
exclamation.attachClip();
level.clipsAttached.push(exclamation);
hasExclamation = true;
}
}
function removeExclamation() {
exclamation.removeClip();
level.removeFromStageClipsArray(exclamation);
exclamation = undefined;
hasExclamation = false;
}
function attachJumpPopUp(linkage) {
var _local2 = 44935;
while (level.getInstanceAtDepth(_local2)) {
_local2++;
}
jumpPopUp = new mcs.JumpPopUp(linkage, campingObject.x, campingObject.y, 0, _local2);
jumpPopUp.attachClip();
level.clipsAttached.push(jumpPopUp);
}
function removeJumpPopUp() {
jumpPopUp.removeClip();
level.removeFromStageClipsArray(jumpPopUp);
}
function getEntireState() {
var _local2 = new Object();
_local2.happiness = happiness;
_local2.noisiness = noisiness;
_local2.complained = complained;
_local2.moneyBack = moneyBack;
_local2.additionalText = additionalText;
_local2.desiredObjectType = desiredObjectType;
_local2.toiletnum210 = toiletnum210;
_local2.showernum210 = showernum210;
_local2.washingnum210 = washingnum210;
_local2.trashnum210 = trashnum210;
_local2.entertainnum450 = entertainnum450;
_local2.entertainnum130 = entertainnum130;
_local2.entertainnum600 = entertainnum600;
_local2.entertainnum300 = entertainnum300;
_local2.entertainnum90 = entertainnum90;
_local2.roadsNum450 = roadsNum450;
_local2.roadsNum300 = roadsNum300;
_local2.lampnum90 = lampnum90;
_local2.landscapenum120 = landscapenum120;
_local2.camfirenum210 = camfirenum210;
_local2.distanceToQC = distanceToQC;
_local2.numberOfQC60 = numberOfQC60;
_local2.distanceToNC = distanceToNC;
_local2.numberOfNC60 = numberOfNC60;
_local2.stateFlag = stateFlag;
_local2.toiletFlag = toiletFlag;
_local2.wMachineFlag = wMachineFlag;
_local2.showerFlag = showerFlag;
_local2.entertainmentFlag = entertainmentFlag;
_local2.roadsFlag = roadsFlag;
_local2.parkingFlag = parkingFlag;
_local2.campfireFlag = campfireFlag;
_local2.lampFlag = lampFlag;
_local2.landscapeFlag = landscapeFlag;
_local2.trashFlag = trashFlag;
_local2.hasExclamation = hasExclamation;
_local2.typesDesiredObjects = new Array();
var _local4 = 0;
while (_local4 < typesDesiredObjects.length) {
_local2.typesDesiredObjects[_local4] = typesDesiredObjects[_local4];
_local4++;
}
_local2.type = type;
_local4 = 0;
while (_local4 < level.buildings.length) {
if (level.buildings[_local4] == campingObject) {
_local2.campingObject = _local4;
}
_local4++;
}
_local2.campers = new Array();
_local4 = 0;
while (_local4 < level.characters.length) {
var _local3 = 0;
while (_local3 < campers.length) {
if (level.characters[_local4] == campers[_local3]) {
_local2.campers.push(_local4);
}
_local3++;
}
_local4++;
}
_local2.timeOfArrival = timeOfArrival;
_local2.timeOfStaying = timeOfStaying;
_local2.expenses = expenses;
_local2.age = age;
_local2.complainText = complainText;
_local4 = 0;
while (_local4 < level.cars.length) {
if (level.cars[_local4] == car) {
_local2.car = _local4;
}
_local4++;
}
_local2.complainReason = new Array();
_local4 = 0;
while (_local4 < complainReason.length) {
_local2.complainReason[_local4] = complainReason[_local4];
_local4++;
}
if (exclamation.clip instanceof MovieClip) {
_local2.exclamation = true;
}
return(_local2);
}
function restoreEntireState(es) {
happiness = es.happiness;
noisiness = es.noisiness;
complained = es.complained;
moneyBack = es.moneyBack;
additionalText = es.additionalText;
desiredObjectType = es.desiredObjectType;
toiletnum210 = es.toiletnum210;
showernum210 = es.showernum210;
washingnum210 = es.washingnum210;
trashnum210 = es.trashnum210;
entertainnum450 = es.entertainnum450;
entertainnum130 = es.entertainnum130;
entertainnum600 = es.entertainnum600;
entertainnum300 = es.entertainnum300;
entertainnum90 = es.entertainnum90;
roadsNum450 = es.roadsNum450;
roadsNum300 = es.roadsNum300;
lampnum90 = es.lampnum90;
landscapenum120 = es.landscapenum120;
camfirenum210 = es.camfirenum210;
distanceToQC = es.distanceToQC;
numberOfQC60 = es.numberOfQC60;
distanceToNC = es.distanceToNC;
numberOfNC60 = es.numberOfNC60;
stateFlag = es.stateFlag;
toiletFlag = es.toiletFlag;
wMachineFlag = es.wMachineFlag;
showerFlag = es.showerFlag;
entertainmentFlag = es.entertainmentFlag;
roadsFlag = es.roadsFlag;
parkingFlag = es.parkingFlag;
campfireFlag = es.campfireFlag;
lampFlag = es.lampFlag;
landscapeFlag = es.landscapeFlag;
trashFlag = es.trashFlag;
typesDesiredObjects = new Array();
var _local4 = 0;
while (_local4 < es.typesDesiredObjects.length) {
typesDesiredObjects[_local4] = es.typesDesiredObjects[_local4];
_local4++;
}
type = es.type;
campingObject = level.buildings[es.campingObject];
campers = new Array();
var _local3 = 0;
while (_local3 < es.campers.length) {
_local4 = 0;
while (_local4 < level.characters.length) {
if (_local4 == es.campers[_local3]) {
level.characters[_local4].camperGroup = this;
campers[_local3] = level.characters[_local4];
break;
}
_local4++;
}
_local3++;
}
complainReason = new Array();
_local4 = 0;
while (_local4 < es.complainReason.length) {
complainReason[_local4] = es.complainReason[_local4];
_local4++;
}
timeOfArrival = es.timeOfArrival;
timeOfStaying = es.timeOfStaying;
expenses = es.expenses;
car = level.cars[es.car];
campingObject.camperGroup = this;
age = es.age;
complainText = es.complainText;
complains = new mcs.Complains();
complains.restoreEntireState(es.complains);
hasExclamation = es.hasExclamation;
if (hasExclamation) {
exclamation = new mcs.Exclamation("exclamation", campingObject.x, campingObject.y, 0, campingObject.depth);
exclamation.attachClip();
level.clipsAttached.push(exclamation);
}
}
}
Symbol 2804 MovieClip [__Packages.mcs.Car] Frame 0
class mcs.Car extends mcs.MovieClipProps
{
var level, depth, campers, groupType, desiredObjectType, linkID, people, man, woman, boy, girl, state, timeOfStaying, currentFrame, parkSpot, bmpWidth, bmpHieght, x, y, clip, carPopUp, rot, setTint;
function Car (linkID, x, y, rot, depth, campers_) {
super(linkID, x, y, rot);
level = _global.game.LevelClip;
this.depth = depth;
campers = campers_[0].slice();
groupType = campers_[1];
if (groupType != undefined) {
findDesiredObject();
}
if (level.firstCampers) {
desiredObjectType = Constants.hugeTent;
}
if (desiredObjectType == Constants.motorHomeSpot) {
this.linkID = "MotorHomeVehicle";
} else if (desiredObjectType == Constants.bigMotorHomeSpot) {
this.linkID = "bigMotorHomeVehicle";
} else {
var _local6 = int(Math.random() * 5) + 1;
this.linkID = "car" + _local6;
}
people = campers.length;
man = 0;
woman = 0;
boy = 0;
girl = 0;
var _local4 = 0;
while (_local4 < campers.length) {
if (campers[_local4].age == 0) {
if ((campers[_local4].linkID == "boy") || (campers[_local4].linkID == "man")) {
boy++;
} else {
girl++;
}
} else if ((campers[_local4].linkID == "midAgeMan") || (campers[_local4].linkID == "oldMan")) {
man++;
} else {
woman++;
}
_local4++;
}
state = 0;
var _local5 = Math.ceil(level.clock.toSeconds() / level.daynightLasting);
_local5 = ((_local5 < 17) ? (_local5) : 16);
timeOfStaying = (Math.ceil(Math.random() * Math.floor(_local5 / 2)) + 1) * level.daynightLasting;
if (level.firstTwo < 2) {
timeOfStaying = 1 * level.daynightLasting;
}
}
function attachClip() {
super.attachClip(level);
addEvents();
}
function removeClip() {
super.removeClip();
currentFrame = 1;
}
function parkCar(_parkSpot) {
if (_parkSpot != undefined) {
removeClip();
parkSpot = _parkSpot;
if (parkSpot != level.grid[0][21]) {
var _local2 = flash.display.BitmapData.loadBitmap(linkID + "Img");
bmpWidth = _local2.width;
bmpHieght = _local2.height;
var _local5 = new flash.geom.Rectangle(0, 0, _local2.width, _local2.height);
var _local4 = _local2.clone();
var _local3 = {x:parkSpot.x - 15, y:parkSpot.y - 15};
level.mapFog.copyPixels(_local2, _local5, new flash.geom.Point(_local3.x, _local3.y), _local4, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(_local2, _local5, new flash.geom.Point(_local3.x, _local3.y), _local4, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(_local2, _local5, new flash.geom.Point(_local3.x, _local3.y), _local4, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
level.removeFromStageClipsArray(this);
}
if (parkSpot instanceof mcs.Cell) {
parkSpot.setState(parkSpot.RESERVED);
state = 2;
} else {
parkSpot.isReserved = true;
state = 1;
}
x = parkSpot.x;
y = parkSpot.y;
}
}
function removeCar() {
if (parkSpot != undefined) {
if (parkSpot != level.grid[0][21]) {
var _local3 = {x:parkSpot.x - 15, y:parkSpot.y - 15};
var _local6 = new flash.geom.Rectangle(_local3.x, _local3.y, bmpWidth, bmpHieght);
level.mapFog.copyPixels(level.mapWithoutRoads, _local6, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(level.mapWithoutRoadsLake, _local6, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(level.mapWithoutRoadsRiver, _local6, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
}
if (state == 2) {
parkSpot.setState(parkSpot.BUYED);
} else {
parkSpot.isReserved = false;
}
if (state == 1) {
var _local5 = 0;
while (_local5 < level.camperGroups.length) {
if (level.camperGroups[_local5].car.state == 2) {
var _local3 = {x:level.camperGroups[_local5].car.parkSpot.x - 15, y:level.camperGroups[_local5].car.parkSpot.y - 15};
var _local6 = new flash.geom.Rectangle(_local3.x, _local3.y, level.camperGroups[_local5].car.bmpWidth, level.camperGroups[_local5].car.bmpHieght);
level.mapFog.copyPixels(level.mapWithoutRoads, _local6, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(level.mapWithoutRoadsLake, _local6, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(level.mapWithoutRoadsRiver, _local6, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
level.camperGroups[_local5].car.parkSpot.setState(level.camperGroups[_local5].car.parkSpot.BUYED);
level.camperGroups[_local5].car.parkCar(parkSpot);
var _local2 = 0;
while (_local2 < level.camperGroups[_local5].car.campers.length) {
var _local4 = level.camperGroups[_local5].car.campers[_local2];
_local4.setHappiness(-20);
_local2++;
}
level.camperGroups[_local5].setHappiness(-20);
level.camperGroups[_local5].servComplain(1);
break;
}
_local5++;
}
}
}
level.removeFromStageClipsArray(this);
var _local5 = 0;
while (_local5 < level.cars.length) {
if (level.cars[_local5] == this) {
level.cars.splice(_local5, 1);
break;
}
_local5++;
}
removeClip();
state = 0;
}
function findDesiredObject() {
var _local4 = Constants.getDesiredObjectTypes(groupType).slice();
var _local5 = new conf.ButtonConfig();
var _local2 = _local4[int(Math.random() * _local4.length)];
while ((_local2 < 11) || (_local2 > 23)) {
_local2 = _local4[int(Math.random() * _local4.length)];
}
var _local3 = 0;
while (_local3 < level.unlockedObjects.length) {
if (level.unlockedObjects[_local3] == _local2) {
desiredObjectType = _local2;
return(undefined);
}
_local3++;
}
findDesiredObject();
}
function addEvents() {
clip.holderObj = this;
clip.onRollOver = function () {
if (!_global.helpHint) {
if (this.holderObj.state == 0) {
this.holderObj.level.carArrow.removeClip();
this.holderObj.carPopUp = this.holderObj.level.attachMovie("carPopUp", "carPopUp", this.holderObj.level.depthCtrl.objectPopUpDepth);
var _local4 = {x:0, y:0};
this.localToGlobal(_local4);
this.holderObj.carPopUp._x = _local4.x;
this.holderObj.carPopUp._y = _local4.y;
this.holderObj.carPopUp._alpha = 60;
this.holderObj.carPopUp.woman.text = this.holderObj.woman;
this.holderObj.carPopUp.man.text = this.holderObj.man;
this.holderObj.carPopUp.boy.text = this.holderObj.boy;
this.holderObj.carPopUp.girl.text = this.holderObj.girl;
var _local3 = int(this.holderObj.timeOfStaying / this.holderObj.level.daynightLasting);
var _local5 = ((_local3 > 1) ? (_local3.toString() + " days") : (_local3.toString() + " day"));
this.holderObj.carPopUp.comment.comment.text = (((Constants.getGroupName(this.holderObj.groupType) + ", ") + Constants.getObjectName(this.holderObj.desiredObjectType)) + ", ") + _local5;
if (_global.game.LevelClip.firstCampers) {
_global.game.LevelClip.helpTips[13].showPopUp();
}
}
}
};
clip.onRollOut = function () {
if (this.holderObj.carPopUp) {
this.holderObj.carPopUp.removeMovieClip();
this.holderObj.carPopUp = undefined;
}
};
clip.onPress = function () {
if (!_global.helpHint) {
if ((!this.holderObj.level.pause) && (this.holderObj.state == 0)) {
_global.game.LevelClip.cancelRoadConstaruction();
this.holderObj.level.mouse.clip = this.holderObj.level.attachMovie("charIcon", "charIcon", this.holderObj.level.depthCtrl.tempBuildnigDepth, {_x:this.holderObj.level._xmouse, _y:this.holderObj.level._ymouse, _xscale:200, _yscale:200});
startDrag (this.holderObj.level.mouse.clip, true);
_global.game.LevelClip.mouse.car = true;
}
}
};
clip.onDragOut = function () {
if (this.holderObj.carPopUp) {
this.holderObj.carPopUp.removeMovieClip();
this.holderObj.carPopUp = undefined;
}
};
clip.onDragOver = function () {
if (this.holderObj.state == 0) {
this.holderObj.carPopUp = this.holderObj.level.attachMovie("carPopUp", "carPopUp", this.holderObj.level.depthCtrl.objectPopUpDepth);
var _local3 = {x:0, y:0};
this.localToGlobal(_local3);
this.holderObj.carPopUp._x = _local3.x;
this.holderObj.carPopUp._y = _local3.y;
this.holderObj.carPopUp._alpha = 60;
this.holderObj.carPopUp.woman.text = this.holderObj.woman;
this.holderObj.carPopUp.man.text = this.holderObj.man;
this.holderObj.carPopUp.boy.text = this.holderObj.boy;
this.holderObj.carPopUp.girl.text = this.holderObj.girl;
var _local2 = int(this.holderObj.timeOfStaying / this.holderObj.level.daynightLasting);
var _local4 = ((_local2 > 1) ? (_local2.toString() + " days") : (_local2.toString() + " day"));
this.holderObj.carPopUp.comment.comment.text = (((Constants.getGroupName(this.holderObj.groupType) + ", ") + Constants.getObjectName(this.holderObj.desiredObjectType)) + ", ") + _local4;
}
};
clip.onRelease = function () {
this.holderObj.level.mouse.clip.removeMovieClip();
};
clip.onReleaseOutside = function () {
this.holderObj.level.mouse.clip.removeMovieClip();
};
}
function isAccomodated(callTime, delay) {
if ((level.clock.toSeconds() - callTime) >= delay) {
if (state == 0) {
if (carPopUp) {
carPopUp.removeMovieClip();
carPopUp = undefined;
}
_global.game.sndCtrl.stopSound("carLeaves");
_global.game.sndCtrl.playSound("carLeaves", -1, this);
removeCar();
if (_global.game.LevelClip.currentPopUp == 11) {
_global.game.LevelClip.helpTips[12].showPopUp();
}
if (_global.game.LevelClip.currentPopUp == 13) {
_global.game.LevelClip.helpTips[14].showPopUp();
}
level.hasAGroup = false;
level.mouse.car = false;
level.mouse.clip.removeMovieClip();
}
} else {
var _local3 = level.clock.toSeconds();
var _local4 = delay - (_local3 - callTime);
utils.Delegate.callDelayed(this, isAccomodated, _local4 * 1000, _local3, _local4);
}
}
function getEntireState() {
var _local3 = new Object();
_local3.linkID = linkID;
_local3.x = x;
_local3.y = y;
_local3.rot = rot;
_local3.depth = depth;
_local3.state = state;
_local3.groupType = groupType;
_local3.timeOfStaying = timeOfStaying;
_local3.desiredObjectType = desiredObjectType;
_local3.man = man;
_local3.woman = woman;
_local3.boy = boy;
_local3.girl = girl;
_local3.bmpWidth = bmpWidth;
_local3.bmpHieght = bmpHieght;
_local3.campers = new Array();
var _local4 = 0;
while (_local4 < campers.length) {
_local3.campers[_local4] = campers[_local4].getEntireState();
_local4++;
}
_local3.people = people;
if (state == 2) {
var _local2 = 0;
var _local5 = false;
while (_local2 < level.grid.length) {
_local4 = 0;
while (_local4 < level.grid[_local2].length) {
if (level.grid[_local2][_local4] == parkSpot) {
_local3.parkSpot = [_local2, _local4];
_local5 = true;
break;
}
_local4++;
}
if (_local5) {
break;
}
_local2++;
}
} else {
_local4 = 0;
while (_local4 < level.parkingTiles.length) {
if (level.parkingTiles[_local4] == parkSpot) {
_local3.parkSpot = _local4;
break;
}
_local4++;
}
}
return(_local3);
}
function restoreEntireState(es) {
linkID = es.linkID;
x = es.x;
y = es.y;
rot = es.rot;
depth = es.depth;
state = es.state;
people = es.people;
groupType = es.groupType;
timeOfStaying = es.timeOfStaying;
desiredObjectType = es.desiredObjectType;
man = es.man;
woman = es.woman;
boy = es.boy;
girl = es.girl;
bmpWidth = es.bmpWidth;
bmpHieght = es.bmpHieght;
campers = new Array();
var _local2 = 0;
while (_local2 < es.campers.length) {
var _local5 = es.campers[_local2];
var _local4 = new mcs.Character();
_local4.restoreEntireState(_local5);
campers[_local2] = _local4;
_local2++;
}
if (state == 0) {
parkSpot = level.grid[0][21];
} else if (state == 2) {
parkSpot = level.grid[es.parkSpot[0]][es.parkSpot[1]];
} else {
parkSpot = level.parkingTiles[es.parkSpot];
}
if (parkSpot != level.grid[0][21]) {
parkCar(parkSpot);
}
if (state == 0) {
attachClip();
setTint(level.tint);
level.clipsAttached.push(this);
utils.Delegate.callDelayed(this, isAccomodated, 30000, level.clock.toSeconds(), 30);
}
}
}
Symbol 2805 MovieClip [__Packages.mcs.Cell] Frame 0
class mcs.Cell extends mcs.MovieClipProps
{
var depth, selected_, marked, weight, price, flood, terrein, id, state_, linkID, x, y, rot, tileType, filter;
function Cell (linkID, x, y, terrein_) {
super(linkID, x, y, 0, 100, 100);
depth = depth;
selected_ = false;
marked = false;
weight = 3;
price = 50;
flood = 0;
terrein = terrein_;
id = 0;
switch (terrein) {
case 0 :
state_ = NEEDTOBUY;
break;
case 1 :
state_ = UNAVAILABLE;
weight = 6;
break;
case 2 :
state_ = NEEDTOBUY;
flood = 1;
break;
case 3 :
state_ = NEEDTOBUY;
flood = 2;
break;
case 4 :
state_ = NEEDTOBUY;
}
}
function setState(s) {
if (state_ != UNAVAILABLE) {
state_ = s;
if (s == ROAD) {
weight = 1;
}
if (s == RESERVED) {
weight = 6;
}
if (s == BUYED) {
weight = 3;
id = 0;
}
}
}
function getState() {
return(state_);
}
function setID(id_) {
id = id_;
}
function getID() {
return(id);
}
function isSelected() {
return(selected_);
}
function isMarked() {
return(marked);
}
function select() {
selected_ = true;
}
function deselect() {
selected_ = false;
}
function mark() {
marked = true;
}
function unmark() {
marked = false;
}
function getEntireState() {
var _local2 = new Object();
_local2.linkID = linkID;
_local2.x = x;
_local2.y = y;
_local2.rot = rot;
_local2.depth = depth;
_local2.selected_ = selected_;
_local2.state_ = state_;
_local2.id = id;
_local2.marked = marked;
_local2.weight = weight;
_local2.tileType = tileType;
_local2.filter = filter;
_local2.price = price;
_local2.flood = flood;
_local2.terrein = terrein;
return(_local2);
}
function restoreEntireState(es) {
linkID = es.linkID;
x = es.x;
y = es.y;
rot = es.rot;
depth = es.depth;
selected_ = es.selected_;
state_ = es.state_;
id = es.id;
marked = es.marked;
weight = es.weight;
tileType = es.tileType;
filter = es.filter;
price = es.price;
flood = es.flood;
terrein = es.terrein;
}
var BUYED = 0;
var NEEDTOBUY = 1;
var ROAD = 2;
var RESERVED = 3;
var UNAVAILABLE = 4;
}
Symbol 2806 MovieClip [__Packages.conf.ButtonConfig] Frame 0
class conf.ButtonConfig
{
var btnObj, opositionCampsChances;
function ButtonConfig () {
btnObj = new Array();
opositionCampsChances = new Array();
init();
}
function init() {
btnObj[Constants.standardReception] = {linkID:"smallReception", numOfSquares:6, cost:0, spots:0, luxury:0, type:Constants.standardReception, rent:0, timeToBuild:2000, kind:Constants.RECEPTION, chance:30, storm:0, fire:0, flood:0, repairExpence:10};
btnObj[Constants.normalReception] = {linkID:"mediumReception", numOfSquares:6, cost:200, spots:0, luxury:20, type:Constants.normalReception, rent:0, timeToBuild:3000, kind:Constants.RECEPTION, chance:15, teen:0.2, adult:0.2, old:0.2, storm:0, fire:0, flood:0, repairExpence:10};
btnObj[Constants.bigReception] = {linkID:"largeReception", numOfSquares:6, cost:550, spots:0, luxury:55, type:Constants.bigReception, rent:0, timeToBuild:10000, kind:Constants.RECEPTION, chance:22, storm:0, fire:0, flood:0, repairExpence:10};
btnObj[Constants.hedge] = {linkID:"hedge", numOfSquares:1, cost:20, spots:250, luxury:0.2, type:Constants.hedge, rent:0, timeToBuild:1000, kind:Constants.PLEASURE, chance:60, teen:1.5, adult:1, old:0.4, storm:30, fire:10, flood:50, repairExpence:10};
btnObj[Constants.tree] = {linkID:"tree", numOfSquares:1, cost:25, spots:0, luxury:0.25, type:Constants.tree, rent:0, timeToBuild:1000, kind:Constants.PLEASURE, chance:0, storm:30, fire:2, flood:50, repairExpence:0};
btnObj[Constants.smallPark] = {linkID:"smallPark", numOfSquares:1, cost:50, spots:0, luxury:0.5, type:Constants.smallPark, rent:0, timeToBuild:1000, kind:Constants.PLEASURE, chance:0, storm:50, fire:1, flood:50, repairExpence:10};
btnObj[Constants.mediumPark] = {linkID:"mediumPark", numOfSquares:2, cost:90, spots:0, luxury:0.9, type:Constants.mediumPark, rent:0, timeToBuild:2000, kind:Constants.PLEASURE, chance:0, storm:40, fire:1, flood:50, repairExpence:10};
btnObj[Constants.bigPark] = {linkID:"bigPark", numOfSquares:9, cost:175, spots:0, luxury:1.75, type:Constants.bigPark, rent:0, timeToBuild:4000, kind:Constants.PLEASURE, chance:0, storm:25, fire:1, flood:50, repairExpence:10};
btnObj[Constants.campFire] = {linkID:"campFire", numOfSquares:1, cost:70, spots:0, luxury:0.7, type:Constants.campFire, rent:0, timeToBuild:4000, kind:Constants.PLEASURE, chance:0, storm:15, fire:2, flood:60, repairExpence:10};
btnObj[Constants.electricalLamp] = {linkID:"electricalLamp", numOfSquares:1, cost:20, spots:0, luxury:0.2, type:Constants.electricalLamp, rent:0, timeToBuild:1000, kind:Constants.PLEASURE, chance:0, storm:40, fire:4, flood:80, repairExpence:10};
btnObj[Constants.basicTent] = {linkID:"basicTent", numOfSquares:1, cost:50, spots:2, luxury:0.2, type:Constants.basicTent, rent:5, timeToBuild:1000, kind:Constants.RESERVATION_SPOT, chance:10, storm:60, fire:1, flood:100, repairExpence:10};
btnObj[Constants.largeTent] = {linkID:"largeTent", numOfSquares:2, cost:70, spots:3, luxury:0.3, type:Constants.largeTent, rent:7, timeToBuild:2000, kind:Constants.RESERVATION_SPOT, chance:0, storm:45, fire:2, flood:90, repairExpence:10};
btnObj[Constants.familyTent] = {linkID:"familyTent", numOfSquares:2, cost:80, spots:5, luxury:0.5, type:Constants.familyTent, rent:8, timeToBuild:2000, kind:Constants.RESERVATION_SPOT, chance:0, storm:30, fire:2, flood:80, repairExpence:10};
btnObj[Constants.hugeTent] = {linkID:"hugeTent", numOfSquares:4, cost:120, spots:8, luxury:0.8, type:Constants.hugeTent, rent:12, timeToBuild:4000, kind:Constants.RESERVATION_SPOT, chance:5, teen:0.2, adult:0.4, old:1, storm:30, fire:4, flood:80, repairExpence:10};
btnObj[Constants.normalCaravanSpot] = {linkID:"normalCaravan", numOfSquares:4, cost:180, spots:3, luxury:0.7, type:Constants.normalCaravanSpot, rent:18, timeToBuild:3000, kind:Constants.RESERVATION_SPOT, chance:20, storm:10, fire:0.5, flood:10, repairExpence:10};
btnObj[Constants.bigCaravanSpot] = {linkID:"bigCaravan", numOfSquares:4, cost:220, spots:6, luxury:0.9, type:Constants.bigCaravanSpot, rent:22, timeToBuild:4000, kind:Constants.RESERVATION_SPOT, chance:50, teen:0, adult:0.2, old:1, storm:10, fire:0.5, flood:10, repairExpence:10};
btnObj[Constants.motorHomeSpot] = {linkID:"motorhome", numOfSquares:4, cost:240, spots:4, luxury:0.8, type:Constants.motorHomeSpot, rent:24, timeToBuild:4000, kind:Constants.RESERVATION_SPOT, chance:60, storm:10, fire:0.5, flood:10, repairExpence:10};
btnObj[Constants.bigMotorHomeSpot] = {linkID:"bigMotorhome", numOfSquares:6, cost:260, spots:6, luxury:1, type:Constants.bigMotorHomeSpot, rent:26, timeToBuild:5000, kind:Constants.RESERVATION_SPOT, chance:60, storm:10, fire:0.5, flood:10, repairExpence:10};
btnObj[Constants.basicBungalow] = {linkID:"basicBungalow", numOfSquares:6, cost:220, spots:4, luxury:3.4, type:Constants.basicBungalow, rent:22, timeToBuild:2000, kind:Constants.UNMOVABLE_OBJECT, chance:60, storm:3, fire:1, flood:5, repairExpence:10};
btnObj[Constants.bigBungalow] = {linkID:"bigBungalow", numOfSquares:9, cost:470, spots:6, luxury:4.2, type:Constants.bigBungalow, rent:47, timeToBuild:4000, kind:Constants.UNMOVABLE_OBJECT, chance:10, storm:3, fire:1, flood:5, repairExpence:10};
btnObj[Constants.villaBungalow] = {linkID:"villaBungalow", numOfSquares:12, cost:630, spots:8, luxury:4.8, type:Constants.villaBungalow, rent:63, timeToBuild:6000, kind:Constants.UNMOVABLE_OBJECT, chance:25, storm:3, fire:1, flood:5, repairExpence:10};
btnObj[Constants.normalUnmovableCaravan] = {linkID:"normalUnmovableCaravan", numOfSquares:4, cost:190, spots:3, luxury:3.1, type:Constants.normalUnmovableCaravan, rent:19, timeToBuild:3000, kind:Constants.UNMOVABLE_OBJECT, chance:60, storm:6, fire:1, flood:15, repairExpence:10};
btnObj[Constants.bigUnmovableCaravan] = {linkID:"BigUnmovableCaravan", numOfSquares:4, cost:230, spots:6, luxury:3.6, type:Constants.bigUnmovableCaravan, rent:23, timeToBuild:4000, kind:Constants.UNMOVABLE_OBJECT, chance:25, storm:6, fire:1, flood:15, repairExpence:10};
btnObj[Constants.trashcan] = {linkID:"trashcan", numOfSquares:1, cost:10, spots:0, luxury:0, type:Constants.trashcan, rent:0, timeToBuild:1000, kind:Constants.SANITARY, chance:30, storm:70, fire:0.5, flood:100, repairExpence:10};
btnObj[Constants.woodenToilet] = {linkID:"woodenToilet", numOfSquares:1, cost:40, spots:20, luxury:2, type:Constants.woodenToilet, rent:0, timeToBuild:1000, kind:Constants.SANITARY, chance:15, teen:0.2, adult:0.2, old:0.2, storm:30, fire:1, flood:70, repairExpence:10};
btnObj[Constants.stoneToilet] = {linkID:"stoneToilet", numOfSquares:2, cost:65, spots:30, luxury:3, type:Constants.stoneToilet, rent:0, timeToBuild:2000, kind:Constants.SANITARY, chance:22, storm:4, fire:1, flood:30, repairExpence:10};
btnObj[Constants.stoneToiletShower] = {linkID:"shower", numOfSquares:2, cost:100, spots:30, luxury:3, type:Constants.stoneToiletShower, rent:0, timeToBuild:3000, kind:Constants.SANITARY, chance:0, storm:4, fire:1, flood:30, repairExpence:10};
btnObj[Constants.bigSanitaryHouse] = {linkID:"bigSanitaryHouse", numOfSquares:6, cost:210, spots:45, luxury:4.5, type:Constants.bigSanitaryHouse, rent:0, timeToBuild:4000, kind:Constants.SANITARY, chance:0, storm:3, fire:1, flood:20, repairExpence:10};
btnObj[Constants.washingMachineUnit] = {linkID:"washingMachine", numOfSquares:2, cost:40, spots:20, luxury:2, type:Constants.washingMachineUnit, rent:0, timeToBuild:2000, kind:Constants.SANITARY, chance:5, teen:0.2, adult:0.4, old:1, storm:4, fire:1, flood:30, repairExpence:10};
btnObj[Constants.allInOneSanitary] = {linkID:"allInOneSanitary", numOfSquares:8, cost:410, spots:60, luxury:6, type:Constants.allInOneSanitary, rent:0, timeToBuild:8000, kind:Constants.SANITARY, chance:20, storm:2, fire:1, flood:15, repairExpence:10};
btnObj[Constants.tableTennis] = {linkID:"tableTenis", numOfSquares:2, cost:45, spots:16, luxury:1.6, type:Constants.tableTennis, rent:1003, timeToBuild:1000, kind:Constants.ENTERTAINMENT, chance:50, teen:0, adult:0, old:0, storm:50, fire:1, flood:70, repairExpence:10};
btnObj[Constants.playground] = {linkID:"playground", numOfSquares:6, cost:90, spots:20, luxury:2, type:Constants.playground, rent:0, timeToBuild:2000, kind:Constants.ENTERTAINMENT, chance:60, teen:0, adult:0, old:0, storm:15, fire:1, flood:40, repairExpence:10};
btnObj[Constants.bigPlayarena] = {linkID:"bigPlayArena", numOfSquares:12, cost:200, spots:40, luxury:4, type:Constants.bigPlayarena, rent:1006, timeToBuild:5000, kind:Constants.ENTERTAINMENT, chance:10, teen:0, adult:0, old:0, storm:10, fire:1, flood:30, repairExpence:10};
btnObj[Constants.smallSupermarket] = {linkID:"smallMarket", numOfSquares:6, cost:120, spots:40, luxury:4, type:Constants.smallSupermarket, rent:1007, timeToBuild:4000, kind:Constants.ENTERTAINMENT, chance:25, teen:0.2, adult:0.2, old:0.2, storm:2, fire:1, flood:5, repairExpence:10};
btnObj[Constants.bigSupermarket] = {linkID:"bigSupermarket", numOfSquares:8, cost:400, spots:80, luxury:8, type:Constants.bigSupermarket, rent:1003, timeToBuild:8000, kind:Constants.ENTERTAINMENT, chance:60, teen:0.8, adult:0.8, old:0.8, storm:2, fire:1, flood:5, repairExpence:10};
btnObj[Constants.bingoHall] = {linkID:"bingoHall", numOfSquares:12, cost:600, spots:100, luxury:10, type:Constants.bingoHall, rent:1006, timeToBuild:5000, kind:Constants.ENTERTAINMENT, chance:30, teen:0, adult:0.5, old:1, storm:2, fire:1, flood:5, repairExpence:10};
btnObj[Constants.restaurant] = {linkID:"restaurant", numOfSquares:16, cost:800, spots:60, luxury:6, type:Constants.restaurant, rent:109, timeToBuild:7000, kind:Constants.ENTERTAINMENT, chance:22, teen:0.2, adult:0.4, old:0.8, storm:2, fire:1, flood:7, repairExpence:10};
btnObj[Constants.bar] = {linkID:"bar", numOfSquares:6, cost:620, spots:100, luxury:10, type:Constants.bar, rent:1001, timeToBuild:5000, kind:Constants.ENTERTAINMENT, chance:5, teen:1, adult:0.4, old:0.2, storm:2, fire:1, flood:5, repairExpence:10};
btnObj[Constants.arcade] = {linkID:"arcade", numOfSquares:6, cost:640, spots:80, luxury:8, type:Constants.arcade, rent:1003, timeToBuild:6000, kind:Constants.ENTERTAINMENT, chance:50, teen:1, adult:0.2, old:0, storm:4, fire:1, flood:6, repairExpence:10};
btnObj[Constants.disco] = {linkID:"discoteque", numOfSquares:12, cost:850, spots:120, luxury:12, type:Constants.disco, rent:1001, timeToBuild:7000, kind:Constants.ENTERTAINMENT, chance:5, teen:1, adult:0.4, old:0, storm:4, fire:1, flood:6, repairExpence:10};
btnObj[Constants.smallOutdoorPool] = {linkID:"smallPool", numOfSquares:12, cost:710, spots:45, luxury:4.5, type:Constants.smallOutdoorPool, rent:1002, timeToBuild:6000, kind:Constants.ENTERTAINMENT, chance:2, teen:0.5, adult:0.2, old:0, storm:8, fire:1, flood:10, repairExpence:10};
btnObj[Constants.bigOutdoorPool] = {linkID:"bigPool", numOfSquares:15, cost:980, spots:90, luxury:9, type:Constants.bigOutdoorPool, rent:1003, timeToBuild:8000, kind:Constants.ENTERTAINMENT, chance:50, teen:0.7, adult:0.3, old:0.1, storm:7, fire:1, flood:10, repairExpence:10};
btnObj[Constants.indoorPool] = {linkID:"indoorPool", numOfSquares:12, cost:1100, spots:80, luxury:8, type:Constants.indoorPool, rent:10005, timeToBuild:8000, kind:Constants.ENTERTAINMENT, chance:60, teen:0.1, adult:0.2, old:0.6, storm:2, fire:1, flood:4, repairExpence:10};
btnObj[Constants.footballField] = {linkID:"footballField", numOfSquares:15, cost:800, spots:80, luxury:8, type:Constants.footballField, rent:1006, timeToBuild:6000, kind:Constants.ENTERTAINMENT, chance:10, teen:0.4, adult:0.2, old:0, storm:4, fire:0, flood:30, repairExpence:10};
btnObj[Constants.tennisField] = {linkID:"tenisField", numOfSquares:12, cost:800, spots:60, luxury:6, type:Constants.tennisField, rent:1007, timeToBuild:6000, kind:Constants.ENTERTAINMENT, chance:25, teen:0.1, adult:0.2, old:0.1, storm:4, fire:0, flood:50, repairExpence:10};
btnObj[Constants.hugeWaterPark] = {linkID:"hugeWaterPark", numOfSquares:35, cost:1700, spots:250, luxury:25, type:Constants.hugeWaterPark, rent:1003, timeToBuild:20000, kind:Constants.ENTERTAINMENT, chance:60, teen:1.5, adult:1, old:0.4, storm:2, fire:0.5, flood:20, repairExpence:10};
btnObj[Constants.dirtParking] = {linkID:"dirtParking", numOfSquares:1, cost:2, spots:0, luxury:0.3, type:Constants.dirtParking, rent:1006, timeToBuild:1000, kind:Constants.PARKING, chance:0, storm:5, fire:1, flood:5, repairExpence:10};
btnObj[Constants.pavedParking] = {linkID:"pavedParking", numOfSquares:1, cost:10, spots:0, luxury:0.4, type:Constants.pavedParking, rent:1007, timeToBuild:1000, kind:Constants.PARKING, chance:0, storm:5, fire:1, flood:5, repairExpence:10};
btnObj[Constants.asphaltParking] = {linkID:"asphaltParking", numOfSquares:1, cost:20, spots:0, luxury:0.5, type:Constants.asphaltParking, rent:1003, timeToBuild:1000, kind:Constants.PARKING, chance:0, storm:5, fire:1, flood:5, repairExpence:10};
opositionCampsChances[1] = [5, 0, 10, 10, 10, 10, 0, 4, 8, 80, 40, 20, 0, 40, 20, 10, 0, 30, 10, 0, 20, 0, 50, 30, 15, 10, 5, 5, 5, 10, 10, 5, 4, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 240, 100];
opositionCampsChances[2] = [20, 2, 10, 10, 15, 5, 10, 8, 8, 60, 45, 10, 5, 10, 30, 20, 10, 15, 25, 40, 10, 20, 70, 5, 15, 15, 15, 15, 15, 10, 5, 5, 2, 5, 0, 2, 2, 4, 4, 8, 6, 2, 4, 4, 2, 430, 150];
opositionCampsChances[3] = [20, 10, 20, 20, 5, 10, 15, 8, 8, 30, 60, 30, 30, 10, 50, 10, 50, 5, 30, 50, 15, 20, 70, 2, 5, 30, 20, 30, 25, 10, 10, 15, 5, 15, 5, 5, 5, 6, 6, 10, 10, 10, 10, 10, 10, 740, 124];
}
function getObjProps(i) {
return(btnObj[i]);
}
function getObjects() {
return(btnObj);
}
function getOpositionChances(i) {
return(opositionCampsChances[i]);
}
}
Symbol 2807 MovieClip [__Packages.mcs.Character] Frame 0
class mcs.Character extends mcs.MovieClipProps
{
var age, linkID, happiness, accomodated, changedPath, inMovement, discoPlay, barPlay, restorantPlay, level, forward, visible_, levell, depth, speed, astarPath, cellx, celly, canMove, leader, pathAgent, camperGroup, destinationObject, startPoint, x, y, destPoint, clip, currentFrame, activity, rot, startx, starty, endx, endy, angle, xmov, ymov, footPath, pathBack, tmpPath, myLeader;
function Character (age, level_) {
super();
this.age = age;
switch (this.age) {
case 0 :
linkID = Constants.teenageLinkIds[int(Math.random() * Constants.teenageLinkIds.length)];
break;
case 1 :
linkID = Constants.adultLinkIds[int(Math.random() * Constants.adultLinkIds.length)];
break;
case 2 :
linkID = Constants.elderLinkIds[int(Math.random() * Constants.elderLinkIds.length)];
}
happiness = 100;
accomodated = false;
changedPath = false;
inMovement = false;
discoPlay = false;
barPlay = false;
restorantPlay = false;
level = level_;
forward = false;
visible_ = false;
levell = _global.game.LevelClip;
}
function setMcProps(x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
speed = 1;
astarPath = new Array();
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
canMove = false;
leader = false;
pathAgent = new utils.PathAgent(this, level.grid, level.spacing);
}
function setHappiness(h) {
happiness = (((happiness - h) > 0) ? (happiness - h) : 0);
happiness = ((happiness > 100) ? 100 : (happiness));
happiness = happiness;
}
function getHappiness() {
return(happiness);
}
function findDestinationObject() {
var _local3 = camperGroup.typesDesiredObjects[int(Math.random() * camperGroup.typesDesiredObjects.length)];
while ((_local3 < 6) || ((_local3 > 8) && (_local3 < 24))) {
_local3 = camperGroup.typesDesiredObjects[int(Math.random() * camperGroup.typesDesiredObjects.length)];
}
var _local4 = new Array();
var _local2 = 0;
while (_local2 < level.buildings.length) {
if (level.buildings[_local2].getType() == _local3) {
_local4.push(_local2);
}
_local2++;
}
if (_local4.length > 0) {
var _local5 = level.buildings[_local4[int(Math.random() * _local4.length)]];
return(_local5);
}
return(undefined);
}
function walkTo() {
destinationObject = findDestinationObject();
var _local3 = destinationObject.findFreeCell();
if (destinationObject && (_local3)) {
var _local2 = camperGroup.campingObject.findFreeCell();
var _local7 = int(_local2.cell.x / level.spacing);
var _local6 = int(_local2.cell.y / level.spacing);
startPoint = [_local7, _local6];
x = _local2.cell.x;
y = _local2.cell.y;
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
var _local5 = int(_local3.cell.x / level.spacing);
var _local4 = int(_local3.cell.y / level.spacing);
destPoint = [_local5, _local4];
visible_ = true;
clip._visible = visible_;
pathAgent.walkTo(destPoint[0], destPoint[1]);
inMovement = true;
forward = true;
if (currentFrame > 3) {
currentFrame = int(Math.random() * 3) + 1;
clip.gotoAndStop(currentFrame);
}
}
}
function comeBack() {
visible_ = true;
clip._visible = visible_;
pathAgent.walkTo(startPoint[0], startPoint[1]);
inMovement = true;
forward = false;
if (currentFrame > 3) {
currentFrame = int(Math.random() * 3) + 1;
clip.gotoAndStop(currentFrame);
}
}
function moveCamper() {
var _local2 = this;
_local2.pathAgent.walkingLoop();
}
function stopCamper() {
var _local2 = this;
inMovement = false;
onArrive();
}
function changeDirection() {
inMovement = false;
if (forward) {
forward = false;
comeBack();
} else {
forward = true;
walkTo();
}
}
function attachClip() {
super.attachClip(_global.game.LevelClip);
clip._visible = visible_;
}
function removeClip() {
super.removeClip();
}
function setClip() {
level.setClip(this);
}
function onArrive() {
currentFrame = 7;
clip.gotoAndStop(currentFrame);
visible_ = false;
clip._visible = visible_;
if (forward == true) {
}
}
function changeActivity() {
var _local4 = true;
var _local3 = 0;
while (_local3 < _global.game.LevelClip.characters.length) {
if (_global.game.LevelClip.characters[_local3] == this) {
_local4 = false;
break;
}
_local3++;
}
if (!_local4) {
if (!level.pause) {
var _local5 = true;
stopCamper();
activity = int(Math.random() * 10);
visible_ = true;
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (activity <= 3) {
var _local6 = findDestinationObject().findFreeCell();
if (_local6 == undefined) {
activity = 7;
}
}
if ((level.grid[celly][cellx].getState() == level.grid[celly][cellx].RESERVED) && (activity > 3)) {
activity = 7;
}
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].RESERVED) {
visible_ = false;
}
clip._visible = visible_;
x = level.grid[celly][cellx].x;
y = level.grid[celly][cellx].y;
switch (activity) {
case 1 :
speed = walkingSpeed;
inMovement = true;
currentFrame = 1;
clip.gotoAndStop(currentFrame);
if (forward) {
comeBack();
} else {
walkTo();
}
break;
case 2 :
speed = runningSpeed;
inMovement = true;
currentFrame = 2;
clip.gotoAndStop(currentFrame);
if (forward) {
comeBack();
} else {
walkTo();
}
break;
case 3 :
speed = runningSpeed;
inMovement = true;
currentFrame = 3;
clip.gotoAndStop(currentFrame);
if (forward) {
comeBack();
} else {
walkTo();
}
break;
case 4 :
currentFrame = 4;
clip.gotoAndStop(currentFrame);
break;
case 5 :
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].ROAD) {
changeActivity();
_local5 = false;
break;
}
currentFrame = 5;
clip.gotoAndStop(currentFrame);
break;
case 6 :
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].ROAD) {
changeActivity();
_local5 = false;
} else {
currentFrame = 6;
clip.gotoAndStop(currentFrame);
break;
currentFrame = 7;
clip.gotoAndStop(currentFrame);
break;
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].ROAD) {
changeActivity();
_local5 = false;
} else {
currentFrame = 8;
clip.gotoAndStop(currentFrame);
break;
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].ROAD) {
changeActivity();
_local5 = false;
} else {
currentFrame = 9;
clip.gotoAndStop(currentFrame);
break;
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].ROAD) {
changeActivity();
_local5 = false;
} else {
currentFrame = 10;
clip.gotoAndStop(currentFrame);
}
}
}
}
case 7 :
currentFrame = 7;
clip.gotoAndStop(currentFrame);
break;
case 8 :
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].ROAD) {
changeActivity();
_local5 = false;
} else {
currentFrame = 8;
clip.gotoAndStop(currentFrame);
break;
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].ROAD) {
changeActivity();
_local5 = false;
} else {
currentFrame = 9;
clip.gotoAndStop(currentFrame);
break;
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].ROAD) {
changeActivity();
_local5 = false;
} else {
currentFrame = 10;
clip.gotoAndStop(currentFrame);
}
}
}
case 9 :
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].ROAD) {
changeActivity();
_local5 = false;
} else {
currentFrame = 9;
clip.gotoAndStop(currentFrame);
break;
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].ROAD) {
changeActivity();
_local5 = false;
} else {
currentFrame = 10;
clip.gotoAndStop(currentFrame);
}
}
case 10 :
cellx = int(x / level.spacing);
celly = int(y / level.spacing);
if (level.grid[celly][cellx].getState() == level.grid[celly][cellx].ROAD) {
changeActivity();
_local5 = false;
} else {
currentFrame = 10;
clip.gotoAndStop(currentFrame);
}
}
}
if (_local5) {
utils.Delegate.callDelayed(this, changeActivity, 30000);
}
}
}
function getEntireState() {
var _local2 = new Object();
_local2.linkID = linkID;
_local2.x = x;
_local2.y = y;
_local2.rot = rot;
_local2.depth = depth;
_local2.currentFrame = currentFrame;
_local2.age = age;
_local2.startx = startx;
_local2.starty = starty;
_local2.endx = endx;
_local2.endy = endy;
_local2.angle = angle;
_local2.speed = speed;
_local2.cellx = cellx;
_local2.celly = celly;
_local2.xmov = xmov;
_local2.ymov = ymov;
_local2.canMove = canMove;
_local2.astarPath = astarPath;
_local2.footPath = footPath;
_local2.pathBack = pathBack;
_local2.tmpPath = tmpPath;
_local2.forward = forward;
_local2.accomodated = accomodated;
_local2.startPoint = startPoint;
_local2.destPoint = destPoint;
_local2.leader = leader;
_local2.changedPath = changedPath;
_local2.inMovement = inMovement;
_local2.activity = activity;
_local2.visible_ = visible_;
var _local3 = 0;
while (_local3 < level.buildings.length) {
if (destinationObject == level.buildings[_local3]) {
_local2.destinationObject = _local3;
break;
}
_local3++;
}
_local3 = 0;
while (_local3 < level.leaders.length) {
if (level.leaders[_local3] == myLeader) {
_local2.myLeader = _local3;
break;
}
_local3++;
}
_local2.happiness = happiness;
return(_local2);
}
function restoreEntireState(es) {
level = _global.game.LevelClip;
linkID = es.linkID;
x = es.x;
y = es.y;
rot = es.rot;
depth = es.depth;
setMcProps(x, y, rot, depth);
currentFrame = es.currentFrame;
age = es.age;
startx = es.startx;
starty = es.starty;
endx = es.endx;
endy = es.endy;
angle = es.angle;
speed = es.speed;
cellx = es.cellx;
celly = es.celly;
xmov = es.xmov;
ymov = es.ymov;
canMove = es.canMove;
astarPath = es.astarPath;
footPath = es.footPath;
pathBack = es.pathBack;
tmpPath = es.tmpPath;
forward = es.forward;
accomodated = es.accomodated;
startPoint = es.startPoint;
destPoint = es.destPoint;
leader = es.leader;
myLeader = level.leaders[es.myLeader];
happiness = es.happiness;
changedPath = es.changedPath;
inMovement = es.inMovement;
destinationObject = level.buildings[es.destinationObject];
activity = es.activity;
visible_ = es.visible_;
}
var walkingSpeed = 1;
var runningSpeed = 3;
}
Symbol 2808 MovieClip [__Packages.utils.PathAgent] Frame 0
class utils.PathAgent
{
var map, movingObject, land, road, obsticle, spacing, tx, ty, walkingLoop, dir, visitedNodes, currCellx, currCelly;
function PathAgent (mo, map_, spacing_) {
map = map_;
movingObject = mo;
land = 1;
road = 2;
obsticle = 3;
spacing = spacing_;
}
function walkTo(tx, ty) {
this.tx = tx;
this.ty = ty;
if (walkingLoop != walking) {
dir = 0;
dir = getApproximatedDirection();
}
visitedNodes = new Array();
currCellx = movingObject.cellx;
currCelly = movingObject.celly;
walkingLoop = walking;
}
function getApproximatedDirection() {
var _local5 = map;
var _local3 = movingObject.cellx;
var _local4 = movingObject.celly;
var _local24 = dir;
var _local23 = tx;
var _local21 = ty;
var _local9 = _local23 - _local3;
var _local8 = _local21 - _local4;
var _local16 = Math.abs;
var _local18 = _local16(_local9);
var _local17 = _local16(_local8);
var _local14 = _local18 >= _local17;
var _local12 = _local17 >= _local18;
var _local2 = new Array();
var _local11 = _local5[_local4];
if ((_local11[_local3 + 1].getState() <= land) && (_local24 != 2)) {
var _local26;
_local26 = _local9 >= 0;
if (_local26 && (_local14)) {
_local2.push({dir:1, value:3, isRoad:false});
} else if (_local26) {
_local2.push({dir:1, value:2, isRoad:false});
} else if (_local24 == 1) {
_local2.push({dir:1, value:1, isRoad:false});
} else {
_local2.push({dir:1, value:0, isRoad:false});
}
} else if ((_local11[_local3 + 1].getState() == road) && (_local24 != 2)) {
var _local26 = _local9 >= 0;
if (_local26 && (_local14)) {
_local2.push({dir:1, value:6, isRoad:true});
} else if (_local26) {
_local2.push({dir:1, value:4, isRoad:true});
} else if (_local24 == 1) {
_local2.push({dir:1, value:2, isRoad:true});
} else {
_local2.push({dir:1, value:0, isRoad:true});
}
}
if ((_local11[_local3 - 1].getState() <= land) && (_local24 != 1)) {
var _local22;
_local22 = _local9 <= 0;
if (_local22 && (_local14)) {
_local2.push({dir:2, value:3, isRoad:false});
} else if (_local22) {
_local2.push({dir:2, value:2, isRoad:false});
} else if (_local24 == 2) {
_local2.push({dir:2, value:1, isRoad:false});
} else {
_local2.push({dir:2, value:0, isRoad:false});
}
} else if ((_local11[_local3 - 1].getState() == road) && (_local24 != 1)) {
var _local22 = _local9 <= 0;
if (_local22 && (_local14)) {
_local2.push({dir:2, value:6, isRoad:true});
} else if (_local22) {
_local2.push({dir:2, value:4, isRoad:true});
} else if (_local24 == 2) {
_local2.push({dir:2, value:2, isRoad:true});
} else {
_local2.push({dir:2, value:0, isRoad:true});
}
}
if ((_local5[_local4 + 1][_local3].getState() <= land) && (_local24 != 8)) {
var _local25;
_local25 = _local8 >= 0;
if (_local25 && (_local12)) {
_local2.push({dir:4, value:3, isRoad:false});
} else if (_local25) {
_local2.push({dir:4, value:2, isRoad:false});
} else if (_local24 == 4) {
_local2.push({dir:4, value:1, isRoad:false});
} else {
_local2.push({dir:4, value:0, isRoad:false});
}
} else if ((_local5[_local4 + 1][_local3].getState() == road) && (_local24 != 8)) {
var _local25 = _local8 >= 0;
if (_local25 && (_local12)) {
_local2.push({dir:4, value:6, isRoad:true});
} else if (_local25) {
_local2.push({dir:4, value:4, isRoad:true});
} else if (_local24 == 4) {
_local2.push({dir:4, value:2, isRoad:true});
} else {
_local2.push({dir:4, value:0, isRoad:true});
}
}
if ((_local5[_local4 - 1][_local3].getState() <= land) && (_local24 != 4)) {
var _local20;
_local20 = _local8 <= 0;
if (_local20 && (_local12)) {
_local2.push({dir:8, value:3, isRoad:false});
} else if (_local20) {
_local2.push({dir:8, value:2, isRoad:false});
} else if (_local24 == 8) {
_local2.push({dir:8, value:1, isRoad:false});
} else {
_local2.push({dir:8, value:0, isRoad:false});
}
} else if ((_local5[_local4 - 1][_local3].getState() == road) && (_local24 != 4)) {
var _local20 = _local8 <= 0;
if (_local20 && (_local12)) {
_local2.push({dir:8, value:6, isRoad:true});
} else if (_local20) {
_local2.push({dir:8, value:4, isRoad:true});
} else if (_local24 == 8) {
_local2.push({dir:8, value:2, isRoad:true});
} else {
_local2.push({dir:8, value:0, isRoad:true});
}
}
_local2.sortOn("value");
var _local19 = _local2.length;
_local19--;
var _local6 = _local2[_local19];
_local19--;
var _local7 = _local2[_local19];
var _local15;
if ((_local6.isRoad && (_local7.isRoad)) || ((!_local6.isRoad) && (!_local7.isRoad))) {
_local15 = _local6.value == _local7.value;
} else if (_local6.isRoad && (!_local7.isRoad)) {
_local15 = _local6.value == (2 * _local7.value);
} else if ((!_local6.isRoad) && (_local7.isRoad)) {
_local15 = (2 * _local6.value) == _local7.value;
}
if (_local15) {
var _local13 = _local6.dir + _local7.dir;
if ((_local13 == 5) && (_local5[_local4 + 1][_local3 + 1].getState() < obsticle)) {
return(5);
}
if ((_local13 == 6) && (_local5[_local4 + 1][_local3 - 1].getState() < obsticle)) {
return(6);
}
if ((_local13 == 9) && (_local5[_local4 - 1][_local3 + 1].getState() < obsticle)) {
return(9);
}
if ((_local13 == 10) && (_local5[_local4 - 1][_local3 - 1].getState() < obsticle)) {
return(10);
}
}
var _local10 = _local2.pop().dir;
if (_local10 == visitedNodes[_local4][_local3]) {
_local10 = _local2.pop().dir;
}
if (_local24 != _local10) {
if (visitedNodes[_local4] == undefined) {
visitedNodes[_local4] = [];
}
visitedNodes[_local4][_local3] = _local10;
}
return(_local10);
}
function walking() {
var _local2 = dir;
var _local3 = movingObject.speed;
if (_local2 == 1) {
movingObject.x = movingObject.x + _local3;
movingObject.rot = 0;
} else if (_local2 == 2) {
movingObject.x = movingObject.x - _local3;
movingObject.rot = 180;
} else if (_local2 == 4) {
movingObject.y = movingObject.y + _local3;
movingObject.rot = 90;
} else if (_local2 == 8) {
movingObject.y = movingObject.y - _local3;
movingObject.rot = -90;
} else if (_local2 == 5) {
movingObject.x = movingObject.x + _local3;
movingObject.y = movingObject.y + _local3;
movingObject.rot = 45;
} else if (_local2 == 9) {
movingObject.x = movingObject.x + _local3;
movingObject.y = movingObject.y - _local3;
movingObject.rot = -45;
} else if (_local2 == 10) {
movingObject.x = movingObject.x - _local3;
movingObject.y = movingObject.y - _local3;
movingObject.rot = -135;
} else if (_local2 == 6) {
movingObject.x = movingObject.x - _local3;
movingObject.y = movingObject.y + _local3;
movingObject.rot = 135;
}
movingObject.setClip();
var _local6 = int(movingObject.x / spacing);
var _local5 = int(movingObject.y / spacing);
var _local4 = ((((movingObject.x % int(spacing / 2)) == 0) && ((movingObject.y % int(spacing / 2)) == 0)) && ((movingObject.x % spacing) != 0)) && ((movingObject.y % spacing) != 0);
if (_local4) {
if (_local2 == 1) {
movingObject.cellx = movingObject.cellx + 1;
movingObject.rot = 0;
} else if (_local2 == 2) {
movingObject.cellx = movingObject.cellx - 1;
movingObject.rot = 180;
} else if (_local2 == 4) {
movingObject.celly = movingObject.celly + 1;
movingObject.rot = 90;
} else if (_local2 == 8) {
movingObject.celly = movingObject.celly - 1;
movingObject.rot = -90;
} else if (_local2 == 5) {
movingObject.cellx = movingObject.cellx + 1;
movingObject.celly = movingObject.celly + 1;
movingObject.rot = 45;
} else if (_local2 == 9) {
movingObject.cellx = movingObject.cellx + 1;
movingObject.celly = movingObject.celly - 1;
movingObject.rot = -45;
} else if (_local2 == 10) {
movingObject.cellx = movingObject.cellx - 1;
movingObject.celly = movingObject.celly - 1;
movingObject.rot = -135;
} else if (_local2 == 6) {
movingObject.cellx = movingObject.cellx - 1;
movingObject.celly = movingObject.celly + 1;
movingObject.rot = 135;
}
currCellx = movingObject.cellx;
currCelly = movingObject.celly;
if ((movingObject.cellx == tx) && (movingObject.celly == ty)) {
movingObject.changeDirection();
movingObject.visible = false;
movingObject.setClip();
delete walkingLoop;
movingObject.onArrive();
return(undefined);
}
dir = getApproximatedDirection();
}
}
}
Symbol 2809 MovieClip [__Packages.utils.MathUtils] Frame 0
class 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 2810 MovieClip [__Packages.mcs.Trash] Frame 0
class mcs.Trash extends mcs.MovieClipProps
{
var depth, level, cleaningPrice, clean, linkID, bmpWidth, bmpHieght, y, x, clip, cleaner, rot, currentFrame;
function Trash (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
level = _global.game.LevelClip;
cleaningPrice = 5;
clean = false;
}
function attachClip() {
var _local3 = flash.display.BitmapData.loadBitmap(linkID + "Img");
bmpWidth = _local3.width;
bmpHieght = _local3.height;
var _local5 = new flash.geom.Rectangle(0, 0, _local3.width, _local3.height);
var _local4 = _local3.clone();
var _local2 = {x:x - 15, y:y - 15};
level.mapFog.copyPixels(_local3, _local5, new flash.geom.Point(_local2.x, _local2.y), _local4, new flash.geom.Point(0, 0), false);
level.mapWithoutRoads.copyPixels(_local3, _local5, new flash.geom.Point(_local2.x, _local2.y), _local4, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(_local3, _local5, new flash.geom.Point(_local2.x, _local2.y), _local4, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsLake.copyPixels(_local3, _local5, new flash.geom.Point(_local2.x, _local2.y), _local4, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(_local3, _local5, new flash.geom.Point(_local2.x, _local2.y), _local4, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsRiver.copyPixels(_local3, _local5, new flash.geom.Point(_local2.x, _local2.y), _local4, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
var _local7 = int(x / level.spacing);
var _local6 = int(y / level.spacing);
level.grid[_local6][_local7].setState(level.grid[_local6][_local7].RESERVED);
level.grid[_local6][_local7].setID(depth);
level.grid[_local6][_local7].building = this;
}
function removeClip() {
var _local6 = int(x / level.spacing);
var _local5 = int(y / level.spacing);
level.grid[_local5][_local6].setState(level.grid[_local5][_local6].BUYED);
super.removeClip();
var _local3 = {x:x - 15, y:y - 15};
var _local4 = new flash.geom.Rectangle(_local3.x, _local3.y, bmpWidth, bmpHieght);
level.mapFog.copyPixels(level.onlyRoads, _local4, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.mapWithoutRoads.copyPixels(level.mapBought, _local4, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(level.onlyRoadsLake, _local4, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsLake.copyPixels(level.mapLakeBrigth, _local4, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(level.onlyRoadsRiver, _local4, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.mapWithoutRoadsRiver.copyPixels(level.mapRiverBrigth, _local4, new flash.geom.Point(_local3.x, _local3.y), undefined, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
}
function onClick() {
if (!level.pause) {
_global.game.LevelClip.cancelRoadConstaruction();
var _local3 = nearestObjectDistance(level.trashcans);
if (_local3 <= 180) {
cleanTrash();
_global.game.sndCtrl.stopSound("broom_sweep");
_global.game.sndCtrl.playSound("broom_sweep", -1, this);
} else {
_global.game.LevelClip.helpTips[24].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[24], _global.game.LevelClip.helpTips[24].hidePopUp, 10000);
}
}
}
function addEvents() {
clip.holderObj = this;
clip.onPress = function () {
};
clip.onRelease = function () {
if (!this.holderObj.level.pause) {
}
};
clip.onReleaseOutside = function () {
if (!this.holderObj.level.pause) {
}
};
clip.onRollOver = function () {
if (!this.holderObj.level.pause) {
}
};
clip.onRollOut = function () {
if (!this.holderObj.level.pause) {
}
};
}
function cleanTrash() {
if (!level.pause) {
if (!clean) {
cleaner = new mcs.Cleaner("cleaner", x, y, 0, level.depthCtrl.characterDepth++);
cleaner.attachClip();
level.clipsAttached.push(cleaner);
clean = true;
utils.Delegate.callDelayed(this, removeObject, 5000);
}
}
}
function removeObject() {
level.changeBudget(-cleaningPrice);
_global.game.sndCtrl.stopSound("broom_sweep", this);
_global.game.sndCtrl.stopSound("vacum_cleaner", _global.game.LevelClip);
level.expences = level.expences + cleaningPrice;
clean = false;
cleaner.removeClip();
removeClip();
level.removeFromStageClipsArray(this);
level.removeObjectFromArray(this, level.trash);
level.removeFromStageClipsArray(cleaner);
var _local3 = 0;
while (_local3 < _global.game.LevelClip.camperGroups.length) {
var _local4 = _global.game.LevelClip.camperGroups[_local3];
_local4.calculateTrash();
_local3++;
}
}
function nearestObjectDistance(obj) {
if (obj.length > 0) {
var _local5 = utils.MathUtils.getDistance(x, y, obj[0].x, obj[0].y);
var _local2 = 1;
while (_local2 < obj.length) {
var _local3 = utils.MathUtils.getDistance(x, y, obj[_local2].x, obj[_local2].y);
if (_local5 > _local3) {
_local5 = _local3;
}
_local2++;
}
return(int(_local5));
}
return(Number.MAX_VALUE);
}
function getEntireState() {
var _local2 = new Object();
_local2.linkID = linkID;
_local2.x = x;
_local2.y = y;
_local2.rot = rot;
_local2.depth = depth;
_local2.currentFrame = currentFrame;
_local2.cleaningPrice = cleaningPrice;
_local2.bmpWidth = bmpWidth;
_local2.bmpHieght = bmpHieght;
return(_local2);
}
function restoreEntireState(es) {
linkID = es.linkID;
x = es.x;
y = es.y;
rot = es.rot;
depth = es.depth;
currentFrame = es.currentFrame;
cleaningPrice = es.cleaningPrice;
bmpWidth = es.bmpWidth;
bmpHieght = es.bmpHieght;
attachClip();
var _local4 = int(x / level.spacing);
var _local3 = int(y / level.spacing);
level.grid[_local3][_local4].setState(level.grid[_local3][_local4].RESERVED);
level.grid[_local3][_local4].setID(depth);
level.grid[_local3][_local4].building = this;
}
}
Symbol 2811 MovieClip [__Packages.mcs.Cleaner] Frame 0
class mcs.Cleaner extends mcs.MovieClipProps
{
var depth, setTint;
function Cleaner (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
}
function attachClip() {
super.attachClip(_global.game.LevelClip);
setTint(_global.game.LevelClip.tint);
}
function removeClip() {
super.removeClip();
}
}
Symbol 2812 MovieClip [__Packages.mcs.Exclamation] Frame 0
class mcs.Exclamation extends mcs.MovieClipProps
{
var depth, level, isActive, x, y, clip, linkID, rot;
function Exclamation (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
level = _global.game.LevelClip;
isActive = false;
}
function attachClip() {
var _local2 = level.translateCameraToStage(x, y);
clip = level.attachMovie(linkID, utils.StringUtils.getUniqueName(), depth, {_x:_local2.x, _y:_local2.y, _rotation:rot});
}
function removeClip() {
super.removeClip();
clip = undefined;
}
function onClick() {
_global.game.interface_.getLevelInterface().complainsScreen();
}
}
Symbol 2813 MovieClip [__Packages.mcs.JumpPopUp] Frame 0
class mcs.JumpPopUp extends mcs.MovieClipProps
{
var depth, level, x, y, clip, linkID, rot;
function JumpPopUp (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
level = _global.game.LevelClip;
}
function attachClip() {
var _local2 = level.translateCameraToStage(x, y);
clip = level.attachMovie(linkID, utils.StringUtils.getUniqueName(), depth, {_x:_local2.x, _y:_local2.y, _rotation:rot});
}
function removeClip() {
super.removeClip();
clip = undefined;
}
}
Symbol 2814 MovieClip [__Packages.mcs.Complains] Frame 0
class mcs.Complains
{
var type, object, reasons, time;
function Complains (type_, co, reasons_, time_) {
type = type_;
object = co;
reasons = reasons_;
time = time_;
}
function getEntireState() {
var _local4 = new Object();
_local4.type = type;
_local4.reasons = reasons;
_local4.time = time;
var _local3 = 0;
while (_local3 < _global.game.LevelClip.buildings.length) {
if (_global.game.LevelClip.buildings[_local3] == object) {
_local4.object = _local3;
}
_local3++;
}
return(_local4);
}
function restoreEntireState(es) {
type = es.type;
reasons = es.reasons;
time = es.time;
object = _global.game.LevelClip.buildings[es.object];
}
}
Symbol 2815 MovieClip [__Packages.mcs.LoaderClip] Frame 0
class mcs.LoaderClip extends mcs.MovieClipProps
{
var depth, level;
function LoaderClip (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
level = _global.game.LevelClip;
}
function attachClip() {
super.attachClip(level);
}
function removeClip() {
super.removeClip();
}
}
Symbol 2816 MovieClip [__Packages.mcs.FlameClip] Frame 0
class mcs.FlameClip extends mcs.MovieClipProps
{
var depth, level, x, y, clip, linkID, rot;
function FlameClip (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
level = _global.game.LevelClip;
}
function attachClip() {
var _local2 = level.translateCameraToStage(x, y);
clip = level.attachMovie(linkID, utils.StringUtils.getUniqueName(), depth, {_x:_local2.x, _y:_local2.y, _rotation:rot});
}
function removeClip() {
super.removeClip();
}
}
Symbol 2817 MovieClip [__Packages.mcs.DistructionClip] Frame 0
class mcs.DistructionClip extends mcs.MovieClipProps
{
var depth, level, x, y, clip, linkID, rot, setTint, tint;
function DistructionClip (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
level = _global.game.LevelClip;
}
function attachClip() {
var _local2 = level.translateCameraToStage(x, y);
clip = level.attachMovie(linkID, utils.StringUtils.getUniqueName(), depth, {_x:_local2.x, _y:_local2.y, _rotation:rot});
setTint(tint);
}
function removeClip() {
super.removeClip();
}
}
Symbol 2818 MovieClip [__Packages.mcs.ConstructionClip] Frame 0
class mcs.ConstructionClip extends mcs.MovieClipProps
{
var depth, level, x, y, clip, linkID, rot, setTint, tint;
function ConstructionClip (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
level = _global.game.LevelClip;
}
function attachClip() {
var _local2 = level.translateCameraToStage(x, y);
clip = level.attachMovie(linkID, utils.StringUtils.getUniqueName(), depth, {_x:_local2.x, _y:_local2.y, _rotation:rot});
setTint(tint);
}
function removeClip() {
super.removeClip();
}
}
Symbol 2819 MovieClip [__Packages.mcs.Animation] Frame 0
class mcs.Animation extends mcs.MovieClipProps
{
var depth, level, active, x, y, clip, linkID, rot, setTint, tint;
function Animation (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
level = _global.game.LevelClip;
active = false;
}
function attachClip() {
var _local2 = level.translateCameraToStage(x, y);
clip = level.attachMovie(linkID, utils.StringUtils.getUniqueName(), depth, {_x:_local2.x, _y:_local2.y, _rotation:rot});
clip.cacheAsBitmap = true;
setTint(tint);
}
function removeClip() {
super.removeClip();
}
}
Symbol 2820 MovieClip [__Packages.mcs.Buldozer] Frame 0
class mcs.Buldozer extends mcs.MovieClipProps
{
var depth, level;
function Buldozer (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
level = _global.game.LevelClip;
}
function attachClip() {
super.attachClip(_global.game.LevelClip);
}
function removeClip() {
super.removeClip();
}
}
Symbol 2821 MovieClip [__Packages.mcs.RoadTile] Frame 0
class mcs.RoadTile extends mcs.MovieClipProps
{
var depth, cell, tileType, _state, stormEff, floodEff, isDestoring, isBuilding, isRepairing, buldozerOnStage, timeToBuild, level, linkID, _luxuryPoints, currentFrame, frameTile, intervalID, clip, y, x, rot, bmpWidth, bmpHieght, buldozer;
function RoadTile (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
cell = new Object();
tileType = TILE_FULL;
_state = 0;
stormEff = 4;
floodEff = 5;
isDestoring = false;
isBuilding = false;
isRepairing = false;
buldozerOnStage = false;
timeToBuild = 5000;
level = _global.game.LevelClip;
if (this.linkID == "dirt") {
_luxuryPoints = 0.3;
}
if (this.linkID == "paved") {
_luxuryPoints = 0.4;
}
if (this.linkID == "cyckling") {
_luxuryPoints = 0.45;
}
if (this.linkID == "asfalt") {
_luxuryPoints = 0.5;
}
}
function getTileType() {
return(tileType);
}
function setTileType(tt) {
tileType = tt;
if (tileType == "square") {
currentFrame = 1;
}
if (tileType == "45grades") {
currentFrame = 2;
}
if (tileType == "rectangle") {
currentFrame = 3;
}
}
function setFrameTile(frame) {
frameTile = frame;
}
function attachClip() {
super.attachClip(level);
}
function removeClip() {
super.removeClip();
}
function getState() {
return(_state);
}
function setState(s) {
_state = s;
if (_state <= 0) {
_state = 0;
disappearing();
}
if (_state > 100) {
_state = 100;
}
}
function stormEffect() {
if (((linkID == "dirt") || (linkID == "cyckling")) || (linkID == "paved")) {
}
}
function floodEffect() {
if (linkID == "dirt") {
destroy();
}
}
function loading() {
if (!level.pause) {
setState(100);
if (getState() >= 100) {
clearInterval(intervalID);
done();
}
}
}
function destroying() {
if (!level.pause) {
setState(0);
if (_state <= 0) {
clearInterval(intervalID);
disappearing();
}
}
}
function repairing() {
if (!level.pause) {
}
}
function disappearing() {
cell.setState(cell.BUYED);
frameTile.cell.setState(frameTile.cell.BUYED);
level.removeFromStageClipsArray(this);
level.removeFromStageClipsArray(frameTile);
var _local2 = 0;
while (_local2 < level.road.length) {
if ((level.road[_local2] == this) || (level.road[_local2] == frameTile)) {
level.road.splice(_local2, 1);
}
_local2++;
}
frameTile.clip.removeMovieClip();
isDestoring = false;
clip.removeMovieClip();
if (tileType == "square") {
var _local4 = flash.display.BitmapData.loadBitmap(linkID + "square");
var _local3 = {x:x - 15, y:y - 15};
} else if (tileType == "45grades") {
var _local4 = flash.display.BitmapData.loadBitmap((linkID + "45grades") + rot);
if (rot == 0) {
var _local3 = {x:x - 15, y:y - 15};
} else if (rot == 90) {
var _local3 = {x:(x - _local4.width) + 15, y:y - 15};
} else if (rot == 180) {
var _local3 = {x:(x - _local4.width) + 15, y:(y - _local4.height) + 15};
} else if (rot == -90) {
var _local3 = {x:x - 15, y:(y - _local4.height) + 15};
}
} else if (tileType == "rectangle") {
var _local4 = flash.display.BitmapData.loadBitmap((linkID + "rectangle") + rot);
if (rot == 0) {
var _local3 = {x:(x - _local4.width) + 15, y:y - 15};
} else if (rot == 90) {
var _local3 = {x:(x - _local4.width) + 15, y:(y - _local4.height) + 15};
} else if (rot == 180) {
var _local3 = {x:x - 15, y:y - 15};
} else if (rot == -90) {
var _local3 = {x:x - 15, y:y - 15};
}
}
bmpWidth = _local4.width;
bmpHieght = _local4.height;
var _local6 = new flash.geom.Rectangle(_local3.x, _local3.y, _local4.width, _local4.height);
var _local5 = _local4.clone();
level.mapFog.copyPixels(level.mapWithoutRoads, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(level.mapWithoutRoadsLake, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(level.mapWithoutRoadsRiver, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.onlyRoads.copyPixels(level.mapWithoutRoads, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.onlyRoadsLake.copyPixels(level.mapWithoutRoadsLake, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.onlyRoadsRiver.copyPixels(level.mapWithoutRoadsRiver, _local6, new flash.geom.Point(_local3.x, _local3.y), _local5, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
}
function build() {
removeClip();
isBuilding = true;
if (tileType == "square") {
var _local2 = flash.display.BitmapData.loadBitmap(linkID + "square");
var _local3 = {x:x - 15, y:y - 15};
} else if (tileType == "45grades") {
var _local2 = flash.display.BitmapData.loadBitmap((linkID + "45grades") + rot);
if (rot == 0) {
var _local3 = {x:x - 15, y:y - 15};
} else if (rot == 90) {
var _local3 = {x:(x - _local2.width) + 15, y:y - 15};
} else if (rot == 180) {
var _local3 = {x:(x - _local2.width) + 15, y:(y - _local2.height) + 15};
} else if (rot == -90) {
var _local3 = {x:x - 15, y:(y - _local2.height) + 15};
}
} else if (tileType == "rectangle") {
var _local2 = flash.display.BitmapData.loadBitmap((linkID + "rectangle") + rot);
if (rot == 0) {
var _local3 = {x:(x - _local2.width) + 15, y:y - 15};
} else if (rot == 90) {
var _local3 = {x:(x - _local2.width) + 15, y:(y - _local2.height) + 15};
} else if (rot == 180) {
var _local3 = {x:x - 15, y:y - 15};
} else if (rot == -90) {
var _local3 = {x:x - 15, y:y - 15};
}
}
bmpWidth = _local2.width;
bmpHieght = _local2.height;
var _local5 = new flash.geom.Rectangle(0, 0, _local2.width, _local2.height);
var _local4 = _local2.clone();
level.mapFog.copyPixels(_local2, _local5, new flash.geom.Point(_local3.x, _local3.y), _local4, new flash.geom.Point(0, 0), false);
level.onlyRoads.copyPixels(_local2, _local5, new flash.geom.Point(_local3.x, _local3.y), _local4, new flash.geom.Point(0, 0), false);
level.mapLake.copyPixels(_local2, _local5, new flash.geom.Point(_local3.x, _local3.y), _local4, new flash.geom.Point(0, 0), false);
level.onlyRoadsLake.copyPixels(_local2, _local5, new flash.geom.Point(_local3.x, _local3.y), _local4, new flash.geom.Point(0, 0), false);
level.mapRiver.copyPixels(_local2, _local5, new flash.geom.Point(_local3.x, _local3.y), _local4, new flash.geom.Point(0, 0), false);
level.onlyRoadsRiver.copyPixels(_local2, _local5, new flash.geom.Point(_local3.x, _local3.y), _local4, new flash.geom.Point(0, 0), false);
level.background.drawCameraView(level.camBMP);
}
function done() {
clearInterval(intervalID);
isDestoring = false;
isBuilding = false;
isRepairing = false;
}
function repair() {
}
function destroy() {
isDestoring = true;
destroying();
}
function hireBuldozer() {
}
function removeBuldozer() {
}
function findFreeCell() {
return(undefined);
}
function getEntireState() {
var _local4 = new Object();
_local4.linkID = linkID;
_local4.x = x;
_local4.y = y;
_local4.rot = rot;
_local4.depth = depth;
_local4.currentFrame = currentFrame;
_local4.tileType = tileType;
_local4.bmpWidth = bmpWidth;
_local4.bmpHieght = bmpHieght;
_local4._state = _state;
_local4.stormEff = stormEff;
_local4.floodEff = floodEff;
_local4.isDestoring = isDestoring;
_local4.isBuilding = isBuilding;
_local4.isRepairing = isRepairing;
_local4.buldozerOnStage = buldozerOnStage;
_local4.timeToBuild = timeToBuild;
_local4._luxuryPoints = _luxuryPoints;
var _local3 = 0;
var _local5 = false;
_local4.cell = new Array();
while (_local3 < level.grid.length) {
var _local2 = 0;
while (_local2 < level.grid[_local3].length) {
if (level.grid[_local3][_local2] == cell) {
_local4.cell = [_local3, _local2];
_local5 = true;
break;
}
_local2++;
}
if (_local5) {
break;
}
_local3++;
}
return(_local4);
}
function restoreEntireState(es) {
linkID = es.linkID;
x = es.x;
y = es.y;
rot = es.rot;
depth = es.depth;
currentFrame = es.currentFrame;
tileType = es.tileType;
cell = level.grid[es.cell[0]][es.cell[1]];
_state = es._state;
stormEff = es.stormEff;
floodEff = es.floodEff;
isDestoring = es.isDestoring;
isBuilding = es.isBuilding;
isRepairing = es.isRepairing;
buldozerOnStage = es.buldozerOnStage;
timeToBuild = es.timeToBuild;
bmpWidth = es.bmpWidth;
bmpHieght = es.bmpHieght;
_luxuryPoints = es._luxuryPoints;
if (buldozerOnStage) {
buldozer = undefined;
}
if (isRepairing) {
}
if (isBuilding) {
build();
}
cell.setState(cell.ROAD);
}
var TILE_FULL = "square";
var TILE_45 = "45grades";
var TILE_HALF = "rectangle";
}
Symbol 2822 MovieClip [__Packages.com.Navigator] Frame 0
class com.Navigator
{
var onStage, mapOriginal, mapFog, clip;
function Navigator (clip_) {
onStage = false;
mapOriginal = flash.display.BitmapData.loadBitmap("MapSmall");
mapFog = mapOriginal.clone();
var _local3 = 0.6;
var _local2 = new Array();
_local2 = _local2.concat([_local3, 0, 0, 0, 0]);
_local2 = _local2.concat([0, _local3, 0, 0, 0]);
_local2 = _local2.concat([0, 0, _local3, 0, 0]);
_local2 = _local2.concat([0, 0, 0, 1, 0]);
var _local4 = new flash.filters.ColorMatrixFilter(_local2);
var _local5 = new flash.geom.Rectangle(0, 0, 120, 120);
mapFog.applyFilter(mapFog, _local5, new flash.geom.Point(0, 0), _local4);
clip = clip_;
attachNavigator();
}
function attachNavigator() {
var _local4 = _global.game.LevelClip;
var _local3 = 0;
while (_local3 < _local4.clipsOnStage.length) {
if (_local4.clipsOnStage[_local3] instanceof mcs.Building) {
if (_local4.clipsOnStage[_local3].getType() != Constants.tree) {
}
}
_local3++;
}
clip.frame.swapDepths(15000);
clip.map.attachBitmap(_local4.background.getMap(), 0);
clip.map._xscale = 10;
clip.map._yscale = 10;
onStage = true;
if (_local4.levelnum < 3) {
} else if (_local4.levelnum < 5) {
} else if (_local4.levelnum < 7) {
} else if (_local4.levelnum < 9) {
}
}
function removeNavigator() {
clip.removeMovieClip();
onStage = false;
}
function refreshNavigator(left, top) {
var _local2 = new flash.geom.Rectangle(int(left / 10), int(top / 10), 3, 3);
mapFog.merge(mapOriginal, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
}
function level1() {
var _local4 = _global.game.LevelClip;
var _local5 = 0;
while (_local5 < 21) {
var _local3 = 0;
while (_local3 < 29) {
if ((_local4.grid[_local5][_local3].x <= 800) && (_local4.grid[_local5][_local3].y <= 600)) {
var _local7 = int(_local3 * _local4.spacing);
var _local6 = int(_local5 * _local4.spacing);
refreshNavigator(_local7, _local6);
}
_local3++;
}
_local5++;
}
}
function level3() {
level1();
var _local5 = _global.game.LevelClip;
var _local4 = 0;
while (_local4 < 21) {
var _local3 = 27;
while (_local3 < map.Map.grid[_local4].length) {
if ((_local5.grid[_local4][_local3].x > 800) && (_local5.grid[_local4][_local3].y <= 600)) {
var _local7 = int(_local3 * _local5.spacing);
var _local6 = int(_local4 * _local5.spacing);
refreshNavigator(_local7, _local6);
}
_local3++;
}
_local4++;
}
}
function level5() {
level3();
var _local4 = _global.game.LevelClip;
var _local5 = 19;
while (_local5 < map.Map.grid.length) {
var _local3 = 0;
while (_local3 < 29) {
if ((_local4.grid[_local5][_local3].x <= 800) && (_local4.grid[_local5][_local3].y > 600)) {
var _local7 = int(_local3 * _local4.spacing);
var _local6 = int(_local5 * _local4.spacing);
refreshNavigator(_local7, _local6);
}
_local3++;
}
_local5++;
}
}
function level7() {
level5();
var _local5 = _global.game.LevelClip;
var _local4 = 19;
while (_local4 < map.Map.grid.length) {
var _local3 = 27;
while (_local3 < map.Map.grid[_local4].length) {
if ((_local5.grid[_local4][_local3].x > 800) && (_local5.grid[_local4][_local3].y > 600)) {
var _local7 = int(_local3 * _local5.spacing);
var _local6 = int(_local4 * _local5.spacing);
refreshNavigator(_local7, _local6);
}
_local3++;
}
_local4++;
}
}
}
Symbol 2823 MovieClip [__Packages.map.Map] Frame 0
class map.Map
{
function Map () {
}
static var grid = [[1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 4, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 1, 1], [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 4, 4, 4, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 0, 4, 4, 4, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 0, 4, 4, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 0, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 3, 3, 3, 0, 0, 0, 0, 4, 0, 0], [1, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 4, 4, 4, 0], [0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0], [0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 0], [2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0], [1, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0], [1, 1, 1, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0], [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1, 1, 1]];
}
Symbol 2824 MovieClip [__Packages.com.Level] Frame 0
class com.Level extends MovieClip
{
var mouse, keyboard, depthCtrl, width_, height_, bgImage, camera, background, mapBought, mapRiver, mapLake, mapLakeBrigth, mapRiverBrigth, mapFog, bgMC, createEmptyMovieClip, camBMP, mapWithoutRoads, onlyRoads, mapWithoutRoadsLake, onlyRoadsLake, mapWithoutRoadsRiver, onlyRoadsRiver, markFilter, mapWidth, mapHeight, levelnum, spacing, roadSpacing, tolerance, cellTolerance, selectedLandPrice, selection_, roadBuilding, startBuildingRoad, campBuilding, moveChars, startPoint, road, tempRoad, lastVisitedCell, lastDrawn, characters, aStar, leaders, buldozers, buildings, unlockedObjects, clipsAttached, camperSpots, building, cars, sanitary, trashcans, trash, parkingTiles, camperGroups, complains, roadLinkID, firstTwo, campFireFlag, numOfCampersServed, teenagers, adult, old, hasAGroup, hasReception, roosterFlag, scrollLocked, barMusicPlay, restorantMusicPlay, discoMusicPlay, tint, currentGoal, grid, clipsOnStage, gridOnStage, followObject, stateFlag, toiletFlag, wMachineFlag, showerFlag, entertainmentFlag, roadsFlag, parkingFlag, campfireFlag, lampFlag, landscapeFlag, trashFlag, tutorialFlow, advertisedPopups, oposingCamp, arrival, dayNum, dayStart, nightStart, isDay, daynightLasting, budget, investment, expences, percentInvestment, relizedTurnover, exploitationCost, currentPopUp, availableSpots, pause, firstDeparture, statScrText, firstCampers, flood, clock, onFire, onStorm, onFlood, onMidRecept, onLargeRecept, onOppositionAdv, onComplaint, onComplaintScreen, onNoTrashCan, over25, over50, over150, over500, helpOnOff, timer, _ymouse, _xmouse, navigator, advertisement, receptionObject, mapForSaleTemp, mapForSale, carArrow, getInstanceAtDepth, attachMovie, _age, _reception, storm, helpTips;
function Level () {
super();
init();
}
function init() {
mouse = new com.MouseImpl();
keyboard = new com.Keyboard();
depthCtrl = new ctrl.DepthController();
width_ = 800;
height_ = 600;
bgImage = "Map";
camera = new scr.Camera();
camera.setSize(width_, height_);
background = new scr.BackGround(bgImage, camera);
mapBought = flash.display.BitmapData.loadBitmap("original");
mapRiver = flash.display.BitmapData.loadBitmap("river");
mapLake = flash.display.BitmapData.loadBitmap("lake");
mapLakeBrigth = mapLake.clone();
mapRiverBrigth = mapRiver.clone();
mapFog = mapBought.clone();
background.setMap(mapFog);
camera.setBounds(0, background.__get__width(), 0, background.__get__height());
bgMC = createEmptyMovieClip("bg_mc", depthCtrl.bgDepth);
camBMP = new flash.display.BitmapData(width_, height_, false, 0);
bgMC.attachBitmap(camBMP, bgMC.getNextHighestDepth());
var _local6 = 0.6;
var _local7 = 0.6;
var _local3 = new Array();
_local3 = _local3.concat([_local7, 0, 0, 0, 0]);
_local3 = _local3.concat([0, _local6, 0, 0, 0]);
_local3 = _local3.concat([0, 0, _local6, 0, 0]);
_local3 = _local3.concat([0, 0, 0, 1, 0]);
var _local5 = new flash.filters.ColorMatrixFilter(_local3);
var _local4 = new flash.geom.Rectangle(0, 0, 1200, 1200);
mapFog.applyFilter(mapFog, _local4, new flash.geom.Point(0, 0), _local5);
mapRiver.applyFilter(mapRiver, _local4, new flash.geom.Point(0, 0), _local5);
mapLake.applyFilter(mapLake, _local4, new flash.geom.Point(0, 0), _local5);
mapWithoutRoads = mapFog.clone();
onlyRoads = mapFog.clone();
mapWithoutRoadsLake = mapLake.clone();
onlyRoadsLake = mapLake.clone();
mapWithoutRoadsRiver = mapRiver.clone();
onlyRoadsRiver = mapRiver.clone();
_local6 = 1.8;
_local7 = 1.8;
_local3 = new Array();
_local3 = _local3.concat([_local7, 0, 0, 0, 0]);
_local3 = _local3.concat([0, _local6, 0, 0, 0]);
_local3 = _local3.concat([0, 0, _local6, 0, 0]);
_local3 = _local3.concat([0, 0, 0, 1, 0]);
markFilter = new flash.filters.ColorMatrixFilter(_local3);
mapWidth = 1200;
mapHeight = 1200;
levelnum = 1;
spacing = 30;
roadSpacing = 20;
tolerance = 30;
cellTolerance = 1;
selectedLandPrice = 0;
selection_ = false;
roadBuilding = false;
startBuildingRoad = false;
campBuilding = false;
moveChars = false;
startPoint = new Array();
road = new Array();
tempRoad = new Array();
lastVisitedCell = new Object();
lastDrawn = new Array();
characters = new Array();
aStar = new utils.Astar();
leaders = new Array();
buldozers = new Array();
buildings = new Array();
unlockedObjects = new Array();
clipsAttached = new Array();
camperSpots = new Array();
building = new Object();
cars = new Array();
sanitary = new Array();
trashcans = new Array();
trash = new Array();
parkingTiles = new Array();
camperGroups = new Array();
complains = new Array();
roadLinkID = "dirt";
firstTwo = 0;
campFireFlag = false;
numOfCampersServed = 0;
teenagers = 0;
adult = 0;
old = 0;
hasAGroup = false;
hasReception = false;
roosterFlag = true;
scrollLocked = false;
barMusicPlay = false;
restorantMusicPlay = false;
discoMusicPlay = false;
tint = 0;
currentGoal = 25;
unlockBuildnigs();
grid = new Array();
clipsOnStage = new Array();
gridOnStage = false;
setGrid();
setCameraPosition(400, 300);
followObject = new Object();
followObject.x = 400;
followObject.y = 300;
stateFlag = 0;
toiletFlag = 0;
wMachineFlag = 0;
showerFlag = 0;
entertainmentFlag = 0;
roadsFlag = 0;
parkingFlag = 0;
campfireFlag = 0;
lampFlag = 0;
landscapeFlag = 0;
trashFlag = 0;
tutorialFlow = 0;
advertisedPopups = 0;
oposingCamp = new Array();
oposingCamp.push(new mcs.OpositionCamp(1, 10000000, this));
oposingCamp.push(new mcs.OpositionCamp(2, 10000000, this));
oposingCamp.push(new mcs.OpositionCamp(3, 10000000, this));
arrival = new ctrl.Arrival(this);
dayNum = 1;
dayStart = 0;
nightStart = 0;
isDay = true;
daynightLasting = 180;
budget = 2000;
investment = 0;
expences = 0;
percentInvestment = 0;
relizedTurnover = new Array();
exploitationCost = new Array();
currentPopUp = 0;
availableSpots = 0;
pause = false;
firstDeparture = false;
statScrText = "";
firstCampers = true;
flood = new mcs.Flooding();
utils.Delegate.callDelayed(this, disaster, 900000);
utils.Delegate.callDelayed(this, makeTrash, int(30000 * Math.random()));
clock = new utils.Clock();
clock.addEventListener("onClockTick", this);
clock.start(0);
onFire = false;
onStorm = false;
onFlood = false;
onMidRecept = false;
onLargeRecept = false;
onOppositionAdv = false;
onComplaint = false;
onComplaintScreen = false;
onNoTrashCan = false;
over25 = false;
over50 = false;
over150 = false;
over500 = false;
initPopupHints();
helpOnOff = true;
timer = new utils.Timer();
timer.addEventListener("onTimerTick", this);
timer.start();
_global.game.sndCtrl.playSound("birds_singing", 32768);
_global.game.sndCtrl.playSound("day_insects", 32768);
_global.game.sndCtrl.playSound("birds_flappingWings", 32768);
_global.game.sndCtrl.playSound("river_flow", 32768);
_global.game.sndCtrl.setSoundVolume("river_flow", (_global.musicVolume * 30) / 100);
}
function onTimerTick() {
mouse.update();
update();
moveLoop();
updateAfterEvent();
}
function onClockTick() {
nightHandler();
var _local2 = 0;
while (_local2 < camperGroups.length) {
if (camperGroups[_local2].getTimeOfStaying() <= 0) {
availableSpots = availableSpots + camperGroups[_local2].getCampingObject()._visitors;
} else {
camperGroups[_local2].setTimeOfStaying();
camperGroups[_local2].changeHappiness();
}
_local2++;
}
}
function update() {
if (!scrollLocked) {
camera.__set__follow({x:_xmouse, y:_ymouse});
camera.update();
}
if (startBuildingRoad) {
findRoad();
}
}
function pauseGame() {
if (!pause) {
pause = true;
for (var _local3 in _global.game.playingSounds) {
_global.game.sndCtrl.pauseSound(_global.game.playingSounds[_local3]);
}
clock.stop();
timer.stop();
building.clip.stopDrag();
building.clip.removeMovieClip();
delete building;
delete mouse.building;
cancelRoadConstaruction();
}
}
function continueGame() {
if (pause) {
for (var _local3 in _global.game.playingSounds) {
_global.game.sndCtrl.resumeSound(_global.game.playingSounds[_local3]);
}
_global.pausebutton.gotoAndStop(1);
pause = false;
clock.start();
timer.start();
}
}
function getSavingParameters() {
var _local2 = new Object();
_local2.depthCtrl = depthCtrl.getEntireState();
_local2.time = clock.toSeconds();
_local2.selectedLandPrice = selectedLandPrice;
_local2.levelnum = levelnum;
_local2.moveChars = moveChars;
_local2.startPoint = startPoint;
_local2.lastVisitedCell = lastVisitedCell;
_local2.lastDrawn = lastDrawn;
_local2.navigator = navigator;
_local2.teenagers = teenagers;
_local2.adult = adult;
_local2.old = old;
_local2.firstCampers = firstCampers;
_local2.stateFlag = stateFlag;
_local2.toiletFlag = toiletFlag;
_local2.wMachineFlag = wMachineFlag;
_local2.showerFlag = showerFlag;
_local2.entertainmentFlag = entertainmentFlag;
_local2.roadsFlag = roadsFlag;
_local2.parkingFlag = parkingFlag;
_local2.campfireFlag = campfireFlag;
_local2.lampFlag = lampFlag;
_local2.landscapeFlag = landscapeFlag;
_local2.trashFlag = trashFlag;
_local2.dayNum = dayNum;
_local2.advertisedPopups = advertisedPopups;
_local2.grid = new Array();
var _local3 = 0;
while (_local3 < int(mapHeight / spacing)) {
var _local4 = 0;
_local2.grid[_local3] = new Array();
while (_local4 < int(mapWidth / spacing)) {
_local2.grid[_local3][_local4] = grid[_local3][_local4].getEntireState();
_local4++;
}
_local3++;
}
_local2.characters = new Array();
var _local4 = 0;
while (_local4 < characters.length) {
_local2.characters[_local4] = characters[_local4].getEntireState();
_local4++;
}
_local2.buildings = new Array();
_local4 = 0;
while (_local4 < buildings.length) {
_local2.buildings[_local4] = buildings[_local4].getEntireState();
_local4++;
}
_local2.parkingTiles = new Array();
_local4 = 0;
while (_local4 < parkingTiles.length) {
_local2.parkingTiles[_local4] = parkingTiles[_local4].getEntireState();
_local4++;
}
_local2.sanitary = new Array();
_local4 = 0;
while (_local4 < sanitary.length) {
_local2.sanitary[_local4] = sanitary[_local4].getEntireState();
_local4++;
}
_local2.trashcans = new Array();
_local4 = 0;
while (_local4 < trashcans.length) {
_local2.trashcans[_local4] = trashcans[_local4].getEntireState();
_local4++;
}
_local2.trash = new Array();
_local4 = 0;
while (_local4 < trash.length) {
_local2.trash[_local4] = trash[_local4].getEntireState();
_local4++;
}
_local2.building = building;
_local2.road = new Array();
_local4 = 0;
while (_local4 < road.length) {
_local2.road[_local4] = road[_local4].getEntireState();
_local4++;
}
_local2.cars = new Array();
_local4 = 0;
while (_local4 < cars.length) {
_local2.cars[_local4] = cars[_local4].getEntireState();
_local4++;
}
_local2.hasAGroup = hasAGroup;
_local2.camperGroups = new Array();
_local4 = 0;
while (_local4 < camperGroups.length) {
_local2.camperGroups[_local4] = camperGroups[_local4].getEntireState();
_local4++;
}
_local2.oposingCamp = new Array();
_local4 = 0;
while (_local4 < oposingCamp.length) {
_local2.oposingCamp[_local4] = oposingCamp[_local4].getEntireState();
_local4++;
}
_local2.unlockedObjects = new Array();
_local4 = 0;
while (_local4 < unlockedObjects.length) {
_local2.unlockedObjects[_local4] = unlockedObjects[_local4];
_local4++;
}
_local2.firstTwo = firstTwo;
_local2.gridOnStage = gridOnStage;
_local2.dayStart = dayStart;
_local2.nightStart = nightStart;
_local2.isDay = isDay;
_local2.tint = tint;
_local2.hasReception = hasReception;
_local2.numOfCampersServed = numOfCampersServed;
_local2.currentGoal = currentGoal;
_local2.advertisement = advertisement.getEntireState();
_local2.budget = budget;
_local2.investment = investment;
_local2.expences = expences;
_local2.percentInvestment = percentInvestment;
_local2.currentPopUp = currentPopUp;
_local2.firstDeparture = firstDeparture;
_local2.onFire = onFire;
_local2.onStorm = onStorm;
_local2.onFlood = onFlood;
_local2.onMidRecept = onMidRecept;
_local2.onLargeRecept = onLargeRecept;
_local2.onOppositionAdv = onOppositionAdv;
_local2.onComplaint = onComplaint;
_local2.onComplaintScreen = onComplaintScreen;
_local2.onNoTrashCan = onNoTrashCan;
_local2.over25 = over25;
_local2.over50 = over50;
_local2.over150 = over150;
_local2.over500 = over500;
_local2.relizedTurnover = new Array();
for (var _local5 in relizedTurnover) {
_local2.relizedTurnover[_local5] = relizedTurnover[_local5];
}
_local2.exploitationCost = new Array();
for (var _local5 in exploitationCost) {
_local2.exploitationCost[_local5] = exploitationCost[_local5];
}
_local2.availableSpots = availableSpots;
_local2.roadLinkID = roadLinkID;
return(_local2);
}
function setLoadedParameters(saveObject) {
depthCtrl.restoreEntireState(saveObject.depthCtrl);
selectedLandPrice = saveObject.selectedLandPrice;
roadBuilding = saveObject.roadBuilding;
levelnum = saveObject.levelnum;
moveChars = saveObject.moveChars;
startPoint = saveObject.startPoint;
lastVisitedCell = saveObject.lastVisitedCell;
lastDrawn = saveObject.lastDrawn;
teenagers = saveObject.teenagers;
adult = saveObject.adult;
old = saveObject.old;
firstTwo = saveObject.firstTwo;
gridOnStage = saveObject.gridOnStage;
dayStart = saveObject.dayStart;
nightStart = saveObject.nightStart;
isDay = saveObject.isDay;
dayNum = saveObject.dayNum;
firstCampers = saveObject.firstCampers;
stateFlag = saveObject.stateFlag;
toiletFlag = saveObject.toiletFlag;
wMachineFlag = saveObject.wMachineFlag;
showerFlag = saveObject.showerFlag;
entertainmentFlag = saveObject.entertainmentFlag;
roadsFlag = saveObject.roadsFlag;
parkingFlag = saveObject.parkingFlag;
campfireFlag = saveObject.campfireFlag;
lampFlag = saveObject.lampFlag;
landscapeFlag = saveObject.landscapeFlag;
trashFlag = saveObject.trashFlag;
advertisedPopups = saveObject.advertisedPopups;
unlockedObjects = new Array();
var _local9 = 0;
while (_local9 < saveObject.unlockedObjects.length) {
unlockedObjects[_local9] = saveObject.unlockedObjects[_local9];
_local9++;
}
while (j < int(mapHeight / spacing)) {
_local9 = 0;
grid[j] = new Array();
while (_local9 < int(mapWidth / spacing)) {
var _local15 = saveObject.grid[j][_local9];
var _local5 = new mcs.Cell();
_local5.restoreEntireState(_local15);
grid[j][_local9] = _local5;
_local9++;
}
j++;
}
_local9 = 0;
while (_local9 < saveObject.buildings.length) {
var _local15 = saveObject.buildings[_local9];
var _local4 = new mcs.Building();
_local4.restoreEntireState(_local15);
buildings[_local9] = _local4;
clipsOnStage.push(_local4);
reserveCells(_local4);
_local4.loadSounds();
if (((_local4.kind == Constants.RESERVATION_SPOT) || (_local4.kind == Constants.UNMOVABLE_OBJECT)) || (_local4.kind == Constants.ENTERTAINMENT)) {
camperSpots.push(_local4);
} else if (_local4.kind == Constants.RECEPTION) {
receptionObject = _local4;
}
_local9++;
}
_local9 = 0;
while (_local9 < saveObject.trash.length) {
var _local15 = saveObject.trash[_local9];
var _local10 = new mcs.Trash();
_local10.restoreEntireState(_local15);
trash[_local9] = _local10;
clipsOnStage.push(_local10);
_local9++;
}
var j = 0;
_local9 = 0;
while (_local9 < saveObject.characters.length) {
var _local15 = saveObject.characters[_local9];
var _local12 = new mcs.Character();
_local12.restoreEntireState(_local15);
characters[_local9] = _local12;
clipsAttached.push(_local12);
_local12.changeActivity();
_local9++;
}
building = undefined;
_local9 = 0;
while (_local9 < saveObject.parkingTiles.length) {
var _local15 = saveObject.parkingTiles[_local9];
var _local8 = new mcs.Building();
_local8.restoreEntireState(_local15);
parkingTiles[_local9] = _local8;
clipsOnStage.push(_local8);
reserveCells(_local8);
_local8.loadSounds();
_local9++;
}
_local9 = 0;
while (_local9 < saveObject.sanitary.length) {
var _local15 = saveObject.sanitary[_local9];
var _local6 = new mcs.Building();
_local6.restoreEntireState(_local15);
sanitary[_local9] = _local6;
clipsOnStage.push(_local6);
reserveCells(_local6);
_local6.loadSounds();
_local9++;
}
_local9 = 0;
while (_local9 < saveObject.trashcans.length) {
var _local15 = saveObject.trashcans[_local9];
var _local7 = new mcs.Building();
_local7.restoreEntireState(_local15);
trashcans[_local9] = _local7;
clipsOnStage.push(_local7);
reserveCells(_local7);
_local7.loadSounds();
_local9++;
}
_local9 = 0;
while (_local9 < saveObject.road.length) {
var _local15 = saveObject.road[_local9];
var _local11 = new mcs.RoadTile();
_local11.restoreEntireState(_local15);
road[_local9] = _local11;
clipsOnStage.push(_local11);
if ((_local9 % 2) != 0) {
}
_local9++;
}
_local9 = 0;
while (_local9 < saveObject.cars.length) {
var _local12 = new mcs.Car();
_local12.restoreEntireState(saveObject.cars[_local9]);
cars[_local9] = _local12;
clipsOnStage.push(_local12);
_local9++;
}
hasAGroup = saveObject.hasAGroup;
_local9 = 0;
while (_local9 < saveObject.camperGroups.length) {
var _local13 = new mcs.Group();
_local13.restoreEntireState(saveObject.camperGroups[_local9]);
camperGroups[_local9] = _local13;
_local9++;
}
_local9 = 0;
while (_local9 < saveObject.oposingCamp.length) {
var _local14 = new mcs.OpositionCamp();
_local14.restoreEntireState(saveObject.oposingCamp[_local9]);
oposingCamp[_local9] = _local14;
_local9++;
}
_local9 = 0;
while (_local9 < saveObject.complains.length) {
var _local12 = new mcs.Complains();
_local12.restoreEntireState(saveObject.complains[_local9]);
complains[_local9] = _local12;
_local9++;
}
tint = saveObject.tint;
setTint(tint);
budget = saveObject.budget;
investment = saveObject.investment;
expences = saveObject.expences;
percentInvestment = saveObject.percentInvestment;
relizedTurnover = new Array();
for (var _local16 in saveObject.relizedTurnover) {
relizedTurnover[_local16] = saveObject.relizedTurnover[_local16];
}
exploitationCost = new Array();
for (var _local16 in saveObject.exploitationCost) {
exploitationCost[_local16] = saveObject.exploitationCost[_local16];
}
availableSpots = saveObject.availableSpots;
hasReception = saveObject.hasReception;
numOfCampersServed = saveObject.numOfCampersServed;
currentPopUp = saveObject.currentPopUp;
currentGoal = saveObject.currentGoal;
advertisement = new com.Advertisement();
advertisement.restoreEntireState(saveObject.advertisement);
roadLinkID = saveObject.roadLinkID;
firstDeparture = saveObject.firstDeparture;
onFire = saveObject.onFire;
onStorm = saveObject.onStorm;
onFlood = saveObject.onFlood;
onMidRecept = saveObject.onMidRecept;
onLargeRecept = saveObject.onLargeRecept;
onOppositionAdv = saveObject.onOppositionAdv;
onComplaint = saveObject.onComplaint;
onComplaintScreen = saveObject.onComplaintScreen;
onNoTrashCan = saveObject.onNoTrashCan;
over25 = saveObject.over25;
over50 = saveObject.over50;
over150 = saveObject.over150;
over500 = saveObject.over500;
refreshClips();
mapForSaleTemp.merge(mapForSale, new flash.geom.Rectangle(0, 0, mapWidth, mapHeight), new flash.geom.Point(0, 0), 255, 255, 255, 255);
clock.stop();
clock.start(saveObject.time);
_global.game.interface_.getLevelInterface().scoreBoardRight.day.text = dayNum;
_global.game.interface_.getLevelInterface().scoreBoardLeft.campersServed.text = (numOfCampersServed + "/") + currentGoal;
_global.game.interface_.getLevelInterface().scoreBoardLeft.bankAccount.text = Math.round(budget);
utils.Delegate.callDelayed(this, campersArrive, arrival.teenagerArrivalTimeRandom * 1000, 0);
utils.Delegate.callDelayed(this, campersArrive, arrival.adultArrivalTimeRandom * 1000, 1);
utils.Delegate.callDelayed(this, campersArrive, arrival.olderArrivalTimeRandom * 1000, 2);
}
function setGrid() {
map.Map.grid.length;
var _local3 = 0;
while (_local3 < map.Map.grid.length) {
var _local2 = 0;
grid[_local3] = new Array();
while (_local2 < map.Map.grid[_local3].length) {
grid[_local3][_local2] = new mcs.Cell("Cell", (_local2 * spacing) + (spacing / 2), (_local3 * spacing) + (spacing / 2), map.Map.grid[_local3][_local2]);
var _local5 = int(_local2 * spacing);
var _local4 = int(_local3 * spacing);
_local2++;
}
_local3++;
}
mapForSaleTemp = mapForSale.clone();
}
function attachGrid() {
gridOnStage = true;
background.setMap(mapForSale);
background.drawCameraView(camBMP);
selection_ = true;
scrollLocked = true;
}
function removeGrid() {
gridOnStage = false;
selection_ = false;
scrollLocked = false;
resetBuying();
background.setMap(mapFog);
background.drawCameraView(camBMP);
}
function clipOnViewPort(mc) {
if ((((mc.x >= (camera.left - tolerance)) && (mc.x <= (camera.right + tolerance))) && (mc.y >= (camera.top - tolerance))) && (mc.y <= (camera.bottom + tolerance))) {
return(true);
}
if ((mc instanceof mcs.River) && (camera.right > 1100)) {
return(true);
}
return(false);
}
function translateMouseClick() {
var _local2 = new Object();
_local2.x = (camera.left + _xmouse) - bgMC._x;
_local2.y = (camera.top + _ymouse) - bgMC._y;
return(_local2);
}
function translateStageToCamera(x, y) {
var _local2 = new Object();
_local2.x = (camera.left + x) - bgMC._x;
_local2.y = (camera.top + y) - bgMC._y;
return(_local2);
}
function translateCameraToStage(x, y) {
var _local2 = new Object();
_local2.x = (x + bgMC._x) - camera.left;
_local2.y = (y + bgMC._y) - camera.top;
return(_local2);
}
function setCameraPosition(x, y) {
camera.setCameraPosition(x, y);
mouse.mouseRoll();
keyboard.xscroll = x;
keyboard.yscroll = y;
refreshClips();
background.drawCameraView(camBMP);
_global.navigatorView._x = camera.x / 10;
_global.navigatorView._y = camera.y / 10;
clearTempRoadClips();
if (carArrow) {
if (camera.top > 60) {
carArrow.rot = 0;
carArrow.clip._rotation = carArrow.rot;
carArrow.clip._x = 630;
carArrow.clip._y = 10;
} else {
carArrow.rot = 45;
setClip(carArrow);
}
}
}
function refreshClips() {
var _local5 = clipsAttached.length;
var _local4 = 0;
while (_local4 < _local5) {
var _local3 = clipsAttached[_local4];
if (clipOnViewPort(clipsAttached[_local4])) {
if (!_local3.clip) {
_local3.attachClip();
if (_local3 instanceof mcs.River) {
if (_global.musicVolume > 0) {
_global.game.sndCtrl.setSoundVolume("river_flow", (_global.musicVolume * 80) / 100);
}
}
if (_local3 instanceof mcs.RoadTile) {
}
} else {
setClip(_local3);
}
} else if (_local3.clip) {
if (_local3 instanceof mcs.River) {
if (_global.musicVolume > 0) {
_global.game.sndCtrl.setSoundVolume("river_flow", (_global.musicVolume * 30) / 100);
}
}
_local3.removeClip();
}
_local4++;
}
}
function checkCellAvaiblility(obj) {
var _local20 = true;
var _local21 = obj.clip;
var _local8 = 1;
while (_local8 <= obj.numOfSquares) {
var _local17 = _local21["sq" + _local8];
var _local7 = {x:0, y:0};
_local17.localToGlobal(_local7);
var _local3 = translateStageToCamera(_local7.x, _local7.y);
var _local6 = (_local3.x + (_local17._width / 2)) - cellTolerance;
var _local4 = (_local3.y + (_local17._height / 2)) - cellTolerance;
var _local9 = (_local3.x - (_local17._width / 2)) + cellTolerance;
var _local5 = (_local3.y - (_local17._height / 2)) + cellTolerance;
var _local15 = int(_local9 / spacing);
var _local14 = int(_local5 / spacing);
var _local12 = int(_local6 / spacing);
var _local10 = int(_local5 / spacing);
var _local13 = int(_local9 / spacing);
var _local11 = int(_local4 / spacing);
var _local19 = int(_local6 / spacing);
var _local18 = int(_local4 / spacing);
var _local16 = false;
if ((((_local9 < 0) || (_local6 > mapWidth)) || (_local5 < 0)) || (_local4 > mapHeight)) {
_local16 = true;
}
if (((((_local16 || (grid[_local14][_local15].getState() != grid[_local14][_local15].BUYED)) || (grid[_local10][_local12].getState() != grid[_local10][_local12].BUYED)) || (grid[_local11][_local13].getState() != grid[_local11][_local13].BUYED)) || (grid[_local18][_local19].getState() != grid[_local18][_local19].BUYED)) || (mouse.building && (_global.game.interface_.levelInterface.clip.hitTest(_xmouse, _ymouse, true)))) {
_local17.gotoAndStop("notAvaible");
_local20 = false;
} else {
_local17.gotoAndStop("avaible");
}
_local8++;
}
if (keyboard.overAllColor) {
_local8 = 1;
while (_local8 <= obj.numOfSquares) {
var _local17 = _local21["sq" + _local8];
if (_local20) {
_local17.gotoAndStop("avaible");
} else {
_local17.gotoAndStop("notAvaible");
}
_local8++;
}
}
return(_local20);
}
function snapping() {
var _local5 = translateStageToCamera(_xmouse, _ymouse);
var _local3 = int(_local5.x / spacing);
var _local2 = int(_local5.y / spacing);
var _local4 = translateCameraToStage(grid[_local2][_local3].x, grid[_local2][_local3].y);
building.clip._x = _local4.x;
building.clip._y = _local4.y;
}
function reserveCells(obj) {
var _local2 = 0;
while (_local2 < obj.squares.length) {
var _local4 = int(obj.squares[_local2].x / spacing);
var _local3 = int(obj.squares[_local2].y / spacing);
grid[_local3][_local4].setState(grid[_local3][_local4].RESERVED);
grid[_local3][_local4].setID(obj.depth);
grid[_local3][_local4].building = obj;
_local2++;
}
}
function mark(mc) {
var _local11 = translateStageToCamera(mc._x, mc._y);
var _local12 = translateStageToCamera(_xmouse, _ymouse);
var _local21 = camera.right;
var _local18 = camera.bottom;
var _local20 = camera.left;
var _local19 = camera.top;
var _local16 = int(_local20 / spacing);
var _local14 = int(_local21 / spacing);
var _local15 = int(_local19 / spacing);
var _local13 = int(_local18 / spacing);
unmark(mc);
var _local7 = ((int(_local11.x / spacing) < int(_local12.x / spacing)) ? (int(_local11.x / spacing)) : (int(_local12.x / spacing)));
var _local8 = ((int(_local11.x / spacing) > int(_local12.x / spacing)) ? (int(_local11.x / spacing)) : (int(_local12.x / spacing)));
var _local9 = ((int(_local11.y / spacing) < int(_local12.y / spacing)) ? (int(_local11.y / spacing)) : (int(_local12.y / spacing)));
var _local10 = ((int(_local11.y / spacing) > int(_local12.y / spacing)) ? (int(_local11.y / spacing)) : (int(_local12.y / spacing)));
_local7 = ((_local7 >= _local16) ? (_local7) : (_local16));
_local8 = ((_local8 <= _local14) ? (_local8) : (_local14));
_local9 = ((_local9 >= _local15) ? (_local9) : (_local15));
_local10 = ((_local10 <= _local13) ? (_local10) : (_local13));
var _local3 = _local9;
while (_local3 <= _local10) {
var _local2 = _local7;
while (_local2 <= _local8) {
if (grid[_local3][_local2].getState() == grid[_local3][_local2].NEEDTOBUY) {
if ((!grid[_local3][_local2].isMarked()) && ((selectedLandPrice + grid[_local3][_local2].price) <= budget)) {
selectedLandPrice = selectedLandPrice + grid[_local3][_local2].price;
mouse.clip.price.text = selectedLandPrice.toString();
var _local6 = int(grid[_local3][_local2].x - (spacing / 2));
var _local5 = int(grid[_local3][_local2].y - (spacing / 2));
var _local4 = new flash.geom.Rectangle(_local6, _local5, 30, 30);
mapForSale.applyFilter(mapForSale, _local4, new flash.geom.Point(_local4.x, _local4.y), markFilter);
background.drawCameraView(camBMP);
grid[_local3][_local2].mark();
}
}
_local2++;
}
_local3++;
}
}
function unmark(mc) {
var _local13 = translateStageToCamera(mc._x, mc._y);
var _local14 = translateStageToCamera(_xmouse, _ymouse);
var _local20 = camera.right;
var _local17 = camera.bottom;
var _local19 = camera.left;
var _local18 = camera.top;
var _local12 = int(_local19 / spacing);
var _local7 = int(_local20 / spacing);
var _local16 = int(_local18 / spacing);
var _local15 = int(_local17 / spacing);
var _local9 = ((int(_local13.x / spacing) < int(_local14.x / spacing)) ? (int(_local13.x / spacing)) : (int(_local14.x / spacing)));
var _local11 = ((int(_local13.x / spacing) > int(_local14.x / spacing)) ? (int(_local13.x / spacing)) : (int(_local14.x / spacing)));
var _local8 = ((int(_local13.y / spacing) < int(_local14.y / spacing)) ? (int(_local13.y / spacing)) : (int(_local14.y / spacing)));
var _local10 = ((int(_local13.y / spacing) > int(_local14.y / spacing)) ? (int(_local13.y / spacing)) : (int(_local14.y / spacing)));
var _local3 = _local16;
while (_local3 <= _local15) {
var _local2 = _local12;
while (_local2 <= _local7) {
if (grid[_local3][_local2].getState() == grid[_local3][_local2].NEEDTOBUY) {
if (((_local2 < _local9) || (_local2 > _local11)) || ((_local3 < _local8) || (_local3 > _local10))) {
if (grid[_local3][_local2].isMarked() && (!grid[_local3][_local2].isSelected())) {
selectedLandPrice = selectedLandPrice - grid[_local3][_local2].price;
mouse.clip.price.text = selectedLandPrice.toString();
var _local6 = int(grid[_local3][_local2].x - (spacing / 2));
var _local5 = int(grid[_local3][_local2].y - (spacing / 2));
var _local4 = new flash.geom.Rectangle(_local6, _local5, 30, 30);
mapForSale.merge(mapForSaleTemp, _local4, new flash.geom.Point(_local4.x, _local4.y), 255, 255, 255, 255);
background.drawCameraView(camBMP);
grid[_local3][_local2].unmark();
}
}
}
_local2++;
}
_local3++;
}
}
function addToSelected() {
var _local11 = camera.right;
var _local8 = camera.bottom;
var _local10 = camera.left;
var _local9 = camera.top;
var _local4 = int(_local10 / spacing);
var _local5 = int(_local11 / spacing);
var _local6 = int(_local9 / spacing);
var _local7 = int(_local8 / spacing);
var _local3 = _local6;
while (_local3 <= _local7) {
var _local2 = _local4;
while (_local2 <= _local5) {
if (grid[_local3][_local2].getState() == grid[_local3][_local2].NEEDTOBUY) {
if (grid[_local3][_local2].isMarked()) {
grid[_local3][_local2].select();
}
}
_local2++;
}
_local3++;
}
}
function buyLand() {
var _local14 = camera.right;
var _local11 = camera.bottom;
var _local13 = camera.left;
var _local12 = camera.top;
var _local7 = int(_local13 / spacing) - 1;
var _local8 = int(_local14 / spacing) + 1;
var _local9 = int(_local12 / spacing) - 1;
var _local10 = int(_local11 / spacing) + 1;
var _local3 = _local9;
while (_local3 <= _local10) {
var _local2 = _local7;
while (_local2 <= _local8) {
if ((grid[_local3][_local2].getState() == grid[_local3][_local2].NEEDTOBUY) && (grid[_local3][_local2].isSelected())) {
grid[_local3][_local2].setState(grid[_local3][_local2].BUYED);
var _local6 = int(grid[_local3][_local2].x - (spacing / 2));
var _local5 = int(grid[_local3][_local2].y - (spacing / 2));
var _local4 = new flash.geom.Rectangle(_local6, _local5, 30, 30);
mapFog.merge(mapBought, _local4, new flash.geom.Point(_local4.x, _local4.y), 255, 255, 255, 255);
mapForSale.merge(mapBought, _local4, new flash.geom.Point(_local4.x, _local4.y), 255, 255, 255, 255);
navigator.refreshNavigator(_local6, _local5);
background.drawCameraView(camBMP);
}
_local2++;
}
_local3++;
}
changeBudget(-selectedLandPrice);
selectedLandPrice = 0;
mapForSaleTemp.merge(mapForSale, new flash.geom.Rectangle(0, 0, mapWidth, mapHeight), new flash.geom.Point(0, 0), 255, 255, 255, 255);
}
function resetBuying() {
var _local11 = camera.right;
var _local8 = camera.bottom;
var _local10 = camera.left;
var _local9 = camera.top;
var _local4 = int(_local10 / spacing);
var _local5 = int(_local11 / spacing);
var _local6 = int(_local9 / spacing);
var _local7 = int(_local8 / spacing);
var _local3 = _local6;
while (_local3 <= _local7) {
var _local2 = _local4;
while (_local2 <= _local5) {
if (grid[_local3][_local2].getState() == grid[_local3][_local2].NEEDTOBUY) {
grid[_local3][_local2].unmark();
grid[_local3][_local2].deselect();
}
_local2++;
}
_local3++;
}
selectedLandPrice = 0;
mapForSale.merge(mapForSaleTemp, new flash.geom.Rectangle(0, 0, mapWidth, mapHeight), new flash.geom.Point(0, 0), 255, 255, 255, 255);
background.drawCameraView(camBMP);
}
function findRoad() {
var _local5 = new Array();
var _local8 = translateStageToCamera(_xmouse, _ymouse);
_local5[0] = int(_local8.x / spacing);
_local5[1] = int(_local8.y / spacing);
if (lastVisitedCell != grid[_local5[1]][_local5[0]]) {
if ((grid[_local5[1]][_local5[0]].getState() == grid[_local5[1]][_local5[0]].BUYED) || (grid[_local5[1]][_local5[0]].getState() == grid[_local5[1]][_local5[0]].ROAD)) {
if (!_global.game.interface_.levelInterface.clip.hitTest(_xmouse, _ymouse)) {
var _local4 = new Array();
_local4 = aStar.findPath(grid, startPoint, _local5);
var _local7 = 0;
if (roadLinkID == "dirt") {
_local7 = _local4.length * 2;
}
if (roadLinkID == "paved") {
_local7 = _local4.length * 10;
}
if (roadLinkID == "cyckling") {
_local7 = _local4.length * 15;
}
if (roadLinkID == "asfalt") {
_local7 = _local4.length * 20;
}
if (_local7 <= budget) {
clearTempRoadClips();
mouse.clip.price.text = _local7.toString();
lastDrawn = _local4[0];
var _local3 = 0;
while (_local3 < _local4.length) {
drawRoad(lastDrawn, _local4[_local3]);
_local3++;
}
lastVisitedCell = grid[_local5[1]][_local5[0]];
} else if (currentPopUp != 29) {
var _local6 = depthCtrl.infScreens;
while (getInstanceAtDepth(_local6++)) {
}
var _local9 = this;
_local9.attention.removeMovieClip();
var _local10 = attachMovie("buildMoney", "attention", _local6, {_x:400, _y:300});
}
}
}
}
}
function clearTempRoadClips() {
var _local2 = 0;
while (_local2 < tempRoad.length) {
tempRoad[_local2].clip.removeMovieClip();
tempRoad[_local2].cell.tileType = undefined;
_local2++;
}
tempRoad.splice(0);
}
function buildRoad() {
if (tempRoad.length > 2) {
if (tempRoad[3].getTileType() != "45grades") {
}
}
var _local6 = clipsOnStage.length;
var _local3 = 0;
while (_local3 < tempRoad.length) {
road.push(tempRoad[_local3]);
var _local2 = tempRoad[_local3];
_local2.cell.setState(_local2.cell.ROAD);
clipsOnStage[_local6 + _local3] = _local2;
_local2.setTint(tint);
_local2.build();
_local3++;
}
var _local5 = 0;
if (roadLinkID == "dirt") {
_local5 = 2;
}
if (roadLinkID == "paved") {
_local5 = 10;
}
if (roadLinkID == "cyckling") {
_local5 = 15;
}
if (roadLinkID == "asfalt") {
_local5 = 20;
}
changeBudget((-tempRoad.length) * _local5);
investment = investment + (tempRoad.length * _local5);
tempRoad.splice(0);
startPoint[0] = int(lastVisitedCell.x / spacing);
startPoint[1] = int(lastVisitedCell.y / spacing);
_local3 = 0;
while (_local3 < camperGroups.length) {
var _local4 = camperGroups[_local3];
_local4.calculateRoads();
_local3++;
}
}
function getTileProps(last, current) {
var _local1 = new Object();
if ((current[0] == last[0]) || (current[1] == last[1])) {
_local1.type = "rectangle";
if (current[0] > last[0]) {
_local1.rotation = 0;
} else if (current[0] < last[0]) {
_local1.rotation = 180;
} else if (current[1] > last[1]) {
_local1.rotation = 90;
} else if (current[1] < last[1]) {
_local1.rotation = -90;
} else {
_local1.type = "square";
_local1.rotation = 0;
}
} else {
_local1.type = "45grades";
if ((current[0] < last[0]) && (current[1] < last[1])) {
_local1.rotation = 0;
} else if ((current[0] > last[0]) && (current[1] < last[1])) {
_local1.rotation = 90;
} else if ((current[0] < last[0]) && (current[1] > last[1])) {
_local1.rotation = -90;
} else if ((current[0] > last[0]) && (current[1] > last[1])) {
_local1.rotation = 180;
}
}
return(_local1);
}
function drawRoad(lastDrawn, current) {
var _local4 = new Object();
_local4 = getTileProps(lastDrawn, current);
if ((grid[current[1]][current[0]].getState() == grid[current[1]][current[0]].ROAD) && (grid[current[1]][current[0]].tileType == _local4.type)) {
}
var _local6 = translateCameraToStage(grid[current[1]][current[0]].x, grid[current[1]][current[0]].y);
var _local5 = depthCtrl.roadDepth++;
var _local3 = new mcs.RoadTile(roadLinkID, grid[current[1]][current[0]].x, grid[current[1]][current[0]].y, _local4.rotation, _local5);
_local3.clip = attachMovie(roadLinkID, "tile" + _local5, _local5, {_x:_local6.x, _y:_local6.y, _rotation:_local4.rotation});
_local3.clip.cacheAsBitmap = true;
_local3.clip.gotoAndStop(_local4.type);
_local3.setTileType(_local4.type);
_local3.setTint(tint);
grid[current[1]][current[0]].tileType = _local4.type;
_local3.cell = grid[current[1]][current[0]];
tempRoad.push(_local3);
this.lastDrawn = current;
if (tempRoad.length > 2) {
}
}
function moveCharacters() {
if (!pause) {
}
utils.Delegate.callDelayed(this, moveCharacters, 60000);
}
function moveLoop() {
var _local2 = 0;
while (_local2 < characters.length) {
if (characters[_local2].inMovement && (characters[_local2].visible_)) {
characters[_local2].moveCamper();
}
_local2++;
}
}
function setClip(obj) {
if (obj.clip) {
var _local3 = translateCameraToStage(obj.x, obj.y);
obj.clip._x = int(_local3.x);
obj.clip._y = int(_local3.y);
obj.clip._rotation = int(obj.rot);
}
}
function positionClip() {
if (building) {
building.clip.stopDrag();
if (checkCellAvaiblility(building)) {
var _local16 = translateStageToCamera(building.clip._x, building.clip._y);
var _local4 = int(_local16.x / spacing);
var _local3 = int(_local16.y / spacing);
if (building.kind == Constants.PARKING) {
building.depth = depthCtrl.parkingDepth++;
parkingTiles.push(building);
} else if (building.getType() == Constants.trashcan) {
building.depth = depthCtrl.trashcanDepth++;
trashcans.push(building);
} else if (((((building.getType() == Constants.allInOneSanitary) || (building.getType() == Constants.woodenToilet)) || (building.getType() == Constants.stoneToilet)) || (building.getType() == Constants.stoneToiletShower)) || (building.getType() == Constants.bigSanitaryHouse)) {
building.depth = depthCtrl.findObjectsDepth(_local4, _local3);
if (getInstanceAtDepth(building.depth) != undefined) {
mouse.building = false;
building.clip.removeMovieClip();
delete building;
return(undefined);
}
sanitary.push(building);
} else {
building.depth = depthCtrl.findObjectsDepth(_local4, _local3);
if (getInstanceAtDepth(building.depth) != undefined) {
mouse.building = false;
building.clip.removeMovieClip();
delete building;
return(undefined);
}
buildings.push(building);
}
building.clip.swapDepths(building.depth);
building.x = grid[_local3][_local4].x;
building.y = grid[_local3][_local4].y;
var _local15 = translateCameraToStage(building.x, building.y);
building.clip._x = _local15.x;
building.clip._y = _local15.y;
building.rot = building.clip._rotation;
building.setTint(tint);
var _local7 = 1;
while (_local7 <= building.numOfSquares) {
var _local11 = building.clip;
_local11["sq" + _local7].gotoAndStop("build");
var _local12 = _local11["sq" + _local7];
var _local9 = {x:0, y:0};
_local12.localToGlobal(_local9);
var _local10 = translateStageToCamera(_local9.x, _local9.y);
building.squares.push({x:_local10.x, y:_local10.y});
_local7++;
}
var _local5 = new Array();
var _local6 = 0;
while (_local6 < characters.length) {
if (characters[_local6].clip.hitTest(building.clip)) {
_local5.push(characters[_local6]);
}
_local6++;
}
if (building instanceof mcs.Building) {
}
clipsOnStage.push(building);
reserveCells(building);
if ((building.kind == Constants.RESERVATION_SPOT) || (building.kind == Constants.UNMOVABLE_OBJECT)) {
availableSpots = availableSpots + building._visitors;
camperSpots.push(building);
} else if (building.kind == Constants.ENTERTAINMENT) {
camperSpots.push(building);
if ((((((building.getType() == Constants.hugeWaterPark) || (building.getType() == Constants.tennisField)) || (building.getType() == Constants.tableTennis)) || (building.getType() == Constants.footballField)) || (building.getType() == Constants.bigOutdoorPool)) || (building.getType() == Constants.smallOutdoorPool)) {
utils.Delegate.callDelayed(building, building.playAnimation, 50000);
}
}
if (building.kind == Constants.RECEPTION) {
hasReception = true;
receptionObject = building;
if ((levelnum >= 3) && (receptionObject.getType() == Constants.normalReception)) {
if (!_global.game.LevelClip.onOppositionAdv) {
_global.game.LevelClip.onOppositionAdv = true;
_global.game.LevelClip.helpTips[21].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[21], _global.game.LevelClip.helpTips[21].hidePopUp, 10000);
}
}
}
_local7 = 0;
while (_local7 < _local5.length) {
var _local8 = building.findFreeCell().cell;
_local5[_local7].x = _local8.x;
_local5[_local7].y = _local8.y;
_local5[_local7].cellx = int(_local5[_local7].x / spacing);
_local5[_local7].celly = int(_local5[_local7].y / spacing);
_local5[_local7].setClip();
_local7++;
}
building.loadSounds();
building.build();
if (building.kind == Constants.ENTERTAINMENT) {
if ((((((building.getType() == Constants.hugeWaterPark) || (building.getType() == Constants.tennisField)) || (building.getType() == Constants.tableTennis)) || (building.getType() == Constants.footballField)) || (building.getType() == Constants.bigOutdoorPool)) || (building.getType() == Constants.smallOutdoorPool)) {
utils.Delegate.callDelayed(building, building.playAnimation, 50000);
}
}
_global.game.sndCtrl.stopSound("bulldozer");
_global.game.sndCtrl.stopSound("crane");
_global.game.sndCtrl.stopSound("hamer_construction");
_global.game.sndCtrl.playSound("bulldozer", -1, building);
_global.game.sndCtrl.playSound("crane", -1, building);
_global.game.sndCtrl.playSound("hamer_construction", -1, building);
changeBudget(-building.getCost());
investment = investment + building.getCost();
mouse.building = false;
building.addEvents();
oposingCamp[0].build();
oposingCamp[1].build();
oposingCamp[2].build();
building.clip.removeMovieClip();
building = undefined;
if (_global.game.LevelClip.helpOnOff) {
if (_global.game.interface_.getLevelInterface().currentBtn == "dragAndDrop") {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn14";
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, _global.constructionMenu.btn14._x + 40, _global.constructionMenu.btn14._y);
_global.helpHint = true;
if (_global.game.LevelClip.currentPopUp == 6) {
_global.game.LevelClip.helpTips[7].showPopUp();
}
}
if ((_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.btn14") && (_global.game.LevelClip.currentPopUp < 6)) {
_global.game.interface_.getLevelInterface().currentBtn = "dragAndDrop";
if (_global.game.LevelClip.currentPopUp == 5) {
_global.game.LevelClip.helpTips[6].showPopUp();
}
}
}
} else {
if (!_global.game.interface_.levelInterface.clip.hitTest(_xmouse, _ymouse)) {
if ((!_global.game.LevelClip.helpOnOff) || (!_global.game.interface_.getLevelInterface().basics)) {
var _local7 = 1;
while (_local7 <= building.numOfSquares) {
var _local11 = building.clip;
_local11["sq" + _local7].gotoAndStop("build");
var _local12 = _local11["sq" + _local7];
var _local9 = {x:0, y:0};
_local12.localToGlobal(_local9);
var _local10 = translateStageToCamera(_local9.x, _local9.y);
var _local4 = int(_local10.x / spacing);
var _local3 = int(_local10.y / spacing);
if (grid[_local3][_local4].getState() == grid[_local3][_local4].UNAVAILABLE) {
_global.game.LevelClip.helpTips[26].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[26], _global.game.LevelClip.helpTips[26].hidePopUp, 10000);
break;
}
if (grid[_local3][_local4].getState() == grid[_local3][_local4].NEEDTOBUY) {
_global.game.LevelClip.helpTips[25].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[25], _global.game.LevelClip.helpTips[25].hidePopUp, 10000);
break;
}
if ((grid[_local3][_local4].getState() == grid[_local3][_local4].RESERVED) || (grid[_local3][_local4].getState() == grid[_local3][_local4].ROAD)) {
if (grid[_local3][_local4].building.kind != Constants.RECEPTION) {
_global.game.LevelClip.helpTips[27].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[27], _global.game.LevelClip.helpTips[27].hidePopUp, 10000);
} else {
_global.game.LevelClip.helpTips[26].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[26], _global.game.LevelClip.helpTips[26].hidePopUp, 10000);
}
break;
}
_local7++;
}
}
}
mouse.building = false;
building.clip.removeMovieClip();
delete building;
}
}
}
function findSquere(obj) {
var _local3 = obj.squares[0];
var _local4 = 0;
var _local1 = 1;
while (_local1 < obj.squares.length) {
if ((obj.squares[_local1].x <= _local3.x) && (obj.squares[_local1].y <= _local3.y)) {
_local3 = obj.squares[_local1];
_local4 = _local1;
}
_local1++;
}
return(_local3);
}
function removeFromStageClipsArray(obj) {
var _local2 = 0;
while (_local2 < clipsOnStage.length) {
if (clipsOnStage[_local2] == obj) {
clipsOnStage.splice(_local2, 1);
break;
}
_local2++;
}
_local2 = 0;
while (_local2 < clipsAttached.length) {
if (clipsAttached[_local2] == obj) {
clipsAttached.splice(_local2, 1);
break;
}
_local2++;
}
}
function removeObjectFromArray(obj, arr) {
var _local1 = 0;
while (_local1 < arr.length) {
if (arr[_local1] == obj) {
arr.splice(_local1, 1);
break;
}
_local1++;
}
}
function campersArrive(age) {
if (!pause) {
if (!_global.helpHint) {
if ((_global.game.LevelClip.currentPopUp >= 10) || (!_global.game.LevelClip.helpOnOff)) {
if ((!hasAGroup) && (hasReception)) {
var _local5;
var _local3 = 0;
while (_local3 < clipsOnStage.length) {
if ((clipsOnStage[_local3] instanceof mcs.Building) && (clipsOnStage[_local3].kind == Constants.RECEPTION)) {
_local5 = clipsOnStage[_local3];
break;
}
_local3++;
}
if (_local5) {
_age = age;
_reception = _local5;
_global.game.sndCtrl.stopSound("car_arrive");
_global.game.sndCtrl.playSound("car_arrive", -1, this);
hasAGroup = true;
var _local7 = arrival.inviteCampers(_age);
var _local4 = new mcs.Car("car", 645, 15, 0, depthCtrl.carDepth++, _local7);
_local4.parkCar(grid[0][21]);
_local4.attachClip();
_local4.setTint(tint);
_local4.state = 0;
_local4.clip.gotoAndPlay("coming");
cars.push(_local4);
clipsAttached.push(_local4);
if (firstCampers) {
if (_global.game.LevelClip.helpOnOff) {
carArrow = new mcs.CarArrow("carArrow", 630, 30, 45, depthCtrl.carDepth + 2);
carArrow.attachClip();
if (camera.top > 60) {
carArrow.rot = 0;
carArrow.clip._rotation = carArrow.rot;
carArrow.clip._x = 630;
carArrow.clip._y = 10;
} else {
carArrow.rot = 45;
setClip(carArrow);
}
_global.game.LevelClip.helpTips[11].showPopUp();
}
}
if (!firstCampers) {
utils.Delegate.callDelayed(_local4, _local4.isAccomodated, 30000, clock.toSeconds(), 30);
}
utils.Delegate.callDelayed(this, breakSound, 1300);
}
}
}
}
}
if (arrival.campersWaiting.length == 0) {
if (age == 0) {
utils.Delegate.callDelayed(this, campersArrive, arrival.teenagerArrivalTimeRandom * 1000, 0);
}
if (age == 1) {
utils.Delegate.callDelayed(this, campersArrive, arrival.adultArrivalTimeRandom * 1000, 1);
}
if (age == 2) {
utils.Delegate.callDelayed(this, campersArrive, arrival.olderArrivalTimeRandom * 1000, 2);
}
} else {
if (age == 0) {
utils.Delegate.callDelayed(this, campersArrive, 1000, 0);
}
if (age == 1) {
utils.Delegate.callDelayed(this, campersArrive, 1000, 1);
}
if (age == 2) {
utils.Delegate.callDelayed(this, campersArrive, 1000, 2);
}
}
}
function nightHandler() {
if (isDay) {
if (dayStart == int((2 * daynightLasting) / 3)) {
nightFalls();
nightStart = 0;
isDay = false;
_global.game.sndCtrl.playSound("night_insects", 32768);
nightOwl();
_global.game.sndCtrl.stopSound("birds_singing");
_global.game.sndCtrl.stopSound("day_insects");
_global.game.sndCtrl.stopSound("birds_flappingWings");
_global.game.sndCtrl.stopSound("river_flow");
var _local6 = 0;
var _local5 = 0;
while (_local5 < buildings.length) {
var _local3 = buildings[_local5];
if (_local3.kind == Constants.ENTERTAINMENT) {
var _local4 = _local3.getDailyIncome();
if (relizedTurnover[_local3.linkID] != undefined) {
relizedTurnover[_local3.linkID] = relizedTurnover[_local3.linkID] + _local4;
} else {
relizedTurnover[_local3.linkID] = _local4;
}
changeBudget(_local4);
if (!_local3.congradulation) {
if (_local3.overAllIncome >= (2 * _local3.getCost())) {
_local3.congradulation = true;
_global.game.interface_.getLevelInterface().congratulation("Great investment!", 0);
statScrText = ((("Your total income from the " + Constants.getObjectName(_local3.getType())) + " has reached ") + _local3.overAllIncome) + "$. Way to go. \n";
}
}
}
if (_local3.kind == Constants.PLEASURE) {
if (_local3.getType() == Constants.electricalLamp) {
if (_local3.currentFrame == 3) {
_local3.attachAnimation();
_local3.animation.setTint(0);
}
}
if (_local3.getType() == Constants.campFire) {
if (_local3.currentFrame == 3) {
_local3.attachAnimation();
_local3.animation.setTint(0);
}
}
}
if ((_local3.kind == Constants.UNMOVABLE_OBJECT) || (_local3.kind == Constants.RESERVATION_SPOT)) {
_local6++;
}
_local5++;
}
if ((budget < 50) && (_local6 <= 0)) {
_global.game.mode = "gameover";
_global.game.playMode();
}
_local5 = 0;
while (_local5 < clipsOnStage.length) {
if (clipsOnStage[_local5] instanceof mcs.Building) {
clipsOnStage[_local5].changeState();
}
_local5++;
}
} else {
dayStart++;
}
} else if (nightStart == int(daynightLasting / 3)) {
nightRises();
dayStart = 0;
isDay = true;
roosterFlag = true;
dayNum++;
_global.game.interface_.getLevelInterface().scoreBoardRight.day.text = dayNum;
var _local5 = 0;
while (_local5 < buildings.length) {
var _local3 = buildings[_local5];
if (_local3.kind == Constants.PLEASURE) {
if (_local3.getType() == Constants.electricalLamp) {
_local3.removeAnimation();
}
if (_local3.getType() == Constants.campFire) {
_local3.removeAnimation();
_global.game.sndCtrl.stopSound("camp_fire", this);
}
}
_local5++;
}
_global.game.sndCtrl.stopSound("night_insects");
_global.game.sndCtrl.stopSound("night_owl");
_global.game.sndCtrl.playSound("birds_singing", 32768);
_global.game.sndCtrl.playSound("day_insects", 32768);
_global.game.sndCtrl.playSound("birds_flappingWings", 32768);
_global.game.sndCtrl.playSound("river_flow", 32768);
if (_global.musicVolume > 0) {
_global.game.sndCtrl.setSoundVolume("river_flow", (_global.musicVolume * 30) / 100);
}
} else {
nightStart++;
}
}
function nightOwl() {
if (isDay == false) {
_global.game.sndCtrl.stopSound("night_owl");
_global.game.sndCtrl.playSound("night_owl");
_global.game.sndCtrl.setSoundVolume("night_owl", _global.musicVolume);
utils.Delegate.callDelayed(this, nightOwl, 5000);
}
}
function nightFalls() {
if (tint <= 50) {
tint++;
setTint(tint);
utils.Delegate.callDelayed(this, nightFalls, 10);
}
}
function nightRises() {
if (tint > 0) {
if (roosterFlag == true) {
_global.game.sndCtrl.stopSound("rooster_call");
_global.game.sndCtrl.playSound("rooster_call", -1, this);
roosterFlag = false;
}
tint--;
setTint(tint);
utils.Delegate.callDelayed(this, nightRises, 10);
}
}
function callStorm() {
if (!pause) {
_global.game.sndCtrl.stopSound("thunder_storm");
_global.game.sndCtrl.playSound("thunder_storm", -1, this);
storm = attachMovie("storm", "storm", depthCtrl.stormDepth, {_x:400, _y:300});
var _local4 = 0;
while (_local4 < clipsOnStage.length) {
if (clipsOnStage[_local4] instanceof mcs.Building) {
var _local3 = clipsOnStage[_local4];
if (((((_local3.kind != Constants.RECEPTION) && (_local3.kind != Constants.PARKING)) && (_local3.getType() != Constants.campFire)) && (_local3.getType() != Constants.electricalLamp)) && (_local3.getType() != Constants.tree)) {
_local3.stormEffect();
}
}
if (clipsOnStage[_local4] instanceof mcs.RoadTile) {
}
_local4++;
}
if (!_global.game.LevelClip.onStorm) {
_global.game.LevelClip.onStorm = true;
_global.game.LevelClip.helpTips[17].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[17], _global.game.LevelClip.helpTips[17].hidePopUp, 10000);
}
utils.Delegate.callDelayed(this, removeStorm, 15000);
}
}
function removeStorm() {
_global.game.sndCtrl.stopSound("thunder_storm");
storm.removeMovieClip();
}
function fireStart() {
if (!pause) {
var _local6 = new Array();
var _local4 = 0;
while (_local4 < buildings.length) {
var _local3 = buildings[_local4];
if (((((_local3.kind != Constants.RECEPTION) && (_local3.kind != Constants.PARKING)) && (_local3.getType() != Constants.campFire)) && (_local3.getType() != Constants.electricalLamp)) && (_local3.getType() != Constants.tree)) {
_local6.push(_local3);
}
_local4++;
}
var _local7 = _local6.concat(sanitary);
var _local5 = _local7[int(Math.random() * _local7.length)];
if (_local5 instanceof mcs.Building) {
if ((((_local5.kind != Constants.RECEPTION) && (_local5.kind != Constants.PARKING)) && (_local5.getType() != Constants.campFire)) && (_local5.getType() != Constants.electricalLamp)) {
if (_local5.kind == Constants.RESERVATION_SPOT) {
if (_local5.currentFrame == 7) {
_global.game.sndCtrl.stopSound("disater_alarm", this);
_global.game.sndCtrl.playSound("disater_alarm", -1, this);
_local5.fireEffect();
if (!_global.game.LevelClip.onFire) {
_global.game.LevelClip.onFire = true;
_global.game.LevelClip.helpTips[16].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[16], _global.game.LevelClip.helpTips[16].hidePopUp, 10000);
}
}
} else if (_local5.currentFrame == 3) {
_global.game.sndCtrl.stopSound("disater_alarm", this);
_global.game.sndCtrl.playSound("disater_alarm", -1, this);
_local5.fireEffect();
if (!_global.game.LevelClip.onFire) {
_global.game.LevelClip.onFire = true;
_global.game.LevelClip.helpTips[16].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[16], _global.game.LevelClip.helpTips[16].hidePopUp, 10000);
}
}
}
}
}
}
function disaster() {
if ((!pause) && (!_global.helpHint)) {
if ((_global.game.LevelClip.currentPopUp > 15) || (!_global.game.LevelClip.helpOnOff)) {
var _local4 = new Randomization();
var _local3 = _local4.rouletteWheelSelection([{dis:"flood", chance:10}, {dis:"fire", chance:20}, {dis:"storm", chance:15}, {dis:"none", chance:140}]).dis;
if (_local3 == "flood") {
_global.game.sndCtrl.stopSound("disater_alarm", this);
_global.game.sndCtrl.playSound("disater_alarm", -1, this);
flood.floodLand();
}
if (_local3 == "fire") {
fireStart();
}
if (_local3 == "storm") {
_global.game.sndCtrl.stopSound("disater_alarm", this);
_global.game.sndCtrl.playSound("disater_alarm", -1, this);
callStorm();
}
}
}
utils.Delegate.callDelayed(this, disaster, 120000);
}
function makeTrash() {
if (!pause) {
if (!_global.helpHint) {
if ((_global.game.LevelClip.currentPopUp >= 10) || (!_global.game.LevelClip.helpOnOff)) {
if (characters.length > 0) {
var _local11 = characters[int(characters.length * Math.random())];
var _local8 = _local11.x;
var _local7 = _local11.y;
var _local14 = int(_local8 / spacing);
var _local13 = int(_local7 / spacing);
if (grid[_local13][_local14].getState() == grid[_local13][_local14].RESERVED) {
var _local12 = _local11.camperGroup.getCampingObject().findFreeCell().cell;
_local8 = _local12.x;
_local7 = _local12.y;
}
var _local9 = true;
var _local3 = 0;
while (_local3 < trashcans.length) {
var _local4 = trashcans[_local3];
var _local5 = utils.MathUtils.getDistance(_local8, _local7, _local4.x, _local4.y);
if (_local5 <= 180) {
_local9 = false;
break;
}
_local3++;
}
if (_local9) {
var _local15 = ((depthCtrl.trashDepth < depthCtrl.roadFrameDepth) ? (depthCtrl.trashDepth++) : ((depthCtrl.trashDepth = 2000)));
var _local10 = new mcs.Trash("trash", _local8, _local7, 0, _local15);
_local10.setTint(tint);
trash.push(_local10);
clipsOnStage.push(_local10);
_local10.attachClip();
_local3 = 0;
while (_local3 < camperGroups.length) {
var _local6 = camperGroups[_local3];
_local6.calculateTrash();
_local3++;
}
}
}
}
}
}
utils.Delegate.callDelayed(this, makeTrash, int(120000 * Math.random()));
}
function setTint(tint) {
utils.ClipUtils.setTint(bgMC, 0, tint);
var _local2 = 0;
while (_local2 < clipsAttached.length) {
if (((((((clipsAttached[_local2].linkID != "fireAnim") && (clipsAttached[_local2].linkID != "lightOn0")) && (clipsAttached[_local2].linkID != "lightOn90")) && (clipsAttached[_local2].linkID != "lightOn180")) && (clipsAttached[_local2].linkID != "lightOn-90")) && (clipsAttached[_local2].linkID != "flames_mc")) && (clipsAttached[_local2].linkID != "exclamation")) {
clipsAttached[_local2].setTint(tint);
}
_local2++;
}
}
function publishAdvertisement(obj) {
advertisement = new com.Advertisement(obj.type, obj.group);
return(advertisement);
}
function cancelRoadConstaruction() {
roadBuilding = false;
startBuildingRoad = false;
clearTempRoadClips();
mouse.clip.removeMovieClip();
}
function buildReception(recType) {
var _local8 = new conf.ButtonConfig();
var _local3 = _local8.getObjProps(recType);
if (budget >= _local3.cost) {
var _local5 = translateCameraToStage(grid[0][21].x, grid[0][21].y);
building = new mcs.Building(_local3.linkID, _local5.x, _local5.y, 0, depthCtrl.tempBuildnigDepth);
building.setProperties(_local3.numOfSquares, _local3.kind, _local3.cost, _local3.luxury, _local3.timeToBuild, _local3.spots, _local3.type, _local3.rent, _local3.chance, _local3.repairExpence);
building.setEffectsValues(_local3.storm, _local3.fire, _local3.flood);
building._defaultRent = _local3.rent;
building.clip = attachMovie(building.linkID, utils.StringUtils.getUniqueName(), building.depth, {_x:building.x, _y:building.y});
grid[0][21].setState(grid[0][21].BUYED);
grid[0][22].setState(grid[0][22].BUYED);
grid[0][23].setState(grid[0][23].BUYED);
grid[1][21].setState(grid[1][21].BUYED);
grid[1][22].setState(grid[1][22].BUYED);
grid[1][23].setState(grid[1][23].BUYED);
mouse.building = false;
if (recType == Constants.bigReception) {
}
if (checkCellAvaiblility(building)) {
receptionObject.disappearing();
positionClip();
} else {
if (recType == Constants.normalReception) {
_global.game.LevelClip.helpTips[31].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[31], _global.game.LevelClip.helpTips[31].hidePopUp, 10000);
}
mouse.building = false;
building.clip.removeMovieClip();
delete building;
grid[0][21].setState(grid[0][21].RESERVED);
grid[0][22].setState(grid[0][22].RESERVED);
grid[0][23].setState(grid[0][23].RESERVED);
grid[1][21].setState(grid[1][21].RESERVED);
grid[1][22].setState(grid[1][22].RESERVED);
grid[1][23].setState(grid[1][23].RESERVED);
if (recType == Constants.bigReception) {
_global.game.LevelClip.helpTips[29].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[29], _global.game.LevelClip.helpTips[29].hidePopUp, 10000);
}
}
} else {
var _local4 = depthCtrl.infScreens;
while (getInstanceAtDepth(_local4++)) {
}
var _local7 = this;
_local7.attention.removeMovieClip();
var _local9 = attachMovie("buildMoney", "attention", _local4, {_x:400, _y:300});
}
}
function buildTrees() {
var _local9 = new conf.ButtonConfig();
var _local2 = _local9.getObjProps(Constants.tree);
var _local4 = 0;
while (_local4 < map.Map.grid.length) {
var _local3 = 0;
while (_local3 < map.Map.grid[_local4].length) {
if (map.Map.grid[_local4][_local3] == 4) {
building = new mcs.Building(_local2.linkID, grid[_local4][_local3].x, grid[_local4][_local3].y, 0, depthCtrl.tempBuildnigDepth);
building.setProperties(_local2.numOfSquares, _local2.kind, _local2.cost, _local2.luxury, _local2.timeToBuild, _local2.spots, _local2.type, _local2.rent, _local2.chance, _local2.repairExpence);
building.setEffectsValues(_local2.storm, _local2.fire, _local2.flood);
building.depth = depthCtrl.findObjectsDepth(_local3, _local4);
if (getInstanceAtDepth(building.depth) != undefined) {
mouse.building = false;
delete building;
return(undefined);
}
buildings.push(building);
clipsOnStage.push(building);
building.squares.push({x:building.x, y:building.y});
var _local6 = int(building.x / spacing);
var _local5 = int(building.y / spacing);
grid[_local5][_local6].setID(building.depth);
grid[_local5][_local6].building = building;
building.loadSounds();
building.done();
building.currentFrame = 3;
building.setState(100);
mouse.building = false;
building.addEvents();
delete building;
}
_local3++;
}
_local4++;
}
}
function storm_end() {
_global.game.sndCtrl.stopSound("thunder_storm", this);
storm.removeMovieClip;
}
function arrivingSound() {
_global.game.sndCtrl.stopSound("car_arrive", this);
if ((!hasAGroup) && (hasReception)) {
_global.game.sndCtrl.playSound("car_arrive", -1, this);
}
}
function increaseNumberOfCampersServed(num) {
numOfCampersServed = numOfCampersServed + num;
if ((numOfCampersServed >= 1000) && (levelnum == 8)) {
_global.game.mode = "win";
_global.game.playMode();
} else if ((numOfCampersServed >= 800) && (levelnum == 7)) {
currentGoal = 1000;
levelnum = 8;
unlockBuildnigs();
attachMovie("congratulation", "congratulation", 44936, {_x:400, _y:200});
_global.game.interface_.getLevelInterface().congratulation("Congratulations!", 1);
statScrText = "You\u2019re doing great. New objects are unlocked. \n";
} else if ((numOfCampersServed >= 650) && (levelnum == 6)) {
currentGoal = 800;
levelnum = 7;
unlockBuildnigs();
_global.game.interface_.getLevelInterface().congratulation("Congratulations!", 1);
statScrText = "Great job! More objects are unlocked and you won more land. \n";
changeBudget(10000);
} else if ((numOfCampersServed >= 500) && (!over500)) {
over500 = true;
} else if ((numOfCampersServed >= 400) && (levelnum == 5)) {
currentGoal = 650;
levelnum = 6;
unlockBuildnigs();
attachMovie("congratulation", "congratulation", 44936, {_x:400, _y:200});
_global.game.interface_.getLevelInterface().congratulation("Congratulations!", 1);
statScrText = "You\u2019re doing great. New objects are unlocked. \n";
} else if ((numOfCampersServed >= 250) && (levelnum == 4)) {
currentGoal = 400;
levelnum = 5;
unlockBuildnigs();
_global.game.interface_.getLevelInterface().congratulation("Congratulations!", 1);
statScrText = "Great job! More objects are unlocked and you won more land. \n";
} else if ((numOfCampersServed >= 150) && (!over150)) {
over150 = true;
if (levelnum == 3) {
currentGoal = 250;
levelnum = 4;
unlockBuildnigs();
attachMovie("congratulation", "congratulation", 44936, {_x:400, _y:200});
_global.game.interface_.getLevelInterface().congratulation("Congratulations!", 1);
statScrText = "You\u2019re doing great. New objects are unlocked. The next goal is 250 campers. Keep it up. \n";
changeBudget(2000);
}
} else if ((numOfCampersServed >= 75) && (levelnum == 2)) {
currentGoal = 150;
levelnum = 3;
unlockBuildnigs();
_global.game.interface_.getLevelInterface().congratulation("Congratulations!", 1);
statScrText = "Great job! New objects have been unlocked and you\u2019ve been granted permission by the government to utilize some more land. You can use the bulldozer for some of the trees and prepare the land to build some more objects. \n";
} else if ((numOfCampersServed >= 50) && (!over50)) {
over50 = true;
} else if ((numOfCampersServed >= 25) && (!over25)) {
over25 = true;
if (levelnum == 1) {
currentGoal = 75;
levelnum = 2;
unlockBuildnigs();
attachMovie("congratulation", "congratulation", 44936, {_x:400, _y:200});
_global.game.interface_.getLevelInterface().congratulation("Congratulations!", 1);
statScrText = "You\u2019ve served 25 campers. New objects have been unlocked. The next goal is to serve 75 campers. \n";
}
}
_global.game.interface_.getLevelInterface().scoreBoardLeft.campersServed.text = (numOfCampersServed + "/") + currentGoal;
}
function changeBudget(num) {
budget = budget + num;
_global.game.interface_.getLevelInterface().scoreBoardLeft.bankAccount.text = Math.round(budget);
var _local3 = 0;
for (var _local4 in relizedTurnover) {
_local3 = relizedTurnover[_local4];
}
if (_local3 >= 100000) {
_global.game.interface_.getLevelInterface().congratulation("You're doing great!", 2);
statScrText = "You have earned 100 000$ up to date. \n";
}
}
function initPopupHints() {
var _local4 = new conf.PopUpConfig();
helpTips = new Array();
var _local2 = 1;
while (_local2 <= 52) {
if (((_local2 < 16) || (_local2 > 31)) && (_local2 < 46)) {
var _local3 = _local4.getPopUpdata(_local2);
helpTips[_local2] = new mcs.PopUp("popup" + _local2, _local3.x, _local3.y, 0, depthCtrl.helpHints, _local2, _local3.isStatic);
} else {
helpTips[_local2] = new mcs.PopUp("popup" + _local2, 285, 239, 0, depthCtrl.infScreens + 1, _local2, true);
}
_local2++;
}
}
function unlockBuildnigs() {
switch (levelnum) {
case 1 :
unlockedObjects.push(Constants.basicTent, Constants.largeTent, Constants.hugeTent, Constants.playground, Constants.restaurant, Constants.smallSupermarket, Constants.tableTennis, Constants.washingMachineUnit, Constants.stoneToiletShower, Constants.woodenToilet, Constants.trashcan);
break;
case 2 :
unlockedObjects.push(Constants.familyTent, Constants.bigPlayarena, Constants.bigSupermarket, Constants.bingoHall, Constants.stoneToilet);
break;
case 3 :
unlockedObjects.push(Constants.normalCaravanSpot, Constants.bar, Constants.arcade, Constants.smallOutdoorPool, Constants.bigSanitaryHouse, Constants.normalReception);
_global.game.interface_.getLevelInterface().endLevelScreen();
break;
case 4 :
unlockedObjects.push(Constants.bigCaravanSpot, Constants.tennisField, Constants.bigOutdoorPool, Constants.disco, Constants.allInOneSanitary);
break;
case 5 :
unlockedObjects.push(Constants.motorHomeSpot, Constants.basicBungalow, Constants.footballField, Constants.indoorPool, Constants.bigReception);
if (!_global.game.LevelClip.onLargeRecept) {
_global.game.LevelClip.onLargeRecept = true;
_global.game.LevelClip.helpTips[20].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[20], _global.game.LevelClip.helpTips[20].hidePopUp, 10000);
_global.game.sndCtrl.stopSound("goodjob", this);
_global.game.sndCtrl.playSound("goodjob", -1, this);
}
_global.game.interface_.getLevelInterface().endLevelScreen();
break;
case 6 :
unlockedObjects.push(Constants.bigMotorHomeSpot, Constants.bigBungalow, Constants.normalUnmovableCaravan, Constants.hugeWaterPark);
break;
case 7 :
unlockedObjects.push(Constants.bigUnmovableCaravan);
_global.game.interface_.getLevelInterface().endLevelScreen();
break;
case 8 :
unlockedObjects.push(Constants.villaBungalow);
}
var _local3 = 2;
while (_local3 <= 46) {
_global.game.interface_.getLevelInterface().checkLock(_local3, _global.constructionMenu["btn" + _local3]);
_local3++;
}
}
function startTutorial() {
_global.game.interface_.getLevelInterface().basics = true;
_global.helpHint = true;
clock.stop();
if (_global.game.interface_.getLevelInterface().clip.menuOpened) {
if (tutorialFlow > 0) {
if (tutorialFlow == 1) {
if (!_global.game.interface_.getLevelInterface().clip.tools.opened) {
_global.game.interface_.getLevelInterface().currentBtn = "this.clip.mainMenu.collapseMenu.toolBtn";
_global.game.interface_.getLevelInterface().attachArrow(_global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu, 117, 56);
_global.game.LevelClip.helpTips[45].showPopUp();
} else {
_global.game.interface_.getLevelInterface().currentBtn = "_global.toolMenu.btn2";
_global.game.interface_.getLevelInterface().attachArrow(_global.toolMenu, _global.toolMenu.btn2._x + 40, _global.toolMenu.btn2._y);
}
} else if (tutorialFlow < 9) {
if (!_global.game.interface_.getLevelInterface().clip.constructions.opened) {
_global.game.interface_.getLevelInterface().currentBtn = "this.clip.mainMenu.collapseMenu.constructionBtn";
_global.game.interface_.getLevelInterface().attachArrow(_global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu, 81, 11);
if (tutorialFlow == 2) {
helpTips[36].showPopUp();
} else if (tutorialFlow == 5) {
helpTips[38].showPopUp();
} else if (tutorialFlow == 6) {
helpTips[40].showPopUp();
} else if (tutorialFlow == 7) {
helpTips[34].showPopUp();
} else if (tutorialFlow == 8) {
helpTips[32].showPopUp();
}
} else if (_global.game.LevelClip.tutorialFlow == 6) {
if (_global.constructionMenu.opened == 5) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn31";
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, _global.constructionMenu.btn31._x + 40, _global.constructionMenu.btn31._y);
} else {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.tabs.entertainment";
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, 130, 4);
helpTips[41].showPopUp();
}
} else if (_global.game.LevelClip.tutorialFlow < 6) {
if (_global.constructionMenu.opened == 4) {
if (_global.game.LevelClip.tutorialFlow == 5) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn24";
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, _global.constructionMenu.btn24._x + 40, _global.constructionMenu.btn24._y);
} else if (_global.game.LevelClip.tutorialFlow == 2) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn25";
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, _global.constructionMenu.btn25._x + 40, _global.constructionMenu.btn25._y);
}
} else {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.tabs.sanitary";
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, 103, 4);
if (tutorialFlow == 2) {
helpTips[37].showPopUp();
} else if (tutorialFlow == 5) {
helpTips[39].showPopUp();
}
}
} else if (_global.game.LevelClip.tutorialFlow <= 8) {
if (_global.constructionMenu.opened == 3) {
if (_global.game.LevelClip.tutorialFlow == 7) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn50";
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, _global.constructionMenu.btn50._x + 40, _global.constructionMenu.btn50._y);
} else if (_global.game.LevelClip.tutorialFlow == 8) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn51";
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, _global.constructionMenu.btn51._x + 40, _global.constructionMenu.btn51._y);
}
} else {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.tabs.road";
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, 77, 4);
if (tutorialFlow == 7) {
helpTips[35].showPopUp();
} else if (tutorialFlow == 8) {
helpTips[33].showPopUp();
}
}
}
} else if (!_global.game.interface_.getLevelInterface().clip.landscaper.opened) {
_global.game.interface_.getLevelInterface().currentBtn = "this.clip.mainMenu.collapseMenu.landscapeBtn";
_global.game.interface_.getLevelInterface().attachArrow(_global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu, 106, 33);
if (tutorialFlow == 11) {
_global.game.LevelClip.helpTips[42].showPopUp();
}
if (tutorialFlow == 10) {
_global.game.LevelClip.helpTips[43].showPopUp();
}
if (tutorialFlow == 9) {
_global.game.LevelClip.helpTips[44].showPopUp();
}
} else {
if (tutorialFlow == 11) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.landscapeMenu.btn1";
_global.game.interface_.getLevelInterface().attachArrow(_global.landscapeMenu, _global.landscapeMenu.btn1._x + 40, _global.landscapeMenu.btn1._y);
}
if (tutorialFlow == 10) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.landscapeMenu.btn6";
_global.game.interface_.getLevelInterface().attachArrow(_global.landscapeMenu, _global.landscapeMenu.btn6._x + 40, _global.landscapeMenu.btn6._y);
}
if (tutorialFlow == 9) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.landscapeMenu.btn7";
_global.game.interface_.getLevelInterface().attachArrow(_global.landscapeMenu, _global.landscapeMenu.btn7._x + 40, _global.landscapeMenu.btn7._y);
}
}
}
} else {
_global.game.interface_.getLevelInterface().currentBtn = "this.clip.mainMenu.collapseMenu.btn.btn";
_global.game.interface_.getLevelInterface().attachArrow(_global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu.btn, 17, 9);
if (tutorialFlow > 0) {
if (tutorialFlow == 1) {
_global.game.LevelClip.helpTips[45].showPopUp();
} else if (tutorialFlow < 9) {
if (tutorialFlow == 2) {
helpTips[36].showPopUp();
} else if (tutorialFlow == 5) {
helpTips[38].showPopUp();
} else if (tutorialFlow == 6) {
helpTips[40].showPopUp();
} else if (tutorialFlow == 7) {
helpTips[34].showPopUp();
} else if (tutorialFlow == 8) {
helpTips[32].showPopUp();
}
} else {
if (tutorialFlow == 11) {
_global.game.LevelClip.helpTips[42].showPopUp();
}
if (tutorialFlow == 10) {
_global.game.LevelClip.helpTips[43].showPopUp();
}
if (tutorialFlow == 9) {
_global.game.LevelClip.helpTips[44].showPopUp();
}
}
}
}
}
function returnGame() {
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
clock.start();
}
}
function breakSound() {
if (!pause) {
_global.game.sndCtrl.stopSound("car_arrive_brakes", this);
_global.game.sndCtrl.playSound("car_arrive_brakes", -1, this);
utils.Delegate.callDelayed(this, receptionBell, 1000);
}
}
function receptionBell() {
if (!pause) {
_global.game.sndCtrl.stopSound("guestsarrive", this);
_global.game.sndCtrl.playSound("guestsarrive", -1, this);
}
}
}
Symbol 2825 MovieClip [__Packages.utils.BaseClass] Frame 0
class utils.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);
}
function destroy() {
var _local2 = false;
}
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 2826 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 2827 MovieClip [__Packages.utils.Timer] Frame 0
class utils.Timer extends utils.BaseClass
{
var _ival, events;
function Timer () {
super();
}
function start() {
clearInterval(_ival);
_ival = setInterval(this, "doTick", 40);
}
function stop() {
clearInterval(_ival);
}
function doTick() {
events.dispatchEvent({type:"onTimerTick", target:this});
}
}
Symbol 2828 MovieClip [__Packages.scr.BackGround] Frame 0
class scr.BackGround
{
var _linkId, _camera, _bmp;
function BackGround (imageLinkId, camera) {
_linkId = imageLinkId;
_camera = camera;
init();
}
function init() {
_bmp = flash.display.BitmapData.loadBitmap(_linkId);
}
function get width() {
return(_bmp.width);
}
function get height() {
return(_bmp.height);
}
function drawCameraView(destination) {
var _local2 = new flash.geom.Rectangle(_camera.left, _camera.top, _camera.right - _camera.left, _camera.bottom - _camera.top);
destination.copyPixels(_bmp, _local2, new flash.geom.Point(0, 0), null, null, true);
}
function getMap() {
return(_bmp);
}
function setMap(bd) {
_bmp = bd;
}
}
Symbol 2829 MovieClip [__Packages.scr.Camera] Frame 0
class scr.Camera extends MovieClip
{
var _follow, width, height, x, y, left, right, top, bottom, szero, swidth, sheight, xmin, xmax, ymin, ymax, isScrolling, xprev, yprev;
function Camera () {
super();
init();
}
function init() {
}
function get follow() {
return(_follow);
}
function set follow(o) {
if (o == undefined) {
return;
}
_follow = o;
//return(follow);
}
function setSize(w, h) {
width = w;
height = h;
x = width / 2;
y = height / 2;
left = x - (width / 2);
right = x + (width / 2);
top = y - (height / 2);
bottom = y + (height / 2);
szero = 10;
swidth = width - szero;
sheight = height - szero;
}
function setBounds(left, right, top, bottom) {
xmin = left + (width / 2);
if (right < width) {
xmax = width / 2;
} else {
xmax = right - (width / 2);
}
ymin = top + (height / 2);
ymax = bottom - (height / 2);
}
function update() {
if (_follow == undefined) {
return(undefined);
}
if ((((follow.x < szero) || (follow.y < szero)) || (follow.x > swidth)) || (follow.y > sheight)) {
isScrolling = true;
var _local4 = x;
var _local3 = y;
xprev = x;
yprev = y;
if ((follow.x < szero) && (follow.y < szero)) {
_local4 = _local4 - speed;
_local3 = _local3 - speed;
} else if ((follow.x > swidth) && (follow.y > sheight)) {
_local4 = _local4 + speed;
_local3 = _local3 + speed;
} else if ((follow.x < szero) && (follow.y > sheight)) {
_local4 = _local4 - speed;
_local3 = _local3 + speed;
} else if ((follow.x > swidth) && (follow.y < szero)) {
_local4 = _local4 + speed;
_local3 = _local3 - speed;
} else if (follow.x < szero) {
_local4 = _local4 - speed;
} else if (follow.x > swidth) {
_local4 = _local4 + speed;
} else if (follow.y < szero) {
_local3 = _local3 - speed;
} else if (follow.y > sheight) {
_local3 = _local3 + speed;
}
if (_local4 < xmin) {
x = xmin;
} else if (_local4 > xmax) {
x = xmax;
} else {
x = _local4;
}
if (_local3 < ymin) {
y = ymin;
} else if (_local3 > ymax) {
y = ymax;
} else {
y = _local3;
}
if ((x != xprev) || (y != yprev)) {
utils.Delegate.callDelayed(this, increaseSpeed, 40);
} else {
speed = 20;
}
left = x - (width / 2);
right = x + (width / 2);
top = y - (height / 2);
bottom = y + (height / 2);
_global.game.LevelClip.setCameraPosition(x, y);
} else {
isScrolling = false;
}
}
function increaseSpeed() {
speed = speed + 5;
}
function centerStage(temp_mc) {
var _local3 = temp_mc.x;
var _local2 = temp_mc.y;
var _local4 = width / 2;
var _local5 = height / 2;
var _local7 = xmax + _local4;
var _local6 = ymax + _local5;
isScrolling = true;
if ((((_local3 > (right - 10)) || (_local3 < (left + 10))) || (_local2 > (bottom - 10))) || (_local2 < (top + 10))) {
if ((_local3 >= _local4) && ((_local7 - _local3) >= _local4)) {
x = _local3;
} else if (_local3 > _local4) {
x = _local7 - _local4;
} else if ((_local7 - _local3) > _local4) {
x = _local4;
}
if ((_local2 >= _local5) && ((_local6 - _local2) >= _local5)) {
y = _local2;
} else if (_local2 > _local5) {
y = _local6 - _local5;
} else if ((_local6 - _local2) > _local5) {
y = _local5;
}
left = x - (width / 2);
right = x + (width / 2);
top = y - (height / 2);
bottom = y + (height / 2);
}
}
function setCameraPosition(x, y) {
this.x = x;
this.y = y;
left = x - (width / 2);
right = x + (width / 2);
top = y - (height / 2);
bottom = y + (height / 2);
}
var speed = 20;
}
Symbol 2830 MovieClip [__Packages.com.MouseImpl] Frame 0
class com.MouseImpl
{
var level, mouseListener, building, destroy, repair, fireman, car, road, replace, pressed, xcoord, ycoord, now, br, greater, angleTolerance, timess, shake, id, frame, clip, rollOverObj;
function MouseImpl () {
level = _global.game.LevelClip;
init();
}
function init() {
mouseListener = new Object();
mouseListener.mouse = this;
mouseListener.onMouseDown = Click;
mouseListener.onMouseUp = Release;
mouseListener.onMouseMove = onMove;
Mouse.addListener(mouseListener);
building = false;
destroy = false;
repair = false;
fireman = false;
car = false;
road = false;
replace = false;
pressed = false;
xcoord = _xmouse;
ycoord = _ymouse;
now = getTimer();
br = 0;
greater = false;
angleTolerance = 20;
timess = 3;
shake = false;
id = 0;
}
function show() {
frame = "normal";
clip.gotoAndStop(frame);
Mouse.show();
}
function hide() {
Mouse.hide();
}
function mouseRoll() {
if (!_global.game.interface_.levelInterface.clip.hitTest(_xmouse, _ymouse, true)) {
var _local3 = _global.game.LevelClip;
var _local6 = _local3.translateStageToCamera(_xmouse, _ymouse);
var _local5 = int(_local6.x / _local3.spacing);
var _local4 = int(_local6.y / _local3.spacing);
if (id != _local3.grid[_local4][_local5].getID()) {
if (id > 0) {
rollOverObj.RollOut();
}
if (_local3.grid[_local4][_local5].getID() > 0) {
if (_local3.grid[_local4][_local5].building) {
rollOverObj = _local3.grid[_local4][_local5].building;
_local3.grid[_local4][_local5].building.RollOver();
}
}
id = _local3.grid[_local4][_local5].getID();
}
}
}
function onMove() {
if (!_global.game.LevelClip.pause) {
var _local4 = this;
var _local3 = _local4.mouse;
_local3.mouseRoll();
_local3.shakeMouse();
}
}
function Click() {
var _local12 = this;
var _local7 = _local12.mouse;
var _local3 = _global.game.LevelClip;
var _local10 = _local3.translateStageToCamera(_xmouse, _ymouse);
var _local5 = int(_local10.x / _local3.spacing);
var _local4 = int(_local10.y / _local3.spacing);
_global.game.sndCtrl.stopSound("light_switch_btn_click");
_global.game.sndCtrl.playSound("light_switch_btn_click", -1);
if (((!_local3.pause) && (!_global.popUp)) && (!_global.helpHint)) {
_local7.pressed = true;
if (!_global.game.interface_.levelInterface.clip.hitTest(_xmouse, _ymouse, true)) {
if (_local3.selection_) {
_local3.attachMovie("selection", "Select", _local3.depthCtrl.selectionDepth, {_x:_xmouse, _y:_ymouse});
_local7.clip = _local3.attachMovie("price", "price", _local3.depthCtrl.mouseDepth);
_local7.clip._alpha = 80;
_local7.clip.cacheAsBitmap = true;
startDrag (_local7.clip, true);
_local3.Select.onEnterFrame = function () {
this._xscale = (_xmouse - this._x) * 330;
this._yscale = (_ymouse - this._y) * 330;
this._parent.mark(this);
updateAfterEvent();
};
}
}
if (!_global.game.interface_.levelInterface.clip.hitTest(_xmouse, _ymouse, true)) {
if (_local3.roadBuilding) {
var _local9 = 0;
if (_local3.roadLinkID == "dirt") {
_local9 = 2;
}
if (_local3.roadLinkID == "paved") {
_local9 = 10;
}
if (_local3.roadLinkID == "cyckling") {
_local9 = 15;
}
if (_local3.roadLinkID == "asfalt") {
_local9 = 20;
}
if (_local3.budget >= _local9) {
if (!_local3.startBuildingRoad) {
_local10 = _local3.translateStageToCamera(_xmouse, _ymouse);
_local3.startPoint[0] = int(_local10.x / _local3.spacing);
_local3.startPoint[1] = int(_local10.y / _local3.spacing);
if ((_local3.grid[_local3.startPoint[1]][_local3.startPoint[0]].getState() == _local3.grid[_local3.startPoint[1]][_local3.startPoint[0]].BUYED) || (_local3.grid[_local3.startPoint[1]][_local3.startPoint[0]].getState() == _local3.grid[_local3.startPoint[1]][_local3.startPoint[0]].ROAD)) {
_local3.lastVisitedCell = _local3.grid[_local3.startPoint[1]][_local3.startPoint[0]];
if (_local3.grid[_local3.startPoint[1]][_local3.startPoint[0]].getState() == _local3.grid[_local3.startPoint[1]][_local3.startPoint[0]].BUYED) {
_local3.drawRoad(_local3.startPoint, _local3.startPoint);
}
_local3.startBuildingRoad = true;
_local7.clip.removeMovieClip();
_local7.clip = _local3.attachMovie("price", "price", _local3.depthCtrl.mouseDepth);
_local7.clip._alpha = 80;
_local7.clip.cacheAsBitmap = true;
startDrag (_local7.clip, true);
_local9 = 0;
if (_local3.roadLinkID == "dirt") {
_local9 = 2;
}
if (_local3.roadLinkID == "paved") {
_local9 = 10;
}
if (_local3.roadLinkID == "cyckling") {
_local9 = 15;
}
if (_local3.roadLinkID == "asfalt") {
_local9 = 20;
}
_local7.clip.price.text = _local9;
}
} else {
_local3.startBuildingRoad = false;
_local3.buildRoad();
_local7.clip.removeMovieClip();
}
} else {
var _local8 = _local3.depthCtrl.infScreens;
while (_local3.getInstanceAtDepth(_local8++)) {
}
_local3.attention.removeMovieClip();
var _local13 = _local3.attachMovie("buildMoney", "attention", _local8, {_x:400, _y:300});
}
}
}
if (_local7.destroy) {
if (!_global.game.interface_.levelInterface.clip.hitTest(_xmouse, _ymouse, true)) {
if (_local3.grid[_local4][_local5].getState() == _local3.grid[_local4][_local5].RESERVED) {
if (_local3.grid[_local4][_local5].building) {
if (_local3.grid[_local4][_local5].building.currentFrame == 3) {
if ((_local3.grid[_local4][_local5].building.kind != Constants.RECEPTION) && (!((_local3.grid[_local4][_local5].building.kind == Constants.PARKING) && _local3.grid[_local4][_local5].building.isReserved))) {
var _local11 = _local3.grid[_local4][_local5].building.getState() * (_local3.grid[_local4][_local5].building.getCost() / 500);
if (_local11 < _local3.budget) {
_local3.grid[_local4][_local5].building.destroy();
} else {
var _local8 = _local3.depthCtrl.infScreens;
if (_local3.getInstanceAtDepth(_local8++)) {
// unexpected jump
}
_local3.attention.removeMovieClip();
var _local13 = _local3.attachMovie("bulldozerMoney", "attention", _local8, {_x:400, _y:300});
}
}
}
if ((_local3.grid[_local4][_local5].building.currentFrame == 7) && ((_local3.grid[_local4][_local5].building.getType() == Constants.campFire) || (_local3.grid[_local4][_local5].building.getType() == Constants.electricalLamp))) {
_global.game.LevelClip.helpTips[51].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[51], _global.game.LevelClip.helpTips[51].hidePopUp, 5000);
} else if ((_local3.grid[_local4][_local5].building.currentFrame == 7) && (_local3.grid[_local4][_local5].building.kind == Constants.RESERVATION_SPOT)) {
_global.game.LevelClip.helpTips[52].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[52], _global.game.LevelClip.helpTips[52].hidePopUp, 5000);
}
}
}
if (_local3.grid[_local4][_local5].getState() == _local3.grid[_local4][_local5].ROAD) {
var _local6 = 0;
while (_local6 < _local3.road.length) {
if (_local3.road[_local6].cell == _local3.grid[_local4][_local5]) {
_local3.road[_local6].destroy();
}
_local6++;
}
}
} else {
_local7.destroy = false;
_local7.clip.removeMovieClip();
}
} else if (_local7.repair) {
if (!_global.game.interface_.levelInterface.clip.hitTest(_xmouse, _ymouse, true)) {
if (_local3.grid[_local4][_local5].getState() == _local3.grid[_local4][_local5].RESERVED) {
if (_local3.grid[_local4][_local5].building) {
if (_local3.grid[_local4][_local5].building.currentFrame == 3) {
if (_local3.grid[_local4][_local5].building.repairExpence < _local3.budget) {
_local3.grid[_local4][_local5].building.repair();
} else {
var _local8 = _local3.depthCtrl.infScreens;
if (_local3.getInstanceAtDepth(_local8++)) {
// unexpected jump
}
_local3.attention.removeMovieClip();
var _local13 = _local3.attachMovie("repairMoney", "attention", _local8, {_x:400, _y:300});
}
} else if (_local3.grid[_local4][_local5].building.currentFrame == 7) {
if (_local3.grid[_local4][_local5].building.kind == Constants.RESERVATION_SPOT) {
_global.game.LevelClip.helpTips[28].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[28], _global.game.LevelClip.helpTips[28].hidePopUp, 10000);
}
}
}
}
} else {
_local7.repair = false;
_local7.clip.removeMovieClip();
}
} else if (_local7.fireman) {
if (!_global.game.interface_.levelInterface.clip.hitTest(_xmouse, _ymouse, true)) {
_local7.fireman = false;
_local7.clip.removeMovieClip();
if (_local3.grid[_local4][_local5].getState() == _local3.grid[_local4][_local5].RESERVED) {
if (_local3.grid[_local4][_local5].building) {
if (_local3.grid[_local4][_local5].building.currentFrame == 5) {
_local3.grid[_local4][_local5].building.firefight();
}
}
}
} else {
_local7.fireman = false;
_local7.clip.removeMovieClip();
}
} else if (_local7.building) {
_global.game.interface_.getLevelInterface().buildFromInterfaceRelease();
} else if (_local3.grid[_local4][_local5].getState() == _local3.grid[_local4][_local5].RESERVED) {
if (!_global.game.interface_.levelInterface.clip.hitTest(_xmouse, _ymouse, true)) {
if (_local3.grid[_local4][_local5].building) {
if (((!_global.game.LevelClip.helpOnOff) || (!_global.game.interface_.getLevelInterface().basics)) || ((_global.game.interface_.getLevelInterface().currentBtn != "this.clip.mainMenu.collapseMenu.mapBtn") && (_global.game.interface_.getLevelInterface().currentBtn != "basicTentAgain"))) {
if (_local3.grid[_local4][_local5].building.camperGroup.exclamation.clip.hitTest(_xmouse, _ymouse, true)) {
_global.complainingGroup = _local3.grid[_local4][_local5].building.camperGroup;
_local3.grid[_local4][_local5].building.camperGroup.exclamation.onClick();
} else {
_local3.grid[_local4][_local5].building.onClick();
}
}
}
}
}
}
}
function Release() {
var _local8 = this;
var _local4 = _local8.mouse;
var _local3 = _global.game.LevelClip;
if (!_local3.pause) {
var _local7 = _local3.translateStageToCamera(_xmouse, _ymouse);
var _local6 = int(_local7.x / _local3.spacing);
var _local5 = int(_local7.y / _local3.spacing);
if (_local3.selection_) {
delete _local3.Select.onEnterFrame;
_local3.Select.removeMovieClip();
_local4.clip.removeMovieClip();
_local3.addToSelected();
}
if (_global.game.interface_.getLevelInterface().secondClickBuildind) {
_global.game.interface_.getLevelInterface().secondClickBuildind = false;
}
if (_local4.car) {
_local4.car = false;
_local4.building = false;
_local4.destroy = false;
_local4.repair = false;
_local4.fireman = false;
_local4.road = false;
_local4.replace = false;
_local4.clip.removeMovieClip();
if (_local3.grid[_local5][_local6].getState() == _local3.grid[_local5][_local6].RESERVED) {
if (_local3.grid[_local5][_local6].building) {
if (_local3.grid[_local5][_local6].building.currentFrame == 3) {
_local3.grid[_local5][_local6].building.accomodateCampers();
} else if ((_local3.grid[_local5][_local6].building.currentFrame == 7) && (_local3.grid[_local5][_local6].building.kind <= 2)) {
_global.game.LevelClip.helpTips[30].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[30], _global.game.LevelClip.helpTips[30].hidePopUp, 10000);
}
}
}
}
if (_local4.replace) {
_local4.replace = false;
_local4.car = false;
_local4.building = false;
_local4.destroy = false;
_local4.repair = false;
_local4.fireman = false;
_local4.road = false;
_local4.clip.removeMovieClip();
if (_local3.grid[_local5][_local6].getState() == _local3.grid[_local5][_local6].RESERVED) {
if (_local3.grid[_local5][_local6].building) {
if (_local3.grid[_local5][_local6].building.currentFrame == 3) {
_local3.grid[_local5][_local6].building.replaceGroup();
} else if ((_local3.grid[_local5][_local6].building.currentFrame == 7) && (_local3.grid[_local5][_local6].building.kind <= 2)) {
_global.game.LevelClip.helpTips[30].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[30], _global.game.LevelClip.helpTips[30].hidePopUp, 10000);
}
}
}
}
_local4.pressed = false;
_local4.dragObj = undefined;
}
}
function update() {
var _local4 = this;
if (_local4.building) {
var _local3 = _global.game.LevelClip;
if (_local3.building) {
_local3.checkCellAvaiblility(_local3.building);
_local3.snapping();
}
}
}
function shakeMouse() {
var _local3 = (180 * Math.atan2(_ymouse - ycoord, _xmouse - xcoord)) / Math.PI;
if (((!greater) && (Math.abs(_local3) <= angleTolerance)) || (greater && (Math.abs(_local3) >= (180 - angleTolerance)))) {
br++;
}
if (Math.abs(_local3) <= angleTolerance) {
greater = true;
} else if (Math.abs(_local3) >= (180 - angleTolerance)) {
greater = false;
}
xcoord = _xmouse;
ycoord = _ymouse;
if ((getTimer() - now) > 350) {
now = getTimer();
if (br > timess) {
if (((!_global.game.LevelClip.helpOnOff) || (!_global.game.interface_.getLevelInterface().basics)) || (_global.game.interface_.getLevelInterface().currentBtn == "shake")) {
if (_global.game.LevelClip.currentPopUp == 3) {
_global.game.LevelClip.helpTips[4].showPopUp();
}
if (_global.game.LevelClip.currentPopUp == 5) {
_global.game.LevelClip.helpTips[6].showPopUp();
}
destroy = false;
repair = false;
fireman = false;
car = false;
replace = false;
clip.removeMovieClip();
if (building) {
building = false;
_global.game.LevelClip.building.clip.removeMovieClip();
delete _global.game.LevelClip.building;
}
if (road) {
road = false;
_global.game.LevelClip.cancelRoadConstaruction();
}
if (_global.game.interface_.getLevelInterface().currentBtn == "shake") {
if (_global.game.LevelClip.currentPopUp == 8) {
_global.game.LevelClip.helpTips[9].showPopUp();
}
_global.game.interface_.getLevelInterface().currentBtn = "this.clip.mainMenu.collapseMenu.mapBtn";
_global.game.interface_.getLevelInterface().attachArrow(_global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu.mapBtn._parent, _global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu.mapBtn._x, _global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu.mapBtn._y);
}
}
}
br = 0;
xcoord = _xmouse;
ycoord = _ymouse;
}
}
function removeMouseListener() {
Mouse.removeListener(mouseListener);
}
}
Symbol 2831 MovieClip [__Packages.com.Keyboard] Frame 0
class com.Keyboard
{
var keyboardListener, overAllColor, buildingInProcess, expanded, snapping, xscroll, yscroll;
function Keyboard () {
keyboardListener = new Object();
keyboardListener.keyboard = this;
keyboardListener.onKeyDown = Press;
keyboardListener.onKeyUp = Release;
Key.addListener(keyboardListener);
overAllColor = false;
buildingInProcess = false;
expanded = true;
snapping = false;
xscroll = 400;
yscroll = 300;
}
function Press() {
var _local5 = this;
var _local4 = _local5.keyboard;
var _local3 = _global.game.LevelClip;
var _local6 = _local3.clipsOnStage.length;
if (Key.getCode() == 80) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
if (!_global.game.RUSure) {
if (!_global.game.interface_.getLevelInterface().savegame) {
if (!_local3.pause) {
_local3.pauseGame();
_global.game.interface_.getLevelInterface().optionScreen();
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
_global.pausebutton.gotoAndStop(2);
} else {
_local3.continueGame();
_global.game.interface_.getLevelInterface().removeScreen();
_global.pausebutton.gotoAndStop(1);
}
}
}
}
}
if (!_local3.pause) {
if (Key.getCode() == 39) {
_local4.xscroll = _local4.xscroll + 10;
if (_local4.xscroll > 800) {
_local4.xscroll = 800;
}
_local3.setCameraPosition(_local4.xscroll, _local4.yscroll);
}
if (Key.getCode() == 37) {
_local4.xscroll = _local4.xscroll - 10;
if (_local4.xscroll < 400) {
_local4.xscroll = 400;
}
_local3.setCameraPosition(_local4.xscroll, _local4.yscroll);
}
if (Key.getCode() == 40) {
_local4.yscroll = _local4.yscroll + 10;
if (_local4.yscroll > 900) {
_local4.yscroll = 900;
}
_local3.setCameraPosition(_local4.xscroll, _local4.yscroll);
}
if (Key.getCode() == 38) {
_local4.yscroll = _local4.yscroll - 10;
if (_local4.yscroll < 300) {
_local4.yscroll = 300;
}
_local3.setCameraPosition(_local4.xscroll, _local4.yscroll);
}
if (Key.getCode() == 72) {
if (!_global.game._loaded) {
if (_global.game.LevelClip.helpOnOff) {
_global.game.LevelClip.helpOnOff = false;
_global.game.interface_.getLevelInterface().removeArrow();
_global.game.LevelClip.helpTips[_global.game.LevelClip.currentPopUp].hidePopUp();
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
}
if (_global.game.LevelClip.firstCampers && (!_global.game.LevelClip.hasAGroup)) {
utils.Delegate.callDelayed(_global.game.LevelClip, _global.game.LevelClip.campersArrive, 8000, 0);
utils.Delegate.callDelayed(_global.game.LevelClip, _global.game.LevelClip.campersArrive, 9000, 1);
utils.Delegate.callDelayed(_global.game.LevelClip, _global.game.LevelClip.campersArrive, 10000, 2);
}
}
}
}
if (Key.getCode() == 82) {
if (_local3.mouse.building) {
if (_local3.building.kind != Constants.PARKING) {
_local3.building.rot = (_local3.building.rot + 90) % 360;
_local3.building.clip._rotation = _local3.building.rot;
_local3.Frame._rotation = _local3.building.rot;
_local3.checkCellAvaiblility(_local3.building);
}
}
}
if (Key.getCode() == 77) {
if (!_local3.mouse.building) {
if (_global.game.interface_.getLevelInterface().checkButton(_global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu.mapBtn)) {
_global.game.interface_.getLevelInterface().clip.expand(4);
_global.game.interface_.getLevelInterface().removeArrow(_global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu);
if (_global.game.LevelClip.currentPopUp == 9) {
_global.game.LevelClip.helpTips[10].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip, _global.game.LevelClip.campersArrive, 8000, 0);
utils.Delegate.callDelayed(_global.game.LevelClip, _global.game.LevelClip.campersArrive, 8000, 1);
utils.Delegate.callDelayed(_global.game.LevelClip, _global.game.LevelClip.campersArrive, 8000, 2);
}
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
}
}
}
}
if (Key.getCode() == 32) {
if (!_local3.mouse.building) {
if (_global.game.interface_.getLevelInterface().checkButton(_global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu.btn.btn)) {
if (_global.game.interface_.getLevelInterface().clip.menuOpened) {
_global.game.interface_.getLevelInterface().clip.mainMenu.gotoAndPlay("collide");
_global.game.interface_.getLevelInterface().clip.collapseMain();
} else {
_global.game.interface_.getLevelInterface().clip.mainMenu.gotoAndPlay("expand");
if (_global.game.LevelClip.currentPopUp == 1) {
_global.game.LevelClip.helpTips[2].showPopUp();
}
if (_global.game.interface_.getLevelInterface().currentBtn == "this.clip.mainMenu.collapseMenu.btn.btn") {
_global.game.interface_.getLevelInterface().currentBtn = "this.clip.mainMenu.collapseMenu.constructionBtn";
}
_global.game.interface_.getLevelInterface().removeArrow(_global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu.btn);
}
}
}
}
if (Key.getCode() == 83) {
}
}
}
function Release() {
var _local2 = this;
var _local3 = _local2.keyboard;
}
function removeKeyboardListener() {
Key.removeListener(keyboardListener);
}
}
Symbol 2832 MovieClip [__Packages.utils.Astar] Frame 0
class utils.Astar
{
function Astar () {
}
function findPath(Grid, Start, Goal) {
function $Grid(x, y) {
return((Grid[y][x].getState() == Grid[y][x].BUYED) || (Grid[y][x].getState() == Grid[y][x].ROAD));
}
function Node(Parent, Point) {
return({Parent:Parent, value:Point.x + (Point.y * cols), x:Point.x, y:Point.y, f:0, g:0});
}
function Path(Find) {
var _local15 = Node(null, {x:Start[0], y:Start[1]});
var _local12 = Node(null, {x:Goal[0], y:Goal[1]});
var _local6 = new Array(limit);
var _local4 = [_local15];
var _local8 = [];
var _local11 = [];
var _local5;
var _local3;
var _local2;
var _local13;
var _local7;
var _local9;
var _local1;
var _local10;
while (_local13 = _local4.length , _local13) {
_local7 = limit;
_local9 = -1;
_local1 = 0;
while (_local1 < _local13) {
if (_local4[_local1].f < _local7) {
_local7 = _local4[_local1].f;
_local9 = _local1;
}
_local1++;
}
_local3 = _local4.splice(_local9, 1)[0];
if (_local3.value === _local12.value) {
_local2 = _local8[_local8.push(_local3) - 1];
do {
_local11.push([_local2.x, _local2.y]);
_local2 = _local2.Parent;
} while (_local2);
_local4 = [];
_local8 = _local4;
_local6 = _local8;
_local11.reverse();
} else {
_local5 = Successors(_local3.x, _local3.y, Find);
_local1 = 0;
_local10 = _local5.length;
while (_local1 < _local10) {
_local2 = Node(_local3, _local5[_local1]);
if (!_local6[_local2.value]) {
_local2.g = _local3.g + Distance(_local5[_local1], _local3);
_local2.f = _local2.g + Distance(_local5[_local1], _local12);
_local4.push(_local2);
_local6[_local2.value] = true;
}
_local1++;
}
_local8.push(_local3);
}
}
return(_local11);
}
function Successors(x, y, Find) {
var _local3 = y - 1;
var _local2 = y + 1;
var _local5 = x + 1;
var _local4 = x - 1;
var _local6 = (_local3 > -1) && ($Grid(x, _local3));
var _local9 = (_local2 < rows) && ($Grid(x, _local2));
var _local8 = (_local5 < cols) && ($Grid(_local5, y));
var _local7 = (_local4 > -1) && ($Grid(_local4, y));
var _local1 = [];
if (_local6) {
_local1.push({x:x, y:_local3});
}
if (_local8) {
_local1.push({x:_local5, y:y});
}
if (_local9) {
_local1.push({x:x, y:_local2});
}
if (_local7) {
_local1.push({x:_local4, y:y});
}
Find(_local6, _local9, _local8, _local7, _local3, _local2, _local5, _local4, _local1);
return(_local1);
}
function DiagonalSuccessors($N, $S, $E, $W, N, S, E, W, result) {
if ($N) {
if ($E && ($Grid(E, N))) {
result.push({x:E, y:N});
}
if ($W && ($Grid(W, N))) {
result.push({x:W, y:N});
}
}
if ($S) {
if ($E && ($Grid(E, S))) {
result.push({x:E, y:S});
}
if ($W && ($Grid(W, S))) {
result.push({x:W, y:S});
}
}
}
function DiagonalSuccessors$($N, $S, $E, $W, N, S, E, W, result) {
$N = N > -1;
$S = S < rows;
$E = E < cols;
$W = W > -1;
if ($E) {
if ($N && ($Grid(E, N))) {
result.push({x:E, y:N});
}
if ($S && ($Grid(E, S))) {
result.push({x:E, y:S});
}
}
if ($W) {
if ($N && ($Grid(W, N))) {
result.push({x:W, y:N});
}
if ($S && ($Grid(W, S))) {
result.push({x:W, y:S});
}
}
}
function Diagonal(Point, Goal) {
return(max(abs(Point.x - Goal.x), abs(Point.y - Goal.y)));
}
function Euclidean(Point, Goal) {
return(sqrt(pow(Point.x - Goal.x, 2) + pow(Point.y - Goal.y, 2)));
}
function Manhattan(Point, Goal) {
return(abs(Point.x - Goal.x) + abs(Point.y - Goal.y));
}
var _local17 = "DiagonalFree";
var cols = Grid[0].length;
var rows = Grid.length;
var limit = (cols * rows);
var abs = Math.abs;
var max = Math.max;
var pow = Math.pow;
var sqrt = Math.sqrt;
var Distance = ({Diagonal:Diagonal, DiagonalFree:Diagonal, Euclidean:Euclidean, EuclideanFree:Euclidean, Manhattan:Manhattan}[_local17] || (Manhattan));
return(Path(DiagonalSuccessors$));
}
}
Symbol 2833 MovieClip [__Packages.ctrl.Arrival] Frame 0
class ctrl.Arrival
{
var level, campersWaiting, lastArrival, advertisement, teenagerArrivalTimeRandom, adultArrivalTimeRandom, olderArrivalTimeRandom, teenagerArrivalTimeFixed, adultArrivalTimeFixed, olderArrivalTimeFixed, teenRandomComponent, adultRandomComponent, oldRandomComponent, charGroup, teenagerLuxury, adultLuxury, olderLuxury;
function Arrival (level_) {
level = level_;
campersWaiting = new Array();
lastArrival = 0;
advertisement = new Array();
loadGroups();
teenagerArrivalTimeRandom = 45 + (10 - (Math.random() * 20));
adultArrivalTimeRandom = 45 + (10 - (Math.random() * 20));
olderArrivalTimeRandom = 45 + (10 - (Math.random() * 20));
teenagerArrivalTimeFixed = 0;
adultArrivalTimeFixed = 0;
olderArrivalTimeFixed = 0;
charFrequency(0);
charFrequency(1);
charFrequency(2);
randomComponents();
}
function inviteCampers(age) {
loadGroups();
randomComponents();
teenagerArrivalTimeRandom = teenagerArrivalTimeFixed + teenRandomComponent;
adultArrivalTimeRandom = adultArrivalTimeFixed + adultRandomComponent;
olderArrivalTimeRandom = olderArrivalTimeFixed + oldRandomComponent;
campersWaiting.push(chooseGroup(age));
var _local2 = campersWaiting.shift();
return(_local2);
}
function loadGroups() {
charGroup = new Array();
charGroup[0] = [new Array(new mcs.Character(0, level)), Constants.singleTeenager];
charGroup[1] = [new Array(new mcs.Character(1, level)), Constants.singleAdult];
charGroup[2] = [new Array(new mcs.Character(0, level), new mcs.Character(0, level)), Constants.teenageCouple];
charGroup[3] = [new Array(new mcs.Character(1, level), new mcs.Character(1, level)), Constants.adultCouple];
charGroup[4] = [new Array(new mcs.Character(2, level), new mcs.Character(2, level)), Constants.olderCouple];
charGroup[5] = [new Array(new mcs.Character(0, level), new mcs.Character(0, level), new mcs.Character(0, level)), Constants.teenageThreesome];
charGroup[6] = [new Array(new mcs.Character(1, level), new mcs.Character(1, level), new mcs.Character(0, level)), Constants.threePersonFamily];
charGroup[7] = [new Array(new mcs.Character(1, level), new mcs.Character(1, level), new mcs.Character(0, level), new mcs.Character(0, level)), Constants.fourPersonFamily];
charGroup[8] = [new Array(new mcs.Character(0, level), new mcs.Character(0, level), new mcs.Character(0, level), new mcs.Character(0, level), new mcs.Character(0, level), new mcs.Character(0, level), new mcs.Character(0, level), new mcs.Character(0, level)), Constants.largeTeenageGroup];
charGroup[9] = [new Array(new mcs.Character(1, level), new mcs.Character(1, level), new mcs.Character(0, level), new mcs.Character(0, level), new mcs.Character(1, level), new mcs.Character(1, level), new mcs.Character(0, level), new mcs.Character(0, level)), Constants.largeFamilyGroup];
}
function charFrequency(age) {
var _local11;
var _local16 = 0;
var _local15 = 0;
var _local19 = 0;
var _local14 = 0;
var _local10 = 0;
var _local12 = 0;
var _local24 = new Array();
var _local4 = 0;
while (_local4 < charGroup.length) {
if (age == 0) {
_local11 = (((charGroup[_local4][1] == Constants.singleTeenager) || (charGroup[_local4][1] == Constants.teenageCouple)) || (charGroup[_local4][1] == Constants.teenageThreesome)) || (charGroup[_local4][1] == Constants.largeTeenageGroup);
}
if (age == 1) {
_local11 = ((((charGroup[_local4][1] == Constants.singleAdult) || (charGroup[_local4][1] == Constants.adultCouple)) || (charGroup[_local4][1] == Constants.threePersonFamily)) || (charGroup[_local4][1] == Constants.fourPersonFamily)) || (charGroup[_local4][1] == Constants.largeFamilyGroup);
}
if (age == 2) {
_local11 = charGroup[_local4][1] == Constants.olderCouple;
}
if (_local11) {
var _local9 = Constants.getDesiredObjectTypes(charGroup[_local4][1]);
var _local5 = 0;
while (_local5 < _local9.length) {
var _local7 = _local9[_local5];
var _local6 = 0;
while (_local6 < level.camperSpots.length) {
var _local3 = level.camperSpots[_local6];
if (_local7 == _local3.getType()) {
if ((_local3.kind == Constants.RESERVATION_SPOT) || (_local3.kind == Constants.UNMOVABLE_OBJECT)) {
if (_local3._people == 0) {
_local16 = _local16 + _local3._visitors;
}
_local15 = _local15 + _local3._visitors;
}
_local10 = _local10 + _local3.getRent();
_local14 = _local14 + _local3._defaultRent;
_local12++;
}
_local6++;
}
_local5++;
}
}
_local4++;
}
if (age == level.advertisedObjects.group) {
var _local6 = 0;
while (_local6 < level.advertisedObjects.objects.length) {
var _local18 = level.advertisedObjects.objects[_local6];
_local19 = _local19 + _local18._luxuryPoints;
_local6++;
}
}
_local10 = ((_local12 > 0) ? (_local10 / _local12) : 0);
_local14 = ((_local12 > 0) ? (_local14 / _local12) : 0);
var _local25 = ((_local15 > 0) ? (_local16 / _local15) : 1);
if (level.advertisement) {
advertisement = level.advertisement.getAdvertisementInfluence();
} else {
advertisement = [0, 0, 0];
}
var _local17 = 0;
var _local13 = 0;
if (level == _global.game.LevelClip) {
var _local6 = 0;
while (_local6 < level.oposingCamp.length) {
if (age == 0) {
_local17 = _local17 + level.oposingCamp[_local6].arrival.teenagerArrivalTimeRandom;
_local13 = _local13 + level.oposingCamp[_local6].arrival.teenagerLuxury;
}
if (age == 1) {
_local17 = _local17 + level.oposingCamp[_local6].arrival.adultArrivalTimeRandom;
_local13 = _local13 + level.oposingCamp[_local6].arrival.adultLuxury;
}
if (age == 2) {
_local17 = _local17 + level.oposingCamp[_local6].arrival.olderArrivalTimeRandom;
_local13 = _local13 + level.oposingCamp[_local6].arrival.olderLuxury;
}
_local6++;
}
}
var _local20 = 0;
if ((_local13 != 0) && (_local19 != 0)) {
if (_local19 >= (_local13 / 3)) {
_local20 = _local19 / (_local13 / 3);
} else {
_local20 = (-(_local13 / 3)) / _local19;
}
}
var _local23 = ((_local10 > 0) ? ((_local14 - _local10) / _local10) : 0);
if (advertisement[age] > 0) {
var _local22 = (_local20 + _local23) + advertisement[age];
var _local21 = ((_local22 != 0) ? (60 / _local22) : 40);
} else {
var _local21 = 40;
}
if (age == 0) {
teenagerArrivalTimeFixed = _local21;
teenagerLuxury = _local19;
}
if (age == 1) {
adultArrivalTimeFixed = _local21;
adultLuxury = _local19;
}
if (age == 2) {
olderArrivalTimeFixed = _local21;
olderLuxury = _local19;
}
}
function randomComponents() {
teenRandomComponent = 10 - (Math.random() * 20);
adultRandomComponent = 10 - (Math.random() * 20);
oldRandomComponent = 10 - (Math.random() * 20);
if (advertisement.length > 0) {
if (advertisement[0] > 0) {
teenRandomComponent = Math.random() * 2;
} else if (advertisement[1] > 0) {
adultRandomComponent = Math.random() * 2;
} else if (advertisement[2] > 0) {
oldRandomComponent = Math.random() * 2;
}
}
}
function chooseGroup(age) {
if (age == 0) {
var _local3 = Constants.singleTeenager + int(Math.random() * 4);
var _local2 = 0;
while (_local2 < charGroup.length) {
if (charGroup[_local2][1] == _local3) {
return(charGroup[_local2]);
}
_local2++;
}
}
if (age == 1) {
var _local3 = Constants.singleAdult + int(Math.random() * 5);
var _local2 = 0;
while (_local2 < charGroup.length) {
if (charGroup[_local2][1] == _local3) {
return(charGroup[_local2]);
}
_local2++;
}
}
if (age == 2) {
return(charGroup[4]);
}
}
}
Symbol 2834 MovieClip [__Packages.mcs.Flooding] Frame 0
class mcs.Flooding
{
var level, floodType;
function Flooding () {
level = _global.game.LevelClip;
floodType = 2;
}
function floodLand() {
var _local5 = _global.game.LevelClip;
floodType = int(Math.random() * 2);
if (_local5.levelnum < 7) {
floodType = 1;
}
if (floodType == 0) {
_local5.background.setMap(_local5.mapRiver);
} else {
_local5.background.setMap(_local5.mapLake);
}
_local5.background.drawCameraView(_local5.camBMP);
_global.game.LevelClip.helpTips[18].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[18], _global.game.LevelClip.helpTips[18].hidePopUp, 10000);
var _local6 = new Array();
var _local9 = 0;
while (_local9 < _local5.clipsOnStage.length) {
var _local3 = _local5.clipsOnStage[_local9];
if (_local3 instanceof mcs.Building) {
var _local4 = 0;
while (_local4 < _local3.squares.length) {
var _local8 = int(_local3.squares[_local4].x / _local5.spacing);
var _local7 = int(_local3.squares[_local4].y / _local5.spacing);
if (floodType == 0) {
if (_local5.grid[_local7][_local8].flood == 1) {
_local6.push(_local3);
}
} else if (_local5.grid[_local7][_local8].flood == 2) {
_local6.push(_local3);
}
_local4++;
}
} else if (_local3 instanceof mcs.RoadTile) {
if (floodType == 0) {
if (_local3.cell.flood == 1) {
_local6.push(_local3);
}
} else if (_local3.cell.flood == 2) {
_local6.push(_local3);
}
}
_local9++;
}
_local9 = 0;
while (_local9 < _local6.length) {
_local6[_local9].floodEffect();
_local9++;
}
utils.Delegate.callDelayed(this, retreatFlood, 10000);
}
function retreatFlood() {
var _local3 = _global.game.LevelClip;
_local3.background.setMap(_local3.mapFog);
_local3.background.drawCameraView(_local3.camBMP);
floodType = 2;
}
}
Symbol 2835 MovieClip [__Packages.ctrl.DepthController] Frame 0
class ctrl.DepthController
{
var bgDepth, surfaceDepth, riverDepth, trashDepth, roadFrameDepth, roadDepth, roadLineDepth, parkingDepth, trashcanDepth, characterDepth, carDepth, buldozerUnderDepth, shadowDepth, objectDepth, buldozerOverDepth, animationDepth, stormDepth, lightsDepth, loaderDepth, riverFloodDepth, popUpUnder, interfaceDepth, objectPopUpDepth, popUpOver, infScreens, snapDepth, mapDepth, selectionDepth, tempBuildnigDepth, screenDepth, helpHints, mouseDepth;
function DepthController () {
bgDepth = 0;
surfaceDepth = 100;
riverDepth = 500;
trashDepth = 2000;
roadFrameDepth = 9000;
roadDepth = 15000;
roadLineDepth = 21000;
parkingDepth = 27000;
trashcanDepth = 29500;
characterDepth = 30000;
carDepth = 32700;
buldozerUnderDepth = 34200;
shadowDepth = 34500;
objectDepth = 36900;
buldozerOverDepth = 43500;
animationDepth = 43600;
stormDepth = 44000;
lightsDepth = 44050;
loaderDepth = 44350;
riverFloodDepth = 44450;
popUpUnder = 44500;
interfaceDepth = 44700;
objectPopUpDepth = 44850;
popUpOver = 45300;
infScreens = 44950;
snapDepth = 45150;
mapDepth = 45200;
selectionDepth = 45800;
tempBuildnigDepth = 46990;
screenDepth = 46995;
helpHints = 47000;
mouseDepth = 48000;
}
function findObjectsDepth(x, y) {
var _local2 = (objectDepth + 6400) - ((x * 80) + y);
return(_local2);
}
function getEntireState() {
var _local2 = new Object();
_local2.bgDepth = bgDepth;
_local2.surfaceDepth = surfaceDepth;
_local2.riverDepth = riverDepth;
_local2.trashDepth = trashDepth;
_local2.loaderDepth = loaderDepth;
_local2.roadFrameDepth = roadFrameDepth;
_local2.roadDepth = roadDepth;
_local2.roadLineDepth = roadLineDepth;
_local2.parkingDepth = parkingDepth;
_local2.trashcanDepth = trashcanDepth;
_local2.characterDepth = characterDepth;
_local2.carDepth = carDepth;
_local2.buldozerUnderDepth = buldozerUnderDepth;
_local2.shadowDepth = shadowDepth;
_local2.objectDepth = objectDepth;
_local2.buldozerOverDepth = buldozerOverDepth;
_local2.animationDepth = animationDepth;
_local2.objectPopUpDepth = objectPopUpDepth;
_local2.stormDepth = stormDepth;
_local2.lightsDepth = lightsDepth;
_local2.riverFloodDepth = riverFloodDepth;
_local2.popUpUnder = popUpUnder;
_local2.interfaceDepth = interfaceDepth;
_local2.popUpOver = popUpOver;
_local2.infScreens = infScreens;
_local2.mapDepth = mapDepth;
_local2.selectionDepth = selectionDepth;
_local2.tempBuildnigDepth = tempBuildnigDepth;
_local2.screenDepth = screenDepth;
_local2.mouseDepth = mouseDepth;
_local2.snapDepth = snapDepth;
return(_local2);
}
function restoreEntireState(es) {
bgDepth = es.bgDepth;
surfaceDepth = es.surfaceDepth;
riverDepth = es.riverDepth;
loaderDepth = es.loaderDepth;
trashDepth = es.trashDepth;
roadFrameDepth = es.roadFrameDepth;
roadDepth = es.roadDepth;
roadLineDepth = es.roadLineDepth;
parkingDepth = es.parkingDepth;
trashcanDepth = es.trashcanDepth;
characterDepth = es.characterDepth;
carDepth = es.carDepth;
buldozerUnderDepth = es.buldozerUnderDepth;
shadowDepth = es.shadowDepth;
objectDepth = es.objectDepth;
buldozerOverDepth = es.buldozerOverDepth;
animationDepth = es.animationDepth;
objectPopUpDepth = es.objectPopUpDepth;
stormDepth = es.stormDepth;
lightsDepth = es.lightsDepth;
riverFloodDepth = es.riverFloodDepth;
popUpUnder = es.popUpUnder;
interfaceDepth = es.interfaceDepth;
popUpOver = es.popUpOver;
infScreens = es.infScreens;
mapDepth = es.mapDepth;
selectionDepth = es.selectionDepth;
tempBuildnigDepth = es.tempBuildnigDepth;
screenDepth = es.screenDepth;
mouseDepth = es.mouseDepth;
snapDepth = es.snapDepth;
}
}
Symbol 2836 MovieClip [__Packages.utils.Clock] Frame 0
class utils.Clock extends utils.BaseClass
{
var second, minute, hour, day, month, started, events, intervalID;
function Clock () {
super();
init();
}
function init() {
second = 0;
minute = 0;
hour = 0;
day = 0;
month = 0;
started = false;
}
function clockTick() {
second++;
if (second == 60) {
second = 0;
minute++;
if (minute == 60) {
minute = 0;
hour++;
if (hour == 24) {
hour = 0;
day++;
if (day == 30) {
day = 0;
month++;
}
}
}
}
events.dispatchEvent({type:"onClockTick", target:this});
}
function getSecond() {
return(second);
}
function getMinute() {
return(minute);
}
function getHour() {
return(hour);
}
function getDay() {
return(day);
}
function getMonth() {
return(month);
}
function toMinutes() {
return((((getMonth() * 30) + (getDay() * 24)) + (getHour() * 60)) + getMinute());
}
function toSeconds() {
return(((((getMonth() * 30) + (getDay() * 24)) + (getHour() * 60)) + (getMinute() * 60)) + getSecond());
}
function reset() {
stop();
init();
}
function start(sec) {
if (!started) {
if (arguments.length > 0) {
second = sec;
}
intervalID = setInterval(this, "clockTick", 1000);
started = true;
}
}
function stop() {
clearInterval(intervalID);
started = false;
}
}
Symbol 2837 MovieClip [__Packages.mcs.OpositionCamp] Frame 0
class mcs.OpositionCamp
{
var lvl, bConfig, allBuildings, buildings, groups, camperSpots, budget, media, index, chances, arrival, availableSpots, arrivingTime, rand, isDay, advertisedObjects, advertisement;
function OpositionCamp (index_, bdgt, level) {
lvl = level;
bConfig = new conf.ButtonConfig();
allBuildings = new Array();
buildings = new Array();
groups = new Array();
camperSpots = new Array();
budget = bdgt;
media = int(Math.random() * 4) + 1;
index = index_;
var _local2 = new conf.ButtonConfig();
chances = _local2.getOpositionChances(index);
init();
}
function init() {
var _local5 = bConfig.getObjects().slice();
var _local3 = 2;
while (_local3 < (_local5.length - 3)) {
var _local2 = _local5[_local3];
if (_local2 != undefined) {
var _local4 = new mcs.Building();
_local4.setProperties(_local2.numOfSquares, _local2.kind, _local2.cost, _local2.luxury, _local2.timeToBuild, _local2.spots, _local2.type, _local2.rent, chances[_local3 - 2], _local2.repairExpence);
_local4._defaultRent = _local2.rent;
if (_local2.kind == Constants.ENTERTAINMENT) {
_local4.setEntertainProperties(_local2.teen, _local2.adult, _local2.old);
}
allBuildings.push(_local4);
}
_local3++;
}
allBuildings.push({doNothing:true, chance:chances[chances.length - 2]}, {destoy:true, chance:chances[chances.length - 1]});
arrival = new ctrl.Arrival(this);
availableSpots = 0;
arrivingTime = 0;
rand = new Randomization();
utils.Delegate.callDelayed(this, campers, arrival.teenagerArrivalTimeRandom * 60000, 0);
utils.Delegate.callDelayed(this, campers, arrival.adultArrivalTimeRandom * 60000, 1);
utils.Delegate.callDelayed(this, campers, arrival.olderArrivalTimeRandom * 60000, 2);
}
function build() {
var _local3 = rand.rouletteWheelSelection(allBuildings);
if (_local3.destoy == true) {
var _local5 = int(Math.random() * buildings.length);
buildings.splice(_local5, 1);
}
if (_local3.doNothing == undefined) {
var _local4 = new mcs.Building();
_local4.setProperties(_local3.numOfSquares, _local3.kind, _local3._cost, _local3._luxuryPoints, _local3.timeToBuild, _local3._visitors, _local3.getType(), _local3.getRent(), _local3.chance, _local3.repairExpence);
_local4.setEffectsValues(_local3.stormEff, _local3.fireEff, _local3.floodEff);
_local4._defaultRent = _local3._defaultRent;
if (_local4.kind == Constants.ENTERTAINMENT) {
_local4.setEntertainProperties(_local3.teen, _local3.adult, _local3.old);
}
if ((budget - _local4.getCost()) >= 0) {
buildings.push(_local4);
budget = budget - _local4.getCost();
if ((_local4.kind == Constants.RESERVATION_SPOT) || (_local4.kind == Constants.UNMOVABLE_OBJECT)) {
availableSpots = availableSpots + _local4._visitors;
camperSpots.push(_local4);
} else if (_local4.kind == Constants.ENTERTAINMENT) {
camperSpots.push(_local4);
}
var _local2 = 0;
while (_local2 < buildings.length) {
buildings[_local2].setRent(buildings[_local2].getRent() + int(Math.random() * 10));
_local2++;
}
isDay = lvl.isDay;
}
}
}
function frequency() {
}
function campers(age) {
if (!lvl.pause) {
var _local3 = new mcs.Group();
_local3.campers = arrival.inviteCampers(age)[0].slice();
if ((availableSpots - _local3.campers.length) >= 0) {
var _local4 = 0;
while (_local4 < buildings.length) {
var _local2 = buildings[_local4];
if ((_local2.kind == Constants.RESERVATION_SPOT) || (_local2.kind == Constants.UNMOVABLE_OBJECT)) {
if (((_local2._people == 0) && (_local2._visitors)) && (_local3.campers.length <= _local2._visitors)) {
_local3.setCampingObject(_local2);
groups.push(_local3);
_local2._people = _local3.campers.length;
availableSpots = availableSpots - _local3.campers.length;
var _local5 = ((7 + ((_local2._defaultRent - _local2.getRent()) / 100)) - int(Math.random() * 4)) * lvl.daynightLasting;
utils.Delegate.callDelayed(this, depature, _local5 * 1000, _local3);
break;
}
}
_local4++;
}
}
}
arrival.campersWaiting.splice(0);
if (age == 0) {
utils.Delegate.callDelayed(this, campers, arrival.teenagerArrivalTimeRandom * 1000, 0);
}
if (age == 1) {
utils.Delegate.callDelayed(this, campers, arrival.adultArrivalTimeRandom * 1000, 1);
}
if (age == 2) {
utils.Delegate.callDelayed(this, campers, arrival.olderArrivalTimeRandom * 1000, 2);
}
}
function depature(group) {
var _local2 = 0;
while (_local2 < groups.length) {
if (groups[_local2] == group) {
availableSpots = availableSpots + groups[_local2].campers.length;
groups[_local2].getCampingObject()._people = 0;
groups.splice(_local2, 1);
break;
}
_local2++;
}
}
function getAdvertisementText() {
advertisedObjects = new Object();
var _local13 = new Array();
var _local17 = ["Check out our nice camping site suitable for ", "Come and see our beautiful camp for ", "The camp every "];
var _local15 = "";
var _local16 = int(Math.random() * 3);
switch (_local16) {
case 0 :
_local15 = "teenagers";
break;
case 1 :
_local15 = "adults/families";
break;
case 2 :
_local15 = "elderly people";
}
advertisement = new com.Advertisement(media, _local16);
advertisedObjects.group = _local16;
var _local8 = "";
var _local7 = "";
var _local3 = new Array();
var _local9 = buildings.length;
var _local2 = 0;
while (_local2 < _local9) {
var _local4 = buildings[_local2];
if (_local4 instanceof mcs.Building) {
if ((((_local4.kind == Constants.UNMOVABLE_OBJECT) || (_local4.kind == Constants.RESERVATION_SPOT)) || (_local4.kind == Constants.SANITARY)) || (_local4.kind == Constants.ENTERTAINMENT)) {
_local13.push(_local4);
_local3[_local4.getType()] = {num:0, name:Constants.getObjectName(_local4.getType()), kind:_local4.kind};
}
}
_local2++;
}
advertisedObjects.objects = new Array();
advertisedObjects.objects = _local13.slice();
_local2 = 0;
while (_local2 < _local9) {
var _local4 = buildings[_local2];
if (_local4 instanceof mcs.Building) {
if ((((_local4.kind == Constants.UNMOVABLE_OBJECT) || (_local4.kind == Constants.RESERVATION_SPOT)) || (_local4.kind == Constants.SANITARY)) || (_local4.kind == Constants.ENTERTAINMENT)) {
_local3[_local4.getType()].num++;
}
}
_local2++;
}
var _local6 = "";
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].num && (_local3[_local2].num > 0)) {
var _local5 = "";
if (_local3[_local2].num > 1) {
_local5 = "s";
}
if ((_local3[_local2].kind == Constants.UNMOVABLE_OBJECT) || (_local3[_local2].kind == Constants.RESERVATION_SPOT)) {
if (_local6 != "") {
_local6 = _local6 + ", ";
}
_local6 = _local6 + (((_local3[_local2].num + " ") + _local3[_local2].name) + _local5);
} else if (_local3[_local2].kind == Constants.SANITARY) {
if (_local8 != "") {
_local8 = _local8 + ", ";
}
_local8 = _local8 + (((_local3[_local2].num + " ") + _local3[_local2].name) + _local5);
} else if (_local3[_local2].kind == Constants.ENTERTAINMENT) {
if (_local7 != "") {
_local7 = _local7 + ", ";
}
_local7 = _local7 + (((_local3[_local2].num + " ") + _local3[_local2].name) + _local5);
}
}
_local2++;
}
var _local14 = ((("Camp " + index) + " : ") + _local17[int(Math.random() * _local17.length)]) + _local15;
if (_local6 != "") {
_local14 = _local14 + (". We have " + _local6);
}
if (_local8 != "") {
_local14 = _local14 + (". You will also enjoy our nice " + _local8);
}
if (_local7 != "") {
_local14 = _local14 + ((". The " + _local7) + " will make your stay a dream come true.");
}
arrival.charFrequency(0);
arrival.charFrequency(1);
arrival.charFrequency(2);
return(_local14);
}
function getEntireState() {
var _local3 = new Object();
_local3.buildings = new Array();
var _local2 = 0;
while (_local2 < buildings.length) {
_local3.buildings[_local2] = buildings[_local2].getEntireState();
_local2++;
}
_local2 = 0;
while (_local2 < camperSpots.length) {
_local3.camperSpots[_local2] = camperSpots[_local2].getEntireState();
_local2++;
}
_local3.groups = new Array();
_local2 = 0;
while (_local2 < groups.length) {
_local3.groups[_local2] = groups[_local2].getEntireState();
_local2++;
}
_local3.availableSpots = availableSpots;
_local3.budget = budget;
_local3.isDay = isDay;
_local3.index = index;
return(_local3);
}
function restoreEntireState(es) {
var _local3 = 0;
while (_local3 < es.buildings.length) {
var _local4 = new mcs.Building();
_local4.restoreEntireState(es.buildings[_local3]);
buildings[_local3] = _local4;
_local3++;
}
_local3 = 0;
while (_local3 < es.camperSpots.length) {
var _local4 = new mcs.Building();
_local4.restoreEntireState(es.camperSpots[_local3]);
camperSpots[_local3] = _local4;
_local3++;
}
_local3 = 0;
while (_local3 < es.groups.length) {
var _local5 = new mcs.Group();
_local5.restoreEntireState(es.groups[_local3]);
groups[_local3] = _local5;
_local3++;
}
availableSpots = es.availableSpots;
budget = es.budget;
isDay = es.isDay;
index = es.index;
var _local6 = new conf.ButtonConfig();
chances = _local6.getOpositionChances(index);
}
}
Symbol 2838 MovieClip [__Packages.com.Advertisement] Frame 0
class com.Advertisement
{
var type, group;
function Advertisement (type_, group_) {
type = type_;
group = group_;
}
function getAdvertisementInfluence() {
var _local2 = 0;
switch (type) {
case 1 :
_local2 = 2;
break;
case 2 :
_local2 = 6;
break;
case 3 :
_local2 = 4;
break;
case 4 :
_local2 = 8;
}
switch (group) {
case 0 :
return([_local2, 0, 0]);
case 1 :
return([0, _local2, 0]);
case 2 :
return([0, 0, _local2]);
}
return([0, 0, 0]);
}
function getAdvertisementText() {
var _local9 = _global.game.LevelClip;
var _local18 = ["Check out our nice camping site suitable for ", "Come and see our beautiful camp for ", "The camp every "];
var _local17 = "";
switch (group) {
case 0 :
_local17 = "teenagers";
break;
case 1 :
_local17 = "adults/families";
break;
case 2 :
_local17 = "elderly people";
}
_local9.advertisedObjects = new Object();
_local9.advertisedObjects.group = group;
var _local13 = new Array();
var _local8 = "";
var _local7 = "";
var _local3 = new Array();
var _local14 = _local9.clipsOnStage.length;
var _local16 = 0;
while (_local16 < _local14) {
var _local4 = _local9.clipsOnStage[_local16];
if (_local4 instanceof mcs.Building) {
if ((((_local4.kind == Constants.UNMOVABLE_OBJECT) || (_local4.kind == Constants.RESERVATION_SPOT)) || (_local4.kind == Constants.SANITARY)) || (_local4.kind == Constants.ENTERTAINMENT)) {
_local13.push(_local4);
if (_local3[_local4.getType()] == undefined) {
_local3[_local4.getType()] = {num:1, name:Constants.getObjectName(_local4.getType()), kind:_local4.kind};
} else {
_local3[_local4.getType()].num++;
}
}
}
_local16++;
}
_local9.advertisedObjects.objects = new Array();
_local9.advertisedObjects.objects = _local13.slice();
var _local6 = "";
for (_local16 in _local3) {
if (_local3[_local16].num && (_local3[_local16].num > 0)) {
var _local5 = "";
if (_local3[_local16].num > 1) {
_local5 = "s";
}
if ((_local3[_local16].kind == Constants.UNMOVABLE_OBJECT) || (_local3[_local16].kind == Constants.RESERVATION_SPOT)) {
if (_local6 != "") {
_local6 = _local6 + ", ";
}
_local6 = _local6 + (((_local3[_local16].num + " ") + _local3[_local16].name) + _local5);
} else if (_local3[_local16].kind == Constants.SANITARY) {
if (_local8 != "") {
_local8 = _local8 + ", ";
}
_local8 = _local8 + (((_local3[_local16].num + " ") + _local3[_local16].name) + _local5);
} else if (_local3[_local16].kind == Constants.ENTERTAINMENT) {
if (_local7 != "") {
_local7 = _local7 + ", ";
}
_local7 = _local7 + (((_local3[_local16].num + " ") + _local3[_local16].name) + _local5);
}
}
}
var _local15 = ("Youda Camp: " + _local18[int(Math.random() * _local18.length)]) + _local17;
if (_local6 != "") {
_local15 = _local15 + (". We have " + _local6);
}
if (_local8 != "") {
_local15 = _local15 + (". You will also enjoy our nice " + _local8);
}
if (_local7 != "") {
_local15 = _local15 + ((". The " + _local7) + " will make your stay a dream come true.");
}
_local9.arrival.charFrequency(0);
_local9.arrival.charFrequency(1);
_local9.arrival.charFrequency(2);
return(_local15);
}
function getEntireState() {
var _local5 = new Object();
var _local4 = _global.game.LevelClip;
_local5.types = new Array();
var _local3 = 0;
while (_local3 < _local4.advertisedObjects.objects.length) {
_local5.types[_local3] = _local4.advertisedObjects.objects.getType();
_local3++;
}
_local5.type = type;
_local5.group = group;
return(_local5);
}
function restoreEntireState(es) {
type = es.type;
group = es.group;
var _local6 = _global.game.LevelClip;
_local6.advertisedObjects = new Object();
_local6.advertisedObjects.group = group;
_local6.advertisedObjects.objects = new Array();
var _local8 = _local6.clipsOnStage.length;
var _local5 = 0;
while (_local5 < es.types.length) {
var _local3 = 0;
while (_local3 < _local8) {
var _local4 = _local6.clipsOnStage[_local3];
if (_local4.getType() == es.types[_local5]) {
_local6.advertisedObjects.objects.push(_local4);
break;
}
_local3++;
}
_local5++;
}
}
}
Symbol 2839 MovieClip [__Packages.Randomization] Frame 0
class Randomization
{
var overallCounter, ranges, hits;
function Randomization () {
overallCounter = 0;
ranges = new Array();
hits = new Array();
}
function getRandomNumber(from, to) {
var _local8;
_local8 = new Array();
arguments.splice(0, 2);
var _local3 = arguments;
var _local10 = 0;
var _local4 = 0;
while (_local4 < _local3.length) {
if (((_local3[_local4].range != undefined) && (_local3[_local4].probablity != undefined)) && (_local8[_local3[_local4].range] == undefined)) {
_local8[_local3[_local4].range] = true;
if ((from < _local3[_local4].range) && (_local3[_local4].range < to)) {
if (_local3[_local4].probablity > 1) {
_local3[_local4].probablity = _local3[_local4].probablity / 100;
}
_local10 = _local10 + _local3[_local4].probablity;
ranges.push(_local3[_local4]);
} else if (from == _local3[_local4].range) {
return(-1);
}
} else {
return(-1);
}
_local4++;
}
if (_local10 > 1) {
return(-1);
}
ranges.push({range:to, probablity:1 - _local10});
ranges.sort(order);
while (true) {
var _local6 = from + (Math.random() * (to - from));
_local4 = 0;
while (_local4 < ranges.length) {
if (_local6 <= ranges[_local4].range) {
var _local5 = _local4;
break;
}
_local4++;
}
if (hits[_local5] == undefined) {
hits[_local5] = 0;
}
if ((ranges[_local5].probablity > 0) && ((hits[_local5] / overallCounter) <= ranges[_local5].probablity)) {
hits[_local5]++;
overallCounter++;
return(_local6);
}
}
}
function order(a, b) {
var _local2 = a.range;
var _local1 = b.range;
if (_local2 < _local1) {
return(-1);
}
if (_local2 > _local1) {
return(1);
}
return(0);
}
function orderChance(a, b) {
var _local2 = a.chance;
var _local1 = b.chance;
if (_local2 < _local1) {
return(-1);
}
if (_local2 > _local1) {
return(1);
}
return(0);
}
function rouletteWheelSelection(ar) {
if (ar.length > 0) {
var _local5 = 0;
var _local1 = 0;
while (_local1 < ar.length) {
_local5 = _local5 + ar[_local1].chance;
_local1++;
}
var _local6 = int(Math.random() * _local5);
var _local3 = 0;
var _local4 = 0;
_local1 = 0;
while (_local1 < ar.length) {
_local3 = _local3 + ar[_local1].chance;
if (_local3 > _local6) {
_local4 = _local1;
break;
}
_local1++;
}
return(ar[_local4]);
}
return(undefined);
}
}
Symbol 2840 MovieClip [__Packages.mcs.River] Frame 0
class mcs.River extends mcs.MovieClipProps
{
var depth, cellsReserved, currentFrame, levell, clip, level, x, y;
function River (linkID, x, y, rot, xscale, yscale, depth) {
super(linkID, x, y, rot, xscale, yscale);
this.depth = depth;
cellsReserved = false;
currentFrame = 1;
levell = _global.game.LevelClip;
}
function floodLand() {
if (!_global.game.LevelClip.onFlood) {
_global.game.LevelClip.onFlood = true;
_global.game.LevelClip.helpTips[15].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[15], _global.game.LevelClip.helpTips[15].hidePopUp, 10000);
}
if (clip) {
clip.gotoAndStop("flooding");
currentFrame = 2;
utils.Delegate.callDelayed(this, narrowRiver, 10000);
}
var _local4 = 1;
while (_local4 < level.clipsOnStage.length) {
var _local3 = level.clipsOnStage[_local4];
if (_local3 instanceof mcs.Building) {
if ((((_local3.x > (x - 1300)) && (_local3.x < x)) && (_local3.y < (y + 1300))) && (_local3.y > y)) {
_local3.floodEffect();
}
}
if (_local3 instanceof mcs.RoadTile) {
if ((((_local3.x > (x - 1300)) && (_local3.x < x)) && (_local3.y < (y + 1300))) && (_local3.y > y)) {
_local3.floodEffect();
}
}
_local4++;
}
}
function riverHit(cell) {
var _local3 = 0;
if (clip.riverFlow.hitTest(cell.x, cell.y, true)) {
_local3++;
}
if (clip.riverFlow.hitTest(cell.x - int(level.spacing / 2), cell.y - int(level.spacing / 2), true)) {
_local3++;
}
if (clip.riverFlow.hitTest(cell.x - int(level.spacing / 2), cell.y + int(level.spacing / 2), true)) {
_local3++;
}
if (clip.riverFlow.hitTest(cell.x + int(level.spacing / 2), cell.y - int(level.spacing / 2), true)) {
_local3++;
}
if (clip.riverFlow.hitTest(cell.x + int(level.spacing / 2), cell.y + int(level.spacing / 2), true)) {
_local3++;
}
clip.gotoAndStop(currentFrame);
if (_local3 > 2) {
return(true);
}
return(false);
}
function reserveRiverCells() {
var _local4 = 0;
while (_local4 < int((level.mapHeight / 2) / level.spacing)) {
var _local3 = 40;
while (_local3 < int(level.mapWidth / level.spacing)) {
if (riverHit(level.grid[_local4][_local3])) {
level.grid[_local4][_local3].setState(level.grid[_local4][_local3].RESERVED);
var _local6 = int(_local3 * level.spacing);
var _local5 = int(_local4 * level.spacing);
var _local2 = new flash.geom.Rectangle(_local6, _local5, 30, 30);
level.mapFog.merge(level.mapBought, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
level.mapForSale.merge(level.mapBought, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
level.navigator.refreshNavigator(_local6, _local5);
level.background.drawCameraView(level.camBMP);
}
_local3++;
}
_local4++;
}
level.mapForSaleTemp.merge(level.mapForSale, new flash.geom.Rectangle(0, 0, 2400, 2400), new flash.geom.Point(0, 0), 255, 255, 255, 255);
cellsReserved = true;
}
function narrowRiver() {
depth = level.depthCtrl.riverDepth;
if (clip) {
clip.gotoAndStop("normalFlow");
currentFrame = 1;
}
}
function configure() {
}
function attachClip() {
super.attachClip(_global.game.LevelClip);
}
function removeClip() {
super.removeClip();
}
}
Symbol 2841 MovieClip [__Packages.mcs.CarArrow] Frame 0
class mcs.CarArrow extends mcs.MovieClipProps
{
var depth, level, x, y, clip, linkID, rot;
function CarArrow (linkID, x, y, rot, depth) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
level = _global.game.LevelClip;
}
function attachClip() {
var _local2 = level.translateCameraToStage(x, y);
clip = level.attachMovie(linkID, utils.StringUtils.getUniqueName(), depth, {_x:_local2.x, _y:_local2.y, _rotation:rot});
}
function removeClip() {
super.removeClip();
clip = undefined;
}
}
Symbol 2842 MovieClip [__Packages.conf.PopUpConfig] Frame 0
class conf.PopUpConfig
{
var popUps;
function PopUpConfig () {
popUps = new Array();
init();
}
function init() {
popUps[1] = {x:37, y:355, isStatic:true};
popUps[2] = {x:95, y:375, isStatic:true};
popUps[4] = {x:372, y:295, isStatic:true};
popUps[5] = {x:360, y:1, isStatic:true};
popUps[6] = {x:372, y:295, isStatic:true};
popUps[7] = {x:372, y:355, isStatic:true};
popUps[8] = {x:360, y:1, isStatic:true};
popUps[9] = {x:95, y:436, isStatic:true};
popUps[10] = {x:221, y:233, isStatic:true};
popUps[11] = {x:360, y:1, isStatic:true};
popUps[13] = {x:626, y:160, isStatic:false};
popUps[15] = {x:360, y:1, isStatic:true};
popUps[32] = {x:73, y:367, isStatic:true};
popUps[33] = {x:273, y:319, isStatic:true};
popUps[34] = {x:73, y:367, isStatic:true};
popUps[35] = {x:273, y:319, isStatic:true};
popUps[36] = {x:73, y:367, isStatic:true};
popUps[37] = {x:307, y:322, isStatic:true};
popUps[38] = {x:73, y:367, isStatic:true};
popUps[39] = {x:307, y:322, isStatic:true};
popUps[40] = {x:73, y:367, isStatic:true};
popUps[41] = {x:344, y:304, isStatic:true};
popUps[42] = {x:137, y:389, isStatic:true};
popUps[43] = {x:137, y:389, isStatic:true};
popUps[44] = {x:137, y:389, isStatic:true};
popUps[45] = {x:139, y:432, isStatic:true};
}
function getPopUpdata(id) {
return(popUps[id]);
}
}
Symbol 2843 MovieClip [__Packages.mcs.PopUp] Frame 0
class mcs.PopUp extends mcs.MovieClipProps
{
var depth, level, id, isStatic, clip, linkID, rot, y, x;
function PopUp (linkID, x, y, rot, depth, id_, stat) {
super(linkID, x, y, rot, 100, 100);
this.depth = depth;
level = _global.game.LevelClip;
id = id_;
_global.popUp = false;
isStatic = stat;
}
function attachClip() {
clip = _global.game.LevelClip.attachMovie(linkID, utils.StringUtils.getUniqueName(), depth, {_x:x, _y:y, _rotation:rot});
}
function removeClip() {
clip.removeMovieClip();
clip = undefined;
_global.popUp = false;
}
function showPopUp() {
if ((_global.game.LevelClip.helpOnOff || ((id > 15) && (id < 32))) || (id > 46)) {
attachClip();
}
if (((id > 15) && (id < 32)) || (id > 46)) {
_global.popUp = true;
}
_global.game.LevelClip.currentPopUp = id;
}
function hidePopUp() {
removeClip();
if (((id > 15) && (id < 32)) || (id > 46)) {
_global.popUp = false;
}
}
function hideAndShowNext() {
hidePopUp();
if (_global.game.LevelClip.currentPopUp == id) {
_global.game.LevelClip.helpTips[id + 1].showPopUp();
}
}
}
Symbol 2844 MovieClip [__Packages.utils.SoundController] Frame 0
class utils.SoundController
{
var volume, sounds;
function SoundController (vol) {
volume = vol;
sounds = new Array();
}
function addSound(s) {
sounds[s.linkId] = s;
sounds[s.linkId].sPaused = false;
setSoundVolume(s.linkId, volume);
}
function removeSound(linkId) {
delete sounds[linkId];
}
function playSound(linkId, loop, which) {
var _local5 = which;
var _local3 = 0;
while (_local3 <= _global.game.soundsPause.length) {
if (linkId == _global.game.soundsPause[_local3]) {
_global.game.playingSounds[linkId] = linkId;
break;
}
_local3++;
}
if (loop == -1) {
sounds[linkId].which = _local5;
sounds[linkId].startImpl();
sounds[linkId].setVolumeImpl(_global.fxVolume);
} else {
sounds[linkId].which = _local5;
sounds[linkId].startImpl(0, loop);
sounds[linkId].setVolumeImpl(_global.musicVolume);
}
}
function stopSound(linkId, which) {
var _local2 = which;
if (_local2 != undefined) {
if (sounds[linkId].which == _local2) {
sounds[linkId].stopImpl();
}
} else {
sounds[linkId].stopImpl();
}
}
function pauseSound(linkId) {
if (sounds[linkId].playing) {
sounds[linkId].sPaused = true;
sounds[linkId].pauseImpl();
}
}
function resumeSound(linkId) {
if (sounds[linkId].sPaused == true) {
sounds[linkId].resumeImpl();
sounds[linkId].sPaused = false;
}
}
function setSoundVolume(linkId, vol) {
sounds[linkId].setVolumeImpl(vol);
}
function getSoundVolume(linkId) {
return(sounds[linkId].getVolumeImpl());
}
function playAllSounds() {
for (var _local2 in sounds) {
if (!sounds[_local2].isLoop) {
playSound(sounds[_local2].linkId);
} else {
playSound(sounds[_local2].linkId, 32000);
}
}
}
function stopAllSounds() {
for (var _local2 in sounds) {
stopSound(sounds[_local2].linkId);
}
}
function pauseAllSounds() {
for (var _local2 in sounds) {
if ((((((sounds[_local2].linkId != "birds_singing") && (sounds[_local2].linkId != "birds_flappingWings")) && (sounds[_local2].linkId != "day_insects")) && (sounds[_local2].linkId != "night_insects")) && (sounds[_local2].linkId != "river_flow")) && (sounds[_local2].linkId != "night_owl")) {
pauseSound(sounds[_local2].linkId);
}
}
}
function resumeAllSounds() {
for (var _local2 in sounds) {
if (sounds[_local2].sPaused == true) {
resumeSound(sounds[_local2].linkId);
sounds[_local2].sPaused = false;
}
}
}
function setOverallVolume(vol) {
volume = vol;
for (var _local3 in sounds) {
setSoundVolume(sounds[_local3].linkId, vol);
}
}
function getOverallVolume() {
return(volume);
}
}
Symbol 2845 MovieClip [__Packages.utils.SoundImpl] Frame 0
class utils.SoundImpl
{
var sound, isLoop, Loop, playing, sPaused, resumed, fadingOut, fadingInSound, fadingOutSound, linkId, initialVolume, curentVol, duration, position, a, b, c;
function SoundImpl (mc) {
if (mc instanceof MovieClip) {
sound = new Sound(mc);
} else {
sound = new Sound();
}
isLoop = false;
Loop = true;
playing = false;
sPaused = false;
resumed = false;
fadingOut = false;
fadingInSound = false;
fadingOutSound = false;
}
function attachSoundImpl(linkId, initVol) {
if (arguments.length > 0) {
this.linkId = linkId;
initialVolume = 100;
sound.attachSound(linkId);
if (initVol != undefined) {
initialVolume = initVol;
if (((this.linkId != "restaurant_music") && (this.linkId != "disco_music")) && (this.linkId != "bar_music")) {
sound.setVolume(initialVolume);
} else if (((this.linkId == "restaurant_music") || (this.linkId == "disco_music")) || (this.linkId == "bar_music")) {
curentVol = 1;
sound.setVolume(curentVol);
}
}
duration = sound.duration;
position = sound.position;
}
}
function setVolumeImpl(vol) {
if (((linkId != "restaurant_music") && (linkId != "disco_music")) && (linkId != "bar_music")) {
sound.setVolume(initialVolume * (vol / 100));
} else if (((linkId == "restaurant_music") || (linkId == "disco_music")) || (linkId == "bar_music")) {
sound.setVolume(curentVol);
}
}
function getVolumeImpl() {
return(sound.getVolume());
}
function startImpl(secondoffset, loop) {
if (!playing) {
playing = true;
sPaused = false;
isLoop = false;
Loop = false;
switch (arguments.length) {
case 0 :
if ((((linkId != "night_owl") && (linkId != "restaurant_music")) && (linkId != "disco_music")) && (linkId != "bar_music")) {
sound.setVolume(initialVolume * (_global.fxVolume / 100));
} else if (((linkId == "restaurant_music") || (linkId == "disco_music")) || (linkId == "bar_music")) {
a = initialVolume;
b = initialVolume / 10;
curentVol = 1;
c = curentVol;
sound.setVolume(curentVol * (_global.fxVolume / 100));
sound.start(secondoffset, loop);
sound.setVolume(curentVol * (_global.fxVolume / 100));
isLoop = false;
Loop = false;
fadeInSound();
}
sound.start();
break;
case 1 :
if ((((linkId != "night_owl") && (linkId != "restaurant_music")) && (linkId != "disco_music")) && (linkId != "bar_music")) {
sound.setVolume(initialVolume * (_global.fxVolume / 100));
} else if (((linkId == "restaurant_music") || (linkId == "disco_music")) || (linkId == "bar_music")) {
a = initialVolume;
b = initialVolume / 10;
curentVol = 1;
c = curentVol;
sound.setVolume(curentVol * (_global.fxVolume / 100));
sound.start(secondoffset, loop);
sound.setVolume(curentVol * (_global.fxVolume / 100));
isLoop = false;
Loop = false;
fadeInSound();
}
sound.start(secondoffset);
break;
case 2 :
if ((((((((linkId == "birds_singing") || (linkId == "birds_flappingWings")) || (linkId == "day_insects")) || (linkId == "night_insects")) || (linkId == "river_flow")) || (linkId == "main_menu_music")) || (linkId == "Game_over_minor")) || (linkId == "night_owl")) {
sound.setVolume(initialVolume * (_global.musicVolume / 100));
isLoop = true;
Loop = true;
sound.start(secondoffset, loop);
} else {
sound.setVolume(initialVolume * (_global.fxVolume / 100));
isLoop = false;
Loop = true;
sound.start(secondoffset, loop);
}
break;
default :
if ((((linkId != "night_owl") && (linkId != "restaurant_music")) && (linkId != "disco_music")) && (linkId != "bar_music")) {
sound.setVolume(initialVolume * (_global.fxVolume / 100));
}
sound.start();
}
}
}
function stopImpl() {
if (((linkId == "restaurant_music") || (linkId == "disco_music")) || (linkId == "bar_music")) {
curentVol = initialVolume * (_global.fxVolume / 100);
}
sound.stop(linkId);
playing = false;
position = 0;
}
function pauseImpl() {
sound.stop(linkId);
playing = false;
position = sound.position;
}
function resumeImpl() {
resumed = true;
if (!Loop) {
startImpl(position / 1000);
} else {
Loop = true;
startImpl(position / 1000);
if ((((((((linkId == "birds_singing") || (linkId == "birds_flappingWings")) || (linkId == "day_insects")) || (linkId == "night_insects")) || (linkId == "river_flow")) || (linkId == "main_menu_music")) || (linkId == "Game_over_minor")) || (linkId == "night_owl")) {
isLoop = true;
} else {
isLoop = false;
}
var _local2 = this;
_local2.sound.holder = this;
sound.onSoundComplete = function () {
this.holder.stopImpl();
this.holder.startImpl(0, 32000);
};
}
}
function fadeInSound() {
fadingInSound = true;
if (c < a) {
c = c + b;
if (_global.fxVolume > 0) {
curentVol = c;
sound.setVolume(c * (_global.fxVolume / 100));
}
utils.Delegate.callDelayed(this, fadeInSound, 1000);
} else {
sound.setVolume(initialVolume * (_global.fxVolume / 100));
fadingInSound = false;
}
}
}
Symbol 2846 MovieClip [__Packages.ctrl.Sounds] Frame 0
class ctrl.Sounds extends utils.SoundController
{
var musicVolume, fxVolume, sounds, lastFxVolume, lastMusicVolume;
function Sounds (vol) {
super(vol);
musicVolume = vol;
fxVolume = vol;
}
function setSoundFXVolume(vol) {
for (var _local3 in sounds) {
if (sounds[_local3].isLoop == false) {
fxVolume = vol;
sounds[_local3].setVolumeImpl(fxVolume);
}
}
}
function getSoundFXVolume() {
return(int(fxVolume));
}
function setMusicVolume(vol) {
for (var _local3 in sounds) {
if (sounds[_local3].isLoop) {
musicVolume = vol;
sounds[_local3].setVolumeImpl(musicVolume);
}
}
}
function getMusicVolume() {
return(int(musicVolume));
}
function fxOff() {
if (fxVolume > 0) {
lastFxVolume = fxVolume;
setSoundFXVolume(0);
}
}
function fxOn() {
if (fxVolume == 0) {
setSoundFXVolume(lastFxVolume);
}
}
function musicOff() {
if (musicVolume > 0) {
lastMusicVolume = musicVolume;
setMusicVolume(0);
}
}
function musicOn() {
if (musicVolume == 0) {
setMusicVolume(lastMusicVolume);
}
}
}
Symbol 2847 MovieClip [__Packages.Game] Frame 0
class Game extends MovieClip
{
var delegate, _loaded, mode, soundClip, createEmptyMovieClip, interface_, playingSounds, soundsPause, sndCtrl, screenOnTop, barMusicPlay, restorantMusicPlay, discoMusicPlay, repairingSound, JazzyMusic, RUSure, OptionsMenu, attachMovie, InstructionsMenu, WinScreen, score, StartGame, ExitGame, LevelClip, GameOverScreen, SaveScreen, LoadScreen, so, loadingGame;
function Game () {
function Entry() {
_global.root = _level0;
_global.company = "Youda";
_global.companylogo = "Youda";
_global.youdagames = "http://www.youdagames.com";
_global.highscorelink = "http://www.youdagames.com/highscore.php?type=game&game=2283";
_global.moregamelink = "http://www.youdagames.com";
_global.buygamelink = "https://www.regnow.com/softsell/nph-softsell.cgi?items=16153-13&action=add_to_cart&affiliate=95301&linkid=Game";
_global.game_idprice = 1;
}
super();
_global.game = this;
Entry();
delegate = utils.Delegate;
_loaded = false;
init();
mode = "intro";
playMode();
}
function init() {
soundClip = createEmptyMovieClip("soundClip", -11000);
interface_ = new com.Interface();
_global.fxVolume = 70;
_global.musicVolume = 50;
playingSounds = new Array();
soundsPause = new Array();
sndCtrl = new ctrl.Sounds(100);
screenOnTop = false;
var _local3 = [["main_menu_music", 70], ["Game_over_minor", 70], ["building_finished", 100], ["crane", 70], ["demolishion_building", 70], ["demolishion_finished", 70], ["hamer_construction", 70], ["fire", 70], ["fire_alarm", 70], ["fire_extinguisher_done", 70], ["fire_extinguishers", 70], ["camp_fire", 70], ["water_splash", 70], ["people_swimm", 70], ["bulldozer", 70], ["tennis_field", 70], ["table_tennis", 70], ["football_field", 70], ["carLeaves", 70], ["tent_radio", 70], ["happy_campers_leaving", 70], ["happysound", 70], ["angry_campers_leaving", 70], ["goodjob", 70], ["vacum_cleaner", 70], ["broom_sweep", 70], ["disater_alarm", 70], ["wind_blow", 70], ["thunder", 70], ["thunder_storm", 70], ["birds_flappingWings", 100], ["birds_singing", 100], ["day_insects", 100], ["night_insects", 70], ["night_owl", 70], ["rooster_call", 70], ["light_switch_btn_click", 70], ["river_flow", 70], ["guestsarrive", 70], ["car_arrive_brakes", 70], ["restaurant_music", 50], ["disco_music", 100], ["bar_music", 70], ["slidingOut", 100], ["slidingIn", 100], ["complaints", 70]];
soundsPause = ["building_finished", "crane", "demolishion_building", "demolishion_finished", "hamer_construction", "fire", "fire_alarm", "fire_extinguisher_done", "fire_extinguishers", "camp_fire", "water_splash", "people_swimm", "bulldozer", "tennis_field", "table_tennis", "football_field", "carLeaves", "tent_radio", "happy_campers_leaving", "happysound", "angry_campers_leaving", "goodjob", "vacum_cleaner", "broom_sweep", "disater_alarm", "wind_blow", "thunder", "thunder_storm", "light_switch_btn_click", "guestsarrive", "car_arrive_brakes", "restaurant_music", "disco_music", "bar_music", "slidingOut", "slidingIn", "complaints"];
attachSounds(_local3);
barMusicPlay = false;
restorantMusicPlay = false;
discoMusicPlay = false;
repairingSound = false;
JazzyMusic = false;
RUSure = false;
}
function attachSounds(sounds) {
var _local2 = 0;
while (_local2 < sounds.length) {
var _local5 = soundClip.createEmptyMovieClip(utils.StringUtils.getUniqueName(), soundClip.getNextHighestDepth());
var _local3 = new utils.SoundImpl(_local5);
_local3.attachSoundImpl(sounds[_local2][0], sounds[_local2][1]);
sndCtrl.addSound(_local3);
_local2++;
}
}
function getInterface() {
return(interface_);
}
function playMode() {
if (!screenOnTop) {
switch (mode) {
case "intro" :
intro();
break;
case "play" :
newGame();
break;
case "load" :
loadGameScreen();
break;
case "save" :
saveGameScreen();
break;
case "options" :
options();
break;
case "instructions" :
instructions();
break;
case "load" :
loadGameScreen();
break;
case "win" :
winScreen();
break;
case "demo" :
demoScreen();
break;
case "gameover" :
gameOver();
}
}
}
function menu() {
}
function options() {
OptionsMenu = attachMovie("optionsScreenMenu", "optionsScreenMenu", 10, {_x:400, _y:300});
screenOnTop = true;
}
function instructions() {
InstructionsMenu = attachMovie("instructions", "instructions", 10, {_x:400, _y:300});
screenOnTop = true;
}
function winScreen() {
delete utils.Delegate;
RUSure = false;
stopAllSounds();
_global.game.sndCtrl.stopSound("Game_over_minor");
_global.game.sndCtrl.stopSound("main_menu_music");
_global.game.LevelClip.mouse.removeMouseListener();
_global.game.LevelClip.keyboard.removeKeyboardListener();
_global.game.LevelClip.removeMovieClip();
sndCtrl.stopAllSounds();
sndCtrl.playSound("main_menu_music", 32768);
WinScreen = attachMovie("winScreen_mc", "winScreen_mc", 10);
}
function demoScreen() {
delete utils.Delegate;
RUSure = false;
stopAllSounds();
score = int(_global.game.LevelClip.budget);
_global.game.sndCtrl.stopSound("Game_over_minor");
_global.game.sndCtrl.stopSound("main_menu_music");
_global.game.LevelClip.mouse.removeMouseListener();
_global.game.LevelClip.keyboard.removeKeyboardListener();
_global.game.LevelClip.removeMovieClip();
sndCtrl.stopAllSounds();
sndCtrl.playSound("main_menu_music", 32768);
WinScreen = attachMovie("demoEndScreen", "demoEndScreen", 10, {_x:400, _y:300});
}
function intro() {
delete utils.Delegate;
RUSure = false;
stopAllSounds();
_global.game.sndCtrl.stopSound("Game_over_minor");
_global.game.sndCtrl.stopSound("main_menu_music");
_global.game.LevelClip.mouse.removeMouseListener();
_global.game.LevelClip.keyboard.removeKeyboardListener();
_global.game.LevelClip.removeMovieClip();
delete _global.game;
_global.game = this;
sndCtrl.playSound("main_menu_music", 32768);
StartGame = attachMovie("startGame", "startGame", 5, {_x:400, _y:300});
StartGame.gotoAndPlay(1);
}
function exitGame() {
ExitGame = attachMovie("exitGame", "exitGame", 10, {_x:400, _y:300});
RUSure = true;
}
function newGame() {
sndCtrl.stopSound("main_menu_music");
StartGame.removeMovieClip();
_root.attachMovie("highscore", "highscore", 50000, {_x:260, _y:110});
utils.Delegate = delegate;
init();
attachMovie("loading", "loading", 100, {_x:400, _y:300});
}
function endGame() {
delete utils.Delegate;
LevelClip.mouse.removeMouseListener();
LevelClip.keyboard.removeKeyboardListener();
LevelClip.removeMovieClip();
}
function gameOver() {
delete utils.Delegate;
LevelClip.mouse.removeMouseListener();
LevelClip.keyboard.removeKeyboardListener();
sndCtrl.stopAllSounds();
sndCtrl.playSound("Game_over_minor", 32768);
LevelClip.removeMovieClip();
GameOverScreen = attachMovie("gameOverScreen_mc", "gameOverScreen_mc", 10);
}
function saveGameScreen() {
SaveScreen = attachMovie("saveScreen", "saveScreen", 10, {_x:380, _y:380});
}
function loadGameScreen() {
LoadScreen = attachMovie("loadScreen", "loadScreen", 10, {_x:380, _y:380});
screenOnTop = true;
}
function saveGame(GameNumber, btntext) {
so = SharedObject.getLocal("SaveGame" + GameNumber);
so.data.game = LevelClip.getSavingParameters(GameNumber);
so.data.buttonText = btntext;
so.data.saved = true;
so.flush();
}
function loadGame(GameNumber) {
_loaded = true;
screenOnTop = false;
LoadScreen.removeMovieClip();
var _local2 = SharedObject.getLocal("SaveGame" + GameNumber);
newGame();
loadingGame = _local2.data.game;
_local2.onStatus = function () {
};
}
}
Symbol 2848 MovieClip [__Packages.com.Interface] Frame 0
class com.Interface
{
var levelInterface;
function Interface () {
}
function attachLevelInterface() {
levelInterface = new com.LevelInterface(6);
levelInterface.attachClip();
}
function removeLevelInterface() {
levelInterface.removeClip();
delete levelInterface;
}
function getLevelInterface() {
return(levelInterface);
}
}
Symbol 2849 MovieClip [__Packages.com.LevelInterface] Frame 0
class com.LevelInterface
{
var bConfig, objNum, reception, advertising, complains, replacing, help, stats, options, savegame, endLevel, basics, congratulationReson, tutorialButtons, clip, complainClip, congratulationClip, scoreBoardLeft, scoreBoardRight, currentBtn, arrowClip, secondClickBuildind, screen;
function LevelInterface (num) {
bConfig = new conf.ButtonConfig();
objNum = bConfig.btnObj.length;
reception = false;
advertising = false;
complains = false;
replacing = false;
help = false;
stats = false;
options = false;
savegame = false;
endLevel = false;
basics = true;
_global.helpHint = false;
congratulationReson = [false, false, false];
tutorialButtons = new Array();
_global.game.LevelClip.levelConf = new conf.Level1();
_global.game.LevelClip.levelConf.setGrid();
setTutorialBtns();
if (_global.game._loaded) {
_global.game.LevelClip.helpOnOff = false;
} else {
_global.game.LevelClip.helpOnOff = true;
}
}
function attachClip() {
clip = _global.game.LevelClip.attachMovie("levelInterface", "levelInterface", 45200, {_x:0, _y:428});
clip.cacheAsBitmap = true;
complainClip = _global.game.LevelClip.attachMovie("complaints_clip", "complaints_clip", _global.game.LevelClip.depthCtrl.interfaceDepth - 5, {_x:0, _y:476});
congratulationClip = _global.game.LevelClip.attachMovie("congratulation_clip", "congratulation_clip", _global.game.LevelClip.depthCtrl.interfaceDepth - 6, {_x:0, _y:476});
scoreBoardLeft = _global.game.LevelClip.attachMovie("scoreBoard_campers", "scoreBoard_campers", _global.game.LevelClip.depthCtrl.interfaceDepth++, {_x:0, _y:0});
scoreBoardRight = _global.game.LevelClip.attachMovie("scoreBoard_day", "scoreBoard_day", _global.game.LevelClip.depthCtrl.interfaceDepth++, {_x:706, _y:0});
scoreBoardLeft.bankAccount.text = _global.game.LevelClip.budget;
scoreBoardLeft.campersServed.text = (_global.game.LevelClip.numOfCampersServed + "/") + _global.game.LevelClip.currentGoal;
scoreBoardRight.day.text = "1";
if (_global.game.mode != "load") {
_global.game.LevelClip.helpOnOff = true;
_global.helpHint = true;
basics = true;
currentBtn = "this.clip.mainMenu.collapseMenu.btn.btn";
_global.game.LevelClip.buildReception(Constants.standardReception);
_global.game.LevelClip.buildTrees();
_global.game.LevelClip.clock.stop();
_global.game.LevelClip.helpTips[1].showPopUp();
}
addEvents();
}
function removeClip() {
clip.removeMovieClip();
complainClip.removeMovieClip();
congratulationClip.removeMovieClip();
scoreBoardLeft.removeMovieClip();
scoreBoardRight.removeMovieClip();
}
function addEvents() {
var _local3 = 0;
while (_local3 <= objNum) {
clip["btn" + _local3].holder = this;
clip["btn" + _local3].index = _local3;
clip["btn" + _local3].onPress = function () {
};
clip["btn" + _local3].onRelease = function () {
var _local2 = _global.game.LevelClip;
if (!_local2.pause) {
if (_local2.campBuilding && (_local2.building)) {
_global.game.LevelClip.positionClip();
}
}
};
clip["btn" + _local3].onReleaseOutside = function () {
var _local2 = _global.game.LevelClip;
if (!_local2.pause) {
if (_local2.campBuilding && (_local2.building)) {
_global.game.LevelClip.positionClip();
}
}
};
_local3++;
}
}
function getClip() {
return(clip);
}
function setValues(ObjType, mc) {
var _local3 = bConfig.getObjects();
switch (_local3[ObjType].kind) {
case Constants.UNMOVABLE_OBJECT :
mc.visitors.text = _local3[ObjType].spots;
mc.rent.text = _local3[ObjType].rent;
break;
case Constants.RESERVATION_SPOT :
mc.visitors.text = _local3[ObjType].spots;
mc.rent.text = _local3[ObjType].rent;
break;
case Constants.ENTERTAINMENT :
mc.visitors.text = "";
mc.rent.text = "";
break;
case Constants.SANITARY :
mc.visitors.text = "";
mc.rent.text = "";
break;
case Constants.PLEASURE :
mc.visitors.text = "";
mc.rent.text = "";
break;
case Constants.PARKING :
mc.visitors.text = "";
mc.rent.text = "";
break;
case Constants.RECEPTION :
mc.visitors.text = "";
mc.rent.text = "";
}
mc.costs.text = _local3[ObjType].cost;
mc.tob.text = Math.round(_local3[ObjType].timeToBuild / 1000).toString();
}
function checkLock(ObjType, mc) {
var _local3 = _global.game.LevelClip;
var _local6 = true;
var _local2 = 0;
while (_local2 < _local3.unlockedObjects.length) {
if (_local3.unlockedObjects[_local2] == ObjType) {
_local6 = false;
break;
}
_local2++;
}
var _local7 = 50;
if (((((ObjType == Constants.familyTent) || (ObjType == Constants.bigPlayarena)) || (ObjType == Constants.bigSupermarket)) || (ObjType == Constants.bingoHall)) || (ObjType == Constants.stoneToilet)) {
_local7 = 75;
}
mc.katanec.removeMovieClip();
if (mc.locked && (!_local6)) {
mc.attachMovie("katanec", "katanec", mc.getNextHighestDepth(), {_x:_local7, _y:20});
mc.katanec.gotoAndStop("unlocked");
}
if (_local6) {
if (_local7 == 50) {
mc.attachMovie("fog", "fog", mc.getNextHighestDepth(), {_x:_local7, _y:20});
}
mc.attachMovie("katanec", "katanec", mc.getNextHighestDepth(), {_x:_local7, _y:20});
mc.locked = true;
} else {
mc.locked = false;
}
}
function checkButton(btn) {
if (!basics) {
return(true);
}
if (!_global.game.LevelClip.helpOnOff) {
return(true);
}
if (btn == undefined) {
return(false);
}
var cbtn = eval (this.currentBtn);
if (btn == cbtn) {
if (_global.game.LevelClip.currentPopUp == 3) {
_global.game.LevelClip.helpTips[4].showPopUp();
}
if (_global.game.LevelClip.currentPopUp == 2) {
_global.game.LevelClip.helpTips[4].showPopUp();
}
if (_global.game.LevelClip.currentPopUp == 1) {
_global.game.LevelClip.helpTips[2].showPopUp();
}
return(true);
}
return(false);
}
function setTutorialBtns() {
tutorialButtons.push("this.clip.mainMenu.collapseMenu.constructionBtn");
tutorialButtons.push("_global.constructionMenu.btn14");
tutorialButtons.push("basicTent");
tutorialButtons.push("this.clip.mainMenu.collapseMenu.mapBtn");
}
function attachArrow(mc, x, y) {
if (_global.game.LevelClip.helpOnOff) {
removeArrow();
arrowClip = mc.attachMovie("btnArrow", "btnArrow", 1000, {_x:x, _y:y});
}
}
function removeArrow(mc) {
arrowClip.removeMovieClip();
}
function buildFromInterfacePress(ObjType) {
var _local3 = _global.game.LevelClip;
if ((!_local3.pause) && (!_global.popUp)) {
if (_local3.campBuilding) {
if (_local3.popUp) {
_local3.popUp.removeMovieClip();
}
if (_global.game.LevelClip.currentPopUp == 4) {
_global.game.LevelClip.helpTips[5].showPopUp();
}
if (_global.game.LevelClip.currentPopUp == 7) {
_global.game.LevelClip.helpTips[8].showPopUp();
}
_local3.building = undefined;
var _local4 = bConfig.getObjProps(ObjType);
if ((_local4.kind != Constants.RECEPTION) || ((_local4.kind == Constants.RECEPTION) && (!_local3.hasReception))) {
if ((_local3.budget - _local4.cost) >= 0) {
_local3.building = new mcs.Building(_local4.linkID, _local3._xmouse, _local3._ymouse, 0, _local3.depthCtrl.tempBuildnigDepth);
_local3.building.setProperties(_local4.numOfSquares, _local4.kind, _local4.cost, _local4.luxury, _local4.timeToBuild, _local4.spots, _local4.type, _local4.rent, _local4.chance, _local4.repairExpence);
_local3.building.setEffectsValues(_local4.storm, _local4.fire, _local4.flood);
_local3.building._defaultRent = _local4.rent;
if (_local4.kind == Constants.ENTERTAINMENT) {
_local3.building.setEntertainProperties(_local4.teen, _local4.adult, _local4.old);
}
_local3.building.clip = _local3.attachMovie(_local3.building.linkID, utils.StringUtils.getUniqueName(), _local3.building.depth, {_x:_local3.building.x, _y:_local3.building.y});
_local3.mouse.building = true;
_local3.checkCellAvaiblility(_local3.building);
} else {
var _local5 = _local3.depthCtrl.infScreens;
while (_local3.getInstanceAtDepth(_local5++)) {
}
_local3.attention.removeMovieClip();
var _local6 = _local3.attachMovie("buildMoney", "attention", _local5, {_x:400, _y:300});
}
}
}
}
}
function buildFromInterfaceRelease() {
var _local3 = _global.game.LevelClip;
if (!_local3.pause) {
if (_local3.campBuilding && (_local3.building)) {
if (_global.game.interface_.getLevelInterface().currentBtn != "shake") {
var _local4 = _local3.building;
_global.game.LevelClip.positionClip();
secondClickBuildind = true;
}
}
}
}
function congratulation(congText, reason) {
if (!congratulationClip.shown) {
congratulationReson[0] = false;
congratulationReson[1] = false;
if (!congratulationReson[reason]) {
_global.game.sndCtrl.stopSound("goodjob");
_global.game.sndCtrl.playSound("goodjob", -1);
congratulationReson[reason] = true;
complainClip.gotoAndStop("show");
congratulationClip.congradulationTxt.text = congText;
congratulationClip.gotoAndPlay("show");
}
}
}
function complaints() {
if (!_global.game.LevelClip.onComplaint) {
_global.game.LevelClip.onComplaint = true;
_global.game.LevelClip.helpTips[22].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[22], _global.game.LevelClip.helpTips[22].hidePopUp, 10000);
}
if (!complainClip.shown) {
_global.game.sndCtrl.stopSound("complaints");
_global.game.sndCtrl.playSound("complaints", -1);
congratulationClip.gotoAndStop("show");
complainClip.gotoAndPlay("show");
} else {
var _local5 = 0;
var _local3 = 0;
while (_local3 < _global.game.LevelClip.camperGroups.length) {
var _local4 = _global.game.LevelClip.camperGroups[_local3];
if (_local4.getComplainText() != "") {
_local5++;
}
_local3++;
}
complainClip.compGuy.cmpNum.text = _local5;
}
}
function recerptionScreen() {
if (!_global.game.RUSure) {
_global.game.LevelClip.cancelRoadConstaruction();
if (!reception) {
removeScreen();
screen = _global.game.LevelClip.attachMovie("receptionScreen", "receptionScreen", _global.game.LevelClip.depthCtrl.screenDepth, {_x:427, _y:233});
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
reception = true;
_global.game.LevelClip.pauseGame();
} else {
screen.removeMovieClip();
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
reception = false;
_global.game.LevelClip.continueGame();
}
}
}
function advertisingScreen() {
if (!_global.game.RUSure) {
_global.game.LevelClip.cancelRoadConstaruction();
if (!advertising) {
removeScreen();
screen = _global.game.LevelClip.attachMovie("advertisingScreen", "advertisingScreen", _global.game.LevelClip.depthCtrl.screenDepth, {_x:427, _y:233});
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
advertising = true;
_global.game.LevelClip.pauseGame();
} else {
screen.removeMovieClip();
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
advertising = false;
_global.game.LevelClip.continueGame();
}
}
}
function complainsScreen() {
_global.game.LevelClip.cancelRoadConstaruction();
if (!complains) {
removeScreen();
screen = _global.game.LevelClip.attachMovie("complainsScreen", "complainsScreen", _global.game.LevelClip.depthCtrl.screenDepth, {_x:427, _y:233});
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
complains = true;
_global.game.LevelClip.pauseGame();
} else {
if (screen.rowNum > 0) {
if (!_global.game.LevelClip.onComplaintScreen) {
_global.game.LevelClip.onComplaintScreen = true;
_global.game.LevelClip.helpTips[23].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[23], _global.game.LevelClip.helpTips[23].hidePopUp, 10000);
}
}
screen.removeMovieClip();
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
complains = false;
_global.game.LevelClip.continueGame();
}
}
function statsScreen() {
if (!_global.game.RUSure) {
_global.game.LevelClip.cancelRoadConstaruction();
if (!stats) {
removeScreen();
screen = _global.game.LevelClip.attachMovie("statsScreen", "statsScreen", _global.game.LevelClip.depthCtrl.screenDepth, {_x:427, _y:233});
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
stats = true;
_global.game.LevelClip.pauseGame();
} else {
screen.removeMovieClip();
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
stats = false;
_global.game.LevelClip.continueGame();
}
}
}
function optionScreen() {
if (!_global.game.RUSure) {
_global.game.LevelClip.cancelRoadConstaruction();
if (!options) {
removeScreen();
screen = _global.game.LevelClip.attachMovie("optionScreen", "optionScreen", _global.game.LevelClip.depthCtrl.screenDepth, {_x:427, _y:233});
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
options = true;
_global.game.LevelClip.pauseGame();
} else {
screen.removeMovieClip();
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
options = false;
_global.game.LevelClip.continueGame();
}
}
}
function helpScreen() {
if (!_global.game.RUSure) {
_global.game.LevelClip.cancelRoadConstaruction();
if (!help) {
removeScreen();
screen = _global.game.LevelClip.attachMovie("helpScreen_mc", "helpScreen_mc", _global.game.LevelClip.depthCtrl.screenDepth, {_x:427, _y:233});
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
help = true;
_global.game.LevelClip.pauseGame();
} else {
screen.removeMovieClip();
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
help = false;
_global.game.LevelClip.continueGame();
}
}
}
function endLevelScreen() {
_global.game.LevelClip.cancelRoadConstaruction();
if (!endLevel) {
removeScreen();
screen = _global.game.LevelClip.attachMovie("endLevelScreen", "endLevelScreen", _global.game.LevelClip.depthCtrl.mouseDepth - 5, {_x:400, _y:300});
endLevel = true;
clip.mainMenu.gotoAndPlay("collide");
clip.collapseMain();
_global.game.LevelClip.pauseGame();
} else {
screen.removeMovieClip();
endLevel = false;
_global.game.LevelClip.continueGame();
}
}
function saveScreen() {
_global.game.LevelClip.cancelRoadConstaruction();
if (!savegame) {
removeScreen();
screen = _global.game.LevelClip.attachMovie("saveScreen", "saveScreen", _global.game.LevelClip.depthCtrl.screenDepth, {_x:427, _y:233});
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
savegame = true;
_global.game.LevelClip.pauseGame();
} else {
screen.removeMovieClip();
_global.game.sndCtrl.stopSound("sliding");
_global.game.sndCtrl.playSound("sliding", -1);
savegame = false;
_global.game.LevelClip.continueGame();
}
}
function removeScreen() {
_global.game.LevelClip.paused.removeMovieClip();
if (reception) {
_global.game.LevelClip.replacingGroup = undefined;
replacing = false;
}
if (complains) {
if (screen.rowNum > 0) {
if (!_global.game.LevelClip.onComplaintScreen) {
_global.game.LevelClip.onComplaintScreen = true;
_global.game.LevelClip.helpTips[23].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[23], _global.game.LevelClip.helpTips[23].hidePopUp, 10000);
}
}
}
screen.removeMovieClip();
screen = undefined;
reception = false;
advertising = false;
complains = false;
stats = false;
help = false;
options = false;
savegame = false;
endLevel = false;
}
function slidingOutPlay() {
_global.game.sndCtrl.stopSound("slidingOut");
_global.game.sndCtrl.playSound("slidingOut", -1);
}
function slidingInPlay() {
_global.game.sndCtrl.stopSound("slidingOut");
_global.game.sndCtrl.playSound("slidingOut", -1);
}
}
Symbol 2850 MovieClip [__Packages.conf.Level1] Frame 0
class conf.Level1
{
var level;
function Level1 () {
level = _global.game.LevelClip;
}
function setGrid() {
map.Map.grid.length;
var _local4 = 0;
while (_local4 < 21) {
var _local3 = 0;
while (_local3 < 29) {
if ((level.grid[_local4][_local3].x <= 800) && (level.grid[_local4][_local3].y <= 600)) {
if ((map.Map.grid[_local4][_local3] != 1) && (map.Map.grid[_local4][_local3] != 4)) {
level.grid[_local4][_local3].setState(level.grid[_local4][_local3].BUYED);
} else if (map.Map.grid[_local4][_local3] == 4) {
level.grid[_local4][_local3].setState(level.grid[_local4][_local3].RESERVED);
}
var _local6 = int(_local3 * level.spacing);
var _local5 = int(_local4 * level.spacing);
var _local2 = new flash.geom.Rectangle(_local6, _local5, 30, 30);
level.mapFog.merge(level.mapBought, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
level.mapWithoutRoads.merge(level.mapBought, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
level.onlyRoads.merge(level.mapBought, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
level.mapLake.merge(level.mapLakeBrigth, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
level.mapWithoutRoadsLake.merge(level.mapLakeBrigth, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
level.onlyRoadsLake.merge(level.mapLakeBrigth, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
level.mapRiver.merge(level.mapRiverBrigth, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
level.mapWithoutRoadsRiver.merge(level.mapRiverBrigth, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
level.onlyRoadsRiver.merge(level.mapRiverBrigth, _local2, new flash.geom.Point(_local2.x, _local2.y), 255, 255, 255, 255);
level.navigator.refreshNavigator(_local6, _local5);
level.background.drawCameraView(level.camBMP);
}
_local3++;
}
_local4++;
}
}
}
Symbol 85 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().endLevel) {
_global.game.interface_.getLevelInterface().endLevel = false;
_global.game.mode = "demo";
_global.game.playMode();
_global.game.interface_.getLevelInterface().screen.removeMovieClip();
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 3
stop();
Symbol 95 MovieClip [endLevelScreen] Frame 1
function showDemo() {
if (_global.game.interface_.getLevelInterface().endLevel) {
_global.game.interface_.getLevelInterface().endLevel = false;
_global.game.mode = "demo";
_global.game.playMode();
_global.game.interface_.getLevelInterface().screen.removeMovieClip();
}
}
utils.Delegate.callDelayed(this, showDemo, 12000);
stop();
Symbol 95 MovieClip [endLevelScreen] Frame 2
stop();
Symbol 95 MovieClip [endLevelScreen] Frame 3
stop();
Symbol 100 MovieClip [needPointsDemo] Frame 41
this.swapDepths(1000);
this.removeMovieClip();
Symbol 103 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 110 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 111 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 160 MovieClip [fireAnim] Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 163 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 2
stop();
Symbol 166 MovieClip Frame 3
stop();
Symbol 167 MovieClip [campFire] Frame 1
stop();
Symbol 167 MovieClip [campFire] Frame 2
stop();
Symbol 167 MovieClip [campFire] Frame 3
stop();
Symbol 170 MovieClip [lightOn0] Frame 1
stop();
Symbol 173 MovieClip [lightOn90] Frame 1
stop();
Symbol 174 MovieClip [lightOn180] Frame 1
stop();
Symbol 175 MovieClip [lightOn-90] Frame 1
stop();
Symbol 192 Button
on (press) {
var i = 0;
while (i < this._parent._parent._parent.rowNum) {
this._parent._parent.objHolder["scrollingObjects" + i].name.textColor = 16764672 /* 0xFFCF00 */;
i++;
}
this._parent._parent._parent.setParameters(this.object);
this.name.textColor = 16777215 /* 0xFFFFFF */;
}
Symbol 229 Button
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(1);
}
on (release) {
this.gotoAndStop(1);
}
Symbol 231 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 1
stop();
Symbol 235 MovieClip [exitGame] Frame 1
noExit.onPress = function () {
_global.game.LevelClip.continueGame();
_global.game.RUSure = false;
_global.game.ExitGame.removeMovieClip();
};
yesExit.onPress = function () {
_global.game.mode = "intro";
_global.game.playMode();
_global.game.RUSure = false;
_global.game.exitGame.removeMovieClip();
};
Symbol 240 Button
on (press) {
_global.popUp = false;
this._parent._parent.removeMovieClip();
}
Symbol 242 MovieClip Frame 1
stop();
Symbol 242 MovieClip Frame 2
stop();
Symbol 245 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_global.popUp = false;
this._parent.removeMovieClip();
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 247 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 3
stop();
Symbol 248 MovieClip [AcceptReject] Frame 1
noExit.onPress = function () {
_global.game.ExitGame.removeMovieClip();
};
this.swapDepths(48000);
utils.Delegate.callDelayed(this, this.removeMovieClip, 1500);
Instance of Symbol 223 MovieClip in Symbol 248 MovieClip [AcceptReject] Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 250 Button
on (press) {
_global.popUp = false;
this._parent.removeMovieClip();
}
Symbol 251 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 2
stop();
Symbol 253 MovieClip [bulldozerMoney] Frame 1
noExit.onPress = function () {
_global.game.ExitGame.removeMovieClip();
};
this.swapDepths(48000);
utils.Delegate.callDelayed(this, this.removeMovieClip, 1500);
Instance of Symbol 223 MovieClip in Symbol 253 MovieClip [bulldozerMoney] Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 255 MovieClip [cleaningMoney] Frame 1
noExit.onPress = function () {
_global.game.ExitGame.removeMovieClip();
};
this.swapDepths(48000);
utils.Delegate.callDelayed(this, this.removeMovieClip, 1500);
Instance of Symbol 223 MovieClip in Symbol 255 MovieClip [cleaningMoney] Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 257 MovieClip [buildMoney] Frame 1
noExit.onPress = function () {
_global.game.ExitGame.removeMovieClip();
};
this.swapDepths(48000);
utils.Delegate.callDelayed(this, this.removeMovieClip, 1500);
Instance of Symbol 223 MovieClip in Symbol 257 MovieClip [buildMoney] Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 259 MovieClip [repairMoney] Frame 1
noExit.onPress = function () {
_global.game.ExitGame.removeMovieClip();
};
this.swapDepths(48000);
utils.Delegate.callDelayed(this, this.removeMovieClip, 1500);
Instance of Symbol 223 MovieClip in Symbol 259 MovieClip [repairMoney] Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 286 Button
on (press) {
this._parent._parent.selectRow(this);
}
Symbol 301 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 303 MovieClip Frame 1
stop();
Symbol 303 MovieClip Frame 2
stop();
Symbol 413 MovieClip [flames_mc] Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 456 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 456 MovieClip Frame 21
gotoAndPlay (2);
Symbol 457 MovieClip [hedge] Frame 1
stop();
Symbol 457 MovieClip [hedge] Frame 2
stop();
Symbol 457 MovieClip [hedge] Frame 3
stop();
Symbol 457 MovieClip [hedge] Frame 4
stop();
Symbol 457 MovieClip [hedge] Frame 5
stop();
Symbol 457 MovieClip [hedge] Frame 6
stop();
Symbol 461 MovieClip Frame 1
stop();
Symbol 461 MovieClip Frame 2
stop();
Symbol 462 MovieClip [smallPark] Frame 1
stop();
Symbol 462 MovieClip [smallPark] Frame 2
stop();
Symbol 462 MovieClip [smallPark] Frame 3
stop();
Symbol 462 MovieClip [smallPark] Frame 4
stop();
Symbol 462 MovieClip [smallPark] Frame 5
stop();
Symbol 462 MovieClip [smallPark] Frame 6
stop();
Symbol 466 MovieClip Frame 1
stop();
Symbol 466 MovieClip Frame 2
stop();
Symbol 467 MovieClip [tree] Frame 1
stop();
Symbol 467 MovieClip [tree] Frame 2
stop();
Symbol 467 MovieClip [tree] Frame 3
stop();
Symbol 467 MovieClip [tree] Frame 4
stop();
Symbol 467 MovieClip [tree] Frame 5
stop();
Symbol 467 MovieClip [tree] Frame 6
stop();
Symbol 471 MovieClip Frame 1
stop();
Symbol 471 MovieClip Frame 2
stop();
Symbol 472 MovieClip [mediumPark] Frame 1
stop();
Symbol 472 MovieClip [mediumPark] Frame 2
stop();
Symbol 472 MovieClip [mediumPark] Frame 3
stop();
Symbol 472 MovieClip [mediumPark] Frame 4
stop();
Symbol 472 MovieClip [mediumPark] Frame 5
stop();
Symbol 472 MovieClip [mediumPark] Frame 6
stop();
Symbol 477 MovieClip [fontaine] Frame 1
stop();
Symbol 477 MovieClip [fontaine] Frame 2
stop();
Symbol 477 MovieClip [fontaine] Frame 3
stop();
Symbol 477 MovieClip [fontaine] Frame 4
stop();
Symbol 477 MovieClip [fontaine] Frame 5
stop();
Symbol 477 MovieClip [fontaine] Frame 6
stop();
Symbol 484 MovieClip Frame 1
stop();
Symbol 484 MovieClip Frame 2
stop();
Symbol 484 MovieClip Frame 3
stop();
Symbol 484 MovieClip Frame 4
stop();
Symbol 485 MovieClip Frame 1
stop();
Symbol 485 MovieClip Frame 2
stop();
Symbol 486 MovieClip [hugeTent] Frame 1
stop();
Symbol 486 MovieClip [hugeTent] Frame 2
stop();
Symbol 486 MovieClip [hugeTent] Frame 3
stop();
Symbol 486 MovieClip [hugeTent] Frame 4
stop();
Symbol 486 MovieClip [hugeTent] Frame 5
stop();
Symbol 486 MovieClip [hugeTent] Frame 6
stop();
Symbol 486 MovieClip [hugeTent] Frame 7
stop();
Symbol 490 MovieClip Frame 1
stop();
Symbol 490 MovieClip Frame 2
stop();
Symbol 490 MovieClip Frame 3
stop();
Symbol 490 MovieClip Frame 4
stop();
Symbol 491 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 2
stop();
Symbol 492 MovieClip [smallMarket] Frame 1
stop();
Symbol 492 MovieClip [smallMarket] Frame 2
stop();
Symbol 492 MovieClip [smallMarket] Frame 3
stop();
Symbol 492 MovieClip [smallMarket] Frame 4
stop();
Symbol 492 MovieClip [smallMarket] Frame 5
stop();
Symbol 492 MovieClip [smallMarket] Frame 6
stop();
Symbol 496 MovieClip Frame 1
stop();
Symbol 496 MovieClip Frame 2
stop();
Symbol 496 MovieClip Frame 3
stop();
Symbol 496 MovieClip Frame 4
stop();
Symbol 497 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 2
stop();
Symbol 498 MovieClip [bingoHall] Frame 1
stop();
Symbol 498 MovieClip [bingoHall] Frame 2
stop();
Symbol 498 MovieClip [bingoHall] Frame 3
stop();
Symbol 498 MovieClip [bingoHall] Frame 4
stop();
Symbol 498 MovieClip [bingoHall] Frame 5
stop();
Symbol 498 MovieClip [bingoHall] Frame 6
stop();
Symbol 502 MovieClip Frame 1
stop();
Symbol 502 MovieClip Frame 2
stop();
Symbol 502 MovieClip Frame 3
stop();
Symbol 502 MovieClip Frame 4
stop();
Symbol 503 MovieClip Frame 1
stop();
Symbol 503 MovieClip Frame 2
stop();
Symbol 504 MovieClip [playground] Frame 1
stop();
Symbol 504 MovieClip [playground] Frame 2
stop();
Symbol 504 MovieClip [playground] Frame 3
stop();
Symbol 504 MovieClip [playground] Frame 4
stop();
Symbol 504 MovieClip [playground] Frame 5
stop();
Symbol 504 MovieClip [playground] Frame 6
stop();
Symbol 508 MovieClip Frame 1
stop();
Symbol 508 MovieClip Frame 2
stop();
Symbol 508 MovieClip Frame 3
stop();
Symbol 508 MovieClip Frame 4
stop();
Symbol 509 MovieClip Frame 1
stop();
Symbol 509 MovieClip Frame 2
stop();
Symbol 510 MovieClip [bigSupermarket] Frame 1
stop();
Symbol 510 MovieClip [bigSupermarket] Frame 2
stop();
Symbol 510 MovieClip [bigSupermarket] Frame 3
stop();
Symbol 510 MovieClip [bigSupermarket] Frame 4
stop();
Symbol 510 MovieClip [bigSupermarket] Frame 5
stop();
Symbol 510 MovieClip [bigSupermarket] Frame 6
stop();
Symbol 514 MovieClip Frame 1
stop();
Symbol 514 MovieClip Frame 2
stop();
Symbol 514 MovieClip Frame 3
stop();
Symbol 514 MovieClip Frame 4
stop();
Symbol 515 MovieClip Frame 1
stop();
Symbol 515 MovieClip Frame 2
stop();
Symbol 516 MovieClip [shower] Frame 1
stop();
Symbol 516 MovieClip [shower] Frame 2
stop();
Symbol 516 MovieClip [shower] Frame 3
stop();
Symbol 516 MovieClip [shower] Frame 4
stop();
Symbol 516 MovieClip [shower] Frame 5
stop();
Symbol 516 MovieClip [shower] Frame 6
stop();
Symbol 520 MovieClip Frame 1
stop();
Symbol 520 MovieClip Frame 2
stop();
Symbol 520 MovieClip Frame 3
stop();
Symbol 520 MovieClip Frame 4
stop();
Symbol 521 MovieClip Frame 1
stop();
Symbol 521 MovieClip Frame 2
stop();
Symbol 522 MovieClip [stoneToilet] Frame 1
stop();
Symbol 522 MovieClip [stoneToilet] Frame 2
stop();
Symbol 522 MovieClip [stoneToilet] Frame 3
stop();
Symbol 522 MovieClip [stoneToilet] Frame 4
stop();
Symbol 522 MovieClip [stoneToilet] Frame 5
stop();
Symbol 522 MovieClip [stoneToilet] Frame 6
stop();
Symbol 526 MovieClip Frame 1
stop();
Symbol 526 MovieClip Frame 2
stop();
Symbol 526 MovieClip Frame 3
stop();
Symbol 526 MovieClip Frame 4
stop();
Symbol 527 MovieClip Frame 1
stop();
Symbol 527 MovieClip Frame 2
stop();
Symbol 528 MovieClip [restaurant] Frame 1
stop();
Symbol 528 MovieClip [restaurant] Frame 2
stop();
Symbol 528 MovieClip [restaurant] Frame 3
stop();
Symbol 528 MovieClip [restaurant] Frame 4
stop();
Symbol 528 MovieClip [restaurant] Frame 5
stop();
Symbol 528 MovieClip [restaurant] Frame 6
stop();
Symbol 532 MovieClip Frame 1
stop();
Symbol 532 MovieClip Frame 2
stop();
Symbol 532 MovieClip Frame 3
stop();
Symbol 532 MovieClip Frame 4
stop();
Symbol 533 MovieClip Frame 1
stop();
Symbol 533 MovieClip Frame 2
stop();
Symbol 534 MovieClip [woodenToilet] Frame 1
stop();
Symbol 534 MovieClip [woodenToilet] Frame 2
stop();
Symbol 534 MovieClip [woodenToilet] Frame 3
stop();
Symbol 534 MovieClip [woodenToilet] Frame 4
stop();
Symbol 534 MovieClip [woodenToilet] Frame 5
stop();
Symbol 534 MovieClip [woodenToilet] Frame 6
stop();
Symbol 538 MovieClip Frame 1
stop();
Symbol 538 MovieClip Frame 2
stop();
Symbol 539 MovieClip [trashcan] Frame 1
stop();
Symbol 539 MovieClip [trashcan] Frame 2
stop();
Symbol 539 MovieClip [trashcan] Frame 3
stop();
Symbol 539 MovieClip [trashcan] Frame 4
stop();
Symbol 539 MovieClip [trashcan] Frame 5
stop();
Symbol 539 MovieClip [trashcan] Frame 6
stop();
Symbol 543 MovieClip Frame 1
stop();
Symbol 543 MovieClip Frame 2
stop();
Symbol 543 MovieClip Frame 3
stop();
Symbol 543 MovieClip Frame 4
stop();
Symbol 544 MovieClip Frame 1
stop();
Symbol 544 MovieClip Frame 2
stop();
Symbol 545 MovieClip [smallReception] Frame 1
stop();
Symbol 545 MovieClip [smallReception] Frame 2
stop();
Symbol 545 MovieClip [smallReception] Frame 3
stop();
Symbol 545 MovieClip [smallReception] Frame 4
stop();
Symbol 545 MovieClip [smallReception] Frame 5
stop();
Symbol 545 MovieClip [smallReception] Frame 6
stop();
Symbol 552 MovieClip Frame 1
stop();
Symbol 552 MovieClip Frame 2
stop();
Symbol 552 MovieClip Frame 3
stop();
Symbol 552 MovieClip Frame 4
stop();
Symbol 553 MovieClip Frame 1
stop();
Symbol 553 MovieClip Frame 2
stop();
Symbol 554 MovieClip [familyTent] Frame 1
stop();
Symbol 554 MovieClip [familyTent] Frame 2
stop();
Symbol 554 MovieClip [familyTent] Frame 3
stop();
Symbol 554 MovieClip [familyTent] Frame 4
stop();
Symbol 554 MovieClip [familyTent] Frame 5
stop();
Symbol 554 MovieClip [familyTent] Frame 6
stop();
Symbol 554 MovieClip [familyTent] Frame 7
stop();
Symbol 558 MovieClip Frame 1
stop();
Symbol 558 MovieClip Frame 2
stop();
Symbol 559 MovieClip [tableTenis] Frame 1
stop();
Symbol 559 MovieClip [tableTenis] Frame 2
stop();
Symbol 559 MovieClip [tableTenis] Frame 3
stop();
Symbol 559 MovieClip [tableTenis] Frame 4
stop();
Symbol 559 MovieClip [tableTenis] Frame 5
stop();
Symbol 559 MovieClip [tableTenis] Frame 6
stop();
Symbol 559 MovieClip [tableTenis] Frame 7
stop();
Symbol 563 MovieClip Frame 1
stop();
Symbol 563 MovieClip Frame 2
stop();
Symbol 563 MovieClip Frame 3
stop();
Symbol 563 MovieClip Frame 4
stop();
Symbol 564 MovieClip Frame 1
stop();
Symbol 564 MovieClip Frame 2
stop();
Symbol 565 MovieClip [washingMachine] Frame 1
stop();
Symbol 565 MovieClip [washingMachine] Frame 2
stop();
Symbol 565 MovieClip [washingMachine] Frame 3
stop();
Symbol 565 MovieClip [washingMachine] Frame 4
stop();
Symbol 565 MovieClip [washingMachine] Frame 5
stop();
Symbol 565 MovieClip [washingMachine] Frame 6
stop();
Symbol 566 MovieClip Frame 1
stop();
Symbol 566 MovieClip Frame 2
stop();
Symbol 566 MovieClip Frame 3
stop();
Symbol 566 MovieClip Frame 4
stop();
Symbol 567 MovieClip Frame 1
stop();
Symbol 567 MovieClip Frame 2
stop();
Symbol 568 MovieClip [largeTent] Frame 1
stop();
Symbol 568 MovieClip [largeTent] Frame 2
stop();
Symbol 568 MovieClip [largeTent] Frame 3
stop();
Symbol 568 MovieClip [largeTent] Frame 4
stop();
Symbol 568 MovieClip [largeTent] Frame 5
stop();
Symbol 568 MovieClip [largeTent] Frame 6
stop();
Symbol 568 MovieClip [largeTent] Frame 7
stop();
Symbol 574 MovieClip [Cell] Frame 1
stop();
Symbol 574 MovieClip [Cell] Frame 2
stop();
Symbol 574 MovieClip [Cell] Frame 3
stop();
Symbol 588 MovieClip [asfalt] Frame 1
stop();
Symbol 588 MovieClip [asfalt] Frame 2
stop();
Symbol 588 MovieClip [asfalt] Frame 3
stop();
Symbol 589 MovieClip [Game] Frame 1
#initclip 57
Object.registerClass("Game", Game);
#endinitclip
Symbol 590 MovieClip [Level] Frame 1
#initclip 56
Object.registerClass("Level", com.Level);
#endinitclip
Symbol 596 MovieClip [electricalLamp] Frame 1
stop();
Symbol 596 MovieClip [electricalLamp] Frame 2
stop();
Symbol 596 MovieClip [electricalLamp] Frame 3
stop();
Symbol 596 MovieClip [electricalLamp] Frame 4
stop();
Symbol 596 MovieClip [electricalLamp] Frame 5
stop();
Symbol 599 MovieClip [asphaltParking] Frame 1
stop();
Symbol 599 MovieClip [asphaltParking] Frame 2
stop();
Symbol 599 MovieClip [asphaltParking] Frame 3
stop();
Symbol 602 MovieClip [dirtParking] Frame 1
stop();
Symbol 602 MovieClip [dirtParking] Frame 2
stop();
Symbol 602 MovieClip [dirtParking] Frame 3
stop();
Symbol 605 MovieClip [pavedParking] Frame 1
stop();
Symbol 605 MovieClip [pavedParking] Frame 2
stop();
Symbol 605 MovieClip [pavedParking] Frame 3
stop();
Symbol 609 MovieClip Frame 1
stop();
Symbol 609 MovieClip Frame 2
stop();
Symbol 610 MovieClip [bigPark] Frame 1
stop();
Symbol 610 MovieClip [bigPark] Frame 2
stop();
Symbol 610 MovieClip [bigPark] Frame 3
stop();
Symbol 610 MovieClip [bigPark] Frame 4
stop();
Symbol 610 MovieClip [bigPark] Frame 5
stop();
Symbol 610 MovieClip [bigPark] Frame 6
stop();
Symbol 617 MovieClip Frame 1
stop();
Symbol 617 MovieClip Frame 2
stop();
Symbol 617 MovieClip Frame 3
stop();
Symbol 617 MovieClip Frame 4
stop();
Symbol 618 MovieClip Frame 1
stop();
Symbol 618 MovieClip Frame 2
stop();
Symbol 619 MovieClip [basicTent] Frame 1
stop();
Symbol 619 MovieClip [basicTent] Frame 2
stop();
Symbol 619 MovieClip [basicTent] Frame 3
stop();
Symbol 619 MovieClip [basicTent] Frame 4
stop();
Symbol 619 MovieClip [basicTent] Frame 5
stop();
Symbol 619 MovieClip [basicTent] Frame 6
stop();
Symbol 619 MovieClip [basicTent] Frame 7
stop();
Symbol 623 MovieClip Frame 1
stop();
Symbol 623 MovieClip Frame 2
stop();
Symbol 623 MovieClip Frame 3
stop();
Symbol 623 MovieClip Frame 4
stop();
Symbol 624 MovieClip Frame 1
stop();
Symbol 624 MovieClip Frame 2
stop();
Symbol 625 MovieClip [bigPlayArena] Frame 1
stop();
Symbol 625 MovieClip [bigPlayArena] Frame 2
stop();
Symbol 625 MovieClip [bigPlayArena] Frame 3
stop();
Symbol 625 MovieClip [bigPlayArena] Frame 4
stop();
Symbol 625 MovieClip [bigPlayArena] Frame 5
stop();
Symbol 625 MovieClip [bigPlayArena] Frame 6
stop();
Symbol 628 MovieClip [storm] Frame 157
this.gotoAndPlay(62);
Symbol 632 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.construction)) {
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
_global.game.interface_.getLevelInterface().removeArrow(this);
this._parent.gotoAndStop("accomodation");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
if (!_global.game.LevelClip.campBuilding) {
_global.game.LevelClip.campBuilding = true;
_global.game.LevelClip.roadBuilding = false;
_global.game.LevelClip.startBuildingRoad = false;
_global.game.LevelClip.clearTempRoadClips();
_global.game.LevelClip.mouse.clip.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpConstructionTab", "popUpConstructionTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 633 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
this._parent.gotoAndStop("receptions");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
if (!_global.game.LevelClip.campBuilding) {
_global.game.LevelClip.campBuilding = true;
_global.game.LevelClip.roadBuilding = false;
_global.game.LevelClip.startBuildingRoad = false;
_global.game.LevelClip.clearTempRoadClips();
_global.game.LevelClip.mouse.clip.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpReceptionTab", "popUpReceptionTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 634 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
_global.game.LevelClip.campBuilding = false;
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
this._parent.gotoAndStop("roads");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpRoadTab", "popUpRoadTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 635 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
this._parent.gotoAndStop("sanitary");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
if (!_global.game.LevelClip.campBuilding) {
_global.game.LevelClip.campBuilding = true;
_global.game.LevelClip.roadBuilding = false;
_global.game.LevelClip.startBuildingRoad = false;
_global.game.LevelClip.clearTempRoadClips();
_global.game.LevelClip.mouse.clip.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpSanitaryTab", "popUpSanitaryTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 636 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
this._parent.gotoAndStop("entertainment");
}
}
on (press) {
if (!_global.game.LevelClip.campBuilding) {
_global.game.LevelClip.campBuilding = true;
_global.game.LevelClip.roadBuilding = false;
_global.game.LevelClip.startBuildingRoad = false;
_global.game.LevelClip.clearTempRoadClips();
_global.game.LevelClip.mouse.clip.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpEntertainmentTab", "popUpEntertainmentTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 637 MovieClip Frame 1
if (_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.tabs.construction") {
_global.game.interface_.getLevelInterface().attachArrow(this, 27, 4.5);
}
Symbol 640 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
this._parent._parent._parent.btn = 0;
this._parent._parent._parent.cancelConstaruction();
this._parent._parent.gotoAndPlay("collapse");
}
}
Symbol 646 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.road)) {
_global.game.LevelClip.campBuilding = false;
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
_global.game.interface_.getLevelInterface().removeArrow();
if (_global.helpHint) {
if (_global.game.LevelClip.tutorialFlow > 0) {
if (_global.game.LevelClip.tutorialFlow == 7) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn50";
} else if (_global.game.LevelClip.tutorialFlow == 8) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn51";
}
}
}
this._parent.gotoAndStop("roads");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpRoadTab", "popUpRoadTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 647 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.sanitary)) {
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
_global.game.interface_.getLevelInterface().removeArrow();
if (_global.helpHint) {
if (_global.game.LevelClip.tutorialFlow > 0) {
if (_global.game.LevelClip.tutorialFlow == 2) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn25";
} else if (_global.game.LevelClip.tutorialFlow == 3) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn29";
} else if (_global.game.LevelClip.tutorialFlow == 4) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn27";
} else if (_global.game.LevelClip.tutorialFlow == 5) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn24";
}
}
}
this._parent.gotoAndStop("sanitary");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
if (!_global.game.LevelClip.campBuilding) {
_global.game.LevelClip.campBuilding = true;
_global.game.LevelClip.roadBuilding = false;
_global.game.LevelClip.startBuildingRoad = false;
_global.game.LevelClip.clearTempRoadClips();
_global.game.LevelClip.mouse.clip.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpSanitaryTab", "popUpSanitaryTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 648 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.entertainment)) {
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
_global.game.interface_.getLevelInterface().removeArrow();
if (_global.helpHint) {
if (_global.game.LevelClip.tutorialFlow > 0) {
if (_global.game.LevelClip.tutorialFlow == 6) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn31";
}
}
}
this._parent.gotoAndStop("entertainment");
}
}
on (press) {
if (!_global.game.LevelClip.campBuilding) {
_global.game.LevelClip.campBuilding = true;
_global.game.LevelClip.roadBuilding = false;
_global.game.LevelClip.startBuildingRoad = false;
_global.game.LevelClip.clearTempRoadClips();
_global.game.LevelClip.mouse.clip.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpEntertainmentTab", "popUpEntertainmentTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 653 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("basicTent");
_global.game.interface_.getLevelInterface().setValues(Constants.basicTent, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.basicTent);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 655 MovieClip Frame 1
stop();
Symbol 655 MovieClip Frame 3
stop();
Symbol 657 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("largeTent");
_global.game.interface_.getLevelInterface().setValues(Constants.largeTent, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.largeTent);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 659 MovieClip Frame 1
stop();
Symbol 659 MovieClip Frame 3
stop();
Symbol 661 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("familyTent");
_global.game.interface_.getLevelInterface().setValues(Constants.familyTent, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.familyTent);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPointsDemo", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 663 MovieClip Frame 1
stop();
Symbol 663 MovieClip Frame 3
stop();
Symbol 665 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("hugeTent");
_global.game.interface_.getLevelInterface().setValues(Constants.hugeTent, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.hugeTent);
_global.helpHint = false;
if (_global.game.LevelClip.currentPopUp == 8) {
_global.game.interface_.getLevelInterface().currentBtn = "shake";
_global.helpHint = true;
}
}
_global.game.interface_.getLevelInterface().removeArrow(this);
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 667 MovieClip Frame 1
stop();
Symbol 667 MovieClip Frame 3
stop();
Symbol 669 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("normalTent");
_global.game.interface_.getLevelInterface().setValues(Constants.normalCaravanSpot, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.normalCaravanSpot);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 671 MovieClip Frame 1
stop();
Symbol 671 MovieClip Frame 3
stop();
Symbol 673 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("bigCaravan");
_global.game.interface_.getLevelInterface().setValues(Constants.bigCaravanSpot, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.bigCaravanSpot);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 675 MovieClip Frame 1
stop();
Symbol 675 MovieClip Frame 3
stop();
Symbol 677 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("motorHome");
_global.game.interface_.getLevelInterface().setValues(Constants.motorHomeSpot, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.motorHomeSpot);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 679 MovieClip Frame 1
stop();
Symbol 679 MovieClip Frame 3
stop();
Symbol 681 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("bigMotorHome");
_global.game.interface_.getLevelInterface().setValues(Constants.bigMotorHomeSpot, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.bigMotorHomeSpot);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 683 MovieClip Frame 1
stop();
Symbol 683 MovieClip Frame 3
stop();
Symbol 685 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("basicBungalow");
_global.game.interface_.getLevelInterface().setValues(Constants.basicBungalow, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.basicBungalow);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 687 MovieClip Frame 1
stop();
Symbol 687 MovieClip Frame 3
stop();
Symbol 689 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("bigBungalow");
_global.game.interface_.getLevelInterface().setValues(Constants.bigBungalow, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.bigBungalow);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 691 MovieClip Frame 1
stop();
Symbol 691 MovieClip Frame 3
stop();
Symbol 693 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("villaBungalow");
_global.game.interface_.getLevelInterface().setValues(Constants.villaBungalow, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.villaBungalow);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 695 MovieClip Frame 1
stop();
Symbol 695 MovieClip Frame 3
stop();
Symbol 697 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("unmovableCaravans");
_global.game.interface_.getLevelInterface().setValues(Constants.normalUnmovableCaravan, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.normalUnmovableCaravan);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 699 MovieClip Frame 1
stop();
Symbol 699 MovieClip Frame 3
stop();
Symbol 701 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("unmuvBigCaravan");
_global.game.interface_.getLevelInterface().setValues(Constants.bigUnmovableCaravan, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.bigUnmovableCaravan);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 703 MovieClip Frame 1
stop();
Symbol 703 MovieClip Frame 3
stop();
Symbol 707 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
this._parent.gotoAndPlay("start");
}
}
Symbol 762 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.road)) {
_global.game.LevelClip.campBuilding = false;
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
if (_global.helpHint) {
if (_global.game.LevelClip.tutorialFlow > 0) {
if (_global.game.LevelClip.tutorialFlow == 7) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn50";
} else if (_global.game.LevelClip.tutorialFlow == 8) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn51";
}
}
}
this._parent.gotoAndStop("roads");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpRoadTab", "popUpRoadTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 763 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.sanitary)) {
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
if (_global.helpHint) {
if (_global.game.LevelClip.tutorialFlow > 0) {
if (_global.game.LevelClip.tutorialFlow == 2) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn25";
} else if (_global.game.LevelClip.tutorialFlow == 3) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn29";
} else if (_global.game.LevelClip.tutorialFlow == 4) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn27";
} else if (_global.game.LevelClip.tutorialFlow == 5) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn24";
}
}
}
this._parent.gotoAndStop("sanitary");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
if (!_global.game.LevelClip.campBuilding) {
_global.game.LevelClip.campBuilding = true;
_global.game.LevelClip.roadBuilding = false;
_global.game.LevelClip.startBuildingRoad = false;
_global.game.LevelClip.clearTempRoadClips();
_global.game.LevelClip.mouse.clip.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpSanitaryTab", "popUpSanitaryTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 764 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.entertainment)) {
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
if (_global.helpHint) {
if (_global.game.LevelClip.tutorialFlow > 0) {
if (_global.game.LevelClip.tutorialFlow == 6) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn31";
}
}
}
this._parent.gotoAndStop("entertainment");
}
}
on (press) {
if (!_global.game.LevelClip.campBuilding) {
_global.game.LevelClip.campBuilding = true;
_global.game.LevelClip.roadBuilding = false;
_global.game.LevelClip.startBuildingRoad = false;
_global.game.LevelClip.clearTempRoadClips();
_global.game.LevelClip.mouse.clip.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpEntertainmentTab", "popUpEntertainmentTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 769 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
if (_global.game.LevelClip.receptionObject.getType() == Constants.standardReception) {
_global.game.LevelClip.buildReception(Constants.normalReception);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 771 MovieClip Frame 1
stop();
Symbol 771 MovieClip Frame 3
stop();
Symbol 773 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (!this.locked) {
this.gotoAndStop(2);
if (_global.game.LevelClip.receptionObject.getType() == Constants.normalReception) {
_global.game.LevelClip.buildReception(Constants.bigReception);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 775 MovieClip Frame 1
stop();
Symbol 775 MovieClip Frame 3
stop();
Symbol 791 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.road)) {
_global.game.LevelClip.campBuilding = false;
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
this._parent.gotoAndStop("roads");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpRoadTab", "popUpRoadTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 796 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
this._parent.gotoAndStop("dirtRoad");
this._parent._parent._parent.cancelConstaruction();
if (!_global.game.LevelClip.roadBuilding) {
_global.game.LevelClip.roadBuilding = true;
}
this._parent.visitors.text = "";
this._parent.rent.text = "";
this._parent.costs.text = 2;
this._parent.tob.text = 1;
_global.game.LevelClip.roadLinkID = "dirt";
_global.game.LevelClip.mouse.clip.removeMovieClip();
_global.game.LevelClip.mouse.clip = _global.game.LevelClip.attachMovie("roadIcon_mc", "roadIcon_mc", _global.game.LevelClip.depthCtrl.mouseDepth, {_x:_xmouse, _y:_ymouse});
_global.game.LevelClip.mouse.clip.gotoAndStop(_global.game.LevelClip.roadLinkID);
_global.game.LevelClip.mouse.road = true;
startDrag (_global.game.LevelClip.mouse.clip, true);
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 798 MovieClip Frame 1
stop();
Symbol 798 MovieClip Frame 3
stop();
Symbol 800 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
this._parent.gotoAndStop("pavedRoad");
this._parent._parent._parent.cancelConstaruction();
if (!_global.game.LevelClip.roadBuilding) {
_global.game.LevelClip.roadBuilding = true;
}
this._parent.visitors.text = "";
this._parent.rent.text = "";
this._parent.costs.text = 10;
this._parent.tob.text = 1;
_global.game.LevelClip.roadLinkID = "paved";
_global.game.LevelClip.mouse.clip.removeMovieClip();
_global.game.LevelClip.mouse.clip = _global.game.LevelClip.attachMovie("roadIcon_mc", "roadIcon_mc", _global.game.LevelClip.depthCtrl.mouseDepth, {_x:_xmouse, _y:_ymouse});
_global.game.LevelClip.mouse.clip.gotoAndStop(_global.game.LevelClip.roadLinkID);
_global.game.LevelClip.mouse.road = true;
startDrag (_global.game.LevelClip.mouse.clip, true);
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 802 MovieClip Frame 1
stop();
Symbol 802 MovieClip Frame 3
stop();
Symbol 804 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("asphaltRoad");
this._parent._parent._parent.cancelConstaruction();
if (!_global.game.LevelClip.roadBuilding) {
_global.game.LevelClip.roadBuilding = true;
}
this._parent.visitors.text = "";
this._parent.rent.text = "";
this._parent.costs.text = 20;
this._parent.tob.text = 1;
_global.game.LevelClip.roadLinkID = "asfalt";
_global.game.LevelClip.mouse.clip.removeMovieClip();
_global.game.LevelClip.mouse.clip = _global.game.LevelClip.attachMovie("roadIcon_mc", "roadIcon_mc", _global.game.LevelClip.depthCtrl.mouseDepth, {_x:_xmouse, _y:_ymouse});
_global.game.LevelClip.mouse.clip.gotoAndStop(_global.game.LevelClip.roadLinkID);
_global.game.LevelClip.mouse.road = true;
startDrag (_global.game.LevelClip.mouse.clip, true);
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 806 MovieClip Frame 1
stop();
Symbol 806 MovieClip Frame 3
stop();
Symbol 808 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
this._parent.gotoAndStop("dirtParkingArea");
this._parent._parent._parent.cancelConstaruction();
_global.game.LevelClip.campBuilding = true;
_global.game.interface_.getLevelInterface().setValues(Constants.dirtParking, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.dirtParking);
}
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 810 MovieClip Frame 1
stop();
Symbol 810 MovieClip Frame 3
stop();
Symbol 812 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
this._parent.gotoAndStop("pavedParkingArea");
this._parent._parent._parent.cancelConstaruction();
_global.game.LevelClip.campBuilding = true;
_global.game.interface_.getLevelInterface().setValues(Constants.pavedParking, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.pavedParking);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 814 MovieClip Frame 1
stop();
Symbol 814 MovieClip Frame 3
stop();
Symbol 816 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("AsphaltParkingArea");
this._parent._parent._parent.cancelConstaruction();
_global.game.LevelClip.campBuilding = true;
_global.game.interface_.getLevelInterface().setValues(Constants.asphaltParking, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.asphaltParking);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("fullVersionText", "needPoints", 1000);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 818 MovieClip Frame 1
stop();
Symbol 818 MovieClip Frame 3
stop();
Symbol 820 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("cyclingPath");
this._parent._parent._parent.cancelConstaruction();
if (!_global.game.LevelClip.roadBuilding) {
_global.game.LevelClip.roadBuilding = true;
}
this._parent.visitors.text = "";
this._parent.rent.text = "";
this._parent.costs.text = 15;
this._parent.tob.text = 1;
_global.game.LevelClip.roadLinkID = "cyckling";
_global.game.LevelClip.mouse.clip.removeMovieClip();
_global.game.LevelClip.mouse.clip = _global.game.LevelClip.attachMovie("roadIcon_mc", "roadIcon_mc", _global.game.LevelClip.depthCtrl.mouseDepth, {_x:_xmouse, _y:_ymouse});
_global.game.LevelClip.mouse.clip.gotoAndStop(_global.game.LevelClip.roadLinkID);
_global.game.LevelClip.mouse.road = true;
startDrag (_global.game.LevelClip.mouse.clip, true);
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 822 MovieClip Frame 1
stop();
Symbol 822 MovieClip Frame 3
stop();
Symbol 850 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.road)) {
_global.game.LevelClip.campBuilding = false;
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
if (_global.helpHint) {
if (_global.game.LevelClip.tutorialFlow > 0) {
if (_global.game.LevelClip.tutorialFlow == 7) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn50";
} else if (_global.game.LevelClip.tutorialFlow == 8) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn51";
}
}
}
this._parent.gotoAndStop("roads");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpRoadTab", "popUpRoadTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 851 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.sanitary)) {
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
this._parent.gotoAndStop("sanitary");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
if (!_global.game.LevelClip.campBuilding) {
_global.game.LevelClip.campBuilding = true;
_global.game.LevelClip.roadBuilding = false;
_global.game.LevelClip.startBuildingRoad = false;
_global.game.LevelClip.clearTempRoadClips();
_global.game.LevelClip.mouse.clip.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpSanitaryTab", "popUpSanitaryTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 856 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("trashcan");
_global.game.interface_.getLevelInterface().setValues(Constants.trashcan, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.trashcan);
}
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 858 MovieClip Frame 1
stop();
Symbol 858 MovieClip Frame 3
stop();
Symbol 860 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("woodenToilet");
_global.game.interface_.getLevelInterface().setValues(Constants.woodenToilet, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.woodenToilet);
}
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 862 MovieClip Frame 1
stop();
Symbol 862 MovieClip Frame 3
stop();
Symbol 864 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("stoneToilet");
_global.game.interface_.getLevelInterface().setValues(Constants.stoneToilet, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.stoneToilet);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPointsDemo", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 866 MovieClip Frame 1
stop();
Symbol 866 MovieClip Frame 3
stop();
Symbol 868 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("stoneShower");
_global.game.interface_.getLevelInterface().setValues(Constants.stoneToiletShower, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.stoneToiletShower);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 870 MovieClip Frame 1
stop();
Symbol 870 MovieClip Frame 3
stop();
Symbol 872 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("bigSanitaryHouse");
_global.game.interface_.getLevelInterface().setValues(Constants.bigSanitaryHouse, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.bigSanitaryHouse);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 874 MovieClip Frame 1
stop();
Symbol 874 MovieClip Frame 3
stop();
Symbol 876 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("washingMachineUnit");
_global.game.interface_.getLevelInterface().setValues(Constants.washingMachineUnit, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.washingMachineUnit);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 878 MovieClip Frame 1
stop();
Symbol 878 MovieClip Frame 3
stop();
Symbol 880 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("allInOneSanitary");
_global.game.interface_.getLevelInterface().setValues(Constants.allInOneSanitary, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.allInOneSanitary);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 882 MovieClip Frame 1
stop();
Symbol 882 MovieClip Frame 3
stop();
Symbol 910 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.road)) {
_global.game.LevelClip.campBuilding = false;
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
if (_global.helpHint) {
if (_global.game.LevelClip.tutorialFlow > 0) {
if (_global.game.LevelClip.tutorialFlow == 7) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn50";
} else if (_global.game.LevelClip.tutorialFlow == 8) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn51";
}
}
}
this._parent.gotoAndStop("roads");
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpRoadTab", "popUpRoadTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 911 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.entertainment)) {
this._parent.infotext.needPoints.swapDepths(1000);
this._parent.infotext.needPoints.removeMovieClip();
this._parent.gotoAndStop("entertainment");
}
}
on (press) {
if (!_global.game.LevelClip.campBuilding) {
_global.game.LevelClip.campBuilding = true;
_global.game.LevelClip.roadBuilding = false;
_global.game.LevelClip.startBuildingRoad = false;
_global.game.LevelClip.clearTempRoadClips();
_global.game.LevelClip.mouse.clip.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpEntertainmentTab", "popUpEntertainmentTab", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 916 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("tableTennis");
_global.game.interface_.getLevelInterface().setValues(Constants.tableTennis, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.tableTennis);
}
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 918 MovieClip Frame 1
stop();
Symbol 918 MovieClip Frame 3
stop();
Symbol 920 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("playGround");
_global.game.interface_.getLevelInterface().setValues(Constants.playground, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.playground);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 922 MovieClip Frame 1
stop();
Symbol 922 MovieClip Frame 3
stop();
Symbol 924 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("bigPlayArena");
_global.game.interface_.getLevelInterface().setValues(Constants.bigPlayarena, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.bigPlayarena);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPointsDemo", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 926 MovieClip Frame 1
stop();
Symbol 926 MovieClip Frame 3
stop();
Symbol 928 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("smallSupermarket");
_global.game.interface_.getLevelInterface().setValues(Constants.smallSupermarket, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.smallSupermarket);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 930 MovieClip Frame 1
stop();
Symbol 930 MovieClip Frame 3
stop();
Symbol 932 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("bigSupermarket");
_global.game.interface_.getLevelInterface().setValues(Constants.bigSupermarket, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.bigSupermarket);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPointsDemo", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 934 MovieClip Frame 1
stop();
Symbol 934 MovieClip Frame 3
stop();
Symbol 936 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("bingoHall");
_global.game.interface_.getLevelInterface().setValues(Constants.bingoHall, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.bingoHall);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPointsDemo", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 938 MovieClip Frame 1
stop();
Symbol 938 MovieClip Frame 3
stop();
Symbol 940 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("restaurant");
_global.game.interface_.getLevelInterface().setValues(Constants.restaurant, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.restaurant);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 942 MovieClip Frame 1
stop();
Symbol 942 MovieClip Frame 3
stop();
Symbol 944 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("bar");
_global.game.interface_.getLevelInterface().setValues(Constants.bar, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.bar);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 946 MovieClip Frame 1
stop();
Symbol 946 MovieClip Frame 3
stop();
Symbol 948 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("arcade");
_global.game.interface_.getLevelInterface().setValues(Constants.arcade, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.arcade);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 950 MovieClip Frame 1
stop();
Symbol 950 MovieClip Frame 3
stop();
Symbol 952 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("disco");
_global.game.interface_.getLevelInterface().setValues(Constants.disco, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.disco);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 954 MovieClip Frame 1
stop();
Symbol 954 MovieClip Frame 3
stop();
Symbol 956 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("smallOutdoorPool");
_global.game.interface_.getLevelInterface().setValues(Constants.smallOutdoorPool, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.smallOutdoorPool);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 958 MovieClip Frame 1
stop();
Symbol 958 MovieClip Frame 3
stop();
Symbol 960 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("bigOutdoorPool");
_global.game.interface_.getLevelInterface().setValues(Constants.bigOutdoorPool, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.bigOutdoorPool);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 962 MovieClip Frame 1
stop();
Symbol 962 MovieClip Frame 3
stop();
Symbol 964 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("indoorPool");
_global.game.interface_.getLevelInterface().setValues(Constants.indoorPool, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.indoorPool);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 966 MovieClip Frame 1
stop();
Symbol 966 MovieClip Frame 3
stop();
Symbol 968 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("footballField");
_global.game.interface_.getLevelInterface().setValues(Constants.footballField, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.footballField);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 970 MovieClip Frame 1
stop();
Symbol 970 MovieClip Frame 3
stop();
Symbol 972 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("tennisField");
_global.game.interface_.getLevelInterface().setValues(Constants.tennisField, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.tennisField);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 974 MovieClip Frame 1
stop();
Symbol 974 MovieClip Frame 3
stop();
Symbol 976 Button
on (rollOver) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (rollOut) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
if (!this.locked) {
this.gotoAndStop(2);
this._parent.gotoAndStop("hugeWaterPark");
_global.game.interface_.getLevelInterface().setValues(Constants.hugeWaterPark, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.hugeWaterPark);
}
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().basics = false;
_global.helpHint = false;
_global.game.interface_.getLevelInterface().removeArrow(this);
}
} else {
this.katanec.gotoAndStop("clicked");
this._parent.infotext.attachMovie("needPoints", "needPoints", 1000);
}
}
}
on (release) {
if (!this.locked) {
this.gotoAndStop(3);
}
}
on (releaseOutside) {
if (!this.locked) {
this.gotoAndStop(1);
}
}
Symbol 978 MovieClip Frame 1
stop();
Symbol 978 MovieClip Frame 3
stop();
Symbol 1031 MovieClip Frame 1
stop();
_global.constructionMenu = this;
_global.constructionMenu.opened = 1;
gotoAndStop (2);
_global.game.LevelClip.campBuilding = true;
if (_global.helpHint) {
if (_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.tabs.entertainment") {
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, 130, 4);
} else if (_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.tabs.sanitary") {
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, 103, 4);
} else if (_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.tabs.road") {
_global.game.interface_.getLevelInterface().attachArrow(_global.constructionMenu, 77, 4);
}
}
Symbol 1031 MovieClip Frame 2
_global.constructionMenu.opened = 1;
var i = 11;
while (i <= 23) {
_global.game.interface_.getLevelInterface().checkLock(i, this["btn" + i]);
i++;
}
if (_global.helpHint) {
if ((_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.btn14") && (_global.game.LevelClip.currentPopUp < 6)) {
_global.game.interface_.getLevelInterface().attachArrow(this, _global.constructionMenu.btn14._x + 40, _global.constructionMenu.btn14._y);
}
}
Instance of Symbol 649 MovieClip "tabs" in Symbol 1031 MovieClip Frame 2
onClipEvent (load) {
}
Symbol 1031 MovieClip Frame 16
_global.constructionMenu.opened = 2;
if (_global.game.LevelClip.receptionObject.getType() == Constants.standardReception) {
this.gotoAndStop("mediumReception");
_global.game.interface_.getLevelInterface().setValues(Constants.normalReception, this);
}
if (_global.game.LevelClip.receptionObject.getType() >= Constants.normalReception) {
this.gotoAndStop("largeReception");
_global.game.interface_.getLevelInterface().setValues(Constants.bigReception, this);
}
var i = 2;
while (i <= 3) {
_global.game.interface_.getLevelInterface().checkLock(i, this["btn" + i]);
i++;
}
Symbol 1031 MovieClip Frame 20
_global.constructionMenu.opened = 3;
_global.game.interface_.getLevelInterface().checkLock(53, this.btn53);
_global.game.interface_.getLevelInterface().checkLock(55, this.btn55);
_global.game.interface_.getLevelInterface().checkLock(56, this.btn56);
if (_global.helpHint) {
if (_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.btn50") {
_global.game.interface_.getLevelInterface().attachArrow(this, _global.constructionMenu.btn50._x + 40, _global.constructionMenu.btn50._y);
} else if (_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.btn51") {
_global.game.interface_.getLevelInterface().attachArrow(this, _global.constructionMenu.btn51._x + 40, _global.constructionMenu.btn51._y);
}
_global.game.LevelClip.helpTips[35].hidePopUp();
_global.game.LevelClip.helpTips[33].hidePopUp();
}
Symbol 1031 MovieClip Frame 28
_global.constructionMenu.opened = 4;
var i = 24;
while (i <= 30) {
_global.game.interface_.getLevelInterface().checkLock(i, this["btn" + i]);
i++;
}
if (_global.helpHint) {
if (_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.btn24") {
_global.game.interface_.getLevelInterface().attachArrow(this, _global.constructionMenu.btn24._x + 40, _global.constructionMenu.btn24._y);
} else if (_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.btn25") {
_global.game.interface_.getLevelInterface().attachArrow(this, _global.constructionMenu.btn25._x + 40, _global.constructionMenu.btn25._y);
} else if (_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.btn27") {
_global.game.interface_.getLevelInterface().attachArrow(this, _global.constructionMenu.btn27._x + 40, _global.constructionMenu.btn27._y);
} else if (_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.btn29") {
_global.game.interface_.getLevelInterface().attachArrow(this, _global.constructionMenu.btn29._x + 40, _global.constructionMenu.btn29._y);
}
_global.game.LevelClip.helpTips[37].hidePopUp();
_global.game.LevelClip.helpTips[39].hidePopUp();
}
Symbol 1031 MovieClip Frame 36
_global.constructionMenu.opened = 5;
var i = 31;
while (i <= 46) {
_global.game.interface_.getLevelInterface().checkLock(i, this["btn" + i]);
i++;
}
if (_global.helpHint) {
if (_global.game.interface_.getLevelInterface().currentBtn == "_global.constructionMenu.btn31") {
_global.game.interface_.getLevelInterface().attachArrow(this, _global.constructionMenu.btn31._x + 40, _global.constructionMenu.btn31._y);
_global.game.LevelClip.helpTips[41].hidePopUp();
}
}
Symbol 1032 MovieClip Frame 1
stop();
opened = false;
Symbol 1032 MovieClip Frame 2
_global.game.interface_.levelInterface.slidingOutPlay();
Symbol 1032 MovieClip Frame 10
stop();
opened = true;
Instance of Symbol 1031 MovieClip "construction" in Symbol 1032 MovieClip Frame 10
onClipEvent (load) {
}
Symbol 1032 MovieClip Frame 11
this.construction.gotoAndStop("start");
_global.game.interface_.levelInterface.slidingInPlay();
Instance of Symbol 1031 MovieClip "construction" in Symbol 1032 MovieClip Frame 11
onClipEvent (load) {
}
Symbol 1034 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
_global.game.LevelClip.campBuilding = true;
this._parent.gotoAndStop("hedge");
_global.game.interface_.getLevelInterface().setValues(Constants.hedge, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.hedge);
}
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1036 MovieClip Frame 1
if ((_global.game.interface_.getLevelInterface().currentBtn == "_global.landscapeMenu.btn1") && (_global.helpHint)) {
_global.game.interface_.getLevelInterface().attachArrow(this._parent, this._x + 40, this._y);
}
stop();
Symbol 1036 MovieClip Frame 3
stop();
Symbol 1038 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
_global.game.LevelClip.campBuilding = true;
this._parent.gotoAndStop("tree");
_global.game.interface_.getLevelInterface().setValues(Constants.tree, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.tree);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1040 MovieClip Frame 1
stop();
Symbol 1040 MovieClip Frame 3
stop();
Symbol 1042 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
_global.game.LevelClip.campBuilding = true;
this._parent.gotoAndStop("smallPark");
_global.game.interface_.getLevelInterface().setValues(Constants.smallPark, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.smallPark);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1044 MovieClip Frame 1
stop();
Symbol 1044 MovieClip Frame 3
stop();
Symbol 1046 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
_global.game.LevelClip.campBuilding = true;
this._parent.gotoAndStop("mediumPark");
_global.game.interface_.getLevelInterface().setValues(Constants.mediumPark, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.mediumPark);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1048 MovieClip Frame 1
stop();
Symbol 1048 MovieClip Frame 3
stop();
Symbol 1050 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
_global.game.LevelClip.campBuilding = true;
this._parent.gotoAndStop("bigPark");
_global.game.interface_.getLevelInterface().setValues(Constants.bigPark, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.bigPark);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1052 MovieClip Frame 1
stop();
Symbol 1052 MovieClip Frame 3
stop();
Symbol 1054 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
this._parent.gotoAndStop("electricLamp");
_global.game.LevelClip.campBuilding = true;
_global.game.interface_.getLevelInterface().setValues(Constants.electricalLamp, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.electricalLamp);
}
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1056 MovieClip Frame 1
if ((_global.game.interface_.getLevelInterface().currentBtn == "_global.landscapeMenu.btn6") && (_global.helpHint)) {
_global.game.interface_.getLevelInterface().attachArrow(this._parent, this._x + 40, this._y);
}
stop();
Symbol 1056 MovieClip Frame 3
stop();
Symbol 1058 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
this._parent.gotoAndStop("firePlace");
_global.game.LevelClip.campBuilding = true;
_global.game.interface_.getLevelInterface().setValues(Constants.campFire, this._parent);
if (!_global.game.LevelClip.mouse.building) {
_global.game.interface_.getLevelInterface().buildFromInterfacePress(Constants.campFire);
}
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1060 MovieClip Frame 1
if ((_global.game.interface_.getLevelInterface().currentBtn == "_global.landscapeMenu.btn7") && (_global.helpHint)) {
_global.game.interface_.getLevelInterface().attachArrow(this._parent, this._x + 40, this._y);
}
stop();
Symbol 1060 MovieClip Frame 3
stop();
Symbol 1088 MovieClip Frame 1
_global.landscapeMenu = this;
stop();
Symbol 1089 MovieClip Frame 1
stop();
opened = false;
Symbol 1089 MovieClip Frame 2
_global.game.interface_.levelInterface.slidingOutPlay();
Symbol 1089 MovieClip Frame 10
stop();
opened = true;
Instance of Symbol 1088 MovieClip in Symbol 1089 MovieClip Frame 10
onClipEvent (load) {
}
Symbol 1089 MovieClip Frame 11
this.landScape.gotoAndStop("start");
_global.game.LevelClip.campBuilding = false;
_global.game.interface_.levelInterface.slidingInPlay();
Instance of Symbol 1088 MovieClip "landScape" in Symbol 1089 MovieClip Frame 11
onClipEvent (load) {
}
Symbol 1091 Button
on (rollOver) {
this.gotoAndStop(3);
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpBulduzer", "popUpBulduzer", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
this.gotoAndStop(1);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
_global.game.LevelClip.mouse.repair = false;
_global.game.LevelClip.mouse.fireman = false;
if (!_global.game.LevelClip.mouse.destroy) {
_global.game.LevelClip.mouse.clip = _global.game.LevelClip.attachMovie("buldozerImg", "buldozerImg", _global.game.LevelClip.depthCtrl.tempBuildnigDepth, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
startDrag (_global.game.LevelClip.mouse.clip, true);
_global.game.LevelClip.mouse.destroy = true;
}
}
}
on (release) {
this.gotoAndStop(3);
this._parent.gotoAndStop("bulldozer");
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1093 MovieClip Frame 1
stop();
Symbol 1093 MovieClip Frame 3
stop();
Symbol 1095 Button
on (rollOver) {
this.gotoAndStop(3);
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpRepair", "popUpRepair", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
this.gotoAndStop(1);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
_global.game.LevelClip.mouse.fireman = false;
_global.game.LevelClip.mouse.destroy = false;
if (!_global.game.LevelClip.mouse.repair) {
_global.game.LevelClip.mouse.clip = _global.game.LevelClip.attachMovie("repairTool", "repairTool", _global.game.LevelClip.depthCtrl.tempBuildnigDepth, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
startDrag (_global.game.LevelClip.mouse.clip, true);
_global.game.LevelClip.mouse.repair = true;
}
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
}
on (release) {
this.gotoAndStop(3);
this._parent.gotoAndStop("repairObjects");
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1097 MovieClip Frame 1
if ((_global.game.interface_.getLevelInterface().currentBtn == "_global.toolMenu.btn2") && (_global.helpHint)) {
_global.game.interface_.getLevelInterface().attachArrow(this._parent, this._x + 40, this._y);
}
stop();
Symbol 1097 MovieClip Frame 3
stop();
Symbol 1099 Button
on (rollOver) {
this.gotoAndStop(3);
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpAutomaticR", "popUpAutomaticR", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
this.gotoAndStop(1);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (press) {
this.gotoAndStop(2);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(3);
var level = _global.game.LevelClip;
if (!level.pause) {
var repairingCost = 0;
var i = 0;
while (i < level.clipsOnStage.length) {
if (level.clipsOnStage[i] instanceof mcs.Building) {
if (level.clipsOnStage[i].currentFrame == 3) {
repairingCost = repairingCost + ((100 - level.clipsOnStage[i].getState()) * (level.clipsOnStage[i].getCost() / 200));
}
}
i++;
}
if ((repairingCost > 0) && (repairingCost < level.budget)) {
var i = 0;
while (i < level.clipsOnStage.length) {
if (level.clipsOnStage[i] instanceof mcs.Building) {
if (level.clipsOnStage[i].currentFrame == 3) {
level.clipsOnStage[i].repair();
}
}
i++;
}
} else if (repairingCost > level.budget) {
var popUpDepth = _global.game.LevelClip.depthCtrl.infScreens;
while (_global.game.LevelClip.getInstanceAtDepth(popUpDepth++)) {
}
_global.game.LevelClip.attention.removeMovieClip();
var infPopUp = _global.game.LevelClip.attachMovie("repairMoney", "attention", popUpDepth, {_x:400, _y:300});
}
}
}
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1101 MovieClip Frame 1
stop();
Symbol 1101 MovieClip Frame 3
stop();
Symbol 1103 Button
on (rollOver) {
this.gotoAndStop(3);
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpCleanCamp", "popUpCleanCamp", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
this.gotoAndStop(1);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (press) {
this.gotoAndStop(2);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(3);
this._parent.gotoAndStop("cleanCamp");
var level = _global.game.LevelClip;
if (!level.pause) {
var cleaningCost = 0;
var i = 0;
while (i < level.trash.length) {
if (level.trash[i] instanceof mcs.Trash) {
cleaningCost = cleaningCost + level.trash[i].cleaningPrice;
}
i++;
}
if ((cleaningCost > 0) && (cleaningCost < level.budget)) {
var trashArray = level.trash.slice();
var i = 0;
while (i < trashArray.length) {
if (trashArray[i] instanceof mcs.Trash) {
trashArray[i].cleanTrash();
}
i++;
}
_global.game.sndCtrl.stopSound("vacum_cleaner");
_global.game.sndCtrl.playSound("vacum_cleaner", -1, level);
_global.game.sndCtrl.stopSound("broom_sweep", -1, trashArray[0]);
_global.game.sndCtrl.playSound("broom_sweep", -1, trashArray[0]);
level.trash.splice(0);
delete trashArray;
} else if (cleaningCost > level.budget) {
var popUpDepth = _global.game.LevelClip.depthCtrl.infScreens;
while (_global.game.LevelClip.getInstanceAtDepth(popUpDepth++)) {
}
_global.game.LevelClip.attention.removeMovieClip();
var infPopUp = _global.game.LevelClip.attachMovie("cleaningMoney", "attention", popUpDepth, {_x:400, _y:300});
}
}
}
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1105 MovieClip Frame 1
stop();
Symbol 1105 MovieClip Frame 3
stop();
Symbol 1107 Button
on (rollOver) {
this.gotoAndStop(3);
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpCleanCamp", "popUpCleanCamp", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
this.gotoAndStop(1);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this)) {
this.gotoAndStop(2);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
_global.game.LevelClip.mouse.destroy = false;
_global.game.LevelClip.mouse.repair = false;
if (!_global.game.LevelClip.mouse.fireman) {
_global.game.LevelClip.mouse.clip = _global.game.LevelClip.attachMovie("gorivatra", "gorivatra", _global.game.LevelClip.depthCtrl.tempBuildnigDepth, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
startDrag (_global.game.LevelClip.mouse.clip, true);
_global.game.LevelClip.mouse.fireman = true;
}
}
}
on (release) {
this.gotoAndStop(3);
this._parent.gotoAndStop("fireman");
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1109 MovieClip Frame 1
stop();
Symbol 1109 MovieClip Frame 3
stop();
Symbol 1131 MovieClip Frame 1
_global.toolMenu = this;
stop();
Symbol 1132 MovieClip Frame 1
stop();
opened = false;
Symbol 1132 MovieClip Frame 2
_global.game.interface_.levelInterface.slidingOutPlay();
Symbol 1132 MovieClip Frame 10
stop();
opened = true;
Instance of Symbol 1131 MovieClip in Symbol 1132 MovieClip Frame 10
onClipEvent (load) {
}
Symbol 1132 MovieClip Frame 11
this.tools.gotoAndStop("start");
_global.game.interface_.levelInterface.slidingInPlay();
Instance of Symbol 1131 MovieClip "tools" in Symbol 1132 MovieClip Frame 11
onClipEvent (load) {
}
Symbol 1134 Button
on (rollOver) {
this.gotoAndStop(3);
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpSelectLand", "popUpSelectLand", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
this.gotoAndStop(1);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (press) {
this.gotoAndStop(2);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (release) {
this.gotoAndStop(3);
if (!_global.game.LevelClip.gridOnStage) {
_global.game.LevelClip.attachGrid();
} else {
_global.game.LevelClip.removeGrid();
}
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1136 MovieClip Frame 1
stop();
Symbol 1136 MovieClip Frame 3
stop();
Symbol 1138 Button
on (rollOver) {
this.gotoAndStop(3);
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpLand", "popUpLand", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
this.gotoAndStop(1);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (press) {
this.gotoAndStop(2);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (release) {
this.gotoAndStop(3);
if (_global.game.LevelClip.gridOnStage && (_global.game.LevelClip.selection_)) {
_global.game.LevelClip.buyLand();
}
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1140 MovieClip Frame 1
stop();
Symbol 1140 MovieClip Frame 3
stop();
Symbol 1142 Button
on (rollOver) {
this.gotoAndStop(3);
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpDeselect", "popUpDeselect", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
this.gotoAndStop(1);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (press) {
this.gotoAndStop(2);
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (release) {
this.gotoAndStop(3);
if (_global.game.LevelClip.gridOnStage && (_global.game.LevelClip.selection_)) {
_global.game.LevelClip.resetBuying();
}
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1144 MovieClip Frame 1
stop();
Symbol 1144 MovieClip Frame 3
stop();
Symbol 1147 MovieClip Frame 1
stop();
Symbol 1148 MovieClip Frame 1
stop();
Symbol 1148 MovieClip Frame 2
_global.game.interface_.levelInterface.slidingOutPlay();
Symbol 1148 MovieClip Frame 10
stop();
Symbol 1148 MovieClip Frame 11
this.buyland.gotoAndStop("start");
_global.game.LevelClip.removeGrid();
_global.game.interface_.levelInterface.slidingInPlay();
Instance of Symbol 1147 MovieClip "buyland" in Symbol 1148 MovieClip Frame 11
onClipEvent (load) {
}
Instance of Symbol 1160 MovieClip "screen" in Symbol 1161 MovieClip [navigator] Frame 1
onClipEvent (load) {
this.swapDepths(17000);
this.useHandCursor = false;
var scrollStage = true;
this._x = _global.game.LevelClip.camera.x / 10;
this._y = _global.game.LevelClip.camera.y / 10;
_global.navigatorView = this;
}
on (keyPress "<Space>") {
scrollStage = !scrollStage;
}
on (press) {
if (!_global.helpHint) {
startDrag (this, true, 40, 30, 80, 90);
var oldX = 0;
var oldY = 0;
var stopDraging = false;
this.onEnterFrame = function () {
if ((((_parent._xmouse < 0) || (_parent._xmouse > 120)) || (_parent._ymouse < 0)) || (_parent._ymouse > 120)) {
this.stopDrag();
stopDraging = true;
} else if (stopDraging) {
startDrag (this, true, 40, 30, 80, 90);
stopDraging = false;
}
if (scrollStage) {
if ((this._x != oldX) || (this._y != oldY)) {
_global.game.LevelClip.setCameraPosition(this._x * 10, this._y * 10);
oldX = this._x;
oldY = this._y;
}
}
};
}
}
on (release) {
if (!_global.helpHint) {
this.stopDrag();
delete this.onEnterFrame;
_global.game.LevelClip.setCameraPosition(this._x * 10, this._y * 10);
}
}
on (releaseOutside) {
this.stopDrag();
delete this.onEnterFrame;
_global.game.LevelClip.setCameraPosition(this._x * 10, this._y * 10);
}
Symbol 1163 MovieClip Frame 1
stop();
Symbol 1163 MovieClip Frame 2
_global.game.interface_.levelInterface.slidingOutPlay();
Instance of Symbol 1162 MovieClip in Symbol 1163 MovieClip Frame 2
onClipEvent (load) {
_global.game.LevelClip.navigator = new com.Navigator(this.navigator);
}
Symbol 1163 MovieClip Frame 10
stop();
Symbol 1163 MovieClip Frame 11
_global.game.interface_.levelInterface.slidingInPlay();
Symbol 1171 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.btn)) {
if (!_global.game.LevelClip.pause) {
this._parent._parent._parent.collapseMain();
this._parent._parent.gotoAndPlay("collide");
}
}
}
Symbol 1172 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.btn)) {
if (!_global.game.LevelClip.pause) {
if (_global.helpHint) {
if (_global.game.LevelClip.tutorialFlow == 1) {
_global.game.interface_.getLevelInterface().currentBtn = "this.clip.mainMenu.collapseMenu.toolBtn";
_global.game.LevelClip.helpTips[45].showPopUp();
} else if (_global.game.LevelClip.tutorialFlow < 9) {
_global.game.interface_.getLevelInterface().currentBtn = "this.clip.mainMenu.collapseMenu.constructionBtn";
if (_global.game.LevelClip.tutorialFlow == 2) {
_global.game.LevelClip.helpTips[36].showPopUp();
} else if (_global.game.LevelClip.tutorialFlow == 5) {
_global.game.LevelClip.helpTips[38].showPopUp();
} else if (_global.game.LevelClip.tutorialFlow == 6) {
_global.game.LevelClip.helpTips[40].showPopUp();
} else if (_global.game.LevelClip.tutorialFlow == 7) {
_global.game.LevelClip.helpTips[34].showPopUp();
} else if (_global.game.LevelClip.tutorialFlow == 8) {
_global.game.LevelClip.helpTips[32].showPopUp();
}
} else {
_global.game.interface_.getLevelInterface().currentBtn = "this.clip.mainMenu.collapseMenu.landscapeBtn";
if (_global.game.LevelClip.tutorialFlow == 11) {
_global.game.LevelClip.helpTips[42].showPopUp();
}
if (_global.game.LevelClip.tutorialFlow == 10) {
_global.game.LevelClip.helpTips[43].showPopUp();
}
if (_global.game.LevelClip.tutorialFlow == 9) {
_global.game.LevelClip.helpTips[44].showPopUp();
}
}
}
this._parent._parent.gotoAndPlay("expand");
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
}
Symbol 1173 MovieClip Frame 1
stop();
Symbol 1173 MovieClip Frame 2
stop();
Symbol 1179 MovieClip Frame 1
stop();
Symbol 1179 MovieClip Frame 2
stop();
Symbol 1181 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.constructionBtn)) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.btn14";
if (_global.helpHint) {
if (_global.game.LevelClip.tutorialFlow > 0) {
if (_global.game.LevelClip.tutorialFlow == 6) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.tabs.entertainment";
_global.game.LevelClip.helpTips[41].showPopUp();
} else if (_global.game.LevelClip.tutorialFlow < 6) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.tabs.sanitary";
if (_global.game.LevelClip.tutorialFlow == 2) {
_global.game.LevelClip.helpTips[37].showPopUp();
} else if (_global.game.LevelClip.tutorialFlow == 5) {
_global.game.LevelClip.helpTips[39].showPopUp();
}
} else if (_global.game.LevelClip.tutorialFlow <= 8) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.constructionMenu.tabs.road";
if (_global.game.LevelClip.tutorialFlow == 7) {
_global.game.LevelClip.helpTips[35].showPopUp();
} else if (_global.game.LevelClip.tutorialFlow == 8) {
_global.game.LevelClip.helpTips[33].showPopUp();
}
}
}
}
_global.game.interface_.getLevelInterface().removeArrow(this);
this._parent._parent.expand(1);
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpConstruction", "popUpConstruction", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 1182 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.landscapeBtn)) {
this._parent._parent.expand(2);
if (_global.helpHint) {
if (_global.game.LevelClip.tutorialFlow == 11) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.landscapeMenu.btn1";
}
if (_global.game.LevelClip.tutorialFlow == 10) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.landscapeMenu.btn6";
}
if (_global.game.LevelClip.tutorialFlow == 9) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.landscapeMenu.btn7";
}
_global.game.LevelClip.helpTips[42].hidePopUp();
_global.game.LevelClip.helpTips[43].hidePopUp();
_global.game.LevelClip.helpTips[44].hidePopUp();
}
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpLandscape", "popUpLandscape", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 1183 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.toolBtn)) {
this._parent._parent.expand(3);
if (_global.helpHint) {
_global.game.interface_.getLevelInterface().currentBtn = "_global.toolMenu.btn2";
_global.game.LevelClip.helpTips[45].hidePopUp();
_global.game.interface_.getLevelInterface().removeArrow(this);
}
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpTools", "popUpTools", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 1184 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(this.mapBtn)) {
this._parent._parent.expand(4);
if (_global.game.LevelClip.currentPopUp == 9) {
_global.game.LevelClip.helpTips[10].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip, _global.game.LevelClip.campersArrive, 8000, 0);
utils.Delegate.callDelayed(_global.game.LevelClip, _global.game.LevelClip.campersArrive, 8000, 1);
utils.Delegate.callDelayed(_global.game.LevelClip, _global.game.LevelClip.campersArrive, 8000, 2);
}
_global.game.interface_.getLevelInterface().removeArrow(this);
if (_global.helpHint) {
_global.game.LevelClip.returnGame();
}
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpMap", "popUpMap", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 1185 Button
on (release) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
if (_global.game.interface_.getLevelInterface().checkButton(this.pauseBtn)) {
if (!_global.game.interface_.getLevelInterface().savegame) {
if (!_global.game.interface_.getLevelInterface().screen) {
if (!_global.game.LevelClip.pause) {
_global.game.LevelClip.pauseGame();
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
_global.game.LevelClip.attachMovie("paused", "paused", 45050, {_x:400, _y:300});
pausebtn.gotoAndStop(2);
} else {
_global.game.LevelClip.paused.removeMovieClip();
_global.game.LevelClip.continueGame();
pausebtn.gotoAndStop(1);
}
}
}
}
}
}
on (press) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpBuyLand", "popUpBuyLand", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 1187 Button
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this.receptionBtn)) {
_global.game.interface_.getLevelInterface().recerptionScreen();
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpReception", "popUpReception", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 1189 Button
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(this.advertiseBtn)) {
_global.game.interface_.getLevelInterface().advertisingScreen();
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpAdvert", "popUpAdvert", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 1190 Button
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
_global.game.interface_.getLevelInterface().statsScreen();
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
_global.game.LevelClip.btnClik = true;
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpStats", "popUpStats", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 1191 Button
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
_global.game.interface_.getLevelInterface().optionScreen();
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpGameOp", "popUpGameOp", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 1192 Button
on (press) {
if (_global.game.interface_.getLevelInterface().checkButton(undefined)) {
_global.game.interface_.getLevelInterface().helpScreen();
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
}
on (rollOver) {
_global.game.interface_.getLevelInterface().popUp = _global.game.LevelClip.attachMovie("popUpHelp", "popUpHelp", _global.game.LevelClip.depthCtrl.popUpOver, {_x:_global.game.LevelClip._xmouse, _y:_global.game.LevelClip._ymouse});
}
on (rollOut) {
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
Symbol 1193 MovieClip Frame 1
if (_global.game.interface_.getLevelInterface().currentBtn == "this.clip.mainMenu.collapseMenu.constructionBtn") {
_global.game.interface_.getLevelInterface().attachArrow(this, 81, 11);
} else if (_global.game.interface_.getLevelInterface().currentBtn == "this.clip.mainMenu.collapseMenu.toolBtn") {
_global.game.interface_.getLevelInterface().attachArrow(_global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu, 117, 56);
} else if (_global.game.interface_.getLevelInterface().currentBtn == "this.clip.mainMenu.collapseMenu.landscapeBtn") {
_global.game.interface_.getLevelInterface().attachArrow(_global.game.interface_.getLevelInterface().clip.mainMenu.collapseMenu, 106, 33);
}
if (_global.game.interface_.getLevelInterface().currentBtn == "this.clip.mainMenu.collapseMenu.btn.btn") {
_global.game.interface_.getLevelInterface().attachArrow(this.btn, 17, 9);
}
_global.pausebutton = pausebtn;
Symbol 1194 MovieClip Frame 1
stop();
this.collapseMenu.btn.gotoAndStop(2);
this._parent.menuOpened = false;
_global.game.LevelClip.campBuilding = false;
Instance of Symbol 1193 MovieClip "collapseMenu" in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
}
Symbol 1194 MovieClip Frame 2
_global.game.interface_.levelInterface.slidingOutPlay();
Instance of Symbol 1193 MovieClip "collapseMenu" in Symbol 1194 MovieClip Frame 2
onClipEvent (load) {
}
Symbol 1194 MovieClip Frame 11
stop();
this._parent.menuOpened = true;
Instance of Symbol 1193 MovieClip "collapseMenu" in Symbol 1194 MovieClip Frame 11
onClipEvent (load) {
}
Symbol 1194 MovieClip Frame 12
_global.game.interface_.levelInterface.slidingInPlay();
_global.game.LevelClip.campBuilding = false;
Instance of Symbol 1193 MovieClip "collapseMenu" in Symbol 1194 MovieClip Frame 20
onClipEvent (load) {
}
Symbol 1195 MovieClip [levelInterface] Frame 1
function btnClickHandler(i) {
if (btn == i) {
return(false);
}
this[findClip(btn)].gotoAndPlay("collapse");
return(true);
}
function collapseMain() {
this[findClip(btn)].gotoAndPlay("collapse");
btn = 0;
cancelConstaruction();
}
function expand(i) {
if (!_global.game.LevelClip.pause) {
_global.game.interface_.getLevelInterface().removeScreen();
if (btnClickHandler(i) && (menuOpened)) {
this[findClip(i)].gotoAndPlay("expand");
btn = i;
} else if ((!btnClickHandler(i)) && (menuOpened)) {
this[findClip(btn)].gotoAndPlay("collapse");
btn = 0;
}
cancelConstaruction();
if (_global.game.LevelClip.currentPopUp == 1) {
_global.game.LevelClip.helpTips[2].showPopUp();
}
}
}
function findClip(i) {
switch (i) {
case 1 :
return("constructions");
case 2 :
return("landscaper");
case 3 :
return("tools");
case 4 :
return("navigator");
case 5 :
return("buyLand");
}
return(undefined);
}
function unlockMediumReception() {
_global.katmedium.swapDepths(1000);
_global.katmedium.removeMovieClip();
_global.katmedium = undefined;
}
function unlockLargeReception() {
_global.katbig.swapDepths(1000);
_global.katbig.removeMovieClip();
_global.katbig = undefined;
}
function cancelConstaruction() {
_global.game.LevelClip.campBuilding = false;
_global.game.LevelClip.roadBuilding = false;
_global.game.LevelClip.startBuildingRoad = false;
_global.game.LevelClip.clearTempRoadClips();
_global.game.LevelClip.mouse.building = false;
_global.game.LevelClip.mouse.clip.removeMovieClip();
_global.game.LevelClip.building.clip.removeMovieClip();
_global.game.LevelClip.building = undefined;
}
stop();
var btn = 0;
var menuOpened = false;
Symbol 1204 Button
on (press) {
this.gotoAndStop(2);
_global.game.screenOnTop = false;
_global.game.LevelClip.continueGame();
_global.game.interface_.getLevelInterface().removeScreen();
}
Symbol 1205 MovieClip Frame 1
stop();
Symbol 1205 MovieClip Frame 2
stop();
Symbol 1244 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
if (this._parent.addChecked && (this._parent.groupChecked)) {
var advertisement = _global.game.LevelClip.publishAdvertisement({type:this._parent.type, group:this._parent.group});
_global.game.LevelClip.changeBudget(-this._parent.getAdvertisingCost());
this._parent.budget.text = Math.round(_global.game.LevelClip.budget);
this._parent.setMyText(advertisement.getAdvertisementText());
this._parent.published = true;
}
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1246 MovieClip Frame 1
stop();
Symbol 1246 MovieClip Frame 3
stop();
Symbol 1258 MovieClip Frame 1
stop();
Instance of Symbol 1255 MovieClip in Symbol 1258 MovieClip Frame 1
on (press) {
this._parent._parent.checkAdd(this._parent);
}
Symbol 1258 MovieClip Frame 2
stop();
Symbol 1259 MovieClip Frame 1
stop();
Instance of Symbol 1255 MovieClip in Symbol 1259 MovieClip Frame 1
on (press) {
if (this._parent._parent.canChek) {
this._parent.gotoAndStop(2);
this._parent._parent.groupChecked = true;
this._parent._parent.group = 0;
}
}
Instance of Symbol 1255 MovieClip in Symbol 1259 MovieClip Frame 1
on (press) {
if (this._parent._parent.canChek) {
this._parent.gotoAndStop(3);
this._parent._parent.groupChecked = true;
this._parent._parent.group = 1;
}
}
Instance of Symbol 1255 MovieClip in Symbol 1259 MovieClip Frame 1
on (press) {
if (this._parent._parent.canChek) {
this._parent.gotoAndStop(4);
this._parent._parent.groupChecked = true;
this._parent._parent.group = 2;
}
}
Symbol 1259 MovieClip Frame 2
stop();
Symbol 1259 MovieClip Frame 3
stop();
Symbol 1259 MovieClip Frame 4
stop();
Symbol 1277 MovieClip Frame 1
stop();
Symbol 1277 MovieClip Frame 2
stop();
Symbol 1278 MovieClip [advertisingScreen] Frame 1
function checkAdd(_add) {
if (canChek) {
var _local3 = 1;
while (_local3 <= 4) {
if (this["add" + _local3] == _add) {
type = _local3;
break;
}
_local3++;
}
if (addsChek[type - 1]) {
var _local2 = 1;
while (_local2 <= 4) {
if (_local2 != type) {
this["add" + _local2].gotoAndStop(1);
}
_local2++;
}
_add.gotoAndStop(2);
addChecked = true;
advertCost.text = getAdvertisingCost();
compAdvert.text = "";
setCompetitionText();
} else {
type = 0;
}
}
}
function setMyText(txt) {
myAdvert.text = txt;
myAdvertScroll.btnUpmc.btnUp.onPress = function () {
this._parent.onEnterFrame = function () {
this._parent._parent.myAdvert.scroll--;
};
};
myAdvertScroll.btnUpmc.btnUp.onRelease = function () {
delete this._parent.onEnterFrame;
};
myAdvertScroll.btnUpmc.btnUp.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
};
myAdvertScroll.btnDownmc.btnDown.onPress = function () {
this._parent.onEnterFrame = function () {
this._parent._parent.myAdvert.scroll++;
};
};
myAdvertScroll.btnDownmc.btnDown.onRelease = function () {
delete this._parent.onEnterFrame;
};
myAdvertScroll.btnDownmc.btnDown.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
};
}
function setCompetitionText() {
var _local3 = 0;
while (_local3 < _global.game.LevelClip.oposingCamp.length) {
if (_global.game.LevelClip.oposingCamp[_local3].media == type) {
if (compTexts[_local3] == undefined) {
compTexts[_local3] = _global.game.LevelClip.oposingCamp[_local3].getAdvertisementText() + newline;
}
compAdvert.text = compAdvert.text + compTexts[_local3];
compAdvertScroll.btnUpmc.btnUp.onPress = function () {
this._parent.onEnterFrame = function () {
this._parent._parent.compAdvert.scroll--;
};
};
compAdvertScroll.btnUpmc.btnUp.onRelease = function () {
delete this._parent.onEnterFrame;
};
compAdvertScroll.btnUpmc.btnUp.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
};
compAdvertScroll.btnDownmc.btnDown.onPress = function () {
this._parent.onEnterFrame = function () {
this._parent._parent.compAdvert.scroll++;
};
};
compAdvertScroll.btnDownmc.btnDown.onRelease = function () {
delete this._parent.onEnterFrame;
};
compAdvertScroll.btnDownmc.btnDown.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
};
}
_local3++;
}
}
function getAdvertisingCost() {
switch (type) {
case 1 :
return(50);
case 2 :
return(300);
case 3 :
return(100);
case 4 :
return(500);
}
return(0);
}
budget.text = Math.round(_global.game.LevelClip.budget);
myAdvert.mouseWheelEnabled = true;
compAdvert.mouseWheelEnabled = true;
var addChecked = false;
var groupChecked = false;
var canChek = false;
var type = 0;
var group = -1;
var addsChek = [false, false, false, false];
var compTexts = new Array();
var day = Math.ceil(_global.game.LevelClip.clock.toSeconds() / _global.game.LevelClip.daynightLasting);
var published = false;
xclose.onPress = function () {
this.gotoAndStop(2);
_global.game.screenOnTop = false;
if (this._parent.published) {
if (_global.game.LevelClip.advertisedPopups == 0) {
_global.game.LevelClip.advertisedPopups++;
_global.game.LevelClip.helpTips[47].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[47], _global.game.LevelClip.helpTips[47].hidePopUp, 10000);
} else if (_global.game.LevelClip.advertisedPopups == 1) {
_global.game.LevelClip.advertisedPopups++;
_global.game.LevelClip.helpTips[48].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[48], _global.game.LevelClip.helpTips[48].hidePopUp, 10000);
} else if (_global.game.LevelClip.advertisedPopups == 2) {
_global.game.LevelClip.advertisedPopups++;
_global.game.LevelClip.helpTips[49].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[49], _global.game.LevelClip.helpTips[49].hidePopUp, 10000);
} else if (_global.game.LevelClip.advertisedPopups == 3) {
_global.game.LevelClip.advertisedPopups++;
_global.game.LevelClip.helpTips[50].showPopUp();
utils.Delegate.callDelayed(_global.game.LevelClip.helpTips[50], _global.game.LevelClip.helpTips[50].hidePopUp, 10000);
}
}
_global.game.LevelClip.continueGame();
_global.game.interface_.getLevelInterface().removeScreen();
};
switch (_global.game.LevelClip.receptionObject.getType()) {
case Constants.standardReception :
canChek = false;
addsChek = [false, false, false, false];
this.scrchek.gotoAndStop(1);
this.scradd1.gotoAndStop(1);
this.scradd2.gotoAndStop(1);
this.scradd3.gotoAndStop(1);
this.scradd4.gotoAndStop(1);
break;
case Constants.normalReception :
canChek = true;
addsChek = [true, false, true, false];
this.scrchek.gotoAndStop(2);
this.scradd1.gotoAndStop(2);
this.scradd2.gotoAndStop(1);
this.scradd3.gotoAndStop(2);
this.scradd4.gotoAndStop(1);
break;
case Constants.bigReception :
canChek = true;
addsChek = [true, true, true, true];
this.scrchek.gotoAndStop(2);
this.scradd1.gotoAndStop(2);
this.scradd2.gotoAndStop(2);
this.scradd3.gotoAndStop(2);
this.scradd4.gotoAndStop(2);
}
Symbol 1310 MovieClip Frame 1
var Map = map;
Map.attachBitmap(_global.game.LevelClip.background.getMap(), 0);
Map._xscale = 10;
Map._yscale = 10;
Symbol 1319 MovieClip [complainsScreen] Frame 1
function scrollHolder(x, range) {
if (this.objHolder._height > maskHeight) {
this.objHolder._y = y0 - (((this.objHolder._height - maskHeight) * x) / range);
}
}
function attachRows() {
var _local4 = 0;
while (_local4 < level.camperGroups.length) {
var _local3 = level.camperGroups[_local4];
if (_local3.getComplainText() != "") {
rowNum++;
this.objHolder.attachMovie("complainsRow", "complainsRow" + counter, 100 + ((this.objHolder.getNextHighestDepth() > 0) ? (this.objHolder.getNextHighestDepth()) : (this.objHolder.getNextHighestDepth() * -1)), {_x:0, _y:21.65 * counter});
this.objHolder["complainsRow" + counter].point = this.mapa.attachMovie("objPoint", "objPoint", 100 + ((this.mapa.getNextHighestDepth() > 0) ? (this.mapa.getNextHighestDepth()) : (this.mapa.getNextHighestDepth() * -1)), {_x:_local3.campingObject.x / 10, _y:_local3.campingObject.y / 10});
this.objHolder["complainsRow" + counter].type.text = Constants.getObjectName(_local3.campingObject.getType());
this.objHolder["complainsRow" + counter].group.text = Constants.getGroupName(_local3.type);
this.objHolder["complainsRow" + counter].condition.text = Math.round(_local3.campingObject.getState());
this.objHolder["complainsRow" + counter].price.text = _local3.campingObject.getRent();
this.objHolder["complainsRow" + counter].object = _local3.campingObject;
this.objHolder["complainsRow" + counter].complain = _local3.getComplainText();
if (_local3 == _global.complainingGroup) {
rowToSelect = this.objHolder["complainsRow" + counter];
}
counter++;
}
_local4++;
}
}
function removeRows() {
var _local2 = 0;
while (_local2 < counter) {
this.objHolder["complainsRow" + _local2].point.swapDepths(10000);
this.objHolder["complainsRow" + _local2].point.removeMovieClip();
this.objHolder["complainsRow" + _local2].swapDepths(10000);
this.objHolder["complainsRow" + _local2].removeMovieClip();
_local2++;
}
}
function refreshList() {
removeRows();
selectedObject = undefined;
counter = 0;
attachRows();
this.scrollbar.sliderMc._x = 236;
this.scrollHolder(236 - this.scrollbar.sliderMc._x, 159);
}
function selectRow(row) {
var _local2 = 0;
while (_local2 < this.rowNum) {
this.objHolder["complainsRow" + _local2].point.gotoAndStop("unselected");
this.objHolder["complainsRow" + _local2].type.textColor = 16764672 /* 0xFFCF00 */;
this.objHolder["complainsRow" + _local2].group.textColor = 16764672 /* 0xFFCF00 */;
this.objHolder["complainsRow" + _local2].condition.textColor = 16764672 /* 0xFFCF00 */;
this.objHolder["complainsRow" + _local2].price.textColor = 16764672 /* 0xFFCF00 */;
this.objHolder["complainsRow" + _local2].dolar.textColor = 16764672 /* 0xFFCF00 */;
_local2++;
}
row.point.gotoAndStop("selected");
this.selectedObject = row.object;
row.type.textColor = 16777215 /* 0xFFFFFF */;
row.group.textColor = 16777215 /* 0xFFFFFF */;
row.condition.textColor = 16777215 /* 0xFFFFFF */;
row.price.textColor = 16777215 /* 0xFFFFFF */;
row.dolar.textColor = 16777215 /* 0xFFFFFF */;
this.setMyText(row.complain);
}
function setTutorial() {
if (level.stateFlag == 1) {
level.stateFlag = 2;
level.tutorialFlow = 1;
}
if (level.toiletFlag == 1) {
level.toiletFlag = 2;
level.tutorialFlow = 2;
}
if (level.trashFlag == 1) {
level.trashFlag = 2;
level.tutorialFlow = 5;
}
if (level.entertainmentFlag == 1) {
level.entertainmentFlag = 2;
level.tutorialFlow = 6;
}
if (level.roadsFlag == 1) {
level.roadsFlag = 2;
level.tutorialFlow = 7;
}
if (level.parkingFlag == 1) {
level.parkingFlag = 2;
level.tutorialFlow = 8;
}
if (level.campfireFlag == 1) {
level.campfireFlag = 2;
level.tutorialFlow = 9;
}
if (level.lampFlag == 1) {
level.lampFlag = 2;
level.tutorialFlow = 10;
}
if (level.landscapeFlag == 1) {
level.landscapeFlag = 2;
level.tutorialFlow = 11;
}
if (level.tutorialFlow > 0) {
level.startTutorial();
}
}
function setMyText(txt) {
complainsTxt.text = txt;
txtScrollbar.btnUpmc.btnUp.onPress = function () {
this._parent.onEnterFrame = function () {
this._parent._parent.complainsTxt.scroll--;
};
};
txtScrollbar.btnUpmc.btnUp.onRelease = function () {
delete this._parent.onEnterFrame;
};
txtScrollbar.btnUpmc.btnUp.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
};
txtScrollbar.btnDownmc.btnDown.onPress = function () {
this._parent.onEnterFrame = function () {
this._parent._parent.complainsTxt.scroll++;
};
};
txtScrollbar.btnDownmc.btnDown.onRelease = function () {
delete this._parent.onEnterFrame;
};
txtScrollbar.btnDownmc.btnDown.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
};
}
var y0 = this.objHolder._y;
maskHeight = 218;
var xmov = 1;
x_close.holder = this;
x_close.onPress = function () {
_global.game.screenOnTop = false;
_global.complainingGroup = undefined;
_global.game.LevelClip.continueGame();
if (_global.game.LevelClip.helpOnOff) {
level.tutorialFlow = 0;
this.holder.setTutorial();
}
_global.game.interface_.getLevelInterface().removeScreen();
this.gotoAndStop(2);
};
var selectedObject;
var level = _global.game.LevelClip;
var rowNum = 0;
var counter = 0;
var rowToSelect = undefined;
attachRows();
if (rowToSelect == undefined) {
rowToSelect = this.objHolder.complainsRow0;
}
if (counter > 0) {
selectRow(rowToSelect);
}
var mouseListener = new Object();
mouseListener.scrollObj = this;
mouseListener.onMouseWheel = function (delta, scrollTarget) {
if (this.scrollObj.objHolder._height > this.scrollObj.maskHeight) {
this.scrollObj.scrollbar.sliderMc._x = this.scrollObj.scrollbar.sliderMc._x + delta;
if (this.scrollObj.scrollbar.sliderMc._x > 236) {
this.scrollObj.scrollbar.sliderMc._x = 236;
}
if (this.scrollObj.scrollbar.sliderMc._x < 77) {
this.scrollObj.scrollbar.sliderMc._x = 77;
}
this.scrollObj.scrollHolder(236 - this.scrollObj.scrollbar.sliderMc._x, 159);
}
};
Mouse.addListener(mouseListener);
scrollbar.sliderMc.slider.onPress = function () {
if (this._parent._parent._parent.objHolder._height > this._parent._parent._parent.maskHeight) {
startDrag (this._parent._parent.sliderMc, false, 77, 88.1, 236, 88.1);
this._parent._parent.onEnterFrame = function () {
this._parent.scrollHolder(236 - this.sliderMc._x, 159);
};
}
};
scrollbar.sliderMc.slider.onRelease = function () {
this._parent._parent.sliderMc.stopDrag();
delete this._parent._parent.onEnterFrame;
};
scrollbar.sliderMc.slider.onReleaseOutside = function () {
this._parent._parent.sliderMc.stopDrag();
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnDownmc.btnDown.onPress = function () {
if (this._parent._parent._parent.objHolder._height > this._parent._parent._parent.maskHeight) {
this._parent._parent._parent.xmov = 1;
this._parent._parent.onEnterFrame = function () {
this.sliderMc._x = this.sliderMc._x - this._parent.xmov;
this._parent.xmov++;
if (this.sliderMc._x < 77) {
this.sliderMc._x = 77;
}
this._parent.scrollHolder(236 - this.sliderMc._x, 159);
};
}
};
scrollbar.btnDownmc.btnDown.onRelease = function () {
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnDownmc.btnDown.onReleaseOutside = function () {
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnUpmc.btnUp.onPress = function () {
if (this._parent._parent._parent.objHolder._height > this._parent._parent._parent.maskHeight) {
this._parent._parent._parent.xmov = 1;
this._parent._parent.onEnterFrame = function () {
this.sliderMc._x = this.sliderMc._x + this._parent.xmov;
this._parent.xmov++;
if (this.sliderMc._x > 236) {
this.sliderMc._x = 236;
}
this._parent.scrollHolder(236 - this.sliderMc._x, 159);
};
}
};
scrollbar.btnUpmc.btnUp.onRelease = function () {
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnUpmc.btnUp.onReleaseOutside = function () {
delete this._parent._parent.onEnterFrame;
};
complainsTxt.mouseWheelEnabled = true;
Symbol 1354 MovieClip [statsScreen] Frame 1
function setParameters(obj) {
var _local7 = 0;
var _local8 = _global.game.LevelClip.clipsOnStage.length;
var _local4 = 0;
while (_local4 < _local8) {
var _local3 = _global.game.LevelClip.clipsOnStage[_local4];
if (_local3.linkID == obj.linkID) {
var _local5 = ((_local3.kind == Constants.ENTERTAINMENT) ? (_local3.getDailyIncome()) : (_local3.getRent()));
_local7 = _local7 + int(_local5 * Math.ceil(_global.game.LevelClip.clock.toSeconds() / _global.game.LevelClip.daynightLasting));
}
_local4++;
}
this.title.text = Constants.getObjectName(obj.getType());
this.optTurnover.text = _local7;
this.relTurnover.text = ((_global.game.LevelClip.relizedTurnover[obj.linkID] != undefined) ? (Math.ceil(_global.game.LevelClip.relizedTurnover[obj.linkID])) : 0);
this.expCost.text = ((_global.game.LevelClip.exploitationCost[obj.linkID] != undefined) ? (Math.ceil(_global.game.LevelClip.exploitationCost[obj.linkID])) : 0);
}
function scrollHolder(x, range) {
if (this.objList.objHolder._height > maskHeight) {
this.objList.objHolder._y = y0 - (((this.objList.objHolder._height - maskHeight) * x) / range);
}
}
function attachRows() {
var _local2 = new Array();
var _local6 = 0;
while (_local6 < rowNum) {
var _local3 = level.clipsOnStage[_local6];
if (_local3 instanceof mcs.Building) {
if (((_local3.kind == Constants.UNMOVABLE_OBJECT) || (_local3.kind == Constants.RESERVATION_SPOT)) || (_local3.kind == Constants.ENTERTAINMENT)) {
if (_local2[_local3.getType()].checked == undefined) {
_local2[_local3.getType()] = new Object();
_local2[_local3.getType()].checked = true;
_local2[_local3.getType()].obj = _local3;
_local2[_local3.getType()].num = 1;
} else {
_local2[_local3.getType()].num++;
}
}
}
_local6++;
}
for (_local6 in _local2) {
if (_local2[_local6].obj != undefined) {
var _local3 = _local2[_local6].obj;
this.objList.objHolder.attachMovie("scrollingObjects", "scrollingObjects" + counter, 100 + ((this.objList.objHolder.getNextHighestDepth() > 0) ? (this.objList.objHolder.getNextHighestDepth()) : (this.objList.objHolder.getNextHighestDepth() * -1)), {_x:0, _y:counter * 16});
this.objList.objHolder["scrollingObjects" + counter].name.text = ((Constants.getObjectName(_local3.getType()) + " (") + _local2[_local6].num) + ")";
this.objList.objHolder["scrollingObjects" + counter].object = _local3;
counter++;
}
}
}
var textArray;
textArray = new Array();
textArray[0] = "Build entertainment objects that are used by different groups and your income will increase with a minimal investment. \n";
textArray[1] = "The asphalt roads will give you stable infrastructure even when storms and floods hit your camp. \n";
textArray[2] = "Dirt roads give you flexibility and really pay off in the short terms. \n";
textArray[3] = "Paved roads are best to use near the river as they give you financial flexibility and don\u2019t get damaged by flooding. \n";
textArray[4] = "Make sure you have free squares near objects used by older campers as this is necessary to give them access to your roads. \n";
textArray[5] = "Don\u2019t keep teenagers and older campers closer than 2 squares. \n";
textArray[6] = "The big park is a great investment if you want to save some space and if the adult campers and families are situated very close to each other. \n";
textArray[7] = "Building more hedges and trees around adult groups and families will make sure that their happiness will increase more rapidly. \n";
textArray[8] = "Be prepares and have plenty of trashcans and sanitary objects near adult and older campers. \n";
this.statsText.text = "";
if (!_global.game.LevelClip.btnClik) {
this.statsText.text = _global.game.LevelClip.statScrText;
} else {
this.statsText.text = textArray[int(Math.random() * textArray.length)];
}
var y0 = this.objList.objHolder._y;
maskHeight = 143;
var xmov = 1;
var selectedObject;
var level = _global.game.LevelClip;
var rowNum = level.clipsOnStage.length;
var counter = 0;
attachRows();
var turnover = 0;
for (var it in _global.game.LevelClip.relizedTurnover) {
turnover = turnover + _global.game.LevelClip.relizedTurnover[it];
}
var expences = 0;
for (var it in _global.game.LevelClip.exploitationCost) {
expences = expences + _global.game.LevelClip.exploitationCost[it];
}
var oldPercent = _global.game.LevelClip.percentInvestment;
if (_global.game.LevelClip.investment > 0) {
_global.game.LevelClip.percentInvestment = int(100 * ((turnover - expences) / _global.game.LevelClip.investment));
this.investedCapital.text = _global.game.LevelClip.percentInvestment;
}
this.totalInvestment.text = _global.game.LevelClip.investment;
this.progressTxt.text = _global.game.LevelClip.percentInvestment - oldPercent;
var mouseListener = new Object();
mouseListener.scrollObj = this;
mouseListener.onMouseWheel = function (delta, scrollTarget) {
if (this.scrollObj.objList.objHolder._height > this.scrollObj.maskHeight) {
this.scrollObj.scrollbar.sliderMc._x = this.scrollObj.scrollbar.sliderMc._x + delta;
if (this.scrollObj.scrollbar.sliderMc._x > 236) {
this.scrollObj.scrollbar.sliderMc._x = 236;
}
if (this.scrollObj.scrollbar.sliderMc._x < 140) {
this.scrollObj.scrollbar.sliderMc._x = 140;
}
this.scrollObj.scrollHolder(236 - this.scrollObj.scrollbar.sliderMc._x, 96);
}
};
Mouse.addListener(mouseListener);
scrollbar.sliderMc.slider.onPress = function () {
if (this._parent._parent._parent.objList.objHolder._height > this._parent._parent._parent.maskHeight) {
startDrag (this._parent._parent.sliderMc, false, 140, 88, 236, 88);
this._parent._parent.onEnterFrame = function () {
this._parent.scrollHolder(236 - this.sliderMc._x, 96);
};
}
};
scrollbar.sliderMc.slider.onRelease = function () {
this._parent._parent.sliderMc.stopDrag();
delete this._parent._parent.onEnterFrame;
};
scrollbar.sliderMc.slider.onReleaseOutside = function () {
this._parent._parent.sliderMc.stopDrag();
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnDownmc.btnDown.onPress = function () {
if (this._parent._parent._parent.objList.objHolder._height > this._parent._parent._parent.maskHeight) {
this._parent._parent._parent.xmov = 1;
this._parent._parent.onEnterFrame = function () {
this.sliderMc._x = this.sliderMc._x - this._parent.xmov;
this._parent.xmov++;
if (this.sliderMc._x < 140) {
this.sliderMc._x = 140;
}
this._parent.scrollHolder(236 - this.sliderMc._x, 96);
};
}
};
scrollbar.btnDownmc.btnDown.onRelease = function () {
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnDownmc.btnDown.onReleaseOutside = function () {
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnUpmc.btnUp.onPress = function () {
if (this._parent._parent._parent.objList.objHolder._height > this._parent._parent._parent.maskHeight) {
this._parent._parent._parent.xmov = 1;
this._parent._parent.onEnterFrame = function () {
this.sliderMc._x = this.sliderMc._x + this._parent.xmov;
this._parent.xmov++;
if (this.sliderMc._x > 236) {
this.sliderMc._x = 236;
}
this._parent.scrollHolder(236 - this.sliderMc._x, 96);
};
}
};
scrollbar.btnUpmc.btnUp.onRelease = function () {
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnUpmc.btnUp.onReleaseOutside = function () {
delete this._parent._parent.onEnterFrame;
};
Symbol 1360 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
var i = 0;
while (i < this._parent.counter) {
var obj = this._parent.objHolder["objRow" + i];
if (!isNaN(Number(obj.rent.text))) {
var num = Number(this._parent.objHolder["objRow" + i].rent.text);
this._parent.changeRent(obj.object, num);
}
i++;
}
this._parent.refreshList();
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1362 MovieClip Frame 1
stop();
Symbol 1362 MovieClip Frame 3
stop();
Symbol 1364 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
_global.game.interface_.getLevelInterface().complainsScreen();
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1366 MovieClip Frame 1
stop();
Symbol 1366 MovieClip Frame 3
stop();
Symbol 1367 Button
on (press) {
this.gotoAndStop(2);
_global.game.interface_.getLevelInterface().complainsScreen();
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1369 MovieClip Frame 1
stop();
Symbol 1369 MovieClip Frame 2
stop();
Symbol 1371 MovieClip [receptionScreen] Frame 1
function scrollHolder(x, range) {
if (this.objHolder._height > maskHeight) {
this.objHolder._y = y0 - (((this.objHolder._height - maskHeight) * x) / range);
}
}
function attachRows() {
var _local2 = new Array();
var _local6 = 0;
while (_local6 < rowNum) {
var _local3 = level.clipsOnStage[_local6];
if (_local3 instanceof mcs.Building) {
if ((_local3.kind == Constants.UNMOVABLE_OBJECT) || (_local3.kind == Constants.RESERVATION_SPOT)) {
if (_local3._people == 0) {
if (_local2[_local3.getType()].checked == undefined) {
_local2[_local3.getType()] = new Object();
_local2[_local3.getType()].checked = true;
_local2[_local3.getType()].obj = _local3;
_local2[_local3.getType()].num = 1;
} else {
_local2[_local3.getType()].num++;
}
}
}
}
_local6++;
}
for (_local6 in _local2) {
if (_local2[_local6].obj != undefined) {
var _local3 = _local2[_local6].obj;
this.objHolder.attachMovie("objRow", "objRow" + counter, 100 + ((this.objHolder.getNextHighestDepth() > 0) ? (this.objHolder.getNextHighestDepth()) : (this.objHolder.getNextHighestDepth() * -1)), {_x:269, _y:10 + (21.65 * counter)});
this.objHolder["objRow" + counter].point = this.mapa.attachMovie("objPoint", "objPoint", 100 + ((this.mapa.getNextHighestDepth() > 0) ? (this.mapa.getNextHighestDepth()) : (this.mapa.getNextHighestDepth() * -1)), {_x:_local3.x / 10, _y:_local3.y / 10});
this.objHolder["objRow" + counter].type.text = ((Constants.getObjectName(_local3.getType()) + " (") + _local2[_local6].num) + ")";
this.objHolder["objRow" + counter].size.text = _local3.numOfSquares;
this.objHolder["objRow" + counter].campers.text = _local3._visitors;
this.objHolder["objRow" + counter].condition.text = Math.round(_local3.getState());
this.objHolder["objRow" + counter].rent.text = _local3.getRent();
this.objHolder["objRow" + counter].object = _local3;
counter++;
}
}
}
function removeRows() {
var _local2 = 0;
while (_local2 < counter) {
this.objHolder["objRow" + _local2].point.swapDepths(10000);
this.objHolder["objRow" + _local2].point.removeMovieClip();
this.objHolder["objRow" + _local2].swapDepths(10000);
this.objHolder["objRow" + _local2].removeMovieClip();
_local2++;
}
}
function refreshList() {
removeRows();
selectedObject = undefined;
counter = 0;
attachRows();
this.scrollbar.sliderMc._x = 236;
this.scrollHolder(236 - this.scrollbar.sliderMc._x, 159);
}
function selectObject(type) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < rowNum) {
var _local1 = level.clipsOnStage[_local2];
if (_local1 instanceof mcs.Building) {
if (_local1.getType() == type) {
_local3.push(_local1);
}
}
_local2++;
}
selectedObject = _local3[int(Math.random() * _local3.length)];
}
function changeRent(object, rent) {
var _local2 = 0;
while (_local2 < rowNum) {
var _local1 = level.clipsOnStage[_local2];
if (_local1 instanceof mcs.Building) {
if (_local1.getType() == object.getType()) {
if (rent != _local1.getRent()) {
_local1.setRent(rent);
}
}
}
_local2++;
}
}
function selectRow(row) {
var _local2 = 0;
while (_local2 < this.rowNum) {
this.objHolder["objRow" + _local2].point.gotoAndStop("unselected");
this.objHolder["objRow" + _local2].type.textColor = 16764672 /* 0xFFCF00 */;
this.objHolder["objRow" + _local2].size.textColor = 16764672 /* 0xFFCF00 */;
this.objHolder["objRow" + _local2].campers.textColor = 16764672 /* 0xFFCF00 */;
this.objHolder["objRow" + _local2].condition.textColor = 16764672 /* 0xFFCF00 */;
this.objHolder["objRow" + _local2].rent.textColor = 16764672 /* 0xFFCF00 */;
this.objHolder["objRow" + _local2].dolar.textColor = 16764672 /* 0xFFCF00 */;
_local2++;
}
row.point.gotoAndStop("selected");
this.selectObject(row.object.getType());
row.type.textColor = 16777215 /* 0xFFFFFF */;
row.size.textColor = 16777215 /* 0xFFFFFF */;
row.campers.textColor = 16777215 /* 0xFFFFFF */;
row.condition.textColor = 16777215 /* 0xFFFFFF */;
row.rent.textColor = 16777215 /* 0xFFFFFF */;
row.dolar.textColor = 16777215 /* 0xFFFFFF */;
}
var y0 = this.objHolder._y;
maskHeight = 218;
var xmov = 1;
this.complaints.gotoAndStop(1);
var i = 0;
while (i < _global.game.LevelClip.camperGroups.length) {
var group = _global.game.LevelClip.camperGroups[i];
if (group.hasComplained()) {
this.complaints.gotoAndStop(2);
}
i++;
}
var selectedObject;
var level = _global.game.LevelClip;
var rowNum = level.clipsOnStage.length;
var counter = 0;
attachRows();
if (counter > 0) {
selectRow(this.objHolder.objRow0);
}
var mouseListener = new Object();
mouseListener.scrollObj = this;
mouseListener.onMouseWheel = function (delta, scrollTarget) {
if (this.scrollObj.objHolder._height > this.scrollObj.maskHeight) {
this.scrollObj.scrollbar.sliderMc._x = this.scrollObj.scrollbar.sliderMc._x + delta;
if (this.scrollObj.scrollbar.sliderMc._x > 236) {
this.scrollObj.scrollbar.sliderMc._x = 236;
}
if (this.scrollObj.scrollbar.sliderMc._x < 77) {
this.scrollObj.scrollbar.sliderMc._x = 77;
}
this.scrollObj.scrollHolder(236 - this.scrollObj.scrollbar.sliderMc._x, 159);
}
};
Mouse.addListener(mouseListener);
scrollbar.sliderMc.slider.onPress = function () {
if (this._parent._parent._parent.objHolder._height > this._parent._parent._parent.maskHeight) {
startDrag (this._parent._parent.sliderMc, false, 77, 88.1, 236, 88.1);
this._parent._parent.onEnterFrame = function () {
this._parent.scrollHolder(236 - this.sliderMc._x, 159);
};
}
};
scrollbar.sliderMc.slider.onRelease = function () {
this._parent._parent.sliderMc.stopDrag();
delete this._parent._parent.onEnterFrame;
};
scrollbar.sliderMc.slider.onReleaseOutside = function () {
this._parent._parent.sliderMc.stopDrag();
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnDownmc.btnDown.onPress = function () {
if (this._parent._parent._parent.objHolder._height > this._parent._parent._parent.maskHeight) {
this._parent._parent._parent.xmov = 1;
this._parent._parent.onEnterFrame = function () {
this.sliderMc._x = this.sliderMc._x - this._parent.xmov;
this._parent.xmov++;
if (this.sliderMc._x < 77) {
this.sliderMc._x = 77;
}
this._parent.scrollHolder(236 - this.sliderMc._x, 159);
};
}
};
scrollbar.btnDownmc.btnDown.onRelease = function () {
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnDownmc.btnDown.onReleaseOutside = function () {
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnUpmc.btnUp.onPress = function () {
if (this._parent._parent._parent.objHolder._height > this._parent._parent._parent.maskHeight) {
this._parent._parent._parent.xmov = 1;
this._parent._parent.onEnterFrame = function () {
this.sliderMc._x = this.sliderMc._x + this._parent.xmov;
this._parent.xmov++;
if (this.sliderMc._x > 236) {
this.sliderMc._x = 236;
}
this._parent.scrollHolder(236 - this.sliderMc._x, 159);
};
}
};
scrollbar.btnUpmc.btnUp.onRelease = function () {
delete this._parent._parent.onEnterFrame;
};
scrollbar.btnUpmc.btnUp.onReleaseOutside = function () {
delete this._parent._parent.onEnterFrame;
};
Symbol 1378 Button
on (press) {
this._parent._parent.selectRow(this);
}
Symbol 1379 MovieClip [objRow] Frame 1
rent.onSetFocus = function (oldFocus) {
var _local2 = 0;
while (_local2 < this._parent._parent._parent.rowNum) {
this._parent._parent._parent.objHolder["objRow" + _local2].point.gotoAndStop("unselected");
this._parent._parent._parent.objHolder["objRow" + _local2].type.textColor = 16764672 /* 0xFFCF00 */;
this._parent._parent._parent.objHolder["objRow" + _local2].size.textColor = 16764672 /* 0xFFCF00 */;
this._parent._parent._parent.objHolder["objRow" + _local2].campers.textColor = 16764672 /* 0xFFCF00 */;
this._parent._parent._parent.objHolder["objRow" + _local2].condition.textColor = 16764672 /* 0xFFCF00 */;
this._parent._parent._parent.objHolder["objRow" + _local2].rent.textColor = 16764672 /* 0xFFCF00 */;
this._parent._parent._parent.objHolder["objRow" + _local2].dolar.textColor = 16764672 /* 0xFFCF00 */;
_local2++;
}
this._parent.point.gotoAndStop("selected");
this._parent._parent._parent.selectedObject = this._parent.object;
this._parent.type.textColor = 16777215 /* 0xFFFFFF */;
this._parent.size.textColor = 16777215 /* 0xFFFFFF */;
this._parent.campers.textColor = 16777215 /* 0xFFFFFF */;
this._parent.condition.textColor = 16777215 /* 0xFFFFFF */;
this.textColor = 16777215 /* 0xFFFFFF */;
this._parent.dolar.textColor = 16777215 /* 0xFFFFFF */;
};
Symbol 1382 MovieClip [objPoint] Frame 1
stop();
Symbol 1382 MovieClip [objPoint] Frame 2
stop();
Symbol 1387 MovieClip [popUpStats] Frame 6
stop();
Symbol 1387 MovieClip [popUpStats] Frame 12
stop();
this.removeMovieClip();
Symbol 1390 MovieClip [popUpAdvert] Frame 6
stop();
Symbol 1390 MovieClip [popUpAdvert] Frame 12
stop();
this.removeMovieClip();
Symbol 1393 MovieClip [popUpConstructionTab] Frame 6
stop();
Symbol 1393 MovieClip [popUpConstructionTab] Frame 12
stop();
this.removeMovieClip();
Symbol 1396 MovieClip [popUpReceptionTab] Frame 6
stop();
Symbol 1396 MovieClip [popUpReceptionTab] Frame 12
stop();
this.removeMovieClip();
Symbol 1399 MovieClip [popUpRoadTab] Frame 6
stop();
Symbol 1399 MovieClip [popUpRoadTab] Frame 12
stop();
this.removeMovieClip();
Symbol 1402 MovieClip [popUpSanitaryTab] Frame 6
stop();
Symbol 1402 MovieClip [popUpSanitaryTab] Frame 12
stop();
this.removeMovieClip();
Symbol 1405 MovieClip [popUpEntertainmentTab] Frame 6
stop();
Symbol 1405 MovieClip [popUpEntertainmentTab] Frame 12
stop();
this.removeMovieClip();
Symbol 1408 MovieClip [popUpBuyLand] Frame 6
stop();
Symbol 1408 MovieClip [popUpBuyLand] Frame 12
stop();
this.removeMovieClip();
Symbol 1411 MovieClip [popUpSelectLand] Frame 6
stop();
Symbol 1411 MovieClip [popUpSelectLand] Frame 12
stop();
this.removeMovieClip();
Symbol 1414 MovieClip [popUpLand] Frame 6
stop();
Symbol 1414 MovieClip [popUpLand] Frame 12
stop();
Symbol 1417 MovieClip [popUpDeselect] Frame 6
stop();
Symbol 1417 MovieClip [popUpDeselect] Frame 12
stop();
this.removeMovieClip();
Symbol 1420 MovieClip [popUpHelp] Frame 6
stop();
Symbol 1420 MovieClip [popUpHelp] Frame 12
stop();
this.removeMovieClip();
Symbol 1423 MovieClip [popUpGameOp] Frame 6
stop();
Symbol 1423 MovieClip [popUpGameOp] Frame 12
stop();
this.removeMovieClip();
Symbol 1426 MovieClip [popUpReception] Frame 6
stop();
Symbol 1426 MovieClip [popUpReception] Frame 12
stop();
this.removeMovieClip();
Symbol 1429 MovieClip [popUpLandscape] Frame 6
stop();
Symbol 1429 MovieClip [popUpLandscape] Frame 12
stop();
Symbol 1432 MovieClip [popUpBulduzer] Frame 6
stop();
Symbol 1432 MovieClip [popUpBulduzer] Frame 12
stop();
this.removeMovieClip();
Symbol 1435 MovieClip [popUpRepair] Frame 6
stop();
Symbol 1435 MovieClip [popUpRepair] Frame 12
stop();
this.removeMovieClip();
Symbol 1438 MovieClip [popUpMap] Frame 6
stop();
Symbol 1438 MovieClip [popUpMap] Frame 12
stop();
this.removeMovieClip();
Symbol 1441 MovieClip [popUpAutomaticR] Frame 6
stop();
Symbol 1441 MovieClip [popUpAutomaticR] Frame 12
stop();
this.removeMovieClip();
Symbol 1444 MovieClip [popUpCleanCamp] Frame 6
stop();
Symbol 1444 MovieClip [popUpCleanCamp] Frame 12
stop();
this.removeMovieClip();
Symbol 1447 MovieClip [popUpConstruction] Frame 6
stop();
Symbol 1447 MovieClip [popUpConstruction] Frame 12
stop();
this.removeMovieClip();
Symbol 1450 MovieClip [popUpTools] Frame 6
stop();
Symbol 1450 MovieClip [popUpTools] Frame 12
stop();
this.removeMovieClip();
Symbol 1461 Button
on (press) {
_global.game.interface_.getLevelInterface().complainsScreen();
this.gotoAndPlay("hide");
}
Symbol 1462 MovieClip [complaints_clip] Frame 1
shown = false;
stop();
var complaints = 0;
var i = 0;
while (i < _global.game.LevelClip.camperGroups.length) {
var group = _global.game.LevelClip.camperGroups[i];
if (group.getComplainText() != "") {
complaints++;
}
i++;
}
compGuy.cmpNum.text = complaints;
Symbol 1462 MovieClip [complaints_clip] Frame 10
shown = true;
stop();
var complaints = 0;
var i = 0;
while (i < _global.game.LevelClip.camperGroups.length) {
var group = _global.game.LevelClip.camperGroups[i];
if (group.getComplainText() != "") {
complaints++;
}
i++;
}
compGuy.cmpNum.text = complaints;
Symbol 1468 Button
on (press) {
_global.game.interface_.getLevelInterface().statsScreen();
_global.game.LevelClip.btnClik = false;
this.gotoAndPlay("hide");
}
Symbol 1469 MovieClip [congratulation_clip] Frame 1
shown = false;
congradulationTxt._visible = false;
stop();
Symbol 1469 MovieClip [congratulation_clip] Frame 10
shown = true;
congradulationTxt._visible = true;
stop();
Symbol 1469 MovieClip [congratulation_clip] Frame 11
congradulationTxt._visible = false;
Symbol 1473 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_global.game.mode = "intro";
_global.game.playMode();
_global.game.RUSure = false;
this._parent.removeMovieClip();
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1475 MovieClip Frame 1
stop();
Symbol 1475 MovieClip Frame 3
stop();
Symbol 1522 MovieClip [helpScreen_mc] Frame 1
function scrollHolder(x, range) {
if (this.objHolder._height > maskHeight) {
this.objHolder._y = y0 - (((this.objHolder._height - maskHeight) * x) / range);
}
}
var y0 = this.objHolder._y;
maskHeight = 330;
var xmov = 1;
var currentMovie;
var pole = new Array();
var pole1 = new Array();
var linkID;
var linkid;
var i = 0;
var j = 0;
currentMovie = this.objHolder.attachMovie("help_text_mc", "help_text_mc", 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = "help_text_mc";
pole.push(currentMovie.linkID);
i = i + 1;
var mouseListener = new Object();
mouseListener.scrollObj = this;
mouseListener.onMouseWheel = function (delta, scrollTarget) {
if (this.scrollObj.objHolder._height > this.scrollObj.maskHeight) {
this.scrollObj.scrollBar.slider._x = this.scrollObj.scrollBar.slider._x + delta;
if (this.scrollObj.scrollBar.slider._x > 236) {
this.scrollObj.scrollBar.slider._x = 236;
}
if (this.scrollObj.scrollBar.slider._x < -41) {
this.scrollObj.scrollBar.slider._x = -41;
}
this.scrollObj.scrollHolder(236 - this.scrollObj.scrollBar.slider._x, 277);
}
};
Mouse.addListener(mouseListener);
scrollBar.slider.onPress = function () {
if (this._parent._parent.objHolder._height > this._parent._parent.maskHeight) {
startDrag (this, false, -41, 88.1, 236, 88.1);
this.onEnterFrame = function () {
this._parent._parent.scrollHolder(236 - this._parent.slider._x, 277);
};
}
};
scrollBar.slider.onRelease = function () {
this.stopDrag();
delete this.onEnterFrame;
};
scrollBar.slider.onReleaseOutside = function () {
this.stopDrag();
delete this.onEnterFrame;
};
scrollBar.btnDown.onPress = function () {
if (this._parent._parent.objHolder._height > this._parent._parent.maskHeight) {
this._parent.xmov = 1;
this._parent.onEnterFrame = function () {
this.slider._x = this.slider._x - this._parent.xmov;
this._parent.xmov++;
if (this.slider._x < -41) {
this.slider._x = -41;
}
this._parent.scrollHolder(236 - this.slider._x, 277);
};
}
};
scrollBar.btnDown.onRelease = function () {
delete this._parent.onEnterFrame;
};
scrollBar.btnDownmc.btnDown.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
};
scrollBar.btnUp.onPress = function () {
if (this._parent._parent.objHolder._height > this._parent._parent.maskHeight) {
this._parent.xmov = 1;
this._parent.onEnterFrame = function () {
this.slider._x = this.slider._x + this._parent.xmov;
this._parent.xmov++;
if (this.slider._x > 236) {
this.slider._x = 236;
}
this._parent.scrollHolder(236 - this.slider._x, 277);
};
}
};
scrollBar.btnUp.onRelease = function () {
delete this._parent.onEnterFrame;
};
scrollBar.btnUp.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
};
help_btn.onPress = function () {
scrollBar.slider._x = 236;
scrollHolder(236 - scrollBar.slider._x, 277);
currentMovie.removeMovieClip();
currentMovie = this._parent.objHolder.attachMovie("help_text_mc", "help_text_mc", 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = "help_text_mc";
pole.push(currentMovie.linkID);
i = i + 1;
};
play_game_btn.onPress = function () {
scrollBar.slider._x = 236;
scrollHolder(236 - scrollBar.slider._x, 277);
currentMovie.removeMovieClip();
currentMovie = this._parent.objHolder.attachMovie("playGame_text_mc", "playGame_text_mc", 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = "playGame_text_mc";
pole.push(currentMovie.linkID);
i = i + 1;
};
youda_camper_btn.onPress = function () {
scrollBar.slider._x = 236;
scrollHolder(236 - scrollBar.slider._x, 277);
currentMovie.removeMovieClip();
currentMovie = this._parent.objHolder.attachMovie("youdaCamper_text_mc", "youdaCamper_text_mc", 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = "youdaCamper_text_mc";
pole.push(currentMovie.linkID);
i = i + 1;
};
overview_map_btn.onPress = function () {
scrollBar.slider._x = 236;
scrollHolder(236 - scrollBar.slider._x, 277);
currentMovie.removeMovieClip();
currentMovie = this._parent.objHolder.attachMovie("overviewMap_text_mc", "overviewMap_text_mc", 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = "overviewMap_text_mc";
pole.push(currentMovie.linkID);
i = i + 1;
};
reception_btn.onPress = function () {
scrollBar.slider._x = 236;
scrollHolder(236 - scrollBar.slider._x, 277);
currentMovie.removeMovieClip();
currentMovie = this._parent.objHolder.attachMovie("reception_text_mc", "reception_text_mc", 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = "reception_text_mc";
pole.push(currentMovie.linkID);
i = i + 1;
};
campers.onPress = function () {
scrollBar.slider._x = 236;
scrollHolder(236 - scrollBar.slider._x, 277);
currentMovie.removeMovieClip();
currentMovie = this._parent.objHolder.attachMovie("campers_text_mc", "campers_text_mc", 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = "campers_text_mc";
pole.push(currentMovie.linkID);
i = i + 1;
};
prizes.onPress = function () {
scrollBar.slider._x = 236;
scrollHolder(236 - scrollBar.slider._x, 277);
currentMovie.removeMovieClip();
currentMovie = this._parent.objHolder.attachMovie("prizes_text_mc", "prizes_text_mc", 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = "prizes_text_mc";
pole.push(currentMovie.linkID);
i = i + 1;
};
advertising.onPress = function () {
scrollBar.slider._x = 236;
scrollHolder(236 - scrollBar.slider._x, 277);
currentMovie.removeMovieClip();
currentMovie = this._parent.objHolder.attachMovie("advertising_text_mc", "advertising_text_mc", 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = "advertising_text_mc";
pole.push(currentMovie.linkID);
i = i + 1;
};
complaints.onPress = function () {
scrollBar.slider._x = 236;
scrollHolder(236 - scrollBar.slider._x, 277);
currentMovie.removeMovieClip();
currentMovie = this._parent.objHolder.attachMovie("complaints_text_mc", "complaints_text_mc", 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = "complaints_text_mc";
pole.push(currentMovie.linkID);
i = i + 1;
};
stats.onPress = function () {
scrollBar.slider._x = 236;
scrollHolder(236 - scrollBar.slider._x, 277);
currentMovie.removeMovieClip();
currentMovie = this._parent.objHolder.attachMovie("stats_text_mc", "stats_text_mc", 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = "stats_text_mc";
pole.push(currentMovie.linkID);
i = i + 1;
};
back_btn.onPress = function () {
if (pole.length > 1) {
pole1.push(currentMovie.linkID);
currentMovie.removeMovieClip();
linkid = pole[pole.length - 2];
pole.splice(pole.length - 1, 1);
currentMovie = this._parent.objHolder.attachMovie(linkid, linkid, 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = linkid;
}
};
next_btn.onPress = function () {
if (pole1.length > 0) {
currentMovie.removeMovieClip();
linkid = pole1[pole1.length - 1];
pole1.splice(pole1.length - 1, 1);
currentMovie = this._parent.objHolder.attachMovie(linkid, linkid, 100 + this.objHolder.getNextHighestDepth(), {_x:0, _y:0});
currentMovie.linkID = linkid;
pole.push(currentMovie.linkID);
}
};
Symbol 1526 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
this._parent.gotoAndStop(2);
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1528 MovieClip Frame 1
stop();
Symbol 1528 MovieClip Frame 3
stop();
Symbol 1530 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
this._parent.gotoAndStop(3);
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1532 MovieClip Frame 1
stop();
Symbol 1532 MovieClip Frame 3
stop();
Symbol 1534 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
this._parent.gotoAndStop(4);
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1536 MovieClip Frame 1
stop();
Symbol 1536 MovieClip Frame 3
stop();
Symbol 1538 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
this._parent.gotoAndStop(5);
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1540 MovieClip Frame 1
stop();
Symbol 1540 MovieClip Frame 3
stop();
Symbol 1542 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
this._parent.gotoAndStop(6);
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1544 MovieClip Frame 1
stop();
Symbol 1544 MovieClip Frame 3
stop();
Symbol 1546 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
this._parent.gotoAndStop(8);
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1548 MovieClip Frame 1
stop();
Symbol 1548 MovieClip Frame 3
stop();
Symbol 1550 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
this._parent.gotoAndStop(9);
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1552 MovieClip Frame 1
stop();
Symbol 1552 MovieClip Frame 3
stop();
Symbol 1554 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
this._parent.gotoAndStop(10);
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1556 MovieClip Frame 1
stop();
Symbol 1556 MovieClip Frame 3
stop();
Symbol 1558 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
_global.game.screenOnTop = false;
_global.game.InstructionsMenu.removeMovieClip();
_global.game.LevelClip.continueGame();
_global.game.interface_.getLevelInterface().removeScreen();
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1560 MovieClip Frame 1
stop();
Symbol 1560 MovieClip Frame 3
stop();
Symbol 1612 MovieClip [instructions] Frame 1
x_close.onPress = function () {
this.gotoAndStop(2);
_global.game.screenOnTop = false;
_global.game.InstructionsMenu.removeMovieClip();
_global.game.LevelClip.continueGame();
_global.game.interface_.getLevelInterface().removeScreen();
};
Symbol 1612 MovieClip [instructions] Frame 2
stop();
Symbol 1612 MovieClip [instructions] Frame 3
stop();
Symbol 1612 MovieClip [instructions] Frame 4
stop();
Symbol 1612 MovieClip [instructions] Frame 5
stop();
Symbol 1612 MovieClip [instructions] Frame 6
stop();
Symbol 1612 MovieClip [instructions] Frame 7
stop();
Symbol 1612 MovieClip [instructions] Frame 8
stop();
Symbol 1612 MovieClip [instructions] Frame 9
stop();
Symbol 1612 MovieClip [instructions] Frame 10
stop();
Symbol 1618 Button
on (press) {
if (!_global.game.RUSure) {
_global.game.exitGame();
}
}
Symbol 1620 MovieClip Frame 1
stop();
Symbol 1620 MovieClip Frame 3
stop();
Symbol 1622 Button
on (press) {
if (!_global.game.RUSure) {
_global.game.interface_.getLevelInterface().saveScreen();
}
}
Symbol 1624 MovieClip Frame 1
stop();
Symbol 1624 MovieClip Frame 3
stop();
Symbol 1626 Button
on (press) {
if (!_global.game.RUSure) {
_global.game.interface_.getLevelInterface().helpScreen();
_global.game.interface_.getLevelInterface().popUp.removeMovieClip();
}
}
Symbol 1628 MovieClip Frame 1
stop();
Symbol 1628 MovieClip Frame 3
stop();
Symbol 1630 Button
on (press) {
if (!_global.game.RUSure) {
this.gotoAndStop(2);
_global.game.screenOnTop = false;
_global.game.LevelClip.continueGame();
_global.game.interface_.getLevelInterface().removeScreen();
}
}
Symbol 1632 MovieClip Frame 1
stop();
Symbol 1632 MovieClip Frame 3
stop();
Symbol 1639 MovieClip Frame 1
stop();
Symbol 1642 MovieClip Frame 1
stop();
Symbol 1645 MovieClip [optionScreen] Frame 1
function fmusicOn() {
if (_global.musicVolume == 0) {
tempBarMusic = lastMusicVolume;
}
_global.game.sndCtrl.musicOn();
_global.musicVolume = tempBarMusic;
musicScroll.slidermc._x = ((range / 100) * tempBarMusic) + 14.5;
}
function fmusicOff() {
_global.game.sndCtrl.musicOff();
tempBarMusic = 0;
lastMusicVolume = _global.musicVolume;
_global.musicVolume = tempBarMusic;
musicScroll.slidermc._x = 14.5;
}
function fxOn() {
if (_global.fxVolume == 0) {
tempBarSound = lastFxVolume;
}
_global.game.sndCtrl.fxOn();
_global.fxVolume = tempBarSound;
soundScroll.slidermc._x = ((range / 100) * tempBarSound) + 14.5;
}
function fxOff() {
_global.game.sndCtrl.fxOff();
tempBarSound = 0;
lastFxVolume = _global.fxVolume;
_global.fxVolume = tempBarSound;
soundScroll.slidermc._x = 14.5;
}
function musicVolume(vol) {
tempBarMusic = vol;
_global.musicVolume = tempBarMusic;
_global.game.sndCtrl.setMusicVolume(vol);
}
function fxVolume(vol) {
tempBarSound = vol;
_global.fxVolume = tempBarSound;
_global.game.sndCtrl.setSoundFXVolume(vol);
}
stop();
var musicScroll;
var slidermc;
var soundScroll;
var lastMusicVolume;
var lastFxVolume;
var range = 221.5;
var sndCtrl = _global.game.sndCtrl;
var tempBarMusic = _global.musicVolume;
var tempBarSound = _global.fxVolume;
musicScroll.slidermc._x = ((range / 100) * tempBarMusic) + 14.5;
soundScroll.slidermc._x = ((range / 100) * tempBarSound) + 14.5;
musicScroll.slidermc.slider.onPress = function () {
if (!_global.game.RUSure) {
startDrag (this._parent, false, 236, 88, 14.5, 88);
this._parent.onEnterFrame = function () {
this._parent._parent.musicVolume((musicScroll.slidermc._x - 14.5) / 2.215);
};
}
};
musicScroll.slidermc.slider.onRelease = function () {
delete this._parent.onEnterFrame;
this._parent.stopDrag();
};
musicScroll.slidermc.slider.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
this._parent.stopDrag();
};
musicScroll.btnDownmc.btnDown.onPress = function () {
if (!_global.game.RUSure) {
onEnterFrame = function () {
if ((this.tempBarMusic > 0) && (musicScroll.slidermc._x > 25.5)) {
this.tempBarMusic = this.tempBarMusic - 5;
musicScroll.slidermc._x = musicScroll.slidermc._x - 11;
this.musicVolume(this.tempBarMusic);
} else if (((this.tempBarMusic > 0) && (musicScroll.slidermc._x <= 25.5)) && ((this.tempBarMusic > 0) && (musicScroll.slidermc._x >= 14.5))) {
this.tempBarMusic = 0;
musicScroll.slidermc._x = 14.5;
this.musicVolume(this.tempBarMusic);
}
};
if (this.tempBarMusic == 0) {
}
}
};
musicScroll.btnUpmc.btnUp.onPress = function () {
if (!_global.game.RUSure) {
onEnterFrame = function () {
if ((this.tempBarMusic < 100) && (musicScroll.slidermc._x < 225)) {
this.tempBarMusic = this.tempBarMusic + 5;
musicScroll.slidermc._x = musicScroll.slidermc._x + 11;
this.musicVolume(this.tempBarMusic);
} else if (((this.tempBarMusic < 100) && (musicScroll.slidermc._x >= 225)) && ((this.tempBarMusic < 100) && (musicScroll.slidermc._x <= 236))) {
this.tempBarMusic = 100;
musicScroll.slidermc._x = 236;
this.musicVolume(this.tempBarMusic);
}
};
if (this.tempBarMusic > 0) {
}
}
};
musicScroll.btnDownmc.btnDown.onRelease = function () {
delete onEnterFrame;
};
musicScroll.btnDownmc.btnDown.onReleaseOutside = function () {
delete onEnterFrame;
};
musicScroll.btnUpmc.btnUp.onRelease = function () {
delete onEnterFrame;
};
musicScroll.btnUpmc.btnUp.onReleaseOutside = function () {
delete onEnterFrame;
};
musicOn.onPress = function () {
if (!_global.game.RUSure) {
this._parent.fmusicOn();
}
};
musicOff.onPress = function () {
if (!_global.game.RUSure) {
this._parent.fmusicOff();
}
};
m_minus.onPress = function () {
if (!_global.game.RUSure) {
onEnterFrame = function () {
if ((this.tempBarMusic > 0) && (musicScroll.slidermc._x > 25.5)) {
this.tempBarMusic = this.tempBarMusic - 5;
musicScroll.slidermc._x = musicScroll.slidermc._x - 11;
this.musicVolume(this.tempBarMusic);
} else if (((this.tempBarMusic > 0) && (musicScroll.slidermc._x <= 25.5)) && ((this.tempBarMusic > 0) && (musicScroll.slidermc._x >= 14.5))) {
this.tempBarMusic = 0;
musicScroll.slidermc._x = 14.5;
this.musicVolume(this.tempBarMusic);
}
};
if (this.tempBarMusic == 0) {
}
}
};
m_minus.onRelease = function () {
delete onEnterFrame;
};
m_minus.onReleaseOutside = function () {
delete onEnterFrame;
};
m_plus.onPress = function () {
if (!_global.game.RUSure) {
onEnterFrame = function () {
if ((this.tempBarMusic < 100) && (musicScroll.slidermc._x < 225)) {
this.tempBarMusic = this.tempBarMusic + 5;
musicScroll.slidermc._x = musicScroll.slidermc._x + 11;
this.musicVolume(this.tempBarMusic);
} else if (((this.tempBarMusic < 100) && (musicScroll.slidermc._x >= 225)) && ((this.tempBarMusic < 100) && (musicScroll.slidermc._x <= 236))) {
this.tempBarMusic = 100;
musicScroll.slidermc._x = 236;
this.musicVolume(this.tempBarMusic);
}
};
if (this.tempBarMusic > 0) {
}
}
};
m_plus.onRelease = function () {
delete onEnterFrame;
};
m_plus.onReleaseOutside = function () {
delete onEnterFrame;
};
soundScroll.slidermc.slider.onPress = function () {
if (!_global.game.RUSure) {
startDrag (this._parent, false, 236, 88, 14.5, 88);
this._parent.onEnterFrame = function () {
this._parent._parent.fxVolume((soundScroll.slidermc._x - 14.5) / 2.215);
};
}
};
soundScroll.slidermc.slider.onRelease = function () {
delete this._parent.onEnterFrame;
this._parent.stopDrag();
};
soundScroll.slidermc.slider.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
this._parent.stopDrag();
};
soundScroll.btnDownmc.btnDown.onPress = function () {
if (!_global.game.RUSure) {
onEnterFrame = function () {
if ((this.tempBarSound > 0) && (soundScroll.slidermc._x > 25.5)) {
this.tempBarSound = this.tempBarSound - 5;
soundScroll.slidermc._x = soundScroll.slidermc._x - 11;
this.fxVolume(this.tempBarSound);
} else if (((this.tempBarSound > 0) && (soundScroll.slidermc._x <= 25.5)) && ((this.tempBarSound > 0) && (soundScroll.slidermc._x >= 14.5))) {
this.tempBarSound = 0;
soundScroll.slidermc._x = 14.5;
this.fxVolume(this.tempBarSound);
}
};
if (this.tempBarSound == 0) {
}
}
};
soundScroll.btnUpmc.btnUp.onPress = function () {
if (!_global.game.RUSure) {
onEnterFrame = function () {
if ((this.tempBarSound < 100) && (soundScroll.slidermc._x < 225)) {
this.tempBarSound = this.tempBarSound + 5;
soundScroll.slidermc._x = soundScroll.slidermc._x + 11;
this.fxVolume(this.tempBarSound);
} else if (((this.tempBarSound < 100) && (soundScroll.slidermc._x >= 225)) && ((this.tempBarSound < 100) && (soundScroll.slidermc._x <= 236))) {
this.tempBarSound = 100;
soundScroll.slidermc._x = 236;
this.fxVolume(this.tempBarSound);
}
};
if (this.tempBarSound > 0) {
}
}
};
soundScroll.btnDownmc.btnDown.onRelease = function () {
delete onEnterFrame;
};
soundScroll.btnDownmc.btnDown.onReleaseOutside = function () {
delete onEnterFrame;
};
soundScroll.btnUpmc.btnUp.onRelease = function () {
delete onEnterFrame;
};
soundScroll.btnUpmc.btnUp.onReleaseOutside = function () {
delete onEnterFrame;
};
soundOn.onPress = function () {
if (!_global.game.RUSure) {
this._parent.fxOn();
}
};
soundOff.onPress = function () {
if (!_global.game.RUSure) {
this._parent.fxOff();
}
};
s_minus.onPress = function () {
if (!_global.game.RUSure) {
onEnterFrame = function () {
if ((this.tempBarSound > 0) && (soundScroll.slidermc._x > 25.5)) {
this.tempBarSound = this.tempBarSound - 5;
soundScroll.slidermc._x = soundScroll.slidermc._x - 11;
this.fxVolume(tempBarSound);
} else if (((this.tempBarSound > 0) && (soundScroll.slidermc._x <= 25.5)) && ((this.tempBarSound > 0) && (soundScroll.slidermc._x >= 14.5))) {
this.tempBarSound = 0;
soundScroll.slidermc._x = 14.5;
this.fxVolume(tempBarSound);
}
};
if (this.tempBarSound == 0) {
}
}
};
s_minus.onRelease = function () {
delete onEnterFrame;
};
s_minus.onReleaseOutside = function () {
delete onEnterFrame;
};
s_plus.onPress = function () {
if (!_global.game.RUSure) {
onEnterFrame = function () {
if ((this.tempBarSound < 100) && (soundScroll.slidermc._x < 225)) {
this.tempBarSound = this.tempBarSound + 5;
soundScroll.slidermc._x = soundScroll.slidermc._x + 11;
this.fxVolume(tempBarSound);
} else if (((this.tempBarSound < 100) && (soundScroll.slidermc._x >= 225)) && ((this.tempBarSound < 100) && (soundScroll.slidermc._x <= 236))) {
this.tempBarSound = 100;
soundScroll.slidermc._x = 236;
this.fxVolume(tempBarSound);
}
};
if (this.tempBarSound > 0) {
}
}
};
s_plus.onRelease = function () {
delete onEnterFrame;
};
s_plus.onReleaseOutside = function () {
delete onEnterFrame;
};
x_close.onPress = function () {
if (!_global.game.RUSure) {
this.gotoAndStop(2);
_global.game.screenOnTop = false;
_global.game.OptionsMenu.removeMovieClip();
_global.game.LevelClip.continueGame();
_global.game.interface_.getLevelInterface().removeScreen();
}
};
Symbol 1659 MovieClip Frame 1
stop();
Symbol 1662 MovieClip Frame 1
stop();
Symbol 1663 MovieClip [optionsScreenMenu] Frame 1
function fmusicOn() {
if (_global.musicVolume == 0) {
tempBarMusic = lastMusicVolume;
}
sndCtrl.musicOn();
_global.musicVolume = tempBarMusic;
musicScroll.slidermc._x = ((range / 100) * tempBarMusic) + 14.5;
}
function fmusicOff() {
sndCtrl.musicOff();
tempBarMusic = 0;
lastMusicVolume = _global.musicVolume;
_global.musicVolume = tempBarMusic;
musicScroll.slidermc._x = 14.5;
}
function fxOn() {
if (_global.fxVolume == 0) {
tempBarSound = lastFxVolume;
}
sndCtrl.fxOn();
_global.fxVolume = tempBarSound;
soundScroll.slidermc._x = ((range / 100) * tempBarSound) + 14.5;
}
function fxOff() {
sndCtrl.fxOff();
tempBarSound = 0;
lastFxVolume = _global.fxVolume;
_global.fxVolume = tempBarSound;
soundScroll.slidermc._x = 14.5;
}
function musicVolume(vol) {
tempBarMusic = vol;
_global.musicVolume = tempBarMusic;
sndCtrl.setMusicVolume(vol);
}
function fxVolume(vol) {
tempBarSound = vol;
_global.fxVolume = tempBarSound;
sndCtrl.setSoundFXVolume(vol);
}
stop();
var musicScroll;
var slidermc;
var soundScroll;
var lastMusicVolume;
var lastFxVolume;
var range = 221.5;
var sndCtrl = _global.game.sndCtrl;
var tempBarMusic = _global.musicVolume;
var tempBarSound = _global.fxVolume;
musicScroll.slidermc._x = ((range / 100) * tempBarMusic) + 14.5;
soundScroll.slidermc._x = ((range / 100) * tempBarSound) + 14.5;
musicScroll.slidermc.slider.onPress = function () {
startDrag (this._parent, false, 236, 88, 14.5, 88);
this._parent.onEnterFrame = function () {
this._parent._parent.musicVolume((musicScroll.slidermc._x - 14.5) / 2.215);
};
};
musicScroll.slidermc.slider.onRelease = function () {
delete this._parent.onEnterFrame;
this._parent.stopDrag();
};
musicScroll.slidermc.slider.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
this._parent.stopDrag();
};
musicScroll.btnDownmc.btnDown.onPress = function () {
onEnterFrame = function () {
if ((this.tempBarMusic > 0) && (musicScroll.slidermc._x > 25.5)) {
this.tempBarMusic = this.tempBarMusic - 5;
musicScroll.slidermc._x = musicScroll.slidermc._x - 11;
this.musicVolume(this.tempBarMusic);
} else if (((this.tempBarMusic > 0) && (musicScroll.slidermc._x <= 25.5)) && ((this.tempBarMusic > 0) && (musicScroll.slidermc._x >= 14.5))) {
this.tempBarMusic = 0;
musicScroll.slidermc._x = 14.5;
this.musicVolume(this.tempBarMusic);
}
};
if (this.tempBarMusic == 0) {
}
};
musicScroll.btnUpmc.btnUp.onPress = function () {
onEnterFrame = function () {
if ((this.tempBarMusic < 100) && (musicScroll.slidermc._x < 225)) {
this.tempBarMusic = this.tempBarMusic + 5;
musicScroll.slidermc._x = musicScroll.slidermc._x + 11;
this.musicVolume(this.tempBarMusic);
} else if (((this.tempBarMusic < 100) && (musicScroll.slidermc._x >= 225)) && ((this.tempBarMusic < 100) && (musicScroll.slidermc._x <= 236))) {
this.tempBarMusic = 100;
musicScroll.slidermc._x = 236;
this.musicVolume(this.tempBarMusic);
}
};
if (this.tempBarMusic > 0) {
}
};
musicScroll.btnDownmc.btnDown.onRelease = function () {
delete onEnterFrame;
};
musicScroll.btnDownmc.btnDown.onReleaseOutside = function () {
delete onEnterFrame;
};
musicScroll.btnUpmc.btnUp.onRelease = function () {
delete onEnterFrame;
};
musicScroll.btnUpmc.btnUp.onReleaseOutside = function () {
delete onEnterFrame;
};
musicOn.onPress = function () {
this._parent.fmusicOn();
};
musicOff.onPress = function () {
this._parent.fmusicOff();
};
m_minus.onPress = function () {
onEnterFrame = function () {
if ((this.tempBarMusic > 0) && (musicScroll.slidermc._x > 25.5)) {
this.tempBarMusic = this.tempBarMusic - 5;
musicScroll.slidermc._x = musicScroll.slidermc._x - 11;
this.musicVolume(this.tempBarMusic);
} else if (((this.tempBarMusic > 0) && (musicScroll.slidermc._x <= 25.5)) && ((this.tempBarMusic > 0) && (musicScroll.slidermc._x >= 14.5))) {
this.tempBarMusic = 0;
musicScroll.slidermc._x = 14.5;
this.musicVolume(this.tempBarMusic);
}
};
if (this.tempBarMusic == 0) {
}
};
m_minus.onRelease = function () {
delete onEnterFrame;
};
m_minus.onReleaseOutside = function () {
delete onEnterFrame;
};
m_plus.onPress = function () {
onEnterFrame = function () {
if ((this.tempBarMusic < 100) && (musicScroll.slidermc._x < 225)) {
this.tempBarMusic = this.tempBarMusic + 5;
musicScroll.slidermc._x = musicScroll.slidermc._x + 11;
this.musicVolume(this.tempBarMusic);
} else if (((this.tempBarMusic < 100) && (musicScroll.slidermc._x >= 225)) && ((this.tempBarMusic < 100) && (musicScroll.slidermc._x <= 236))) {
this.tempBarMusic = 100;
musicScroll.slidermc._x = 236;
this.musicVolume(this.tempBarMusic);
}
};
if (this.tempBarMusic > 0) {
}
};
m_plus.onRelease = function () {
delete onEnterFrame;
};
m_plus.onReleaseOutside = function () {
delete onEnterFrame;
};
soundScroll.slidermc.slider.onPress = function () {
startDrag (this._parent, false, 236, 88, 14.5, 88);
this._parent.onEnterFrame = function () {
this._parent._parent.fxVolume((soundScroll.slidermc._x - 14.5) / 2.215);
};
};
soundScroll.slidermc.slider.onRelease = function () {
delete this._parent.onEnterFrame;
this._parent.stopDrag();
};
soundScroll.slidermc.slider.onReleaseOutside = function () {
delete this._parent.onEnterFrame;
this._parent.stopDrag();
};
soundScroll.btnDownmc.btnDown.onPress = function () {
onEnterFrame = function () {
if ((this.tempBarSound > 0) && (soundScroll.slidermc._x > 25.5)) {
this.tempBarSound = this.tempBarSound - 5;
soundScroll.slidermc._x = soundScroll.slidermc._x - 11;
this.fxVolume(this.tempBarSound);
} else if (((this.tempBarSound > 0) && (soundScroll.slidermc._x <= 25.5)) && ((this.tempBarSound > 0) && (soundScroll.slidermc._x >= 14.5))) {
this.tempBarSound = 0;
soundScroll.slidermc._x = 14.5;
this.fxVolume(this.tempBarSound);
}
};
if (this.tempBarSound == 0) {
}
};
soundScroll.btnUpmc.btnUp.onPress = function () {
onEnterFrame = function () {
if ((this.tempBarSound < 100) && (soundScroll.slidermc._x < 225)) {
this.tempBarSound = this.tempBarSound + 5;
soundScroll.slidermc._x = soundScroll.slidermc._x + 11;
this.fxVolume(this.tempBarSound);
} else if (((this.tempBarSound < 100) && (soundScroll.slidermc._x >= 225)) && ((this.tempBarSound < 100) && (soundScroll.slidermc._x <= 236))) {
this.tempBarSound = 100;
soundScroll.slidermc._x = 236;
this.fxVolume(this.tempBarSound);
}
};
if (this.tempBarSound > 0) {
}
};
soundScroll.btnDownmc.btnDown.onRelease = function () {
delete onEnterFrame;
};
soundScroll.btnDownmc.btnDown.onReleaseOutside = function () {
delete onEnterFrame;
};
soundScroll.btnUpmc.btnUp.onRelease = function () {
delete onEnterFrame;
};
soundScroll.btnUpmc.btnUp.onReleaseOutside = function () {
delete onEnterFrame;
};
soundOn.onPress = function () {
this._parent.fxOn();
};
soundOff.onPress = function () {
this._parent.fxOff();
};
s_minus.onPress = function () {
onEnterFrame = function () {
if ((this.tempBarSound > 0) && (soundScroll.slidermc._x > 25.5)) {
this.tempBarSound = this.tempBarSound - 5;
soundScroll.slidermc._x = soundScroll.slidermc._x - 11;
this.fxVolume(tempBarSound);
} else if (((this.tempBarSound > 0) && (soundScroll.slidermc._x <= 25.5)) && ((this.tempBarSound > 0) && (soundScroll.slidermc._x >= 14.5))) {
this.tempBarSound = 0;
soundScroll.slidermc._x = 14.5;
this.fxVolume(tempBarSound);
}
};
if (this.tempBarSound == 0) {
}
};
s_minus.onRelease = function () {
delete onEnterFrame;
};
s_minus.onReleaseOutside = function () {
delete onEnterFrame;
};
s_plus.onPress = function () {
onEnterFrame = function () {
if ((this.tempBarSound < 100) && (soundScroll.slidermc._x < 225)) {
this.tempBarSound = this.tempBarSound + 5;
soundScroll.slidermc._x = soundScroll.slidermc._x + 11;
this.fxVolume(tempBarSound);
} else if (((this.tempBarSound < 100) && (soundScroll.slidermc._x >= 225)) && ((this.tempBarSound < 100) && (soundScroll.slidermc._x <= 236))) {
this.tempBarSound = 100;
soundScroll.slidermc._x = 236;
this.fxVolume(tempBarSound);
}
};
if (this.tempBarSound > 0) {
}
};
s_plus.onRelease = function () {
delete onEnterFrame;
};
s_plus.onReleaseOutside = function () {
delete onEnterFrame;
};
x_close.onPress = function () {
_global.fxVolume = tempBarSound;
_global.musicVolume = tempBarMusic;
this.gotoAndStop(2);
_global.game.screenOnTop = false;
_global.game.OptionsMenu.removeMovieClip();
_global.game.LevelClip.continueGame();
_global.game.interface_.getLevelInterface().removeScreen();
};
Symbol 1667 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(2);
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1668 MovieClip Frame 1
stop();
Symbol 1668 MovieClip Frame 3
stop();
Symbol 1670 MovieClip Frame 1
stop();
Symbol 1672 MovieClip Frame 1
stop();
Symbol 1674 MovieClip Frame 1
stop();
Symbol 1676 MovieClip Frame 1
stop();
Symbol 1678 MovieClip Frame 1
stop();
Symbol 1680 MovieClip Frame 1
stop();
Symbol 1686 MovieClip Frame 1
stop();
Symbol 1686 MovieClip Frame 2
stop();
Symbol 1687 MovieClip [saveScreen] Frame 1
function checkName(i) {
var _local2 = 1;
while (_local2 <= i) {
var _local6;
_local6 = "saveGame" + _local2.toString();
var _local5 = this["saveGame" + _local2]["saveGameText" + _local2].text;
if (_local2 != i) {
if (this["saveGame" + _local2]["saveGameText" + _local2].text == this["saveGame" + i]["saveGameText" + i].text) {
var _local4 = this["saveGame" + i].text;
this["saveGame" + i]["saveGameText" + i].text = this["saveGame" + _local2]["saveGameText" + _local2].text + "1";
}
}
_local2++;
}
return(this["saveGame" + i]["saveGameText" + i].text);
}
stop();
var saved = Boolean;
var enterName;
var i = 1;
while (i <= 6) {
var textMes = ("saveGameText" + i.toString());
var saveGame = ("saveGame" + i.toString());
var okBtn = ("okBtn" + i.toString());
var so = SharedObject.getLocal("SaveGame" + i);
if (so.data.saved == true) {
this[saveGame][textMes]._visible = true;
this[saveGame][textMes].text = so.data.buttonText;
this[okBtn].gotoAndStop(1);
var instance;
instance = "saveGame" + i.toString();
this[instance].saveText = so.data.buttonText;
this[instance].saved = true;
} else {
this[saveGame][textMes]._visible = true;
this[saveGame][textMes].text = "";
}
this["saveGame" + i].index = i;
this["saveGame" + i].holder = this;
var textMes = ("saveGameText" + i.toString());
var saveGame = ("saveGame" + i.toString());
this[saveGame].onPress = function () {
var _local2 = 1;
while (_local2 <= 6) {
if (_local2 != this.index) {
var _local3;
_local3 = "saveGame" + _local2.toString();
if (this.holder[_local3].saved != true) {
this.holder[_local3].enterName = false;
var _local4 = "saveGame" + _local2.toString();
var _local6 = "saveGameText" + _local2.toString();
this.holder[_local4][_local6].text = "";
} else {
this.holder[_local3].enterName = false;
var _local5 = SharedObject.getLocal("SaveGame" + _local2);
var _local4 = "saveGame" + _local2.toString();
var _local6 = "saveGameText" + _local2.toString();
this.holder[_local4][_local6].text = _local5.data.buttonText;
}
}
_local2++;
}
var _local6 = "saveGameText" + this.index.toString();
Selection.setFocus(this[_local6]);
};
var okBtn = ("okBtn" + i.toString());
this[okBtn].index = i;
this[okBtn].holder = this;
this[okBtn].onPress = function () {
var _local2 = 1;
while (_local2 <= 6) {
if (_local2 != this.index) {
var okBtn = ("okBtn" + _local2.toString());
this.holder[okBtn].gotoAndStop(1);
}
_local2++;
}
var _local3;
_local3 = "saveGame" + this.index.toString();
this.holder[_local3].enterName = true;
this.gotoAndStop(2);
};
i++;
}
this.saveButton.holder = this;
this.saveButton.onPress = function () {
var _local3 = 1;
while (_local3 <= 6) {
var _local4;
_local4 = "saveGame" + _local3.toString();
this.holder["saveGame" + _local3].index = _local3;
if (this.holder[_local4].enterName == true) {
if (this.holder[_local4]["saveGameText" + _local3].text != "") {
this.holder["saveGameText" + _local3].text = checkName(_local3);
var _local5 = SharedObject.getLocal("SaveGame" + _local3);
_global.game.saveGame(_local3, this.holder[_local4]["saveGameText" + _local3].text);
this.holder[_local4].saveText = _local5.data.buttonText;
}
_global.game.screenOnTop = false;
_global.game.LevelClip.continueGame();
_global.game.interface_.getLevelInterface().removeScreen();
this.holder.removeMovieClip();
}
_local3++;
}
};
xclose.onPress = function () {
this.gotoAndStop(2);
_global.game.screenOnTop = false;
_global.game.LevelClip.continueGame();
_global.game.interface_.getLevelInterface().removeScreen();
this._parent.removeMovieClip();
};
Symbol 1693 MovieClip Frame 1
stop();
Symbol 1693 MovieClip Frame 3
stop();
Symbol 1696 MovieClip Frame 1
stop();
Symbol 1696 MovieClip Frame 2
stop();
Symbol 1698 MovieClip Frame 1
stop();
Symbol 1698 MovieClip Frame 2
stop();
Symbol 1700 MovieClip Frame 1
stop();
Symbol 1700 MovieClip Frame 2
stop();
Symbol 1702 MovieClip Frame 1
stop();
Symbol 1702 MovieClip Frame 2
stop();
Symbol 1704 MovieClip Frame 1
stop();
Symbol 1704 MovieClip Frame 2
stop();
Symbol 1706 MovieClip Frame 1
stop();
Symbol 1706 MovieClip Frame 2
stop();
Symbol 1707 MovieClip [loadScreen] Frame 1
var toLoad;
var holder = this;
var saved = true;
xclose.onPress = function () {
this.gotoAndStop(2);
_global.game.screenOnTop = false;
this._parent.removeMovieClip();
};
var i = 1;
while (i <= 6) {
var so = SharedObject.getLocal("SaveGame" + i);
if (so.data.saved == true) {
var instance;
instance = "loadGame" + i.toString();
var textMes = ("loadText" + i.toString());
this[instance][textMes]._visible = true;
this[instance][textMes].text = so.data.buttonText;
this[instance].saveText.text = so.data.buttonText;
this[instance].saved = true;
} else {
var instance;
instance = "loadGame" + i.toString();
var textMes = ("loadText" + i.toString());
this[instance][textMes].text = "";
this[instance].saved = false;
}
this["loadGame" + i].index = i;
var loadGame = ("loadGame" + i.toString());
this[loadGame].onPress = function () {
var _local4;
_local4 = "loadGame" + this.index.toString();
if (holder[_local4].saved == true) {
holder[_local4].toLoad = true;
this.gotoAndStop("ok");
var _local2 = 1;
while (_local2 <= 6) {
if (_local2 != this.index) {
var _local3;
_local3 = "loadGame" + _local2.toString();
holder[_local3].gotoAndStop(1);
holder[_local3].toLoad = false;
}
_local2++;
}
}
};
i++;
}
this.loadButton.onPress = function () {
var _local2 = 1;
while (_local2 <= 6) {
if (holder["loadGame" + _local2].toLoad == true) {
_global.game.loadGame(_local2);
}
_local2++;
}
};
Symbol 1724 Button
on (release) {
getURL ("http://www.youdagames.com", "_blank");
}
Symbol 1737 MovieClip Frame 1
stop();
Symbol 1737 MovieClip Frame 2
stop();
Symbol 1737 MovieClip Frame 3
stop();
Symbol 1737 MovieClip Frame 4
stop();
Symbol 1740 MovieClip Frame 1
stop();
Symbol 1740 MovieClip Frame 2
stop();
Symbol 1740 MovieClip Frame 3
stop();
Symbol 1740 MovieClip Frame 4
stop();
Symbol 1743 MovieClip Frame 1
stop();
Symbol 1743 MovieClip Frame 2
stop();
Symbol 1743 MovieClip Frame 3
stop();
Symbol 1743 MovieClip Frame 4
stop();
Symbol 1746 MovieClip Frame 1
stop();
Symbol 1746 MovieClip Frame 2
stop();
Symbol 1746 MovieClip Frame 3
stop();
Symbol 1746 MovieClip Frame 4
stop();
Symbol 1750 Button
on (release) {
getURL (_global.buygamelink, "_blank");
}
Symbol 1751 MovieClip Frame 1
stop();
Symbol 1751 MovieClip Frame 2
stop();
Symbol 1751 MovieClip Frame 3
stop();
Symbol 1751 MovieClip Frame 4
stop();
Symbol 1754 Button
on (release) {
getURL (_global.youdagames, "_blank");
}
Symbol 1756 MovieClip Frame 1
stop();
Symbol 1756 MovieClip Frame 2
stop();
Symbol 1756 MovieClip Frame 3
stop();
Symbol 1756 MovieClip Frame 4
stop();
Instance of Symbol 1737 MovieClip "startBtn" in Symbol 1757 MovieClip Frame 5
onClipEvent (load) {
}
Instance of Symbol 1740 MovieClip "optionBtn" in Symbol 1757 MovieClip Frame 10
onClipEvent (load) {
}
Instance of Symbol 1743 MovieClip "instructionBtn" in Symbol 1757 MovieClip Frame 14
onClipEvent (load) {
}
Instance of Symbol 1746 MovieClip "loadBtn" in Symbol 1757 MovieClip Frame 18
onClipEvent (load) {
}
Instance of Symbol 1751 MovieClip in Symbol 1757 MovieClip Frame 22
onClipEvent (load) {
}
Instance of Symbol 1756 MovieClip in Symbol 1757 MovieClip Frame 26
onClipEvent (load) {
}
Symbol 1757 MovieClip Frame 27
stop();
startBtn.onPress = function () {
if (!_global.game.screenOnTop) {
game.mode = "play";
game.playMode();
}
};
startBtn.onRollOver = function () {
if (!_global.game.screenOnTop) {
this.gotoAndStop(2);
}
};
startBtn.onRollOut = function () {
if (!_global.game.screenOnTop) {
this.gotoAndStop(1);
}
};
optionBtn.onPress = function () {
if (!_global.game.screenOnTop) {
game.mode = "options";
game.playMode();
}
};
optionBtn.onRollOver = function () {
if (!_global.game.screenOnTop) {
this.gotoAndStop(2);
}
};
optionBtn.onRollOut = function () {
if (!_global.game.screenOnTop) {
this.gotoAndStop(1);
}
};
instructionBtn.onPress = function () {
if (!_global.game.screenOnTop) {
game.mode = "instructions";
game.playMode();
}
};
instructionBtn.onRollOver = function () {
if (!_global.game.screenOnTop) {
this.gotoAndStop(2);
}
};
instructionBtn.onRollOut = function () {
if (!_global.game.screenOnTop) {
this.gotoAndStop(1);
}
};
loadBtn.onPress = function () {
if (!_global.game.screenOnTop) {
game.mode = "load";
game.playMode();
}
};
loadBtn.onRollOver = function () {
if (!_global.game.screenOnTop) {
this.gotoAndStop(2);
}
};
loadBtn.onRollOut = function () {
if (!_global.game.screenOnTop) {
this.gotoAndStop(1);
}
};
exitBtn.onPress = function () {
if (!_global.game.screenOnTop) {
fscommand ("quit");
}
};
exitBtn.onRollOver = function () {
if (!_global.game.screenOnTop) {
this.gotoAndStop(2);
}
};
exitBtn.onRollOut = function () {
if (!_global.game.screenOnTop) {
this.gotoAndStop(1);
}
};
Symbol 1759 Button
on (press) {
getURL (_global.affiliatebutton, "_blank");
}
Symbol 1763 Button
on (press) {
getURL (_global.affiliatebutton, "_blank");
}
Symbol 1806 MovieClip Frame 27
stop();
Symbol 1807 Button
on (press) {
getURL (_global.affiliatebutton, "_blank");
}
Symbol 1810 Button
on (press) {
getURL (_global.affiliatebutton, "_blank");
}
Symbol 1813 Button
on (press) {
getURL (_global.affiliatebutton, "_blank");
}
Symbol 1814 MovieClip Frame 1
if (_global.companylogo == "MiniClip") {
gotoAndStop ("minicliplogo");
} else if (_global.companylogo == "2DPlay") {
gotoAndStop ("2dplaylogo");
} else if (_global.companylogo == "Craziness") {
gotoAndStop ("crazinesslogo");
} else if (_global.companylogo == "ArcadeTown") {
gotoAndStop ("arcadetownlogo");
} else if (_global.companylogo == "gamesgames") {
gotoAndStop ("gamesgameslogo");
}
stop();
Symbol 1814 MovieClip Frame 2
stop();
Symbol 1814 MovieClip Frame 9
stop();
Symbol 1814 MovieClip Frame 16
stop();
Symbol 1814 MovieClip Frame 23
stop();
Symbol 1815 MovieClip [startGame] Frame 1
Symbol 1815 MovieClip [startGame] Frame 147
stop();
Symbol 1820 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1827 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1828 MovieClip [cleaner] Frame 1
stop();
Symbol 1828 MovieClip [cleaner] Frame 2
stop();
Symbol 1835 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1842 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1845 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1852 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1866 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1867 MovieClip [boy] Frame 1
stop();
Symbol 1867 MovieClip [boy] Frame 2
stop();
Symbol 1867 MovieClip [boy] Frame 3
stop();
Symbol 1867 MovieClip [boy] Frame 4
stop();
Symbol 1867 MovieClip [boy] Frame 5
stop();
Symbol 1867 MovieClip [boy] Frame 6
stop();
Symbol 1867 MovieClip [boy] Frame 7
stop();
Symbol 1867 MovieClip [boy] Frame 8
stop();
Symbol 1867 MovieClip [boy] Frame 9
stop();
Symbol 1867 MovieClip [boy] Frame 10
stop();
Symbol 1874 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1877 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1882 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1894 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1895 MovieClip [girl] Frame 1
stop();
Symbol 1895 MovieClip [girl] Frame 2
stop();
Symbol 1895 MovieClip [girl] Frame 3
stop();
Symbol 1895 MovieClip [girl] Frame 4
stop();
Symbol 1895 MovieClip [girl] Frame 5
stop();
Symbol 1895 MovieClip [girl] Frame 6
stop();
Symbol 1895 MovieClip [girl] Frame 7
stop();
Symbol 1895 MovieClip [girl] Frame 8
stop();
Symbol 1895 MovieClip [girl] Frame 9
stop();
Symbol 1895 MovieClip [girl] Frame 10
stop();
Symbol 1902 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1909 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1912 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1917 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1929 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1939 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1940 MovieClip [man] Frame 1
stop();
Symbol 1940 MovieClip [man] Frame 2
stop();
Symbol 1940 MovieClip [man] Frame 3
stop();
Symbol 1940 MovieClip [man] Frame 4
stop();
Symbol 1940 MovieClip [man] Frame 5
stop();
Symbol 1940 MovieClip [man] Frame 6
stop();
Symbol 1940 MovieClip [man] Frame 7
stop();
Symbol 1940 MovieClip [man] Frame 8
stop();
Symbol 1940 MovieClip [man] Frame 9
stop();
Symbol 1940 MovieClip [man] Frame 10
stop();
Symbol 1959 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1976 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 1989 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2006 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2022 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2040 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2041 MovieClip [midAgeWoman] Frame 1
stop();
Symbol 2041 MovieClip [midAgeWoman] Frame 2
stop();
Symbol 2041 MovieClip [midAgeWoman] Frame 3
stop();
Symbol 2041 MovieClip [midAgeWoman] Frame 4
stop();
Symbol 2041 MovieClip [midAgeWoman] Frame 5
stop();
Symbol 2041 MovieClip [midAgeWoman] Frame 6
stop();
Symbol 2041 MovieClip [midAgeWoman] Frame 7
stop();
Symbol 2041 MovieClip [midAgeWoman] Frame 8
stop();
Symbol 2041 MovieClip [midAgeWoman] Frame 9
stop();
Symbol 2041 MovieClip [midAgeWoman] Frame 10
stop();
Symbol 2048 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2051 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2056 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2070 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2074 MovieClip [oldWoman] Frame 1
stop();
Symbol 2074 MovieClip [oldWoman] Frame 2
stop();
Symbol 2074 MovieClip [oldWoman] Frame 3
stop();
Symbol 2074 MovieClip [oldWoman] Frame 4
stop();
Symbol 2074 MovieClip [oldWoman] Frame 5
stop();
Symbol 2074 MovieClip [oldWoman] Frame 6
stop();
Symbol 2074 MovieClip [oldWoman] Frame 7
stop();
Symbol 2074 MovieClip [oldWoman] Frame 8
stop();
Symbol 2074 MovieClip [oldWoman] Frame 9
stop();
Symbol 2074 MovieClip [oldWoman] Frame 10
stop();
Symbol 2081 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2088 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2091 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2096 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2109 MovieClip [woman] Frame 1
stop();
Symbol 2109 MovieClip [woman] Frame 2
stop();
Symbol 2109 MovieClip [woman] Frame 3
stop();
Symbol 2109 MovieClip [woman] Frame 4
stop();
Symbol 2109 MovieClip [woman] Frame 5
stop();
Symbol 2109 MovieClip [woman] Frame 6
stop();
Symbol 2109 MovieClip [woman] Frame 7
stop();
Symbol 2109 MovieClip [woman] Frame 8
stop();
Symbol 2109 MovieClip [woman] Frame 9
stop();
Symbol 2109 MovieClip [woman] Frame 10
stop();
Symbol 2116 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2123 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2126 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2133 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2145 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2155 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2156 MovieClip [midAgeMan] Frame 1
stop();
Symbol 2156 MovieClip [midAgeMan] Frame 2
stop();
Symbol 2156 MovieClip [midAgeMan] Frame 3
stop();
Symbol 2156 MovieClip [midAgeMan] Frame 4
stop();
Symbol 2156 MovieClip [midAgeMan] Frame 5
stop();
Symbol 2156 MovieClip [midAgeMan] Frame 6
stop();
Symbol 2156 MovieClip [midAgeMan] Frame 7
stop();
Symbol 2156 MovieClip [midAgeMan] Frame 8
stop();
Symbol 2156 MovieClip [midAgeMan] Frame 9
stop();
Symbol 2156 MovieClip [midAgeMan] Frame 10
stop();
Symbol 2163 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2166 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2171 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2182 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2189 MovieClip [oldMan] Frame 1
stop();
Symbol 2189 MovieClip [oldMan] Frame 2
stop();
Symbol 2189 MovieClip [oldMan] Frame 3
stop();
Symbol 2189 MovieClip [oldMan] Frame 4
stop();
Symbol 2189 MovieClip [oldMan] Frame 5
stop();
Symbol 2189 MovieClip [oldMan] Frame 6
stop();
Symbol 2189 MovieClip [oldMan] Frame 7
stop();
Symbol 2189 MovieClip [oldMan] Frame 8
stop();
Symbol 2189 MovieClip [oldMan] Frame 9
stop();
Symbol 2189 MovieClip [oldMan] Frame 10
stop();
Symbol 2212 MovieClip Frame 32
stop();
Symbol 2213 MovieClip [car5] Frame 1
stop();
Symbol 2213 MovieClip [car5] Frame 2
stop();
Symbol 2216 MovieClip Frame 32
stop();
Symbol 2217 MovieClip [car1] Frame 1
stop();
Symbol 2217 MovieClip [car1] Frame 2
stop();
Symbol 2220 MovieClip Frame 32
stop();
Symbol 2221 MovieClip [car2] Frame 1
stop();
Symbol 2221 MovieClip [car2] Frame 2
stop();
Symbol 2224 MovieClip Frame 32
stop();
Symbol 2225 MovieClip [car4] Frame 1
stop();
Symbol 2225 MovieClip [car4] Frame 2
stop();
Symbol 2228 MovieClip Frame 32
stop();
Symbol 2229 MovieClip [car3] Frame 1
stop();
Symbol 2229 MovieClip [car3] Frame 2
stop();
Symbol 2232 MovieClip Frame 32
stop();
Symbol 2233 MovieClip [bigMotorHomeVehicle] Frame 1
stop();
Symbol 2233 MovieClip [bigMotorHomeVehicle] Frame 2
stop();
Symbol 2236 MovieClip Frame 32
stop();
Symbol 2237 MovieClip [MotorHomeVehicle] Frame 1
stop();
Symbol 2237 MovieClip [MotorHomeVehicle] Frame 2
stop();
Symbol 2246 MovieClip [tileFrame] Frame 1
stop();
Symbol 2246 MovieClip [tileFrame] Frame 2
stop();
Symbol 2246 MovieClip [tileFrame] Frame 3
stop();
Symbol 2250 MovieClip [minus1] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2254 MovieClip [exclamation] Frame 50
Symbol 2258 MovieClip [plus1] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2262 MovieClip [plus3] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2266 MovieClip [plus4] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2270 MovieClip [plus8] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2274 MovieClip [plus2] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2278 MovieClip [minus3] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2282 MovieClip [minus4] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2286 MovieClip [minus8] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2290 MovieClip [minus2] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2293 MovieClip [loading] Frame 25
stop();
_global.game.LevelClip = _global.game.attachMovie("Level", "Level", 0);
_global.game.LevelClip.helpOnOff = true;
_global.game.interface_.attachLevelInterface();
if (_global.game.mode == "load") {
_global.game.LevelClip.setLoadedParameters(_global.game.loadingGame);
_global.game.LevelClip.helpOnOff = false;
}
this.removeMovieClip();
Symbol 2297 MovieClip [godJob] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2301 MovieClip [congratulation] Frame 51
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2308 MovieClip [nice] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2312 MovieClip [welldone] Frame 25
this.swapDepths(48000);
this.removeMovieClip();
Symbol 2331 MovieClip [roadIcon_mc] Frame 1
stop();
Symbol 2331 MovieClip [roadIcon_mc] Frame 2
stop();
Symbol 2331 MovieClip [roadIcon_mc] Frame 3
stop();
Symbol 2331 MovieClip [roadIcon_mc] Frame 4
stop();
Symbol 2342 MovieClip Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2343 MovieClip [buldozer] Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2354 MovieClip [pingPong_mc0] Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2360 MovieClip [pingPong_mc90] Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2361 MovieClip [pingPong_mc-90] Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2362 MovieClip [pingPong_mc180] Frame 1
var cframe;
var paused = false;
this.onEnterFrame = function () {
if (_global.game.LevelClip.pause && (!paused)) {
cframe = this._currentframe;
this.stop();
paused = true;
}
if ((!_global.game.LevelClip.pause) && (paused)) {
this.gotoAndPlay(cframe);
paused = false;
}
};
Symbol 2370 MovieClip Frame 41
this._parent.gotoAndStop(1);
Symbol 2389 MovieClip Frame 69
this._parent.swapDepths(50000);
this._parent.removeMovieClip();
Symbol 2390 MovieClip [katanec] Frame 1
stop();
Symbol 2390 MovieClip [katanec] Frame 2
stop();
Symbol 2390 MovieClip [katanec] Frame 3
stop();
Symbol 2394 MovieClip [needPoints] Frame 18
this.swapDepths(1000);
this.removeMovieClip();
Symbol 2403 MovieClip [popup11] Frame 6
stop();
Symbol 2403 MovieClip [popup11] Frame 12
stop();
this.removeMovieClip();
Symbol 2406 MovieClip [popup1] Frame 6
stop();
Symbol 2406 MovieClip [popup1] Frame 12
stop();
this.removeMovieClip();
Symbol 2409 MovieClip [popup2] Frame 6
stop();
Symbol 2409 MovieClip [popup2] Frame 12
stop();
this.removeMovieClip();
Symbol 2412 MovieClip [popup3] Frame 6
stop();
Symbol 2412 MovieClip [popup3] Frame 12
stop();
this.removeMovieClip();
Symbol 2415 MovieClip [popup4] Frame 6
stop();
Symbol 2415 MovieClip [popup4] Frame 12
stop();
this.removeMovieClip();
Symbol 2418 MovieClip [popup5] Frame 6
stop();
Symbol 2418 MovieClip [popup5] Frame 12
stop();
this.removeMovieClip();
Symbol 2421 MovieClip [popup6] Frame 6
stop();
Symbol 2421 MovieClip [popup6] Frame 12
stop();
this.removeMovieClip();
Symbol 2424 MovieClip [popup7] Frame 6
stop();
Symbol 2424 MovieClip [popup7] Frame 12
stop();
this.removeMovieClip();
Symbol 2427 MovieClip [popup8] Frame 6
stop();
Symbol 2427 MovieClip [popup8] Frame 12
stop();
this.removeMovieClip();
Symbol 2430 MovieClip [popup9] Frame 6
stop();
Symbol 2430 MovieClip [popup9] Frame 12
stop();
this.removeMovieClip();
Symbol 2433 MovieClip [popup10] Frame 6
stop();
Symbol 2433 MovieClip [popup10] Frame 12
stop();
this.removeMovieClip();
Symbol 2436 MovieClip [popup12] Frame 6
stop();
Symbol 2436 MovieClip [popup12] Frame 12
stop();
this.removeMovieClip();
Symbol 2439 MovieClip [popup13] Frame 6
stop();
Symbol 2439 MovieClip [popup13] Frame 12
stop();
this.removeMovieClip();
Symbol 2442 MovieClip [popup15] Frame 6
stop();
Symbol 2442 MovieClip [popup15] Frame 12
stop();
this.removeMovieClip();
Symbol 2445 MovieClip [popup32] Frame 6
stop();
Symbol 2445 MovieClip [popup32] Frame 12
stop();
this.removeMovieClip();
Symbol 2448 MovieClip [popup33] Frame 6
stop();
Symbol 2448 MovieClip [popup33] Frame 12
stop();
this.removeMovieClip();
Symbol 2451 MovieClip [popup34] Frame 6
stop();
Symbol 2451 MovieClip [popup34] Frame 12
stop();
this.removeMovieClip();
Symbol 2454 MovieClip [popup35] Frame 6
stop();
Symbol 2454 MovieClip [popup35] Frame 12
stop();
this.removeMovieClip();
Symbol 2457 MovieClip [popup36] Frame 6
stop();
Symbol 2457 MovieClip [popup36] Frame 12
stop();
this.removeMovieClip();
Symbol 2460 MovieClip [popup37] Frame 6
stop();
Symbol 2460 MovieClip [popup37] Frame 12
stop();
this.removeMovieClip();
Symbol 2463 MovieClip [popup42] Frame 6
stop();
Symbol 2463 MovieClip [popup42] Frame 12
stop();
this.removeMovieClip();
Symbol 2466 MovieClip [popup38] Frame 6
stop();
Symbol 2466 MovieClip [popup38] Frame 12
stop();
this.removeMovieClip();
Symbol 2468 MovieClip [popup39] Frame 6
stop();
Symbol 2468 MovieClip [popup39] Frame 12
stop();
this.removeMovieClip();
Symbol 2471 MovieClip [popup40] Frame 6
stop();
Symbol 2471 MovieClip [popup40] Frame 12
stop();
this.removeMovieClip();
Symbol 2474 MovieClip [popup41] Frame 6
stop();
Symbol 2474 MovieClip [popup41] Frame 12
stop();
this.removeMovieClip();
Symbol 2477 MovieClip [popup43] Frame 6
stop();
Symbol 2477 MovieClip [popup43] Frame 12
stop();
this.removeMovieClip();
Symbol 2480 MovieClip [popup44] Frame 6
stop();
Symbol 2480 MovieClip [popup44] Frame 12
stop();
this.removeMovieClip();
Symbol 2483 MovieClip [popup45] Frame 6
stop();
Symbol 2483 MovieClip [popup45] Frame 12
stop();
this.removeMovieClip();
Symbol 2485 MovieClip [popup14] Frame 6
stop();
Symbol 2485 MovieClip [popup14] Frame 12
stop();
this.removeMovieClip();
Symbol 2486 Button
on (rollOver) {
this.gotoAndStop(3);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_global.popUp = false;
this._parent._parent.removeMovieClip();
}
on (release) {
this.gotoAndStop(3);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 2487 MovieClip Frame 1
stop();
Symbol 2487 MovieClip Frame 3
stop();
Instance of Symbol 223 MovieClip in Symbol 2489 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2490 MovieClip [popup16] Frame 6
stop();
Symbol 2490 MovieClip [popup16] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2492 MovieClip Frame 1
on (press) {
_global.popUp = false;
this._parent.removeMovieClip();
}
Symbol 2493 MovieClip [popup17] Frame 6
stop();
Symbol 2493 MovieClip [popup17] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2495 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2496 MovieClip [popup18] Frame 6
stop();
Symbol 2496 MovieClip [popup18] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2498 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2499 MovieClip [popup19] Frame 6
stop();
Symbol 2499 MovieClip [popup19] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2501 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2502 MovieClip [popup21] Frame 6
stop();
Symbol 2502 MovieClip [popup21] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2504 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2505 MovieClip [popup22] Frame 6
stop();
Symbol 2505 MovieClip [popup22] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2507 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2508 MovieClip [popup20] Frame 6
stop();
Symbol 2508 MovieClip [popup20] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2510 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2511 MovieClip [popup23] Frame 6
stop();
Symbol 2511 MovieClip [popup23] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2513 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2514 MovieClip [popup24] Frame 6
stop();
Symbol 2514 MovieClip [popup24] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2516 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2517 MovieClip [popup25] Frame 6
stop();
Symbol 2517 MovieClip [popup25] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2519 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2520 MovieClip [popup26] Frame 6
stop();
Symbol 2520 MovieClip [popup26] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2522 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2523 MovieClip [popup27] Frame 6
stop();
Symbol 2523 MovieClip [popup27] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2525 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2526 MovieClip [popup28] Frame 6
stop();
Symbol 2526 MovieClip [popup28] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2528 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2530 MovieClip [popup29] Frame 6
stop();
Symbol 2530 MovieClip [popup29] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2532 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2533 MovieClip [popup30] Frame 6
stop();
Symbol 2533 MovieClip [popup30] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2535 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2536 MovieClip [popup31] Frame 6
stop();
Symbol 2536 MovieClip [popup31] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2538 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2539 MovieClip [popup46] Frame 6
stop();
Symbol 2539 MovieClip [popup46] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2541 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2542 MovieClip [popup47] Frame 6
stop();
Symbol 2542 MovieClip [popup47] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2544 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2545 MovieClip [popup48] Frame 6
stop();
Symbol 2545 MovieClip [popup48] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2547 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2548 MovieClip [popup49] Frame 6
stop();
Symbol 2548 MovieClip [popup49] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2550 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2551 MovieClip [popup50] Frame 6
stop();
Symbol 2551 MovieClip [popup50] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2553 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2554 MovieClip [popup51] Frame 6
stop();
Symbol 2554 MovieClip [popup51] Frame 12
stop();
this.removeMovieClip();
Instance of Symbol 223 MovieClip in Symbol 2556 MovieClip Frame 1
on (press) {
this._parent.removeMovieClip();
}
Symbol 2557 MovieClip [popup52] Frame 6
stop();
Symbol 2557 MovieClip [popup52] Frame 12
stop();
this.removeMovieClip();
Symbol 2573 MovieClip Frame 6
stop();
Symbol 2578 Button
on (release) {
System.security.allowDomain(_global.youdagames);
_root.hs_list = false;
_root.hs_score = _global.game.score;
_root.is_time = false;
_root.hs_gameid = 55;
_root.hs_requesturl = _global.youdagames;
_root.highscore.loadMovie(_global.highscorelink);
}
Symbol 2592 MovieClip Frame 6
stop();
Symbol 2596 Button
on (release) {
getURL (_global.buygamelink, "_blank");
}
Symbol 2610 MovieClip Frame 6
stop();
Symbol 2614 Button
on (press) {
_global.game.mode = "intro";
_global.game.playMode();
_global.game.RUSure = false;
_root.highscore.removeMovieClip();
this.removeMovieClip();
}
Symbol 2766 MovieClip Frame 1
stop();
Symbol 2767 Button
on (press) {
getURL ("http://www.youdagames.com", "_blank");
}
Symbol 2792 MovieClip Frame 99
_root.gotoAndPlay("naintro");