Frame 1
function langtxt(id) {
if ((z = danelang["l_" + id])) {
return(z);
}
trace("BRAK T\u0141MACZENIA! " + id);
return("BRAK: " + id);
}
function formatcurrency(num) {
wynik = "";
while (num >= 1000) {
kawalek = num % 1000;
if (kawalek < 10) {
kawalek = "00" + kawalek;
} else if (kawalek < 100) {
kawalek = "0" + kawalek;
}
wynik = ("," + kawalek) + wynik;
num = Math.floor(num / 1000);
}
wynik = num + wynik;
return("$ " + wynik);
}
function langwypiszwszystkie() {
uzyte = new Array("web_menu_play", "web_menu_help", "web_tryfullversion", "web_back", "web_helpC", "web_tryfullversionC", "web_backC", "web_level", "web_l1_0", "web_l1_1", "web_l1_2", "web_l1_3", "web_onlyinfullversion", "web_pause", "web_gamepaused", "web_youwon", "web_gamepaused", "web_nextlevel", "web_playagain", "web_continue", "web_l2_0", "web_l2_1", "web_l3_0", "web_l4_0", "carProcess", "sendToBodywork", "alreadyBodyworked", "alreadyCleaned", "sendToCleaning", "alreadyRepaired", "sendToWorkshop", "howtoplay", "goalHintTotalMoney", "buildingOccupied", "alreadyBodyworked", "carBroken", "lackOfSpares", "actionBroken", "actionField", "actionBodywork", "floatingNotOnField", "floatingProcessing", "actionOwned", "actionField", "actionOwned", "actionField", "lackOfMoney", "floatingNotOnField", "alreadyCleaned", "actionClean", "actionDirty", "actionBroken", "actionRental", "floatingDirty", "floatingBroken", "carProcess", "carProcess", "buildingOccupied", "alreadyRepaired", "lackOfSpares", "actionField", "actionWorkshop", "floatingNotOnField", "floatingProcessing", "carBrokenForSale", "carDirtyForSale", "actionSell", "actionSell", "floatingNotOnField", "floatingSpares", "actionRental", "actionNoRental", "actionSpares", "actionSparesAmount", "needMoney", "lackOfMoney_short", "goalTextTotalMoney", "lackOfMoney_long", "gui_bodywork", "gui_broken", "gui_clean", "gui_dirty", "gui_engine", "gui_tuning", "gui_waxed", "gui_working", "gui_notonfield", "gui_notowned", "gui_forsale", "gui_finances", "gui_spareparts", "gui_employees", "gui_parts", "gui_repairshop", "gui_bodyshop", "pickup", "sedan", "wagon", "goalTextTotalMoney");
var _local1 = new Array();
for (i in uzyte) {
idx = -1;
for (ii in _local1) {
if (_local1[ii] == uzyte[i]) {
idx = ii;
}
}
if (idx == -1) {
_local1.push(uzyte[i]);
}
}
for (ii in _local1) {
i = _local1[ii];
trace(("------------ " + i) + " ------------");
trace(langtxt(i));
}
}
function ladnieczas(s) {
s = Math.round(s);
var _local1 = s % 60;
if (_local1 < 10) {
_local1 = "0" + _local1;
}
return((Math.floor(s / 60) + ":") + _local1);
}
var submithighscores = function (hslevel, hstime) {
trace(((("submithighscores(" + hslevel) + ",") + hstime) + ")");
};
_root.loadVariables("trythefullversionurl.txt");
var zarobek = 0;
var akttlo = "";
var sounds = new Object();
var musicpausedat = 0;
var soundstoload = 0;
var autohelp = 0;
var _lastrent = 0;
var _rentinterval = 15;
var komunikatilejeszcze = 0;
var mbkomunikat = "";
komunikat.napis = "";
komunikat._alpha = 0;
_root.tryfullversion._visible = false;
var roznicaczasu = 0;
var wleczesieglosnosc = false;
var glmuz = 1;
var gl = 100;
var szerpaskaglosnosci = glosnosc.pasek._width;
var loadsound = function (name) {
trace("loadsound: " + name);
_root.sounds[name] = new Sound();
_root.sounds[name].loadSound(name + ".mp3");
_root.sounds[name].onLoad = function () {
_root.soundstoload--;
trace("D\u0179WI\u0118K ZA\u0141ADOWANY!");
if (_root.soundstoload < 1) {
if (!_root.sounds["music-barrens"]) {
_root.loadsound("music-barrens");
} else if (!_root.sounds["music-country"]) {
_root.sounds["music-barrens"].onSoundComplete = function () {
_root.gramuzyka = false;
_root.musicpausedat = 0;
};
_root.loadsound("music-country");
} else {
trace("MUZYKA ZA\u0141ADOWANA!");
_root.sounds["music-country"].onSoundComplete = function () {
_root.gramuzyka = false;
_root.musicpausedat = 0;
};
}
}
};
if (name.indexOf("music-") != 0) {
_root.soundstoload++;
}
};
var playsound = function (name) {
if (sounds[name] && (sounds[name].getBytesLoaded() == sounds[name].getBytesTotal())) {
sounds[name].start(0);
}
};
var gramuzyka = false;
var playmusic = function () {
if (_root.stan != "gra") {
return(undefined);
}
if ((_root.sounds["music-" + _root.akttlo] && (_root.sounds["music-" + _root.akttlo].getBytesLoaded() == _root.sounds["music-" + _root.akttlo].getBytesTotal())) && (_root.sounds["music-" + _root.akttlo].getBytesTotal() > 1000)) {
_root.sounds["music-" + _root.akttlo].start(_root.musicpausedat / 1000);
gramuzyka = true;
}
};
loadsound("autostart");
loadsound("autozepsute");
loadsound("aplauz");
loadsound("aplauzkrotki");
i = 0;
while (i < 4) {
loadsound("barrens-" + i);
loadsound("country-" + i);
i++;
}
loadsound("hello_m");
loadsound("hello_f");
loadsound("goodbye_m");
loadsound("goodbye_f");
loadsound("carhorn");
loadsound("spray");
loadsound("wiertara");
var danelang = {l_howtoplay:"This game is about running a garage. You can earn money in a number of ways. You can buy different cars to rent them or sell them with profit. Sometimes cars need to be fixed or cleaned. You can also upgrade your cars in order to increase their value.\nEvery new level is giving you additonal options and features.\nYou can read more details by clicking the in-game HELP button.", l_web_menu_play:"Play", l_web_menu_help:"Help", l_web_tryfullversion:"Try the full version", l_web_back:"Back", l_web_helpC:"HELP", l_web_tryfullversionC:"TRY THE FULL VERSION", l_web_backC:"BACK", l_web_level:"Level", l_web_l1_0:"REPAIR CARS", l_web_l1_1:"SELL CARS", l_web_l1_2:"BUY CARS", l_web_l1_3:"BUY PARTS", l_web_onlyinfullversion:"ONLY IN THE\nFULL VERSION", l_web_pause:"PAUSE", l_web_gamepaused:"GAME PAUSED", l_web_youwon:"YOU WIN!", l_web_gamepaused:"GAME PAUSED", l_web_nextlevel:"NEXT LEVEL!", l_web_playagain:"PLAY AGAIN", l_web_continue:"CONTINUE", l_web_l2_0:"CLEAN CARS", l_web_l2_1:"COLLECT RENT", l_web_l3_0:"PAINT CARS", l_web_l4_0:"NEW CAR", l_actionBodywork:"BODYWORK UPGRADE IN PROGRESS . . . ", l_actionBroken:"THE CAR NEEDS TO BE FIXED! ", l_actionCarwash:"THE CAR IS BEING WAXED . . . ", l_actionClean:"THE CAR IS BEING CLEANED . . . ", l_actionDirty:"THE CAR NEEDS TO BE CLEANED! ", l_actionDisassembly:"DISASSEMBLING THE CAR . . . ", l_actionEngine:"ENGINE UPGRADE IN PROGRESS . . . ", l_actionField:"THE CAR NEEDS TO BE PUT ON FIELD! ", l_actionNoRental:"THERE ARE NO CARS READY FOR RENT ", l_actionOwned:"YOU DO NOT OWN THIS CAR ", l_actionRental:"COLLECTING RENT ( [AMOUNT] ) . . . ", l_actionSell:"THE CAR IS WAITING FOR A BUYER . . . ", l_actionSpares:"WAITING FOR [AMOUNT] SPARE PARTS . . . ", l_actionSparesAmount:"SPARE PARTS IN STORAGE: [AMOUNT] ", l_actionSpecial:"IT'S SPECIAL ORDER CAR ", l_actionTuning:"TUNING UPGRADE IN PROGRESS . . . ", l_actionWaiting:"WAITING FOR SERVICE . . . ", l_actionWorker:"WAITING FOR AN EMPLOYEE . . . ", l_actionWorkers:"WAITING FOR [AMOUNT] EMPLOYEES . . . ", l_actionWorkersAmount:"EMPLOYEES IN OFFICE: [AMOUNT] ", l_actionWorkshop:"THE CAR IS BEING REPAIRED . . . ", l_lackOfMoney_short:"NOT ENOUGH MONEY: ", l_needMoney:"Money needed: ", l_needSpares:"Spare Parts needed: ", l_needWorkers:"Employees needed: ", l_needWorkersAndSpares:"You need [WORKERS] employees and [SPARES] Spare Parts. ", l_moneygoal_brief:"Lets see how fast you are, and how good is your timing! Try your skills at managing to get a certain amount of money as fast as possible! ", l_timechallenge_brief:"Well, now it's your turn! Let's see if you are better at this than I am. How much money can you get in a limited time? Go on and check yourself! ", l_bodywork:"Body Shop ", l_carwash:"Car wash ", l_disassembly:"Disassembly ", l_engine:"Engine Shop ", l_office:"Office ", l_tuning:"Tuning Shop ", l_workshop:"Repair Shop ", l_cabrio:"CONVERTIBLE ", l_mini:"MINI ", l_pickup:"PICKUP ", l_police:"POLICE TRUCK ", l_sedan:"SEDAN ", l_sports:"SPORTS ", l_van:"VAN ", l_wagon:"WAGON ", l_floatingBroken:"BROKEN! ", l_floatingDirty:"DIRTY! ", l_floatingLackOfMoney:"Not enough money! ", l_floatingLackOfSpares:"Not enough parts! ", l_floatingLackOfWorkers:"Not enough employees! ", l_floatingLevelCompleted:"LEVEL COMPLETED ", l_floatingNotOnField:"NOT-ON-FIELD! ", l_floatingProcessing:"PROCESSING... ", l_floatingSpares:"PARTS ", l_floatingSpecial:"SPECIAL! ", l_policeCarRepaired:"Police Truck Fixed! ", l_policeCarWaxed:"Police Truck Waxed! ", l_taxiEngineImproved:"Engine improved! ", l_unlockFreeplay:"FREEPLAY\nLEVEL\nUNLOCKED! ", l_unlockLocation:"NEW\nLOCATION\nUNLOCKED! ", l_unlockSpecial:"SPECIAL\nLEVEL\nUNLOCKED! ", l_earnIN:"EARN IN [AMOUNT] ", l_goalAll:"ALL ", l_goalBarBuySpares:"ORDER [AMOUNT] ", l_goalBarBuyWorkers:"EMPLOY [AMOUNT] ", l_goalBarCarBodywork:"BODYWORK x[AMOUNT] ", l_goalBarCarBuy:"BUY [AMOUNT] CARS ", l_goalBarCarBuy1:"BUY A CAR ", l_goalBarCarCarwash:"WAX [AMOUNT] CARS ", l_goalBarCarCarwash1:"WAX A CAR ", l_goalBarCarClean:"CLEAN [AMOUNT] CARS ", l_goalBarCarClean1:"CLEAN A CAR ", l_goalBarCarDisassemble:"DISASSEMBLE [AMOUNT] ", l_goalBarCarEngine:"ENGINE x[AMOUNT] ", l_goalBarCarRepair:"FIX [AMOUNT] CARS ", l_goalBarCarRepair1:"FIX A CAR ", l_goalBarCarSell:"SELL [AMOUNT] CARS ", l_goalBarCarSell1:"SELL A CAR ", l_goalBarCarTuning:"TUNING x[AMOUNT] ", l_goalBarPoliceRepair:"FIX [AMOUNT] POLICE TRUCKS ", l_goalBarPoliceWax:"WAX [AMOUNT] POLICE TRUCKS ", l_goalBarRentalIncome:"[AMOUNT] RENT ", l_goalBarSpecialBuggy:"[AMOUNT] BUGGIES ", l_goalBarSpecialCopter:"A HELICOPTER ", l_goalBarSpecialHarvester:"A HARVESTER ", l_goalBarSpecialPolice:"[AMOUNT] POLICE TRUCK ", l_goalBarSpecialTaxi:"[AMOUNT] CABS ", l_goalBarTaxiEngine:"IMPROVE [AMOUNT] TAXI CABS ", l_goalBarTotalMoney:"[AMOUNT] ", l_goalBarTotalSpares:"OWN [AMOUNT] ", l_goalBarTotalWorkers:"HAVE [AMOUNT] ", l_goalTextBuildBodywork:"CONSTRUCT A BODY SHOP ", l_goalTextBuildCarwash:"CONSTRUCT THE CAR WASH ", l_goalTextBuildDisassembly:"CONSTRUCT THE DISASSEMBLY ", l_goalTextBuildEngine:"CONSTRUCT THE ENGINE SHOP ", l_goalTextBuildTuning:"CONSTRUCT THE TUNING SHOP ", l_goalTextBuildWorkshop:"CONSTRUCT A REPAIR SHOP ", l_goalTextBuySpares:"ORDER [AMOUNT] SPARE PARTS ", l_goalTextBuyWorkers:"HIRE [AMOUNT] EMPLOYEES ", l_goalTextCar:"HAVE [AMOUNT] CARS: ", l_goalTextCar1:"HAVE A CAR: ", l_goalTextPoliceRepair:"FIX [AMOUNT] POLICE TRUCKS ", l_goalTextPoliceWax:"WAX [AMOUNT] POLICE TRUCKS ", l_goalTextRentalIncome:"RENTAL INCOME OF [AMOUNT] ", l_goalTextSpecialBuggy:"CONSTRUCT [AMOUNT] BUGGIES ", l_goalTextSpecialCopter:"CONSTRUCT A HELICOPTER ", l_goalTextSpecialHarvester:"CONSTRUCT A HARVESTER ", l_goalTextSpecialPolice:"CONSTRUCT [AMOUNT] POLICE TRUCKS ", l_goalTextSpecialTaxi:"CONSTRUCT [AMOUNT] TAXI CABS ", l_goalTextTaxiEngine:"IMPROVE [AMOUNT] TAXI CABS ", l_goalTextTotalMoney:"GATHER [AMOUNT]", l_goalTextTotalSpares:"HAVE [AMOUNT] SPARE PARTS ", l_goalTextTotalWorkers:"HAVE [AMOUNT] EMPLOYEES ", l_goalTextTrainCabrio:"TRAIN EMPLOYEES IN SERVICING CONVERTIBLES ", l_goalTextTrainSports:"TRAIN EMPLOYEES IN SERVICING SPORTS CARS ", l_police_repair:"SPECIAL ORDER:\nFIX FOR [AMOUNT] ", l_police_wax:"SPECIAL ORDER:\nWAX FOR [AMOUNT] ", l_taxi_engine:"SPECIAL ORDER:\nIMPROVE FOR [AMOUNT] ", l_totalMoney:"TOTAL MONEY ", l_alreadyBodyworked:"THE CAR HAS EXCELLENT BODYWORK.\nIt has a diffrent color, and the purple icon in Car Menu is lit. ", l_alreadyCleaned:"THE CAR IS ALREADY CLEANED.\nIt looks clean, you can also check it looking at the active icon in Car Menu. ", l_alreadyEngined:"THE CAR'S ENGINE HAS BEEN REPLACED.\nIt has a new sound, and the dark red icon in Car Menu is lit. ", l_alreadyOrdered_long:"ORDER IS BEING PROCESSED.\nYou cannot place another order before the last one is delivered. Please be patient. ", l_alreadyRepaired:"THE CAR IS ALREADY WORKING.\nIt looks diffrent, and the green icon in Car Menu is lit. ", l_alreadyTuned:"THE CAR HAS BEEN ALREADY TUNED.\nIt looks a bit diffrent, and the orange icon in Car Menu is lit. ", l_alreadyWaxed:"THE CAR IS ALREADY WAXED.\nYou can check it looking at the active icon in Car Menu. ", l_buildingHintBodywork:"Your employees upgrade the car body here. They use a small amount of Spare Parts. ", l_buildingHintCarwash:"After waxing, cars no longer get dirty in rental. One employee is enough to operate the Car Wash. ", l_buildingHintDisassembly:"Sometimes investing in an old wreck just isn't smart. And we can always use additional parts... ", l_buildingHintEngine:"A sports engine is every boy's dream. A car with a new engine can be twice as expensive! ", l_buildingHintTuning:"Tuning makes a car unique. And a lot more expensive than the standard one. ", l_buildingHintWorkshop:"Your employees fix broken cars here. They use some Spare Parts in the process. ", l_buildingLocked:"THE BUILDING DOESN'T EXIST\nYou have to construct the building before you can use it! ", l_buildingOccupied:"A CAR IS IN THE BUILDING\nYou have to move the previous car before a new one can be processed! ", l_buyHandHint:"Look at hand. Green means good offer. Red higher than car value! ", l_carBroken:"BROKEN CAR\nWe need to fix the car before we invest more money in it. ", l_carBrokenForSale:"BROKEN CAR\nThe car is broken. None will want to buy it! You have to fix the car before selling it! ", l_carClean:"CLEAN CAR\nThe car is already clean. It still may get dirty later - we'll detail then. ", l_carDirtyForSale:"DIRTY CAR\nThe car is dirty. None will want to buy it! You must wash the car before selling it! ", l_carInvalidType:"WRONG CAR\nThis car cannot be converted. You have to choose the right model. ", l_carNotReady:"CAR NOT READY\nThe car is not ready for conversion. You have to upgrade it further. ", l_carProcess:"BUILDING IN USE\nThis building is still used by previous car. Wait until the work is finished. ", l_doesNotAcceptCars:"You do not need to use a car to construct this special vehicle. Simply click the button, like when constructing buildings. ", l_done:"You have already done this. ", l_goalHintBuildBodywork:"If you have enough money, you can do it by clicking the tick over the Building Plot. ", l_goalHintBuySpares:"You can buy spare parts in the Spare Parts Menu on the bottom of the screen. ", l_goalHintBuyWorkers:"You can employ more employees in the Employees Menu on the bottom of the screen. ", l_goalHintCar:"All cars have to be [DESCRIPTION] ", l_goalHintCar1:"This car has to be [DESCRIPTION] ", l_goalHintCarBodywork:"To improve bodywork, drag a car to the Body Shop. You need some employees and spare parts. ", l_goalHintCarBuy:"To buy a car, wait until it arrives at the street, then select it and click the tick. ", l_goalHintCarCarwash:"To wax a car, drag it to the Car Wash. It won't get dirty anymore, unless you upgrade it further. ", l_goalHintCarClean:"To clean a car, simply double-click on it. You need an employee to clean a car. ", l_goalHintCarDisassemble:"To disassemble a car, drag it to the Disassembly. Remember you will lose the car afterwards! ", l_goalHintCarEngine:"To replace a car engine, drag the car to the Engine Shop. You need some employees and spare parts. ", l_goalHintCarRepair:"To fix a car, drag it to the Repair Shop. You will need some employees and spare parts. ", l_goalHintCarSell:"To sell a car, drag it to the Selling Slot, then wait for an offer and accept it. ", l_goalHintCarTuning:"To tune a car, drag it to the Tuning Shop. You need some employees and spare parts. ", l_goalHintPoliceRepair:"Fix Police Trucks by taking them to Repair Shop. You'll get the reward as soon as the car is running. ", l_goalHintPoliceWax:"Wax Police Trucks by taking them to Carwash. You'll get the reward as soon, as the car is waxed. ", l_goalHintRentalIncome:"Rental income is acquired from every clean, working car you have in your yard. ", l_goalHintSpecialBuggy:"You make a Beach Buggy like you construct buildings, but with employees and spare parts. ", l_goalHintSpecialCopter:"You can do it the way you construct buildings, but you need employees and spare parts. ", l_goalHintSpecialHarvester:"You can do it the way you construct buildings, but you need employees and Spare Parts. ", l_goalHintSpecialPolice:"You make a Police Truck from a fully upgraded Pickup by dragging it to the special slot. ", l_goalHintSpecialTaxi:"You make a Taxi Cab from a fully upgraded Sedan by dragging it to the special slot. ", l_goalHintTaxiEngine:"Improve Taxi's engines by taking them to Engine Shop. You'll get the reward as soon as the car is running. ", l_goalHintTotalMoney:"You earn money by selling cars or collecting rent from clean, running cars you own. ", l_goalHintTotalSpares:"You can buy spare parts in the Spare Parts Menu on the bottom of the screen. ", l_goalHintTotalWorkers:"You can employ more employees in the Employees Menu on the bottom of the screen. ", l_goalHintTrainCabrio:"You can train your employees as long as none are occupied and you have enough money. ", l_goalHintTrainSports:"You can train your employees as long as none are occupied and you have enough money. ", l_invalidCarType:"You cannot do this with that type of car. ", l_lackOfMoney:"NOT ENOUGH MONEY!\nYellow color means next rental income is enough, Red requires your attention. You need ", l_lackOfMoney_long:"NOT ENOUGH MONEY!\nYou can earn more money by waiting for rental income or by selling your cars. You need ", l_lackOfSpares:"NOT ENOUGH SPARE PARTS!\nYellow color means next delivery is big enough, Red requires your attention. You need ", l_lackOfWorkers:"NOT ENOUGH EMPLOYEES!\nYellow color means your team is big enough but busy, Red - you need to hire some. You need ", l_lastGoal:"There is only one goal left to finish the level! ", l_lastRentalGoal:"You have enough cars to finish level! Cars must be clean, working and standing on the field, though. ", l_levelTimeComing:"Time is running out!!! We still need to complete some goals! ", l_primeTimeComing:"The Prime Time will be over soon, and we still need to complete some goals! ", l_primeTimeGone:"The Prime Time is already over. We still need to complete some goals! ", l_seashore1_buying_hint:"You're right, Doll! You can get new cars much faster! ", l_seashore6_buggy_hint:"To build a Beach Buggy, use the structure next to the beach. ", l_sellHandHint:"Look at hand. Green means good offer. Red lower than car value! ", l_sendToBodywork:"THE CAR HAS NO BODY UPGRADE.\nIf you have spare parts, you can upgrade it in the highlighted building. ", l_sendToCarwashClean:"THE CAR IS CLEAN.\nYou can still wax it in the Car Wash if you want it to remain this way for long. ", l_sendToCarwashDirty:"THE CAR IS DIRTY.\nYou can either clean it with double click or send it to the Car Wash building for waxing. ", l_sendToCleaning:"THE CAR IS DIRTY.\nYou can clean it by double-clicking. ", l_sendToEngine:"THE CAR HAS STANDARD ENGINE.\nIf you have enough employees & spare parts, you can upgrade it in the highlighted building. ", l_sendToTuning:"THE CAR HAS NO TUNING UPGRADE.\nIf you have enough employees & spare parts, you can upgrade it in the highlighted building. ", l_sendToWorkshop:"THE CAR IS BROKEN.\nYou can repair it in the highlighted building if you have enough spare parts. ", l_suburbs2_special_order_hint:"Sometimes you can perform special orders on cars that are not your own. You will get money just after finishing job. ", l_suburbs5_special_police_description:"This place where we build police trucks. You need spare parts, workers and pickup with all upgrades. ", l_timeChallengeGoal:"Earn as much as possible! ", l_trainingWorkersBusy:"Some of your employees are busy.\nYou have to train them all at once. ", l_unknownCartype:"You need to train your employees\nto work with that type of car. ", l_Menu:"MENU ", l_rentalCurrent:"current ", l_rentalIncome:"RENTAL INCOME ", l_rentalMaximum:"maximum ", l_replayLevel:"REPLAY LEVEL ", l_restartLevelButton:"RESTART LEVEL ", l_resumeButton:"RESUME GAME ", l_selectLevel:"Select a level to play it... ", l_settingsButton:"SETTINGS ", l_skip:"SKIP ", l_stage:"Stage ", l_stageComplete:"Stage complete! ", l_hintFreeplay:"Complete the SPECIAL LEVEL to unlock ", l_hintNormal:"Complete previous levels to unlock ", l_hintSpecial:"Complete all levels in PRIME TIME to unlock ", l_hollywoodButton:"Hollywood ", l_levelFreeplay:"FREEPLAY LEVEL ", l_levelNormal:"CURRENT LEVEL ", l_levelSpecial:"SPECIAL LEVEL ", l_lockedFreeplay:"FREEPLAY LEVEL LOCKED ", l_lockedNormal:"LEVEL LOCKED ", l_lockedSpecial:"SPECIAL LEVEL LOCKED ", l_seashoreButton:"Sea Shore ", l_suburbsButton:"Suburbs ", l_AreYouSure:"Are You sure? ", l_back:"BACK ", l_backButton:"BACK ", l_barrensButton:"Barrens ", l_campaignButton:"PLAY GAME ", l_canCancel:"You can press 'Cancel' if you change your mind. ", l_CANCEL:"CANCEL ", l_connectionError:"Verification error. Try again. ", l_continue:"CONTINUE ", l_countryButton:"Country ", l_CREATE:"CREATE ", l_creditsButton:"CREDITS ", l_creditsTitle:"THE END ", l_downtownButton:"Downtown ", l_EffectsVolume:"EFFECTS VOLUME ", l_Fullscreen:"FULLSCREEN ", l_highScores:"HIGH SCORES ", l_highscoresButton:"HIGHSCORES ", l_HighScoresMoney:"MONEY ", l_highscoresMoneyButton:"MONEY GOAL ", l_HighScoresPlayer:"PLAYER ", l_HighScoresTime:"TIME ", l_highscoresTimeButton:"TIME GOAL ", l_mainMenuButton:"QUIT TO MENU ", l_mainMenuProfileMoneyUnderline:"Money earned in the Story Mode ", l_mainMenuProfileNameUnderline:"You can change your Profile in the Settings menu ", l_MusicVolume:"MUSIC VOLUME ", l_next:"NEXT ", l_nextLevel:"NEXT LEVEL ", l_Off:"OFF ", l_OK:"OK ", l_On:"ON ", l_optionsButton:"OPTIONS ", l_play:"PLAY! ", l_pleseEnterName:"Please enter your name ", l_quitButton:"QUIT ", l_$:"$ ", l_and:"and ", l_goalBodywork:"bodyworked ", l_goalCarwash:"waxed ", l_goalClean:"clean ", l_goalEngine:"with new engine ", l_goalRepair:"working ", l_goalStar:"owned by a star ", l_goalTuning:"tuned ", l_locked:"Locked (for now). ", l_of:"of ", l_taxi:"TAXI CAB ", l_Father:"Dad (Frank) ", l_Greg:"Greg ", l_Kate:"Kate ", l_Lee:"Mr. Lee ", l_Martin:"Martin ", l_Sheriff:"Sheriff Watson ", l_Steve:"Steve ", l_Uncle:"Uncle Ted ", l_bestHighScore:"Yeah! You are the best! ", l_doneNormal:"COMPLETED (NORMAL) ", l_donePrime:"COMPLETED (PRIME!) ", l_doneSpecial:"SPECIAL LEVEL DONE ", l_failedHighScore:"What a pity. Better luck next time... ", l_levelFail:"What a pity. Better luck next time... ", l_levelPrime:"Congratulations! You completed the level in PRIME TIME! ", l_levelSuccess:"Congratulations! You managed to complete the level in time! ", l_newHighScore:"Hurray! You achieved getting high score! ", l_primeTitle:"CHOOSE YOUR REWARD! ", l_primeTitleDouble:"CHOOSE YOUR REWARD! ", l_primeTitleSingle:"YOUR FINAL REWARD IS ", l_textBriefingTimeTitle:"TIME ", l_textSummaryCareerTitle:"CAREER ", l_textSummaryCurrentTitle:"CURRENT ", l_time:"TIME ", l_gui_bodywork:"BODYWORK ", l_gui_broken:"BROKEN ", l_gui_clean:"CLEAN ", l_gui_dirty:"DIRTY ", l_gui_engine:"ENGINE ", l_gui_tuning:"TUNING ", l_gui_waxed:"WAXED ", l_gui_working:"WORKING ", l_gui_notonfield:"NOT ON FIELD ", l_gui_notowned:"NOT OWNED ", l_gui_forsale:"FOR SALE ", l_gui_specialcar:"SPECIAL CAR ", l_gui_finances:"FINANCES ", l_gui_spareparts:"SPARE PARTS ", l_gui_employees:"EMPLOYEES ", l_gui_parts:"[AMOUNT] PARTS ", l_gui_employee:"1 EMPLOYEE ", l_gui_employees:"[AMOUNT] EMPLOYEES ", l_gui_construct:"CONSTRUCT THE ", l_gui_trainemployees:"TRAIN EMPLOYEES IN SERVICING ", l_gui_repairshop:"REPAIR SHOP ", l_gui_bodyshop:"BODY SHOP ", l_gui_tuningshop:"TUNING SHOP ", l_gui_carwash:"CAR WASH ", l_gui_engineshop:"ENGINE SHOP ", l_gui_disassembly:"DISASSEMBLY ", l_gui_sedans:"SEDANS ", l_gui_pickups:"PICKUPS ", l_gui_wagons:"WAGONS ", l_gui_minis:"MINIS ", l_gui_vans:"VANS ", l_gui_convertibles:"CONVERTIBLES ", l_gui_sports:"SPORTS ", l_gui_title:"Fix-it-up: Kate`s Adventure"};
var danelangtxt = "------------ actionClean ------------\nTHE CAR IS BEING CLEANED . . . \n------------ actionDirty ------------\nTHE CAR NEEDS TO BE CLEANED! \n------------ actionBroken ------------\nTHE CAR NEEDS TO BE FIXED! \n------------ actionRental ------------\nCOLLECTING RENT ( [AMOUNT] ) . . . \n------------ floatingDirty ------------\nDIRTY! \n------------ floatingBroken ------------\nBROKEN! \n------------ carProcess ------------\nBUILDING IN USE\nThis building is still used by the previous car. Wait until the work is finished. \n------------ carProcess ------------\nBUILDING IN USE\nThis building is still used by the previous car. Wait until the work is finished. \n------------ buildingOccupied ------------\nA CAR IS IN THE BUILDING\nYou have to move the previous car before a new one can be processed! \n------------ alreadyRepaired ------------\nTHE CAR IS ALREADY WORKING.\nIt looks different and the green icon in the Car Menu is lit. \n------------ lackOfSpares ------------\nNOT ENOUGH SPARE PARTS!\nYellow color means next delivery is big enough, Red requires your attention. You need \n------------ actionField ------------\nTHE CAR NEEDS TO BE PUT ON FIELD! \n------------ actionWorkshop ------------\nTHE CAR IS BEING REPAIRED . . . \n------------ floatingNotOnField ------------\nNOT-ON-FIELD! \n------------ floatingProcessing ------------\nPROCESSING... \n------------ carBrokenForSale ------------\nBROKEN CAR\nThe car is broken. No one will want to buy it! You have to fix the car before selling it! \n------------ carDirtyForSale ------------\nDIRTY CAR\nThe car is dirty. No one will want to buy it! You must wash the car before selling it! \n------------ actionSell ------------\nTHE CAR IS WAITING FOR A BUYER . . . \n------------ actionSell ------------\nTHE CAR IS WAITING FOR A BUYER . . . \n------------ floatingNotOnField ------------\nNOT-ON-FIELD! \n------------ floatingSpares ------------\nPARTS \n------------ actionRental ------------\nCOLLECTING RENT ( [AMOUNT] ) . . . \n------------ actionNoRental ------------\nTHERE ARE NO CARS READY FOR RENT \n------------ actionSpares ------------\nWAITING FOR [AMOUNT] SPARE PARTS . . . \n------------ actionSparesAmount ------------\nSPARE PARTS IN STORAGE: [AMOUNT] \n------------ needMoney ------------\nMoney needed: \n------------ lackOfMoney_short ------------\nNOT ENOUGH MONEY: \n------------ goalTextTotalMoney ------------\nGATHER [AMOUNT]\n------------ lackOfMoney_long ------------\nNOT ENOUGH MONEY!\nYou can earn more money by waiting for rental income or by selling your cars. You need \n------------ gui_bodywork ------------\nBODYWORK \n------------ gui_broken ------------\nBROKEN \n------------ gui_clean ------------\nCLEAN \n------------ gui_dirty ------------\nDIRTY \n------------ gui_engine ------------\nENGINE \n------------ gui_tuning ------------\nTUNING \n------------ gui_waxed ------------\nWAXED \n------------ gui_working ------------\nWORKING \n------------ gui_notonfield ------------\nNOT ON FIELD \n------------ gui_notowned ------------\nNOT OWNED \n------------ gui_forsale ------------\nFOR SALE \n------------ gui_finances ------------\nFINANCES \n------------ gui_spareparts ------------\nSPARE PARTS \n------------ gui_employees ------------\nEMPLOYEES \n------------ gui_parts ------------\n[AMOUNT] PARTS \n------------ gui_repairshop ------------\nREPAIR SHOP \n------------ gui_bodyshop ------------\nBODY SHOP \n------------ pickup ------------\nPICKUP \n------------ sedan ------------\nSEDAN \n------------ wagon ------------\nWAGON \n------------ goalTextTotalMoney ------------\nGATHER [AMOUNT]";
var danelangtxt = danelangtxt.split(newline);
var identyfikator = "";
i = 0;
while (i < danelangtxt.length) {
l = danelangtxt[i];
if (l.indexOf("------------") > -1) {
identyfikator = "l_" + l.substr(13, l.length - 26);
trace(("[" + identyfikator) + "]");
danelang[identyfikator] = "";
} else {
if (danelang[identyfikator] != "") {
danelang[identyfikator] = danelang[identyfikator] + newline;
}
danelang[identyfikator] = danelang[identyfikator] + l;
}
i++;
}
var dragged = null;
var draggedfromx = 0;
var draggedfromy = 0;
var draggedover = null;
var loaded = false;
var stan = "";
var _lastclicktimestamp = 0;
var _lastclickx = 0;
var _lastclicky = 0;
var osttiktak = 0;
var czasgry = 0;
var currentlevel = 0;
var totalnywynik = 0;
var FINANCES = 100000;
var SPAREPARTS = 100;
var FINANCESneeded = 0;
var SELECTED = null;
var SPAREPARTSorderednum = -1;
var SPAREPARTSorderedtimeelapsed = 0;
var ilefieldow = 4;
i = 0;
while (i < ilefieldow) {
_root["field" + i]._progressbar = _root["progressclean" + i];
_root["progressclean" + i]._visible = false;
i++;
}
konieclevelu._visible = false;
_root.uniqid = random(90000) + 10000;
var klikglosnosc = function () {
gl = Math.min(100, Math.max(0, (100 * (glosnosc._xmouse - glosnosc.pasek._x)) / _root.szerpaskaglosnosci));
glosnosc.pasek._xscale = gl;
glosnosc.zakaz._visible = gl == 0;
trace("G\u0141O\u015ANO\u015A\u0106: " + gl);
for (i in sounds) {
if (i.indexOf("music-") > -1) {
sounds[i].setVolume(gl * glmuz);
} else {
sounds[i].setVolume(gl);
}
}
};
glosnosc.zakaz._visible = false;
var klikmuzyka = function () {
if (glmuz == 0) {
glmuz = 1;
glosnoscmuzyki.zakaz._visible = false;
} else {
glmuz = 0;
glosnoscmuzyki.zakaz._visible = true;
}
for (i in sounds) {
if (i.indexOf("music-") > -1) {
sounds[i].setVolume(gl * glmuz);
} else {
sounds[i].setVolume(gl);
}
}
};
glmuz = 0;
klikmuzyka();
var ostatnioodglos = -1;
var odgloslicznik = 0;
onMouseDown = function () {
if (_root.glosnosc.hitTest(_xmouse, _ymouse, false)) {
wleczesieglosnosc = true;
klikglosnosc();
}
if (stan != "gra") {
return(undefined);
}
if ((_root.komunikat._alpha > 50) && (_root.komunikat.hitTest(_root._xmouse, _root._ymouse, true))) {
komunikatilejeszcze = 0.1;
}
var _local3 = null;
var _local4 = 1000000000 /* 0x3B9ACA00 */;
trace((this._xmouse + " ") + this._ymouse);
teraz = getTimer();
for (i in this) {
if (((this[i] instanceof Car) && (teraz >= this[i]._chwytalnyod)) && (this[i].hitTest(this._xmouse, this._ymouse, true))) {
dx = this[i]._x - this._xmouse;
dy = this[i]._y - this._ymouse;
odl = (dx * dx) + (dy * dy);
if (odl < _local4) {
_local3 = i;
_local4 = odl;
}
}
}
if (_local3 != null) {
if (SELECTED != this[_local3]) {
playsound((this[_local3]._broken ? "autozepsute" : "autostart"));
this[_local3]._field.carclicked();
trace("KLIK w auto!");
}
SELECTED = this[_local3];
mozna = true;
_root.debugdopisz(this[_local3]._field);
if (this[_local3]._field != null) {
mozna = this[_local3]._field.testdrag();
}
if (!this[_local3]._owned) {
mozna = false;
}
debugdopisz("mozna dragowac: " + mozna);
if (mozna) {
dragged = this[_local3];
draggedfromx = dragged._x;
draggedfromy = dragged._y;
draggedover = null;
startDrag (dragged);
}
}
pilnujpoziomow();
};
onMouseMove = function () {
if (wleczesieglosnosc) {
klikglosnosc();
}
if (stan != "gra") {
return(undefined);
}
if (dragged != null) {
var _local3 = null;
draggedbounds = dragged.getBounds(_root);
ostodl = 100000000 /* 0x5F5E100 */;
for (i in this) {
if (((this[i] instanceof Field) && (this[i].hitTest(dragged))) && (this[i]._visible)) {
dx = dragged._x - this[i]._x;
dy = dragged._y - this[i]._y;
odl = (dx * dx) + (dy * dy);
if (odl < ostodl) {
_local3 = i;
ostodl = odl;
}
}
}
if (draggedover != _local3) {
draggedover.testdrop(null);
}
if (_local3 != null) {
draggedover = this[_local3];
draggedover.testdrop(dragged);
} else {
draggedover = null;
}
}
};
onMouseUp = function () {
czasteraz = getTimer();
if ((czasteraz - _lastclicktimestamp) < 500) {
dx = _lastclickx - _xmouse;
dy = _lastclicky - _ymouse;
if (((dx * dx) + (dy * dy)) < 100) {
for (i in this) {
if ((((this[i] instanceof Field) && (this[i]._car != null)) && (this[i]._car.hitTest(_xmouse, _ymouse, 1))) && (this[i]._car == _root.SELECTED)) {
this[i].cardoubleclicked();
trace("DOUBLECLICK: " + i);
}
}
}
}
_lastclicktimestamp = czasteraz;
_lastclickx = _xmouse;
_lastclicky = _ymouse;
wleczesieglosnosc = false;
if (stan != "gra") {
return(undefined);
}
if (dragged != null) {
stopDrag();
if (draggedover != null) {
if ("" != ((powod = draggedover.testdrop(dragged)))) {
if ((draggedover != null) && (powod != "-")) {
mbkomunikat = powod;
trace((draggedover + ": ") + powod);
}
new mx.transitions.Tween(dragged, "_x", mx.transitions.easing.Regular.easeInOut, dragged._x, draggedfromx, 0.2, true);
new mx.transitions.Tween(dragged, "_y", mx.transitions.easing.Regular.easeInOut, dragged._y, draggedfromy, 0.2, true);
dragged._chwytalnyod = getTimer() + 200;
} else if (draggedover._car != null) {
draggedfrom = dragged._field;
cartoswap = draggedover._car;
if ((draggedfrom instanceof FieldField) && ((((draggedover instanceof FieldField) || (draggedfrom instanceof FieldField)) && ("" == draggedfrom.testdrop(cartoswap))) && (draggedover.testdrag()))) {
draggedfrom._car = null;
draggedover._car = null;
dragged._field = null;
cartoswap._field = null;
new mx.transitions.Tween(cartoswap, "_x", mx.transitions.easing.Regular.easeInOut, cartoswap._x, draggedfromx, 0.1, true);
new mx.transitions.Tween(cartoswap, "_y", mx.transitions.easing.Regular.easeInOut, cartoswap._y, draggedfromy, 0.1, true);
dragged._chwytalnyod = getTimer() + 100;
draggedfrom.drop(cartoswap);
draggedover.drop(dragged);
trace((("SWAP! " + cartoswap) + " ") + draggedfrom);
new mx.transitions.Tween(dragged, "_x", mx.transitions.easing.Regular.easeInOut, dragged._x, draggedover._x, 0.1, true);
new mx.transitions.Tween(dragged, "_y", mx.transitions.easing.Regular.easeInOut, dragged._y, draggedover._y, 0.1, true);
dragged._chwytalnyod = getTimer() + 100;
} else {
new mx.transitions.Tween(dragged, "_x", mx.transitions.easing.Regular.easeInOut, dragged._x, draggedfromx, 0.2, true);
new mx.transitions.Tween(dragged, "_y", mx.transitions.easing.Regular.easeInOut, dragged._y, draggedfromy, 0.2, true);
dragged._chwytalnyod = getTimer() + 200;
}
} else {
draggedover.drop(dragged);
new mx.transitions.Tween(dragged, "_x", mx.transitions.easing.Regular.easeInOut, dragged._x, draggedover._x, 0.1, true);
new mx.transitions.Tween(dragged, "_y", mx.transitions.easing.Regular.easeInOut, dragged._y, draggedover._y, 0.1, true);
dragged._chwytalnyod = getTimer() + 100;
}
} else {
new mx.transitions.Tween(dragged, "_x", mx.transitions.easing.Regular.easeInOut, dragged._x, draggedfromx, 0.2, true);
new mx.transitions.Tween(dragged, "_y", mx.transitions.easing.Regular.easeInOut, dragged._y, draggedfromy, 0.2, true);
dragged._chwytalnyod = getTimer() + 200;
}
draggedover = null;
dragged = null;
draggedover = null;
}
if ((((!_root.yesnosell.hitTest(_root._xmouse, _root._ymouse, true)) || (!_root.yesnosell._visible)) && ((!_root.yesnobuy.hitTest(_root._xmouse, _root._ymouse, true)) || (!_root.yesnobuy._visible))) && (!_root.guimc.hitTest(_root._xmouse, _root._ymouse, true))) {
var _local4 = null;
var _local3 = 1000000000 /* 0x3B9ACA00 */;
trace((this._xmouse + " ") + this._ymouse);
for (i in this) {
if ((this[i] instanceof Car) && (this[i].hitTest(this._xmouse, this._ymouse, true))) {
dx = this[i]._x - this._xmouse;
dy = this[i]._y - this._ymouse;
odl = (dx * dx) + (dy * dy);
if (odl < _local3) {
_local4 = i;
_local3 = odl;
}
}
}
if (_local4 == null) {
SELECTED = null;
}
}
pilnujpoziomow();
};
var sparesamount = [50, 100, 250, 500, 2000, 5000];
var sparescost = [100, 90, 80, 75, 70, 65];
var sparestime = [5, 7, 10, 12, 15, 20];
var pilnujpoziomow = function () {
var _local3 = ["fontanna", "nadtlo", "progressrepair", "progressbodywork", "komunikat", "yesnosell", "yesnobuy", "guimc", "saleplacefront", "guzikinadgra", "progressclean0", "progressclean1", "progressclean2", "progressclean3", "bodyworksparesindicator", "mechanicalsparesindicator", "komunikat", "konieclevelu", "glosnosc", "glosnoscmuzyki", "menu", "pauza", "levelintro", "help1", "help2", "help3", "help4", "tryfullversion"];
for (c in this) {
if ((this[c] instanceof Car) && (this[c].getDepth() < 0)) {
d = 1;
while (this.getInstanceAtDepth(d)) {
d++;
}
trace("UJEMNY DEPTH AUTA! nowy: " + d);
this[c].swapDepths(d);
}
}
for (c in this) {
if (this[c] instanceof Car) {
oc = this[c];
if (oc == dragged) {
for (cc in this) {
if (((this[cc] instanceof Car) && (this[cc] != oc)) && (oc.getDepth() < this[cc].getDepth())) {
oc.swapDepths(this[cc]);
}
}
}
for (i in _local3) {
o = this[_local3[i]];
if (o.getDepth() < 0) {
o.swapDepths(this.getNextHighestDepthDODATNI());
}
czyzamienic = false;
if (oc == dragged) {
if (oc.getDepth() < o.getDepth()) {
czyzamienic = true;
}
} else if (oc.getDepth() > o.getDepth()) {
czyzamienic = true;
}
if (czyzamienic) {
oc.swapDepths(o);
}
}
}
}
i = 0;
while (i < (_local3.length - 1)) {
j = i + 1;
while (j < _local3.length) {
if (_root[_local3[i]].getDepth() > _root[_local3[j]].getDepth()) {
_root[_local3[i]].swapDepths(_root[_local3[j]]);
}
j++;
}
i++;
}
};
var tiktak = function () {
if (stan == "intro") {
ilehelpow = 0;
i = 1;
while (i <= 4) {
if ((_root["help" + i].getBytesTotal() > 10) && (_root["help" + i].getBytesLoaded() >= _root["help" + i].getBytesTotal())) {
ilehelpow++;
_root["help" + i]._visible = false;
}
i++;
}
if (ilehelpow >= 4) {
_root.loaded = true;
}
trace(ilehelpow);
nastepnygotowy = true;
if (intronum < introile) {
nastepny = intronum + 1;
if ((omc = _root["intro" + nastepny])) {
if ((omc.getBytesTotal() < 10) || (omc.getBytesTotal() > omc.getBytesLoaded())) {
nastepnygotowy = false;
}
} else {
trace((("\u0141adowanie INTRO: " + nastepny) + " ") + introurl[nastepny]);
var omc = _root.createEmptyMovieClip("intro" + nastepny, _root.getNextHighestDepthDODATNI());
omc.loadMovie(introurl[nastepny]);
omc._alpha = 0;
}
}
if (introlicznik > 0) {
_root["intro" + intronum]._alpha = (_root["intro" + intronum]._alpha + 100) / 2;
introlicznik = introlicznik - _root.coiletiktak;
} else if (nastepnygotowy) {
intronum++;
if (intronum <= introile) {
introlicznik = introtime[intronum];
} else if ((_root.getBytesLoaded() >= _root.getBytesTotal()) && (_root.loaded)) {
i = 1;
while (i < introile) {
_root["intro" + i]._visible = false;
i++;
}
_root.zaslonka._visible = false;
_root.menu._visible = true;
_root["intro" + introile]._alpha = _root["intro" + introile]._alpha * 0.5;
if (_root["intro" + introile]._alpha < 1) {
stan = "menu";
Mouse.show();
i = 1;
while (i <= introile) {
_root["intro" + i].removeMovieClip();
i++;
}
}
}
}
}
aktczas = getTimer();
roznicaczasums = aktczas - osttiktak;
if (roznicaczasums < 0) {
roznicaczasums = 1000;
}
osttiktak = aktczas;
_root.roznicaczasu = roznicaczasums / 1000;
if (stan != "gra") {
return(undefined);
}
odgloslicznik = odgloslicznik - roznicaczasu;
if (odgloslicznik < 0) {
los = random(4);
if (los == ostatnioodglos) {
los = random(4);
}
playsound((akttlo + "-") + los);
ostatnioodglos = los;
odgloslicznik = 30;
}
if (komunikatilejeszcze > 0) {
komunikatilejeszcze = komunikatilejeszcze - coiletiktak;
if (komunikatilejeszcze <= 0) {
mbkomunikat = "";
}
}
if (mbkomunikat == komunikat.napis) {
if (mbkomunikat != "") {
komunikat._alpha = (komunikat._alpha + 100) / 2;
}
} else {
komunikat._alpha = komunikat._alpha * 0.5;
if (komunikat._alpha < 1) {
komunikat.napis = mbkomunikat;
if (mbkomunikat != "") {
komunikatilejeszcze = 3;
}
}
}
if (highlighttimeout > 0) {
highlighttimeout = highlighttimeout - 5;
highlightcolor.setTint(255, 255, 255, (highlighttimeout % 25) * 4);
}
_lastrent = _lastrent + coiletiktak;
zarobek = 0;
i = 0;
while (i < _root.ilefieldow) {
if (((_root["field" + i]._car != null) && (!_root["field" + i]._car._dirty)) && (!_root["field" + i]._car._broken)) {
zarobek = zarobek + Math.round(_root["field" + i]._car.getPrice() / 10);
}
i++;
}
if (_lastrent >= _rentinterval) {
for (i in _root) {
if (_root[i]._visible) {
_root[i].rent();
}
}
_lastrent = 0;
} else {
skala = (100 * _lastrent) / _rentinterval;
if (_root.guimc._currentframe != 2) {
skala = skala * 0.85;
}
_root.guimc.prnabuttoniefinances._xscale = skala;
}
czasgry = czasgry + _root.roznicaczasu;
if (!_root.gramuzyka) {
playmusic();
}
for (i in _root) {
if (_root[i] instanceof Field) {
_root[i].tiktak();
}
}
_root.guimc.txtFINANCES = _root.formatcurrency(_root.FINANCES);
_root.guimc.txtSPAREPARTS = _root.SPAREPARTS;
for (i in _root) {
if (_root[i] instanceof Car) {
_root[i].tiktak();
}
}
if (SPAREPARTSorderednum >= 0) {
SPAREPARTSorderedtimeelapsed = SPAREPARTSorderedtimeelapsed + coiletiktak;
trace((("SPAREPARTSorderedtimeelapsed " + SPAREPARTSorderedtimeelapsed) + " ") + sparestime[SPAREPARTSorderednum]);
if (SPAREPARTSorderedtimeelapsed >= sparestime[SPAREPARTSorderednum]) {
SPAREPARTS = SPAREPARTS + sparesamount[SPAREPARTSorderednum];
SPAREPARTSorderednum = -1;
}
skala = (100 * SPAREPARTSorderedtimeelapsed) / sparestime[SPAREPARTSorderednum];
if (_root.guimc._currentframe != 4) {
skala = skala * 0.85;
}
_root.guimc.prnabuttoniespares._xscale = skala;
} else {
_root.guimc.prnabuttoniespares._xscale = 0;
}
if (_root.SELECTED == null) {
_root.SELECTED = 1;
_root.dragged = null;
}
if (_root.SELECTED instanceof Car) {
_root.guimc.gotoAndStop(1);
_root.guimc.caricon.gotoAndStop(_root.SELECTED._cartype + (_root.SELECTED._bodyworked ? 1 : 0));
_root.guimc.isclean.gotoAndStop((_root.SELECTED._dirty ? 1 : 2));
_root.guimc.isworking.gotoAndStop((_root.SELECTED._broken ? 1 : 2));
_root.guimc.isbodyworked.gotoAndStop((_root.SELECTED._bodyworked ? 2 : 1));
_root.guimc.isbodyworked._visible = _root.currentlevel > 2;
_root.guimc.cartypetxt = _root.langtxt(_root.SELECTED._cartype);
_root.guimc.carpricetxt = _root.formatcurrency(_root.SELECTED.getPrice());
if ((_root.SELECTED._broken && ((_root.mechanical._car == null) || (!_root.mechanical._car._broken))) && (_root.mechanical._visible)) {
_root.mechanicalsparesindicator.val = _root.SELECTED.getSparesNeeded("workshop");
} else {
_root.mechanicalsparesindicator.val = 0;
}
if ((((!_root.SELECTED._bodyworked) && ((_root.bodywork._car == null) || (_root.bodywork._car._bodyworked))) && (_root.bodywork._visible)) && (!_root.SELECTED._broken)) {
_root.bodyworksparesindicator.val = _root.SELECTED.getSparesNeeded("bodywork");
} else {
_root.bodyworksparesindicator.val = 0;
}
_root.guimc.carstatustext = _root.SELECTED._statustext;
if (_root.SELECTED._statustext == "") {
_root.guimc.carstatuspercent.val = 0;
} else {
_root.guimc.carstatuspercent.val = _root.SELECTED._statuspercent;
}
if (_root.SELECTED._statusicon == "") {
_root.guimc.carstatusicon._visible = false;
} else {
_root.guimc.carstatusicon._visible = true;
_root.guimc.carstatusicon.gotoAndStop(_root.SELECTED._statusicon);
}
_root.sparepartsover = -1;
} else {
_root.bodyworksparesindicator.val = 0;
_root.mechanicalsparesindicator.val = 0;
if (_root.SELECTED == 1) {
_root.sparepartsover = -1;
_root.guimc.gotoAndStop(2);
zarobek = 0;
i = 0;
while (i < _root.ilefieldow) {
if (((_root["field" + i]._car != null) && (!_root["field" + i]._car._dirty)) && (!_root["field" + i]._car._broken)) {
zarobek = zarobek + Math.round(_root["field" + i]._car.getPrice() / 10);
}
i++;
}
_root.guimc.txtRENTALINCOME = _root.formatcurrency(zarobek);
if (zarobek > 0) {
_root.guimc.carstatustext = _root.langtxt("actionRental").split("[AMOUNT]").join(_root.formatcurrency(zarobek));
_root.guimc.carstatuspercent.val = 100 * (_root._lastrent / _root._rentinterval);
_root.guimc.carstatusicon._visible = false;
} else {
_root.guimc.carstatustext = _root.langtxt("actionNoRental");
_root.guimc.carstatuspercent.val = 100 * (_root._lastrent / _root._rentinterval);
_root.guimc.carstatusicon._visible = false;
}
} else if (_root.SELECTED == 2) {
_root.guimc.gotoAndStop(4);
i = 1;
while (i <= 6) {
_root.guimc["spmc" + i].gotoAndStop(i);
_root.guimc["spbutmc" + i].num = i - 1;
i++;
}
if (SPAREPARTSorderednum >= 0) {
_root.guimc.sparepartsdeliveringmc._visible = true;
procent = 100 * (SPAREPARTSorderedtimeelapsed / sparestime[SPAREPARTSorderednum]);
_root.guimc.carstatuspercent.val = procent;
_root.guimc.carstatusicon._visible = false;
_root.guimc.carstatustext = _root.langtxt("actionSpares").split("[AMOUNT]").join(sparesamount[SPAREPARTSorderednum]);
_root.guimc.sparepartsdeliveringmc.spikonamc.gotoAndStop(SPAREPARTSorderednum + 1);
i = 1;
while (i <= 6) {
_root.guimc["spmc" + i]._alpha = 50;
_root.guimc["spbutmc" + i]._visible = false;
i++;
}
} else {
_root.guimc.sparepartsdeliveringmc._visible = false;
_root.guimc.carstatuspercent.val = -1;
_root.guimc.carstatusicon._visible = false;
_root.guimc.carstatustext = _root.langtxt("actionSparesAmount").split("[AMOUNT]").join(SPAREPARTS);
i = 1;
while (i <= 6) {
num = i - 1;
_root.guimc["spbutmc" + i]._visible = true;
if ((sparescost[num] * sparesamount[num]) <= FINANCES) {
if (num == _root.sparepartsover) {
_root.guimc.carstatustext = _root.langtxt("needMoney").toUpperCase() + _root.formatcurrency(sparescost[num] * sparesamount[num]);
}
_root.guimc["spmc" + i]._alpha = 100;
} else {
if (num == _root.sparepartsover) {
_root.guimc.carstatustext = _root.langtxt("lackOfMoney_short") + _root.formatcurrency(sparescost[num] * sparesamount[num]);
}
_root.guimc["spmc" + i]._alpha = 50;
}
i++;
}
}
}
}
_root.debugtxt = (("L: " + _root.currentlevel) + "\nT: ") + Math.round(czasgry);
_root.financesneeded = _root.langtxt("goalTextTotalMoney").split("[AMOUNT]").join(_root.formatcurrency(FINANCESneeded));
mbwskazowka = -88 * Math.min(1, FINANCES / FINANCESneeded);
_root.guimc.miernikkasy._y = (_root.guimc.miernikkasy._y + mbwskazowka) / 2;
_root.guimc.czas.napis = ladnieczas(czasgry);
_root.goal.maska._x = ((_root.goal.maska._x - 170) + (200 * Math.min(1, FINANCES / FINANCESneeded))) / 2;
if (FINANCES >= FINANCESneeded) {
_root.konieclevelu._visible = true;
komunikatilejeszcze = 0;
totalnywynik = totalnywynik + czasgry;
submithighscores(_root.currentlevel, czasgry);
if (_root.currentlevel == 4) {
_root.konieclevelu.gotoAndStop(3);
trace(_root.konieclevelu._currentframe);
_root.konieclevelu.wynik = ladnieczas(czasgry);
playsound("aplauz");
} else {
_root.konieclevelu.gotoAndStop(1);
_root.konieclevelu.wynik = ladnieczas(czasgry);
playsound("aplauzkrotki");
}
cleanup();
}
};
var orderSpareParts = function (num) {
trace("orderSpareParts: " + num);
if (SPAREPARTSorderednum < 0) {
SELECTED = 2;
if ((sparescost[num] * sparesamount[num]) <= FINANCES) {
FINANCES = FINANCES - (sparescost[num] * sparesamount[num]);
SPAREPARTSorderednum = num;
SPAREPARTSorderedtimeelapsed = 0;
} else {
mbkomunikat = _root.langtxt("lackOfMoney_long") + _root.formatcurrency(sparescost[num] * sparesamount[num]);
}
}
};
var onData = function () {
alert("LOADVARIABLES zako\u0144czone!");
};
var debugdopisz = function (s) {
_root.debugtxt = _root.debugtxt + (newline + s);
_root.debugtxt.scroll = _root.debugtxt.maxscroll;
};
var getNextHighestDepthDODATNI = function () {
d = getNextHighestDepth();
if (d <= 0) {
d = 1;
while (this.getInstanceAtDepth(d)) {
d++;
}
}
return(d);
};
var napisdymek = function (tekst, xx, yy, kolor) {
d = _root.getNextHighestDepthDODATNI();
dmc = _root.attachMovie("napisdymekleci", "dymek" + d, d, {_x:xx, _y:yy, napis:((("<font color=\"#" + kolor) + "\">") + tekst) + "</font>", napiscien:("<font color=\"#444444\">" + tekst) + "</font>"});
new mx.transitions.Tween(dmc, "_y", mx.transitions.easing.Regular.easeIn, yy, yy - 50, 3, true);
new mx.transitions.Tween(dmc, "_xscale", mx.transitions.easing.Regular.easeIn, 100, 150, 3, true);
new mx.transitions.Tween(dmc, "_yscale", mx.transitions.easing.Regular.easeIn, 100, 150, 3, true);
var _local3 = new mx.transitions.Tween(dmc, "_alpha", mx.transitions.easing.Regular.easeIn, 100, 0, 3, true);
_local3.onMotionFinished = function () {
this.obj.removeMovieClip();
};
};
var dzialklik = function (num) {
if (stan != "gra") {
return(undefined);
}
switch (num) {
case 1 :
SELECTED = 1;
break;
case 2 :
SELECTED = 2;
}
};
var tiktakownasekunde = 20;
var coiletiktak = (1 / tiktakownasekunde);
osttiktak = getTimer();
setInterval(tiktak, 1000 / tiktakownasekunde);
yesnobuy.label = "Kupujesz?";
yesnobuy.copowiadomic = _root.buyplace;
yesnobuy._visible = false;
yesnosell.label = "Sprzedajesz?";
yesnosell.copowiadomic = _root.saleplace;
yesnosell._visible = false;
pauza._visible = false;
pomoc._visible = false;
var CTRLstartlevel = function (num) {
odgloslicznik = 15;
if (!_root.loaded) {
return(undefined);
}
_root.mbkomunikat = "";
trace("CTRLstartlevel " + num);
if (num > 4) {
num = 1;
}
if (num < 1) {
num = 1;
}
konieclevelu._visible = false;
cleanup();
czasgry = 0;
_root.currentlevel = num;
for (i in xmllevele.firstChild.childNodes) {
levelxml = xmllevele.firstChild.childNodes[i];
if (levelxml.attributes.num == num) {
FINANCES = Number(levelxml.attributes.finances);
FINANCESneeded = Number(levelxml.attributes.financesneeded);
_root.financesneeded = _root.langtxt("goalTextTotalMoney").split("[AMOUNT]").join(_root.formatcurrency(FINANCESneeded));
SPAREPARTS = Number(levelxml.attributes.spareparts);
autohelp = Number(levelxml.attributes.autohelp);
ustawtlo(levelxml.attributes.location);
_root.bodywork._visible = levelxml.attributes.location == "country";
for (j in levelxml.childNodes) {
carxml = levelxml.childNodes[j];
depth = _root.getNextHighestDepthDODATNI();
_root["field" + carxml.attributes.field].drop(_root.attachMovie("car", "car" + depth, depth, {_x:_root["field" + carxml.attributes.field]._x, _y:_root["field" + carxml.attributes.field]._y, _dirty:Number(carxml.attributes.dirty), _broken:Number(carxml.attributes.broken), _bodyworked:Number(carxml.attributes.bodyworked), _cartype:carxml.attributes.type, _owned:true}));
}
}
}
pilnujpoziomow();
stan = "levelintro";
levelintro._visible = true;
levelintro.gotoAndStop(num);
levelintro.napis.gotoAndPlay(1);
if (num == 1) {
totalnywynik = 0;
}
};
var CTRLplay = function () {
if (loaded) {
menu._visible = false;
CTRLstartlevel(1);
guzikinadgra._visible = true;
}
};
guzikinadgra._visible = false;
var CTRLpause = function () {
if (stan == "pauza") {
pauza._visible = false;
guzikinadgra._visible = true;
stan = "gra";
} else if (stan == "gra") {
if (_root.sounds["music-barrens"]) {
if (_root.gramuzyka && (_root.akttlo == "barrens")) {
_root.musicpausedat = _root.sounds["music-barrens"].position;
}
_root.sounds["music-barrens"].stop();
}
if (_root.sounds["music-country"]) {
if (_root.gramuzyka && (_root.akttlo == "country")) {
_root.musicpausedat = _root.sounds["music-country"].position;
}
_root.sounds["music-country"].stop();
}
_root.gramuzyka = false;
pauza._visible = true;
guzikinadgra._visible = false;
stan = "pauza";
}
};
var CTRLhelp = function () {
if (stan == "help") {
pomoc._visible = false;
i = 1;
while (i <= 4) {
_root["help" + i]._visible = false;
i++;
}
guzikinadgra._visible = true;
stan = "gra";
} else if (stan == "gra") {
pomoc._visible = true;
i = 1;
while (i <= 4) {
_root["help" + i]._visible = i == _root.currentlevel;
i++;
}
guzikinadgra._visible = false;
stan = "help";
}
};
var CTRLtryfullversion = function () {
_root.tryfullversion._visible = true;
_root.tryfullversion.stanpowrot = _root.stan;
_root.stan = "tryfullversion";
};
for (i in _root) {
if (_root[i] instanceof Field) {
_root[i].ox = _root[i]._x;
_root[i].oy = _root[i]._y;
}
}
var ustawtlo = function (jakie) {
akttlo = jakie;
if (jakie == "barrens") {
_root.field3._visible = false;
for (i in _root) {
if (_root[i] instanceof Field) {
_root[i]._x = _root[i].ox;
_root[i]._y = _root[i].oy;
}
}
} else {
_root.field3._visible = true;
_root.mechanical._x = 650;
_root.mechanical._y = 307;
_root.saleplace._x = 120;
_root.saleplace._y = 270;
_root.buyplace._x = 175;
_root.buyplace._y = 115;
i = 0;
while (i < _root.ilefieldow) {
_root["field" + i]._x = 265 + (i * 76);
_root["field" + i]._y = 310 + (i * 44);
i++;
}
}
_root.tlo.gotoAndStop(jakie);
_root.nadtlo.gotoAndStop(jakie);
_root.progressbodywork._x = _root.bodywork._x - 15;
_root.progressbodywork._y = _root.bodywork._y - 25;
_root.progressrepair._x = _root.mechanical._x;
_root.progressrepair._y = _root.mechanical._y;
_root.bodyworksparesindicator._x = _root.bodywork._x - 15;
_root.bodyworksparesindicator._y = _root.bodywork._y - 25;
_root.mechanicalsparesindicator._x = _root.mechanical._x;
_root.mechanicalsparesindicator._y = _root.mechanical._y;
_root.yesnosell._x = _root.saleplace._x;
_root.yesnosell._y = _root.saleplace._y;
_root.saleplacefront._x = _root.saleplace._x;
_root.saleplacefront._y = _root.saleplace._y;
_root.yesnobuy._x = _root.buyplace._x;
_root.yesnobuy._y = _root.buyplace._y;
i = 0;
while (i < _root.ilefieldow) {
_root["progressclean" + i]._x = _root["field" + i]._x;
_root["progressclean" + i]._y = _root["field" + i]._y - 10;
i++;
}
};
ustawtlo("barrens");
var cleanup = function () {
_lastrent = 0;
if (_root.sounds["music-barrens"]) {
_root.sounds["music-barrens"].stop();
}
if (_root.sounds["music-country"]) {
_root.sounds["music-country"].stop();
}
_root.gramuzyka = false;
_root.musicpausedat = 0;
_root.SELECTED = null;
_root.dragged = null;
for (i in _root) {
if (_root[i] instanceof Car) {
_root[i].removeMovieClip();
}
}
for (i in _root) {
if (_root[i] instanceof Field) {
_root[i]._car = null;
}
}
_root.yesnobuy._visible = false;
_root.yesnosell._visible = false;
_root.saleplace.countdown = -1;
_root.buyplace.countdown = -1;
_root.progressbodywork.val = 0;
_root.progressrepair.val = 0;
_root.bodyworksparesindicator.val = 0;
_root.mechanicalsparesindicator.val = 0;
_root.bodywork.ileminelo = 0;
_root.mechanical.ileminelo = 0;
i = 0;
while (i < _root.ilefieldow) {
_root["field" + i]._cleaningleft = 0;
_root["field" + i]._lastrent = 0;
i++;
}
stan = "";
czasgry = 0;
FINANCES = 0;
SPAREPARTS = 0;
FINANCESneeded = 0;
};
var xmllevele = new XML();
xmllevele.ignoreWhite = true;
xmllevele.onLoad = function () {
for (i in xmllevele.firstChild.childNodes) {
levelxml = xmllevele.firstChild.childNodes[i];
var _local3 = levelxml.attributes.num;
var _local2 = _root.createEmptyMovieClip("help" + _local3, _root.getNextHighestDepthDODATNI(), {_visible:false});
_local2._visible = false;
_local2.loadMovie(levelxml.attributes.help);
}
};
xmllevele.load("levels.xml");
var xmlintro = new XML();
xmlintro.ignoreWhite = true;
var introurl = new Array();
var introtime = new Array();
var introile = 0;
var introlicznik = 0;
var intronum = 0;
xmlintro.onLoad = function () {
for (i in this.firstChild.childNodes) {
xmlimage = this.firstChild.childNodes[i];
introurl[1 * xmlimage.attributes.num] = "" + xmlimage.attributes.url;
introtime[1 * xmlimage.attributes.num] = "" + xmlimage.attributes.time;
introile++;
}
stan = "intro";
};
xmlintro.load("intro.xml");
_root.menu._visible = false;
_root.levelintro._visible = false;
Mouse.hide();
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
var highlightmc = 0;
var highlighttimeout = 0;
var highlightcolor = null;
var highlight = function (mc) {
if (highlighttimeout != 0) {
highlightcolor.setTint(255, 255, 255, 0);
}
highlightcolor = new Color(mc);
highlighttimeout = 150;
};
stop();
Symbol 59 MovieClip [car] Frame 1
#initclip 37
Object.registerClass("car", Car);
#endinitclip
Symbol 67 MovieClip [fontannafoam] Frame 5
stop();
Symbol 81 MovieClip [fontannadym] Frame 1
dmc.gotoAndStop(1 + random(dmc._totalframes));
Symbol 81 MovieClip [fontannadym] Frame 3
stop();
Symbol 82 MovieClip [fontanna] Frame 1
#initclip 31
Object.registerClass("fontanna", Fontanna);
#endinitclip
Symbol 86 MovieClip [field_buyplace] Frame 1
#initclip 32
Object.registerClass("field_buyplace", FieldBuyplace);
#endinitclip
Instance of Symbol 85 MovieClip "highlightmc" in Symbol 86 MovieClip [field_buyplace] Frame 1
onClipEvent (load) {
highlightmc._visible = false;
}
Symbol 89 MovieClip [field_saleplace] Frame 1
#initclip 33
Object.registerClass("field_saleplace", FieldSaleplace);
#endinitclip
Instance of Symbol 85 MovieClip "highlightmc" in Symbol 89 MovieClip [field_saleplace] Frame 1
onClipEvent (load) {
highlightmc._visible = false;
}
Symbol 96 MovieClip [field] Frame 1
#initclip 34
Object.registerClass("field", FieldField);
#endinitclip
Symbol 101 MovieClip Frame 1
stop();
Symbol 108 MovieClip Frame 1
var num = 0;
var tiktak = function () {
num = (num + 1) % 12;
arrowbitmap._y = (-(num % 4)) * 64;
arrowbitmap._x = (-Math.floor(num / 4)) * 85;
};
Symbol 109 MovieClip [field_mechanics] Frame 1
#initclip 35
Object.registerClass("field_mechanics", FieldMechanics);
#endinitclip
Symbol 116 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 2
stop();
Symbol 117 MovieClip [field_bodywork] Frame 1
#initclip 36
Object.registerClass("field_bodywork", FieldBodywork);
#endinitclip
Symbol 126 MovieClip Frame 1
stop();
Instance of Symbol 125 MovieClip in Symbol 126 MovieClip Frame 2
/* no clip actions */
Symbol 136 MovieClip Frame 1
var mrugniecielicznik = 1;
var kiedynastepnemrugniecie = 20;
var mrugaj = function () {
if ((++mrugniecielicznik) >= kiedynastepnemrugniecie) {
oczy._visible = true;
mrugniecielicznik = 0;
kiedynastepnemrugniecie = 20 + random(10);
} else {
oczy._visible = false;
}
};
oczy._visible = false;
setInterval(mrugaj, 100);
Symbol 175 MovieClip Frame 1
txtonlyinfullversion = _root.langtxt("web_onlyinfullversion");
Symbol 176 Button
on (release) {
_root.CTRLtryfullversion();
}
Symbol 182 MovieClip Frame 1
this.onEnterFrame = function () {
this._visible = this.val > 0;
barmc._x = ((this.val * 358) / 100) - 358;
};
Symbol 186 MovieClip Frame 1
stop();
Symbol 191 MovieClip Frame 1
stop();
Symbol 195 Button
on (release) {
_root.mbkomunikat = _root.langtxt("sendToWorkshop");
_root.highlight(_root.mechanical);
}
Symbol 198 Button
on (release) {
_root.mbkomunikat = _root.langtxt("alreadyRepaired");
}
Symbol 199 MovieClip Frame 1
stop();
Symbol 202 Button
on (release) {
_root.mbkomunikat = _root.langtxt("sendToCleaning");
}
Symbol 205 Button
on (release) {
_root.mbkomunikat = _root.langtxt("alreadyCleaned");
}
Symbol 206 MovieClip Frame 1
stop();
Symbol 209 Button
on (release) {
_root.mbkomunikat = _root.langtxt("sendToBodywork");
_root.highlight(_root.bodywork);
}
Symbol 212 Button
on (release) {
_root.mbkomunikat = _root.langtxt("alreadyBodyworked");
}
Symbol 213 MovieClip Frame 1
stop();
Symbol 217 Button
on (release) {
_root.dzialklik(2);
}
Symbol 218 Button
on (release) {
_root.dzialklik(1);
}
Symbol 334 MovieClip Frame 1
this.onEnterFrame = function () {
ile = _root.sparesamount[this._currentframe - 1];
podpis = _root.langtxt("gui_parts").split("[AMOUNT]").join(ile);
};
Symbol 344 Button
on (release) {
_root.orderSpareParts(num);
}
on (rollOver) {
_root.sparepartsover = num;
}
on (rollOut) {
if (num == _root.sparepartsover) {
_root.sparepartsover = -1;
}
}
Symbol 346 MovieClip Frame 1
txtfinances = _root.langtxt("gui_finances");
txtemployees = _root.langtxt("gui_employees");
txtspareparts = _root.langtxt("gui_spareparts");
stop();
Symbol 346 MovieClip Frame 2
txtfinances = _root.langtxt("gui_finances");
txtemployees = _root.langtxt("gui_employees");
txtspareparts = _root.langtxt("gui_spareparts");
txttotalmoney = _root.langtxt("totalMoney");
txtrentalincome = _root.langtxt("rentalIncome");
Symbol 346 MovieClip Frame 3
txtfinances = _root.langtxt("gui_finances");
txtemployees = _root.langtxt("gui_employees");
txtspareparts = _root.langtxt("gui_spareparts");
Symbol 346 MovieClip Frame 4
txtfinances = _root.langtxt("gui_finances");
txtemployees = _root.langtxt("gui_employees");
txtspareparts = _root.langtxt("gui_spareparts");
Symbol 356 MovieClip Frame 1
stop();
Symbol 363 Button
on (release) {
_parent.copowiadomic.klikyes();
}
Symbol 369 Button
on (release) {
_parent.copowiadomic.klikyes();
}
Symbol 372 MovieClip Frame 1
stop();
Symbol 377 Button
on (release) {
this.copowiadomic.klikno();
}
Symbol 379 MovieClip Frame 1
stop();
Symbol 385 MovieClip Frame 1
this.val = 0;
this.onEnterFrame = function () {
_visible = (val > 0);
pasek._xscale = Math.min(100, Math.max(0, val));
};
stop();
Symbol 394 MovieClip Frame 1
stop();
Symbol 399 MovieClip Frame 1
this.onEnterFrame = function () {
this._visible = this.val > 0;
numtxt = val;
redgreen.gotoAndStop(((val <= _root.SPAREPARTS) ? 2 : ((((_root.SPAREPARTSorderednum >= 0) && (val <= (_root.SPAREPARTS + _root.sparesamount[_root.SPAREPARTSorderednum]))) ? 3 : 1))));
};
stop();
Symbol 410 Button
on (release) {
_root.CTRLtryfullversion();
}
Symbol 411 Button
on (release) {
_root.CTRLstartlevel(_root.currentlevel);
}
Symbol 412 Button
on (release) {
_root.CTRLstartlevel(_root.currentlevel + 1);
}
Symbol 419 Button
on (release) {
_root.CTRLtryfullversion();
}
Symbol 421 MovieClip Frame 1
stop();
txtyouwon = _root.langtxt("web_youwon");
txtplayagain = _root.langtxt("web_playagain");
txttryfullversion = _root.langtxt("web_tryfullversionC");
txtnextlevel = _root.langtxt("web_nextlevel");
Symbol 421 MovieClip Frame 3
txtcontinue = _root.langtxt("web_continue");
Symbol 422 Button
on (release) {
_parent.CTRLhelp();
}
Symbol 423 Button
on (release) {
_parent.CTRLpause();
}
Symbol 427 MovieClip Frame 1
btntryfullversion = _root.langtxt("web_tryfullversionC");
btnhelp = _root.langtxt("web_helpC");
btnpause = _root.langtxt("web_pause");
Symbol 435 MovieClip Frame 1
stop();
Symbol 438 MovieClip Frame 1
napis.gotoAndStop(_parent._currentframe);
Symbol 438 MovieClip Frame 20
napismaskacienia.gotoAndStop(_parent._currentframe);
Instance of Symbol 435 MovieClip "napis" in Symbol 438 MovieClip Frame 20
onClipEvent (load) {
gotoAndStop(_parent._parent._currentframe);
}
Instance of Symbol 435 MovieClip "napismaskacienia" in Symbol 438 MovieClip Frame 20
onClipEvent (load) {
gotoAndStop(_parent._parent._currentframe);
}
Symbol 438 MovieClip Frame 120
gotoAndPlay ("blysk");
Symbol 439 Button
on (release) {
_root.stan = "gra";
_visible = false;
if (_root.autohelp) {
_root.CTRLhelp();
}
}
Symbol 456 Button
on (release) {
_root.mbkomunikat = _root.langtxt("goalHintTotalMoney");
}
Symbol 457 Button
on (release) {
_parent.CTRLhelp();
}
Symbol 461 Button
on (release) {
_parent.CTRLpause();
}
Symbol 477 Button
on (release) {
_parent.klikmuzyka();
}
Symbol 489 Button
on (release) {
_parent.CTRLplay();
}
Symbol 490 Button
on (release) {
gotoAndStop (2);
}
Symbol 492 Button
on (release) {
_root.CTRLtryfullversion();
}
Symbol 500 Button
on (release) {
gotoAndStop (1);
}
Symbol 501 Button
on (release) {
_parent.CTRLtryfullversion();
}
Symbol 508 MovieClip Frame 1
btnmenutryfullversion = _root.langtxt("web_tryfullversion");
btnmenuplay = _root.langtxt("web_menu_play");
btnmenuhelp = _root.langtxt("web_menu_help");
stop();
Symbol 508 MovieClip Frame 2
howtoplay = _root.langtxt("howtoplay");
btnmenuback = _root.langtxt("web_back");
btnmenutryfullversion = _root.langtxt("web_tryfullversion");
Symbol 514 Button
on (release) {
url = "#";
if (("__" + _root.clickTag) != "__undefined") {
url = _root.clickTag;
}
trace("TRYFULLVERSION: " + url);
getURL (url, "_blank");
}
Symbol 515 Button
on (release) {
_root.stan = stanpowrot;
_visible = false;
}
Symbol 517 MovieClip Frame 1
backbtntxt = _root.langtxt("web_backC");
buttonzaslaniak.useHandCursor = false;
btntryfullversion = _root.langtxt("web_tryfullversionC");
Symbol 520 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 521 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 522 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 523 MovieClip [__Packages.Field] Frame 0
class Field extends MovieClip
{
function Field () {
super();
}
function onLoad() {
}
function rent() {
}
function testdrop(car) {
return("-");
}
function testdrag() {
return(true);
}
function tiktak() {
}
function cardoubleclicked() {
}
function carclicked() {
}
function drop(car) {
trace((("drop: " + car) + " ") + this);
if (_car != null) {
trace("POWINIEN BY\u0106 SWAP!");
}
testdrop(null);
_car = car;
if (_car._field != null) {
_car._field._car = null;
_car._field.aktualizujwyglad();
}
_car._field = this;
}
var _car = null;
}
Symbol 524 MovieClip [__Packages.FieldField] Frame 0
class FieldField extends Field
{
var highlightmc, backmc, _car, _dirtpossible, _parent, _x, _y;
function FieldField () {
super();
}
function onLoad() {
highlightmc._visible = false;
backmc._visible = !highlightmc._visible;
super.onLoad();
}
function testdrop(car) {
if (car == null) {
highlightmc._visible = false;
backmc._visible = !highlightmc._visible;
return("-");
}
if (_car == null) {
highlightmc._visible = true;
backmc._visible = !highlightmc._visible;
return("");
}
highlightmc._visible = false;
backmc._visible = !highlightmc._visible;
if (_car == car) {
return("-");
}
highlightmc._visible = true;
backmc._visible = !highlightmc._visible;
return("");
}
function testdrag() {
if ((_car != null) && (_cleaningleft > 0)) {
return(false);
}
return(true);
}
function cardoubleclicked() {
if (((_car != null) && (!_car._dirty)) && (!_car._broken)) {
_root.mbkomunikat = _root.langtxt("alreadyCleaned");
}
if (((_cleaningleft <= 0) && (_car != null)) && (_car._dirty)) {
_progressbar._visible = true;
_progressbar.val = 0;
_cleaningleft = _car.getTimeNeeded("clean");
_dirtpossible = false;
}
}
function tiktak() {
if (_cleaningleft > 0) {
_cleaningleft = _cleaningleft - _parent.roznicaczasu;
if (_cleaningleft > 0) {
var _local7 = 100 - Math.round(100 * (_cleaningleft / _car.getTimeNeeded("clean")));
_local7 = Math.max(0, _local7);
_local7 = Math.min(100, _local7);
_car.brudmc._visible = true;
_car.brudmc._alpha = 100 - _local7;
_progressbar.val = _local7;
_car._statustext = _root.langtxt("actionClean");
_car._statuspercent = _local7;
_car._statusicon = "cleaning";
if (_cleaningleft > 0.5) {
var _local6 = 0;
_local6 = 0;
while (_local6 < (20 / _root.tiktakownasekunde)) {
var _local5;
var _local4;
var _local3;
_local5 = random(360);
_local4 = (_x + random(70)) - 15;
_local3 = (_y - random(20)) - 25;
if (random(100) > 70) {
_root.fontanna.wystrzellosowo("fontannafoam", _local4, _local3, 40, 60, 100, 20, _local5, (_local5 + random(60)) - 30, 1, mx.transitions.easing.Regular.easeIn, 0, 360, 5, 5);
}
_local4 = (_x + random(70)) - 20;
_local3 = (_y - random(30)) - 30;
if (random(100) > 50) {
_root.fontanna.wystrzellosowo("fontannabubble", _local4, _local3, 50, 120, 20, 100, 0, 0, 0.5, mx.transitions.easing.Regular.easeIn, 180, 360, 20, 40);
}
_local6++;
}
}
} else {
_car._statustext = "";
_progressbar.val = -1;
_cleaningleft = 0;
_car._dirty = false;
_car.aktualizujwyglad();
}
} else if (_car != null) {
if (_car._dirty) {
_car._statustext = _root.langtxt("actionDirty");
_car._statusicon = "cleaning";
_car._statuspercent = 0;
} else if (_car._broken) {
_car._statustext = _root.langtxt("actionBroken");
_car._statusicon = "mechanical";
_car._statuspercent = 0;
} else {
_car._statustext = _root.langtxt("actionRental").split("[AMOUNT]").join(_root.formatcurrency(Math.round(_car.getPrice() / 10)));
_car._statusicon = "rental";
_car._statuspercent = (100 * _parent._lastrent) / _parent._rentinterval;
}
}
}
function rent() {
if (_car != null) {
if (_car._dirty) {
_root.napisdymek(_root.langtxt("floatingDirty"), _x, _y, "991a1a");
} else if (_car._broken) {
_root.napisdymek(_root.langtxt("floatingBroken"), _x, _y, "991a1a");
} else if (_cleaningleft > 0) {
} else {
var _local3 = Math.round(_car.getPrice() / 10);
_root.napisdymek("+" + _root.formatcurrency(_local3), _x, _y, "1ab21a");
_root.FINANCES = _root.FINANCES + _local3;
if (_dirtpossible) {
_car.makedirty("rent");
}
}
_dirtpossible = true;
}
}
function drop(car) {
_dirtpossible = false;
super.drop(car);
}
var _cleaningleft = 0;
var _progressbar = null;
}
Symbol 525 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 526 MovieClip [__Packages.Car] Frame 0
class Car extends MovieClip
{
var automc, _bodyworked, _broken, _dirty, brudmc, _cartype, zaznaczeniemc, autopomalowanemc, shadowmc, maskamc, maskapomalowanamc, zepsuciemc;
function Car () {
super();
}
function getSparesNeeded(whattodo) {
var _local2;
if (whattodo == "workshop") {
_local2 = "70\t50\t100";
} else if (whattodo == "bodywork") {
_local2 = "30\t20\t40";
} else {
_local2 = "0\t0\t0";
}
_local2 = _local2.split("\t");
return(Number(_local2[automc._currentframe - 1]));
}
function getTimeNeeded(whattodo) {
var _local2;
if (whattodo == "workshop") {
_local2 = "10\t8\t12";
} else if (whattodo == "bodywork") {
_local2 = "8\t6\t8";
} else if (whattodo == "clean") {
_local2 = "5\t5\t5";
} else {
_local2 = "0\t0\t0";
}
_local2 = _local2.split("\t");
return(Number(_local2[automc._currentframe - 1]));
}
function getPrice() {
var _local3 = "15000 10000 20000";
_local3 = _local3.split(" ");
var _local2 = "-7500 -7000 -10000";
_local2 = _local2.split(" ");
var _local4 = "5000 3500 7000";
_local4 = _local4.split(" ");
var _local5 = Number(_local3[automc._currentframe - 1]);
if (_bodyworked) {
_local5 = _local5 + Number(_local4[automc._currentframe - 1]);
}
if (_broken) {
_local5 = _local5 + Number(_local2[automc._currentframe - 1]);
}
return(_local5);
}
function makedirty(action) {
var _local3 = 0;
switch (action) {
case "rent" :
_local3 = 0.4;
break;
case "buy" :
_local3 = 0.1;
break;
case "workshop" :
_local3 = 0.6;
}
if (_root.currentlevel >= 2) {
if (random(1000) < (1000 - (_local3 * 1000))) {
_dirty = true;
}
}
aktualizujwyglad();
}
function aktualizujwyglad() {
brudmc.gotoAndStop(_cartype);
zaznaczeniemc.gotoAndStop(_cartype);
autopomalowanemc.gotoAndStop(_cartype);
automc.gotoAndStop(_cartype);
shadowmc.gotoAndStop(_cartype);
maskamc.gotoAndStop(_cartype);
maskapomalowanamc.gotoAndStop(_cartype);
zepsuciemc.gotoAndStop(_cartype);
zepsuciemc._visible = _broken;
if (_broken) {
maskamc._visible = !_bodyworked;
maskapomalowanamc._visible = _bodyworked;
} else {
maskamc._visible = false;
maskapomalowanamc._visible = false;
}
zepsuciemc._alpha = 100;
brudmc._visible = _dirty;
brudmc._alpha = 100;
autopomalowanemc._visible = _bodyworked;
autopomalowanemc._alpha = 100;
automc._visible = !_bodyworked;
}
function onLoad() {
zaznlicznik = 1;
aktualizujwyglad();
}
function testdrag() {
if (_field instanceof Field) {
return(true || (_field.testdrag()));
}
return(true);
}
function doubleclick() {
if (_dirty && (_field instanceof FieldField)) {
_field.cardoubleclicked();
}
}
function tiktak() {
if (_root.SELECTED == this) {
zaznlicznik = zaznlicznik + 0.1;
if (zaznlicznik >= 2) {
zaznlicznik = zaznlicznik - 2;
}
} else {
zaznlicznik = 0;
}
if (zaznlicznik != 0) {
zaznaczeniemc._visible = true;
zaznaczeniemc._alpha = 80 + (20 * Math.sin(Math.PI * zaznlicznik));
} else {
zaznaczeniemc._visible = false;
}
}
var _field = null;
var _lastclicktimestamp = 0;
var _chwytalnyod = 0;
var _statustext = "";
var _statuspercent = 0;
var _statusicon = "";
var zaznlicznik = 0;
}
Symbol 527 MovieClip [__Packages.mx.data.binding.FieldAccessor] Frame 0
class mx.data.binding.FieldAccessor
{
var component, property, parentObj, fieldName, m_location, type, index, xpath;
function FieldAccessor (component, property, parentObj, fieldName, type, index, parentField) {
this.component = component;
this.property = property;
this.parentObj = parentObj;
this.fieldName = fieldName;
if (component == parentObj) {
m_location = undefined;
} else if (parentField.m_location == undefined) {
m_location = fieldName;
} else {
m_location = (parentField.m_location + ".") + fieldName;
}
this.type = type;
this.index = index;
}
function getValue() {
var _local2 = getFieldData();
if ((_local2 == null) && (type.value != undefined)) {
var _local3 = new mx.data.binding.TypedValue(type.value, "String");
_local3.getDefault = true;
component.getField(fieldName).setAnyTypedValue(_local3);
_local2 = _local3.value;
}
if ((isXML(_local2) && (_local2.childNodes.length == 1)) && (_local2.firstChild.nodeType == 3)) {
return(_local2.firstChild.nodeValue);
}
return(_local2);
}
function setValue(newValue, newTypedValue) {
if (newTypedValue.getDefault) {
newTypedValue.value = newValue;
} else {
if (xpath != null) {
var _local4 = getFieldData();
if (_local4 != null) {
setXMLData(_local4, newValue);
} else {
_global.__dataLogger.logData(component, "Can't assign to '<property>:<xpath>' because there is no element at the given path", this);
}
} else if (isXML(parentObj)) {
if (type.category == "attribute") {
parentObj.attributes[fieldName] = newValue;
} else if (type.category == "array") {
} else {
var _local4 = getOrCreateFieldData();
setXMLData(_local4, newValue);
}
} else {
if (parentObj == null) {
_global.__dataLogger.logData(component, "Can't set field '<property>/<location>' because the field doesn't exist", this);
}
parentObj[fieldName] = newValue;
}
component.propertyModified(property, (xpath == null) && (parentObj == component), newTypedValue.type);
}
}
static function isActionScriptPath(str) {
var _local2 = str.toLowerCase();
var _local3 = "0123456789abcdefghijklmnopqrstuvwxyz_.";
var _local1 = 0;
while (_local1 < _local2.length) {
if (-1 == _local3.indexOf(_local2.charAt(_local1))) {
return(false);
}
_local1++;
}
return(true);
}
static function createFieldAccessor(component, property, location, type, mustExist) {
if (mustExist && (component[property] == null)) {
_global.__dataLogger.logData(component, "Warning: property '<property>' does not exist", {property:property});
return(null);
}
var _local5 = new mx.data.binding.FieldAccessor(component, property, component, property, type, null, null);
if (location == null) {
return(_local5);
}
var _local7 = null;
if (location.indices != null) {
_local7 = location.indices;
location = location.path;
}
if (typeof(location) == "string") {
if (_local7 != null) {
_global.__dataLogger.logData(component, "Warning: ignoring index values for property '<property>', path '<location>'", {property:property, location:location});
}
if (isActionScriptPath(String(location))) {
location = location.split(".");
} else {
_local5.xpath = location;
return(_local5);
}
}
if (location instanceof Array) {
var _local3;
var _local10 = 0;
_local3 = 0;
while (_local3 < location.length) {
var _local2 = null;
var _local4 = location[_local3];
if (_local4 == "[n]") {
if (_local7 == null) {
_global.__dataLogger.logData(component, "Error: indices for <property>:<location> are null, but [n] appears in the location.", {property:property, location:location});
return(null);
}
_local2 = _local7[_local10++];
if (_local2 == null) {
_global.__dataLogger.logData(component, "Error: not enough index values for <property>:<location>", {property:property, location:location});
return(null);
}
}
_local5 = _local5.getChild(_local4, _local2, mustExist);
_local3++;
}
if (mustExist && (_local5.getValue() == null)) {
_global.__dataLogger.logData(component, "Warning: field <property>:<m_location> does not exist, or is null", _local5);
}
return(_local5);
}
trace("unrecognized location: " + mx.data.binding.ObjectDumper.toString(location));
return(null);
}
function getFieldAccessor() {
return(this);
}
function getChild(childName, index, mustExist) {
if (childName == ".") {
return(this);
}
var _local2 = getOrCreateFieldData(mustExist);
if (_local2 == null) {
return(null);
}
var _local4 = findElementType(type, childName);
return(new mx.data.binding.FieldAccessor(component, property, _local2, childName, _local4, index, this));
}
function getOrCreateFieldData(mustExist) {
var _local3 = getFieldData();
if (_local3 == null) {
if (mustExist) {
_global.__dataLogger.logData(component, "Warning: field <property>:<m_location> does not exist", this);
} else {
setupComplexField();
_local3 = getFieldData();
}
}
return(_local3);
}
function evaluateSubPath(obj, type) {
var path = type.path;
if (isActionScriptPath(path)) {
var tokens = path.split(".");
var i = 0;
while (i < tokens.length) {
var token = tokens[i];
if (isXML(obj)) {
obj = obj.firstChild;
while (obj != null) {
if (toLocalName(obj.nodeName) == token) {
break;
}
obj = obj.nextSibling;
}
} else {
obj = obj[token];
}
if (obj == null) {
_global.__dataLogger.logData(component, "Warning: path '<path>' evaluates to null, at '<token>' in <t.property>:<t.m_location>", {path:path, token:token, t:this});
break;
}
i++;
}
} else if (isXML(obj)) {
if (path.charAt(0) != "/") {
path = "/" + path;
}
if (obj.nodeName == null) {
obj = obj.firstChild;
} else {
path = toLocalName(obj.nodeName) + path;
}
var category = ((type.category != null) ? (type.category) : (((type.elements.length > 0) ? "complex" : "simple")));
if ((category == "simple") || (category == "attribute")) {
obj = eval ("obj" + mx.xpath.XPathAPI.getEvalString(obj, path));
} else if (category == "complex") {
obj = mx.xpath.XPathAPI.selectSingleNode(obj, path);
} else if (category == "array") {
obj = mx.xpath.XPathAPI.selectNodeList(obj, path);
}
} else {
_global.__dataLogger.logData(component, "Error: path '<path>' is an XPath. It cannot be applied to non-XML data <t.property>:<t.m_location>", {path:path, t:this});
}
return(obj);
}
function getFieldData() {
if (xpath != null) {
var _local4 = parentObj[fieldName].firstChild;
while ((_local4 != null) && (_local4.nodeType != 1)) {
_local4 = _local4.nextSibling;
}
var _local10 = mx.xpath.XPathAPI.selectSingleNode(_local4, xpath);
return(_local10);
}
if (isXML(parentObj)) {
if (type.path != null) {
return(evaluateSubPath(parentObj, type));
}
if (type.category == "attribute") {
var _local5 = parentObj.attributes;
for (var _local8 in _local5) {
if (toLocalName(_local8) == fieldName) {
return(_local5[_local8]);
}
}
return(undefined);
}
var _local3 = parentObj.firstChild;
if (type.category == "array") {
var _local6 = new Array();
while (_local3 != null) {
if (toLocalName(_local3.nodeName) == fieldName) {
_local6.push(_local3);
}
_local3 = _local3.nextSibling;
}
return(_local6);
}
while (_local3 != null) {
if (toLocalName(_local3.nodeName) == fieldName) {
return(_local3);
}
_local3 = _local3.nextSibling;
}
return(null);
}
if (fieldName == "[n]") {
var _local7;
if (index.component != null) {
var _local9 = index.component.getField(index.property, index.location);
_local7 = _local9.getAnyTypedValue(["Number"]);
_local7 = _local7.value;
} else {
_local7 = index.constant;
}
var index = Number(_local7);
if (typeof(_local7) == "undefined") {
_global.__dataLogger.logData(component, "Error: index specification '<index>' was not supplied, or incorrect, for <t.property>:<t.m_location>", {index:index, t:this});
return(null);
}
if (index.toString() == "NaN") {
_global.__dataLogger.logData(component, "Error: index value '<index>' for <t.property>:<t.m_location> is not a number", {index:index, t:this});
return(null);
}
if (!(parentObj instanceof Array)) {
_global.__dataLogger.logData(component, "Error: indexed field <property>:<m_location> is not an array", this);
return(null);
}
if ((index < 0) || (index >= parentObj.length)) {
_global.__dataLogger.logData(component, "Error: index '<index>' for <t.property>:<t.m_location> is out of bounds", {index:index, t:this});
return(null);
}
_global.__dataLogger.logData(component, "Accessing item [<index>] of <t.property>:<t.m_location>", {index:index, t:this});
return(parentObj[index]);
}
if (type.path != null) {
return(evaluateSubPath(parentObj, type));
}
return(parentObj[fieldName]);
}
static function setXMLData(obj, newValue) {
while (obj.hasChildNodes()) {
obj.firstChild.removeNode();
}
var _local2 = xmlNodeFactory.createTextNode(newValue);
obj.appendChild(_local2);
}
function setupComplexField() {
var _local2;
if (isXML(parentObj)) {
_local2 = xmlNodeFactory.createElement(fieldName);
parentObj.appendChild(_local2);
} else if (dataIsXML()) {
parentObj[fieldName] = new XML();
} else {
parentObj[fieldName] = new Object();
}
}
static function findElementType(type, name) {
var _local1 = 0;
while (_local1 < type.elements.length) {
if (type.elements[_local1].name == name) {
return(type.elements[_local1].type);
}
_local1++;
}
return(null);
}
function isXML(obj) {
return(obj instanceof XMLNode);
}
function dataIsXML() {
return(type.name == "XML");
}
static function accessField(component, fieldName, desiredTypes) {
var _local1;
_local1 = desiredTypes[fieldName];
if (_local1 == null) {
_local1 = desiredTypes.dflt;
}
if (_local1 == null) {
_local1 = desiredTypes;
}
var _local4 = component.createField("data", [fieldName]);
var _local2 = _local4.getAnyTypedValue([_local1]);
return(_local2.value);
}
static function ExpandRecord(obj, objectType, desiredTypes) {
var _local4 = new Object();
mx.data.binding.ComponentMixins.initComponent(_local4);
_local4.data = obj;
_local4.__schema = {elements:[{name:"data", type:objectType}]};
var _local2 = new Object();
if (objectType.elements.length > 0) {
var _local3 = 0;
while (_local3 < objectType.elements.length) {
var _local10 = objectType.elements[_local3].name;
_local2[_local10] = accessField(_local4, _local10, desiredTypes);
_local3++;
}
} else if ((obj instanceof XML) || (obj instanceof XMLNode)) {
if ((obj.childNodes.length == 1) && (obj.firstChild.nodeType == 3)) {
return(obj.firstChild.nodeValue);
}
var _local5 = obj.lastChild;
while (_local5 != null) {
var _local10 = toLocalName(_local5.nodeName);
if ((_local10 != null) && (_local2[_local10] == null)) {
_local2[_local10] = accessField(_local4, _local10, desiredTypes);
}
_local5 = _local5.previousSibling;
}
for (var _local10 in obj.attributes) {
if (_local2[_local10] != null) {
_global.__dataLogger.logData(null, "Warning: attribute '<name>' has same name as an element, in XML object <obj>", {name:_local10, obj:obj});
}
_local2[_local10] = accessField(_local4, _local10, desiredTypes);
}
} else {
if (typeof(obj) != "object") {
return(obj);
}
for (var _local10 in obj) {
_local2[_local10] = accessField(_local4, _local10, desiredTypes);
}
}
return(_local2);
}
static function wrapArray(theArray, itemType, desiredTypes) {
var _local4 = {getItemAt:function (index) {
if ((index < 0) || (index >= this.data.length)) {
return(undefined);
}
var _local2 = this.data[index];
if (_local2 == undefined) {
return(undefined);
}
var _local3 = mx.data.binding.FieldAccessor.ExpandRecord(_local2, this.type, desiredTypes);
return(_local3);
}, getItemID:function (index) {
return(index);
}, data:theArray, type:itemType, length:theArray.length};
return(_local4);
}
static function toLocalName(nodeName) {
var _local1 = nodeName.split(":");
var _local2 = _local1[_local1.length - 1];
return(_local2);
}
static var xmlNodeFactory = new XML();
}
Symbol 528 MovieClip [__Packages.mx.data.binding.TypedValue] Frame 0
class mx.data.binding.TypedValue
{
var value, typeName, type;
function TypedValue (value, typeName, type) {
this.value = value;
this.typeName = typeName;
this.type = type;
}
}
Symbol 529 MovieClip [__Packages.mx.data.binding.ObjectDumper] Frame 0
class mx.data.binding.ObjectDumper
{
var inProgress;
function ObjectDumper () {
inProgress = new Array();
}
static function toString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local3 = new mx.data.binding.ObjectDumper();
if (maxLineLength == undefined) {
maxLineLength = 100;
}
if (indent == undefined) {
indent = 0;
}
return(_local3.realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent));
}
function realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local8 = 0;
while (_local8 < inProgress.length) {
if (inProgress[_local8] == obj) {
return("***");
}
_local8++;
}
inProgress.push(obj);
indent++;
var _local16 = typeof(obj);
var _local5;
if ((obj instanceof XMLNode) && (showXMLstructures != true)) {
_local5 = obj.toString();
} else if (obj instanceof Date) {
_local5 = obj.toString();
} else if (_local16 == "object") {
var _local4 = new Array();
if (obj instanceof Array) {
_local5 = "[";
var _local15 = 0;
while (_local15 < obj.length) {
_local4.push(_local15);
_local15++;
}
} else {
_local5 = "{";
for (var _local15 in obj) {
_local4.push(_local15);
}
_local4.sort();
}
var _local9 = "";
var _local3 = 0;
while (_local3 < _local4.length) {
var _local6 = obj[_local4[_local3]];
var _local7 = true;
if (typeof(_local6) == "function") {
_local7 = showFunctions == true;
}
if (typeof(_local6) == "undefined") {
_local7 = showUndefined == true;
}
if (_local7) {
_local5 = _local5 + _local9;
if (!(obj instanceof Array)) {
_local5 = _local5 + (_local4[_local3] + ": ");
}
_local5 = _local5 + realToString(_local6, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent);
_local9 = ", `";
}
_local3++;
}
if (obj instanceof Array) {
_local5 = _local5 + "]";
} else {
_local5 = _local5 + "}";
}
} else if (_local16 == "function") {
_local5 = "function";
} else if (_local16 == "string") {
_local5 = ("\"" + obj) + "\"";
} else {
_local5 = String(obj);
}
if (_local5 == "undefined") {
_local5 = "-";
}
inProgress.pop();
return(replaceAll(_local5, "`", ((_local5.length < maxLineLength) ? "" : (newline + doIndent(indent)))));
}
static function replaceAll(str, from, to) {
var _local3 = str.split(from);
var _local4 = "";
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3.length) {
_local4 = _local4 + (_local2 + _local3[_local1]);
_local2 = to;
_local1++;
}
return(_local4);
}
function doIndent(indent) {
var _local2 = "";
var _local1 = 0;
while (_local1 < indent) {
_local2 = _local2 + " ";
_local1++;
}
return(_local2);
}
}
Symbol 530 MovieClip [__Packages.mx.xpath.XPathAPI] Frame 0
class mx.xpath.XPathAPI
{
function XPathAPI () {
}
static function getEvalString(node, path) {
var _local7 = "";
var _local4 = null;
var _local9 = getPathSet(path);
var _local3 = _local9[0].nodeName;
var _local8;
var _local2 = node;
var _local5 = false;
if ((_local3 != undefined) && ((_local3 == "*") || (node.nodeName == _local3))) {
var _local6 = 1;
while (_local6 < _local9.length) {
_local3 = _local9[_local6].nodeName;
_local8 = _local3.indexOf("@");
if (_local8 >= 0) {
_local3 = _local3.substring(_local8 + 1);
_local5 = _local2.attributes[_local3] != undefined;
_local7 = _local7 + (".attributes." + _local3);
} else {
_local5 = false;
var _local1 = 0;
while (_local1 < _local2.childNodes.length) {
_local4 = _local2.childNodes[_local1];
if (_local4.nodeName == _local3) {
_local7 = _local7 + (".childNodes." + _local1);
_local1 = _local2.childNodes.length;
_local2 = _local4;
_local5 = true;
}
_local1++;
}
}
if (!_local5) {
return("");
}
_local6++;
}
if (!_local5) {
_local7 = "";
} else if (_local8 == -1) {
_local7 = _local7 + ".firstChild.nodeValue";
}
} else {
_local7 = "";
}
return(_local7);
}
static function selectNodeList(node, path) {
var _local2 = new Array(node);
var _local5 = getPathSet(path);
var _local4 = _local5[0];
var _local6 = _local4.__get__nodeName();
var _local1 = null;
if ((_local6 != undefined) && ((_local6 == "*") || (node.nodeName == _local6))) {
if (_local4.__get__filter().length > 0) {
_local1 = new mx.xpath.FilterStack(_local4.__get__filter());
_local2 = filterNodes(_local2, _local1);
}
if (_local2.length > 0) {
var _local3 = 1;
while (_local3 < _local5.length) {
_local4 = _local5[_local3];
_local2 = getAllChildNodesByName(_local2, _local4.__get__nodeName());
if (_local4.__get__filter().length > 0) {
_local1 = new mx.xpath.FilterStack(_local4.__get__filter());
} else {
_local1 = null;
}
if ((_local1 != null) && (_local1.__get__exprs().length > 0)) {
_local2 = filterNodes(_local2, _local1);
}
_local3++;
}
}
} else {
_local2 = new Array();
}
return(_local2);
}
static function selectSingleNode(node, path) {
var _local1 = selectNodeList(node, path);
if (_local1.length > 0) {
return(_local1[0]);
}
return(null);
}
static function setNodeValue(node, path, newValue) {
var _local1 = new Array(node);
var _local9 = getPathSet(path);
var _local7 = _local9[_local9.length - 1].nodeName;
if (_local7.charAt(0) == "@") {
_local7 = _local7.substring(1, _local7.length);
_local9.pop();
} else {
_local7 = null;
}
var _local5 = _local9[0];
var _local11 = _local5.__get__nodeName();
var _local3 = null;
if ((_local11 != undefined) && ((_local11 == "*") || (node.nodeName == _local11))) {
if (_local5.__get__filter().length > 0) {
_local3 = new mx.xpath.FilterStack(_local5.__get__filter());
_local1 = filterNodes(_local1, _local3);
}
if (_local1.length > 0) {
var _local2 = 1;
while (_local2 < _local9.length) {
_local5 = _local9[_local2];
_local1 = getAllChildNodesByName(_local1, _local5.__get__nodeName());
if (_local5.__get__filter().length > 0) {
_local3 = new mx.xpath.FilterStack(_local5.__get__filter());
} else {
_local3 = null;
}
if ((_local3 != null) && (_local3.__get__exprs().length > 0)) {
_local1 = filterNodes(_local1, _local3);
}
_local2++;
}
}
} else {
_local1 = new Array();
}
var _local4 = null;
var _local6 = null;
var _local10 = new XML();
var _local2 = 0;
while (_local2 < _local1.length) {
if (_local7 != null) {
_local1[_local2].attributes[_local7] = newValue;
} else {
_local4 = _local1[_local2];
if ((_local4.firstChild == null) || (_local4.firstChild.nodeType != 3)) {
_local6 = _local10.createTextNode(newValue);
_local4.appendChild(_local6);
} else {
_local6 = _local4.firstChild;
_local6.nodeValue = newValue;
}
}
_local2++;
}
return(_local1.length);
}
static function copyStack(toStk, fromStk) {
var _local1 = 0;
while (_local1 < fromStk.length) {
toStk.splice(_local1, 0, fromStk[_local1]);
_local1++;
}
}
static function evalExpr(expr, node) {
var _local2 = true;
if (expr.__get__attr()) {
_local2 = ((expr.__get__value() != null) ? (node.attributes[expr.__get__name()] == expr.__get__value()) : (node.attributes[expr.__get__name()] != null));
} else {
var _local3 = getChildNodeByName(node, expr.__get__name());
if (_local3 != null) {
_local2 = ((expr.__get__value() != null) ? (_local3.firstChild.nodeValue == expr.__get__value()) : true);
} else {
_local2 = false;
}
}
return(_local2);
}
static function filterNodes(nodeList, stack) {
var _local13 = new Array();
var _local2;
var _local3;
var _local9;
var _local6;
var _local10;
var _local1 = true;
var _local4;
var _local5;
var _local8 = 0;
while (_local8 < nodeList.length) {
_local5 = true;
_local2 = new Array();
_local3 = new Array();
copyStack(_local2, stack.__get__exprs());
copyStack(_local3, stack.__get__ops());
_local4 = nodeList[_local8];
while ((_local2.length > 0) && (_local5)) {
if (typeof(_local2[_local2.length - 1]) == "object") {
_local9 = mx.xpath.FilterExpr(_local2.pop());
_local1 = evalExpr(_local9, _local4);
} else {
_local10 = Boolean(_local2.pop());
_local1 = _local10;
}
if (_local3.length > 0) {
var _local7 = _local2.pop();
_local6 = _local7;
switch (_local3[_local3.length - 1]) {
case "and" :
_local1 = _local1 && (evalExpr(_local6, _local4));
_local5 = _local1;
break;
case "or" :
_local1 = _local1 || (evalExpr(_local6, _local4));
_local5 = !_local1;
}
_local3.pop();
_local2.push(_local1);
}
}
if (_local1) {
_local13.push(_local4);
}
_local8++;
}
return(_local13);
}
static function getAllChildNodesByName(nodeList, name) {
var _local5 = new Array();
var _local2;
var _local3 = 0;
while (_local3 < nodeList.length) {
_local2 = nodeList[_local3].childNodes;
if (_local2 != null) {
var _local1 = 0;
while (_local1 < _local2.length) {
if ((name == "*") || (_local2[_local1].nodeName == name)) {
_local5.push(_local2[_local1]);
}
_local1++;
}
}
_local3++;
}
return(_local5);
}
static function getChildNodeByName(node, nodeName) {
var _local2;
var _local3 = node.childNodes;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = _local3[_local1];
if (_local2.nodeName == nodeName) {
return(_local2);
}
_local1++;
}
return(null);
}
static function getKeyValues(node, keySpec) {
var _local5 = "";
var _local3 = new mx.utils.StringTokenParser(keySpec);
var _local2 = _local3.nextToken();
var _local1;
var _local6;
while (_local2 != mx.utils.StringTokenParser.tkEOF) {
_local1 = _local3.token;
_local5 = _local5 + (" " + _local1);
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
if (_local1 == "@") {
_local2 = _local3.nextToken();
_local1 = _local3.token;
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
_local5 = _local5 + (((_local1 + "='") + node.attributes[_local1]) + "'");
}
} else if (_local1 == "/") {
_local2 = _local3.nextToken();
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
_local1 = _local3.token;
node = getChildNodeByName(node, _local1);
if (node != null) {
_local5 = _local5 + _local1;
}
}
} else if ((((_local1 != "and") && (_local1 != "or")) && (_local1 != "[")) && (_local1 != "]")) {
_local6 = getChildNodeByName(node, _local1);
if (_local6 != null) {
_local5 = _local5 + (("='" + _local6.firstChild.nodeValue) + "'");
}
}
}
if (node == null) {
trace(("Invalid keySpec specified. '" + keySpec) + "' Error.");
return("ERR");
}
_local2 = _local3.nextToken();
}
return(_local5.slice(1));
}
static function getPath(node, keySpecs) {
var _local2 = "";
var _local5 = keySpecs[node.nodeName];
if (_local5 == undefined) {
var _local8 = "";
var _local10;
for (_local10 in node.attributes) {
_local8 = _local8 + (((("@" + _local10) + "='") + node.attributes[_local10]) + "' and ");
}
var _local7 = "";
var _local1;
var _local6;
var _local4 = 0;
while (_local4 < node.childNodes.length) {
_local1 = node.childNodes[_local4];
_local6 = _local1.firstChild.nodeValue;
if (_local6 != undefined) {
_local7 = _local7 + (((_local1.nodeName + "='") + _local6) + "' and ");
}
_local4++;
}
if (_local8.length > 0) {
if (_local7.length > 0) {
_local2 = (((("/" + node.nodeName) + "[") + _local8) + _local7.substring(0, _local7.length - 4)) + "]";
} else {
_local2 = ((("/" + node.nodeName) + "[") + _local8.substring(0, _local8.length - 4)) + "]";
}
} else {
_local2 = ((("/" + node.nodeName) + "[") + _local7.substring(0, _local7.length - 4)) + "]";
}
} else {
_local2 = _local2 + (("/" + node.nodeName) + getKeyValues(node, _local5));
}
var _local1 = node.parentNode;
while (_local1.parentNode != null) {
_local5 = keySpecs[_local1.nodeName];
if (_local5 != undefined) {
_local2 = (("/" + _local1.nodeName) + getKeyValues(_local1, _local5)) + _local2;
} else {
_local2 = ("/" + _local1.nodeName) + _local2;
}
_local1 = _local1.parentNode;
}
return(_local2);
}
static function getPathSet(path) {
var _local6 = new Array();
var _local4;
var _local1;
var _local2;
var _local5;
while (path.length > 0) {
_local4 = path.lastIndexOf("/");
_local1 = path.substring(_local4 + 1);
_local2 = _local1.indexOf("[", 0);
_local5 = ((_local2 >= 0) ? (_local1.substring(_local2 + 1, _local1.length - 1)) : "");
_local1 = ((_local2 >= 0) ? (_local1.substring(0, _local2)) : (_local1));
_local6.splice(0, 0, new mx.xpath.NodePathInfo(_local1, _local5));
path = path.substring(0, _local4);
}
return(_local6);
}
}
Symbol 531 MovieClip [__Packages.mx.xpath.NodePathInfo] Frame 0
class mx.xpath.NodePathInfo
{
function NodePathInfo (nodeName, filter) {
__nodeName = nodeName;
__filter = filter;
}
function get nodeName() {
return(__nodeName);
}
function get filter() {
return(__filter);
}
var __nodeName = null;
var __filter = null;
}
Symbol 532 MovieClip [__Packages.mx.xpath.FilterStack] Frame 0
class mx.xpath.FilterStack
{
var __expr, __ops;
function FilterStack (filterVal) {
__expr = new Array();
__ops = new Array();
var _local2 = new mx.utils.StringTokenParser(filterVal);
var _local5 = _local2.nextToken();
var _local4;
var _local3 = _local2.__get__token();
while (_local5 != mx.utils.StringTokenParser.tkEOF) {
if (_local3 == "@") {
_local5 = _local2.nextToken();
_local3 = _local2.token;
_local4 = new mx.xpath.FilterExpr(true, _local3, null);
__expr.splice(0, 0, _local4);
if (_local2.nextToken() == mx.utils.StringTokenParser.tkSymbol) {
if (_local2.__get__token() == "=") {
_local5 = _local2.nextToken();
_local4.__set__value(_local2.token);
}
}
} else if ((_local3 == "and") || (_local3 == "or")) {
__ops.splice(0, 0, _local3);
} else if ((_local3 != ")") && (_local3 != "(")) {
_local4 = new mx.xpath.FilterExpr(false, _local3, null);
__expr.splice(0, 0, _local4);
if (_local2.nextToken() == mx.utils.StringTokenParser.tkSymbol) {
if (_local2.__get__token() == "=") {
_local5 = _local2.nextToken();
_local4.__set__value(_local2.token);
}
}
}
_local5 = _local2.nextToken();
_local3 = _local2.token;
}
}
function get exprs() {
return(__expr);
}
function get ops() {
return(__ops);
}
}
Symbol 533 MovieClip [__Packages.mx.utils.StringTokenParser] Frame 0
class mx.utils.StringTokenParser
{
var _source, _skipChars;
function StringTokenParser (source, skipChars) {
_source = source;
_skipChars = ((skipChars == undefined) ? null : (skipChars));
}
function get token() {
return(_token);
}
function getPos() {
return(_index);
}
function nextToken() {
var _local4;
var _local2;
var _local3 = _source.length;
skipBlanks();
if (_index >= _local3) {
return(tkEOF);
}
_local2 = _source.charCodeAt(_index);
if (((((_local2 >= 65) && (_local2 <= 90)) || ((_local2 >= 97) && (_local2 <= 122))) || ((_local2 >= 192) && (_local2 <= Number.POSITIVE_INFINITY))) || (_local2 == 95)) {
_local4 = _index;
_index++;
_local2 = _source.charCodeAt(_index);
while (((((((_local2 >= 65) && (_local2 <= 90)) || ((_local2 >= 97) && (_local2 <= 122))) || ((_local2 >= 48) && (_local2 <= 57))) || ((_local2 >= 192) && (_local2 <= Number.POSITIVE_INFINITY))) || (_local2 == 95)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
_token = _source.substring(_local4, _index);
return(tkSymbol);
}
if ((_local2 == 34) || (_local2 == 39)) {
_index++;
_local4 = _index;
_local2 = _source.charCodeAt(_local4);
while (((_local2 != 34) && (_local2 != 39)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
_token = _source.substring(_local4, _index);
_index++;
return(tkString);
}
if ((_local2 == 45) || ((_local2 >= 48) && (_local2 <= 57))) {
var _local5 = tkInteger;
_local4 = _index;
_index++;
_local2 = _source.charCodeAt(_index);
while (((_local2 >= 48) && (_local2 <= 57)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
if (_index < _local3) {
if (((((((_local2 >= 48) && (_local2 <= 57)) || (_local2 == 46)) || (_local2 == 43)) || (_local2 == 45)) || (_local2 == 101)) || (_local2 == 69)) {
_local5 = tkFloat;
}
while ((((((((_local2 >= 48) && (_local2 <= 57)) || (_local2 == 46)) || (_local2 == 43)) || (_local2 == 45)) || (_local2 == 101)) || (_local2 == 69)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
}
_token = _source.substring(_local4, _index);
return(_local5);
}
_token = _source.charAt(_index);
_index++;
return(tkSymbol);
}
function skipBlanks() {
if (_index < _source.length) {
var _local2 = _source.charAt(_index);
while ((_local2 == " ") || ((_skipChars != null) && (skipChar(_local2)))) {
_index++;
_local2 = _source.charAt(_index);
}
}
}
function skipChar(ch) {
var _local2 = 0;
while (_local2 < _skipChars.length) {
if (ch == _skipChars[_local2]) {
return(true);
}
_local2++;
}
return(false);
}
static var tkEOF = -1;
static var tkSymbol = 0;
static var tkString = 1;
static var tkInteger = 2;
static var tkFloat = 3;
var _index = 0;
var _token = "";
}
Symbol 534 MovieClip [__Packages.mx.xpath.FilterExpr] Frame 0
class mx.xpath.FilterExpr
{
function FilterExpr (attrInit, nameInit, valueInit) {
__attr = attrInit;
__name = nameInit;
__value = valueInit;
}
function get attr() {
return(__attr);
}
function set attr(newVal) {
__attr = newVal;
//return(attr);
}
function get name() {
return(__name);
}
function set name(newVal) {
__name = newVal;
//return(name);
}
function get value() {
return(__value);
}
function set value(newVal) {
__value = newVal;
//return(value);
}
var __attr = false;
var __value = null;
var __name = null;
}
Symbol 535 MovieClip [__Packages.mx.data.binding.DataAccessor] Frame 0
class mx.data.binding.DataAccessor
{
var dataAccessor, component, property, location, type;
function DataAccessor () {
}
function getAnyTypedValue(suggestedTypes) {
var _local3 = 0;
while (_local3 < suggestedTypes.length) {
var _local5 = getTypedValue(suggestedTypes[_local3]);
if (_local5 != null) {
return(_local5);
}
_local3++;
}
var _local5 = getTypedValue();
_local3 = 0;
while (_local3 < suggestedTypes.length) {
var _local2 = suggestedTypes[_local3];
if (_local2 == "String") {
return(new mx.data.binding.TypedValue(String(_local5.value), _local2));
}
if (_local2 == "Number") {
return(new mx.data.binding.TypedValue(Number(_local5.value), _local2));
}
if (_local2 == "Boolean") {
return(new mx.data.binding.TypedValue(Boolean(_local5.value), _local2));
}
_local3++;
}
return(_local5);
}
function setAnyTypedValue(newValue) {
var _local7 = getSettableTypes();
if ((_local7 == null) || (-1 != findString(newValue.typeName, _local7))) {
return(setTypedValue(newValue));
}
var _local3 = 0;
while (_local3 < _local7.length) {
var _local2 = _local7[_local3];
if (_local2 == "String") {
return(setTypedValue(new mx.data.binding.TypedValue(String(newValue.value), _local2)));
}
if (_local2 == "Number") {
var _local5 = Number(newValue.value);
var _local6 = setTypedValue(new mx.data.binding.TypedValue(_local5, _local2));
if (_local5.toString() == "NaN") {
return([("Failed to convert '" + newValue.value) + "' to a number"]);
}
return(_local6);
}
if (_local2 == "Boolean") {
return(setTypedValue(new mx.data.binding.TypedValue(Boolean(newValue.value), _local2)));
}
_local3++;
}
return(dataAccessor.setTypedValue(newValue));
}
function getTypedValue(requestedType) {
var _local2 = dataAccessor.getTypedValue(requestedType);
return(_local2);
}
function getGettableTypes() {
return(null);
}
function setTypedValue(newValue) {
return(dataAccessor.setTypedValue(newValue));
}
function getSettableTypes() {
return(null);
}
function findLastAccessor() {
return(((dataAccessor == null) ? this : (dataAccessor.findLastAccessor())));
}
function setupDataAccessor(component, property, location) {
this.component = component;
this.property = property;
this.location = location;
type = component.findSchema(property, location);
}
static function findString(str, arr) {
var _local3 = str.toLowerCase();
var _local1 = 0;
while (_local1 < arr.length) {
if (arr[_local1].toLowerCase() == _local3) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function conversionFailed(newValue, target) {
return(((("Failed to convert to " + target) + ": '") + newValue.value) + "'");
}
}
Symbol 536 MovieClip [__Packages.mx.data.binding.ComponentMixins] Frame 0
class mx.data.binding.ComponentMixins
{
var __refreshing, __bindings, __schema, __fieldCache, _eventDispatcher;
function ComponentMixins () {
}
function refreshFromSources() {
if (__refreshing != null) {
return(undefined);
}
__refreshing = true;
_global.__dataLogger.logData(this, "Refreshing from sources");
_global.__dataLogger.nestLevel++;
mx.data.binding.Binding.refreshFromSources(this, null, __bindings);
_global.__dataLogger.nestLevel--;
__refreshing = null;
}
function refreshDestinations() {
_global.__dataLogger.logData(this, "Refreshing Destinations");
_global.__dataLogger.nestLevel++;
mx.data.binding.Binding.refreshDestinations(this, __bindings);
_global.__dataLogger.nestLevel--;
}
function validateProperty(property, initialMessages) {
var _local4 = null;
var _local3 = getField(property);
if (_local3 != null) {
_local4 = _local3.validateAndNotify(null, null, initialMessages);
} else {
_global.__dataLogger.logData(this, "Can't validate property '<property>' because it doesn't exist", {property:property});
}
return(_local4);
}
function addBinding(binding) {
if (__bindings == undefined) {
__bindings = new Array();
}
__bindings.push(binding);
var _local3 = false;
if (binding.source.component == this) {
getField(binding.source.property, binding.source.location);
_local3 = true;
}
if (binding.dest.component == this) {
getField(binding.dest.property, binding.dest.location);
_local3 = _local3 | Object(binding).is2way;
}
if (_local3) {
var _local4 = binding.dest.component.findSchema(binding.dest.property, binding.dest.location);
if (_local4.readonly) {
binding.source.component.__setReadOnly(true);
}
}
}
static function initComponent(component) {
var _local2 = mx.data.binding.ComponentMixins.prototype;
if (component.refreshFromSources == undefined) {
component.refreshFromSources = _local2.refreshFromSources;
}
if (component.refreshDestinations == undefined) {
component.refreshDestinations = _local2.refreshDestinations;
}
if (component.validateProperty == undefined) {
component.validateProperty = _local2.validateProperty;
}
if (component.createFieldAccessor == undefined) {
component.createFieldAccessor = _local2.createFieldAccessor;
}
if (component.createField == undefined) {
component.createField = _local2.createField;
}
if (component.addBinding == undefined) {
component.addBinding = _local2.addBinding;
}
if (component.findSchema == undefined) {
component.findSchema = _local2.findSchema;
}
if (component.getField == undefined) {
component.getField = _local2.getField;
}
if (component.refreshAndValidate == undefined) {
component.refreshAndValidate = _local2.refreshAndValidate;
}
if (component.getFieldFromCache == undefined) {
component.getFieldFromCache = _local2.getFieldFromCache;
}
if (component.getBindingMetaData == undefined) {
component.getBindingMetaData = _local2.getBindingMetaData;
}
if (component.__setReadOnly == undefined) {
component.__setReadOnly = _local2.__setReadOnly;
}
if (component.__addHighPrioEventListener == undefined) {
component.__addHighPrioEventListener = _local2.__addHighPrioEventListener;
}
}
function createFieldAccessor(property, location, mustExist) {
return(mx.data.binding.FieldAccessor.createFieldAccessor(this, property, location, mx.data.binding.FieldAccessor.findElementType(__schema, property), mustExist));
}
function findSchema(property, location) {
if (typeof(location) == "string") {
if (mx.data.binding.FieldAccessor.isActionScriptPath(String(location))) {
location = location.split(".");
} else {
return(null);
}
}
var _local5 = mx.data.binding.FieldAccessor.findElementType(__schema, property);
if (location != null) {
if (location.path != null) {
location = location.path;
}
if (!(location instanceof Array)) {
return(null);
}
var _local2 = 0;
while (_local2 < location.length) {
var _local4 = location[_local2];
_local5 = mx.data.binding.FieldAccessor.findElementType(_local5, _local4);
_local2++;
}
}
return(_local5);
}
function createField(property, location) {
var _local3 = findSchema(property, location);
var _local2;
if (_local3.validation != null) {
_local2 = mx.data.binding.Binding.getRuntimeObject(_local3.validation);
} else {
_local2 = new mx.data.binding.DataType();
}
_local2.setupDataAccessor(this, property, location);
return(_local2);
}
static function deepEqual(a, b) {
if (a == b) {
return(true);
}
if (typeof(a) != typeof(b)) {
return(false);
}
if (typeof(a) != "object") {
return(false);
}
var _local3 = new Object();
for (var _local4 in a) {
if (!deepEqual(a[_local4], b[_local4])) {
return(false);
}
_local3[_local4] = 1;
}
for (var _local4 in b) {
if (_local3[_local4] != 1) {
return(false);
}
}
return(true);
}
function getFieldFromCache(property, location) {
for (var _local5 in __fieldCache) {
var _local2 = __fieldCache[_local5];
if ((_local2.property == property) && (deepEqual(_local2.location, location))) {
return(_local2);
}
}
return(null);
}
function getField(property, location) {
var _local2 = getFieldFromCache(property, location);
if (_local2 != null) {
return(_local2);
}
_local2 = createField(property, location);
if (__fieldCache == null) {
__fieldCache = new Array();
}
__fieldCache.push(_local2);
return(_local2);
}
function refreshAndValidate(property) {
_global.__dataLogger.logData(this, "Refreshing and validating " + property);
_global.__dataLogger.nestLevel++;
var _local3 = mx.data.binding.Binding.refreshFromSources(this, property, __bindings);
_local3 = validateProperty(property, _local3);
_global.__dataLogger.nestLevel--;
return(_local3 == null);
}
function getBindingMetaData(name) {
return(this["__" + name]);
}
function __setReadOnly(setting) {
if (Object(this).editable != undefined) {
Object(this).editable = !setting;
}
}
function __addHighPrioEventListener(event, handler) {
var _local3 = ((_eventDispatcher != undefined) ? (_eventDispatcher) : this);
if (_local3.__highPrioEvents == undefined) {
_local3.__highPrioEvents = new Object();
}
var _local4 = "__q_" + event;
if (_local3.__highPrioEvents[_local4] == undefined) {
_local3.__highPrioEvents[_local4] = new Array();
}
_global.ASSetPropFlags(_local3.__highPrioEvents, _local4, 1);
mx.events.EventDispatcher._removeEventListener(_local3.__highPrioEvents[_local4], event, handler);
_local3.__highPrioEvents[_local4].push(handler);
if (_local3._databinding_original_dispatchEvent == undefined) {
_local3._databinding_original_dispatchEvent = _local3.dispatchEvent;
_local3.dispatchEvent = function (eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this.dispatchQueue(this.__highPrioEvents, eventObj);
this._databinding_original_dispatchEvent(eventObj);
};
}
}
}
Symbol 537 MovieClip [__Packages.mx.data.binding.Binding] Frame 0
class mx.data.binding.Binding
{
var is2way, dest, source, format;
function Binding (source, dest, format, is2way) {
mx.events.EventDispatcher.initialize(this);
var _local5 = this;
_local5.source = source;
_local5.dest = dest;
_local5.format = format;
_local5.is2way = is2way;
registerBinding(this);
calcShortLoc(source);
calcShortLoc(dest);
_global.__dataLogger.logData(null, ("Creating binding " + summaryString()) + (is2way ? ", 2-way" : ""), {binding:this});
_global.__dataLogger.nestLevel++;
mx.data.binding.ComponentMixins.initComponent(dest.component);
if (source.component != undefined) {
mx.data.binding.ComponentMixins.initComponent(source.component);
}
dest.component.addBinding(this);
if (source.component != undefined) {
source.component.addBinding(this);
setUpListener(source, false);
if (this.is2way) {
setUpListener(dest, true);
setUpIndexListeners(source, false);
setUpIndexListeners(dest, true);
} else {
setUpIndexListeners(source, false);
setUpIndexListeners(dest, false);
}
} else {
execute();
}
_global.__dataLogger.nestLevel--;
}
function execute(reverse) {
var _local3;
var _local4;
if (reverse) {
if (!is2way) {
_global.__dataLogger.logData(null, ("Warning: Can't execute binding " + summaryString(false)) + " in reverse, because it's not a 2 way binding", {binding:this}, mx.data.binding.Log.BRIEF);
return(["error"]);
}
_local3 = dest;
_local4 = source;
} else {
_local3 = source;
_local4 = dest;
}
_global.__dataLogger.logData(null, "Executing binding " + summaryString(reverse), {binding:this});
_global.__dataLogger.nestLevel++;
var _local10;
if (_local3.constant != undefined) {
_local10 = {value:new mx.data.binding.TypedValue(_local3.constant, "String"), getAnyTypedValue:function () {
return(this.value);
}, getTypedValue:function () {
return(this.value);
}, getGettableTypes:function () {
return(["String"]);
}};
} else {
_local10 = _local3.component.getField(_local3.property, _local3.location, true);
}
var _local18;
var _local20;
var _local12 = "";
var _local8 = _local4.component.getField(_local4.property, _local4.location);
if (format != null) {
var _local5 = getRuntimeObject(format);
if (_local5 != null) {
if (reverse) {
_local5.setupDataAccessor(_local4.component, _local4.property, _local4.location);
_local5.dataAccessor = _local8;
_local8 = _local5;
} else {
_local5.setupDataAccessor(_local3.component, _local3.property, _local3.location);
_local5.dataAccessor = _local10;
_local10 = _local5;
}
}
}
var _local14 = ((format == null) ? (_local8.getSettableTypes()) : null);
var value = _local10.getAnyTypedValue(_local14);
var _local9 = new Object();
if (_local8.type.readonly == true) {
_global.__dataLogger.logData(null, "Not executing binding because the destination is read-only", null, mx.data.binding.Log.BRIEF);
var _local6 = new Object();
_local6.type = "invalid";
_local6.property = _local4.property;
_local6.location = _local4.location;
_local6.messages = [{message:"Cannot assign to a read-only data field."}];
_local4.component.dispatchEvent(_local6);
_local9.event = _local6;
} else {
_global.__dataLogger.logData(null, "Assigning new value '<value>' (<typeName>) " + _local12, {value:value.value, typeName:value.typeName, unformattedValue:_local18, formatterFrom:_local20});
var _local13 = _local8.setAnyTypedValue(value);
_local8.validateAndNotify(_local9, false, _local13);
_local4.component.dispatchEvent({type:"bindingExecuted", binding:this});
}
if (_local9.event != null) {
if (_local3.component != null) {
var _local7 = new Object();
_local7.type = _local9.event.type;
_local7.property = _local3.property;
_local7.location = _local3.location;
_local7.messages = _local9.event.messages;
_local7.to = _local4.component;
_local3.component.dispatchEvent(_local7);
}
}
_global.__dataLogger.nestLevel--;
return(_local9.event.messages);
}
function queueForExecute(reverse) {
if (!queued) {
if (_global.__databind_executeQueue == null) {
_global.__databind_executeQueue = new Array();
}
if (_root.__databind_dispatch == undefined) {
_root.createEmptyMovieClip("__databind_dispatch", -8888);
}
_global.__databind_executeQueue.push(this);
queued = true;
this.reverse = reverse;
_root.__databind_dispatch.onEnterFrame = dispatchEnterFrame;
}
}
static function dispatchEnterFrame() {
_root.__databind_dispatch.onEnterFrame = null;
var _local4 = 0;
while (_local4 < _global.__databind_executeQueue.length) {
var _local3 = _global.__databind_executeQueue[_local4];
_local3.execute(_local3.reverse);
_local4++;
}
var _local5;
while (_local5 = _global.__databind_executeQueue.pop() , _local5 != null) {
_local5.queued = false;
_local5.reverse = false;
}
}
function calcShortLoc(endpoint) {
var _local1 = endpoint.location;
if (_local1.path != null) {
_local1 = _local1.path;
}
endpoint.loc = ((_local1 instanceof Array) ? (_local1.join(".")) : (_local1));
}
function summaryString(reverse) {
var _local2 = "<binding.dest.component>:<binding.dest.property>:<binding.dest.loc>";
var _local3 = "<binding.source.component>:<binding.source.property>:<binding.source.loc>";
if (source.constant == null) {
if (reverse == true) {
return((("from " + _local2) + " to ") + _local3);
}
return((("from " + _local3) + " to ") + _local2);
}
return("from constant '<binding.source.constant>' to " + _local2);
}
static function getRuntimeObject(info, constructorParameter) {
if (info.cls == undefined) {
info.cls = mx.utils.ClassFinder.findClass(info.className);
}
var _local3 = new info.cls(constructorParameter);
if (_local3 == null) {
_global.__dataLogger.logData(null, "Could not construct a formatter or validator - new <info.className>(<params>)", {info:info, params:constructorParameter}, mx.data.binding.Log.BRIEF);
}
for (var _local4 in info.settings) {
_local3[_local4] = info.settings[_local4];
}
return(_local3);
}
static function refreshFromSources(component, property, bindings) {
var _local5 = null;
var _local3;
_local3 = 0;
while (_local3 < bindings.length) {
var _local1 = bindings[_local3];
var _local2 = null;
if ((_local1.dest.component == component) && ((property == null) || (property == _local1.dest.property))) {
_local2 = _local1.execute();
} else if ((_local1.is2way && (_local1.source.component == component)) && ((property == null) || (property == _local1.source.property))) {
_local2 = _local1.execute(true);
}
if (_local2 != null) {
_local5 = ((_local5 == null) ? (_local2) : (_local5.concat(_local2)));
}
_local3++;
}
return(_local5);
}
static function refreshDestinations(component, bindings) {
var _local1;
_local1 = 0;
while (_local1 < bindings.length) {
var _local2 = bindings[_local1];
if (_local2.source.component == component) {
_local2.execute();
} else if (_local2.is2way && (_local2.dest.component == component)) {
_local2.execute(true);
}
_local1++;
}
_local1 = 0;
while (_local1 < component.__indexBindings.length) {
var _local3 = component.__indexBindings[_local1];
_local3.binding.execute(_local3.reverse);
_local1++;
}
}
static function okToCallGetterFromSetter() {
function setter(val) {
this.value2 = this.value;
}
function getter() {
return(5);
}
var _local2 = new Object();
_local2.addProperty("value", getter, setter);
_local2.value = 0;
var _local3 = _local2.value2 == _local2.value;
return(_local3);
}
function setUpListener(endpoint, reverse) {
var _local4 = new Object();
_local4.binding = this;
_local4.property = endpoint.property;
_local4.reverse = reverse;
_local4.immediate = okToCallGetterFromSetter();
_local4.handleEvent = function (event) {
_global.__dataLogger.logData(event.target, "Data of property '<property>' has changed. <immediate>.", this);
if (this.immediate) {
if (this.binding.executing != true) {
this.binding.executing = true;
this.binding.execute(this.reverse);
this.binding.executing = false;
}
} else {
this.binding.queueForExecute(this.reverse);
}
};
if (endpoint.event instanceof Array) {
for (var _local5 in endpoint.event) {
endpoint.component.__addHighPrioEventListener(endpoint.event[_local5], _local4);
}
} else {
endpoint.component.__addHighPrioEventListener(endpoint.event, _local4);
}
mx.data.binding.ComponentMixins.initComponent(endpoint.component);
}
function setUpIndexListeners(endpoint, reverse) {
if (endpoint.location.indices != undefined) {
var _local3 = 0;
while (_local3 < endpoint.location.indices.length) {
var _local2 = endpoint.location.indices[_local3];
if (_local2.component != undefined) {
setUpListener(_local2, reverse);
if (_local2.component.__indexBindings == undefined) {
_local2.component.__indexBindings = new Array();
}
_local2.component.__indexBindings.push({binding:this, reverse:reverse});
}
_local3++;
}
}
}
static function copyBinding(b) {
var _local1 = new Object();
_local1.source = copyEndPoint(b.source);
_local1.dest = copyEndPoint(b.dest);
_local1.format = b.format;
_local1.is2way = b.is2way;
return(_local1);
}
static function copyEndPoint(e) {
var _local1 = new Object();
_local1.constant = e.constant;
_local1.component = String(e.component);
_local1.event = e.event;
_local1.location = e.location;
_local1.property = e.property;
return(_local1);
}
static function registerScreen(screen, id) {
var symbol = screenRegistry[id];
if (symbol == null) {
screenRegistry[id] = {symbolPath:String(screen), bindings:[], id:id};
return(undefined);
}
if (symbol.symbolPath == String(screen)) {
return(undefined);
}
var instancePath = String(screen);
var i = 0;
while (i < bindingRegistry.length) {
var b = bindingRegistry[i];
var src = copyEndPoint(b.source);
var dst = copyEndPoint(b.dest);
var prefix = (symbol.symbolPath + ".");
var symbolContainsSource = (prefix == b.source.component.substr(0, prefix.length));
var symbolContainsDest = (prefix == b.dest.component.substr(0, prefix.length));
if (symbolContainsSource) {
if (symbolContainsDest) {
src.component = eval (instancePath + src.component.substr(symbol.symbolPath.length));
dst.component = eval (instancePath + dst.component.substr(symbol.symbolPath.length));
new mx.data.binding.Binding(src, dst, b.format, b.is2way);
} else {
src.component = eval (instancePath + src.component.substr(symbol.symbolPath.length));
dst.component = eval (dst.component);
new mx.data.binding.Binding(src, dst, b.format, b.is2way);
}
} else if (symbolContainsDest) {
src.component = eval (src.component);
dst.component = eval (instancePath + dst.component.substr(symbol.symbolPath.length));
new mx.data.binding.Binding(src, dst, b.format, b.is2way);
}
i++;
}
}
static function registerBinding(binding) {
var _local1 = copyBinding(binding);
bindingRegistry.push(_local1);
}
static function getLocalRoot(clip) {
var _local2;
var _local3 = clip._url;
while (clip != null) {
if (clip._url != _local3) {
break;
}
_local2 = clip;
clip = clip._parent;
}
return(_local2);
}
var queued = false;
var reverse = false;
static var counter = 0;
static var screenRegistry = new Object();
static var bindingRegistry = new Array();
}
Symbol 538 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 539 MovieClip [__Packages.mx.data.binding.EndPoint] Frame 0
class mx.data.binding.EndPoint
{
function EndPoint () {
}
}
Symbol 540 MovieClip [__Packages.mx.data.binding.Log] Frame 0
class mx.data.binding.Log
{
var level, name;
function Log (logLevel, logName) {
level = ((logLevel == undefined) ? (BRIEF) : (logLevel));
name = ((name == undefined) ? "" : (name));
}
function logInfo(msg, level) {
if (level == undefined) {
level = BRIEF;
}
onLog((((getDateString() + " ") + name) + ": ") + mx.data.binding.ObjectDumper.toString(msg));
}
function logData(target, message, info, level) {
if (level == undefined) {
level = VERBOSE;
}
var _local6 = ((name.length > 0) ? ((" " + name) + ": ") : " ");
var _local4 = ((target == null) ? "" : (target + ": "));
if (_local4.indexOf("_level0.") == 0) {
_local4 = _local4.substr(8);
}
var _local3 = ((getDateString() + _local6) + _local4) + substituteIntoString(message, info, 50);
if (showDetails && (info != null)) {
_local3 = _local3 + ("\n " + mx.data.binding.ObjectDumper.toString(info));
} else {
var _local2 = 0;
while (_local2 < nestLevel) {
_local3 = " " + _local3;
_local2++;
}
}
onLog(_local3);
}
function onLog(message) {
trace(message);
}
function getDateString() {
var _local1 = new Date();
return(((((((((_local1.getMonth() + 1) + "/") + _local1.getDate()) + " ") + _local1.getHours()) + ":") + _local1.getMinutes()) + ":") + _local1.getSeconds());
}
static function substituteIntoString(message, info, maxlen, rawDataType) {
var _local9 = "";
if (info == null) {
return(message);
}
var _local11 = message.split("<");
if (_local11 == null) {
return(message);
}
_local9 = _local9 + _local11[0];
var _local7 = 1;
while (_local7 < _local11.length) {
var _local8 = _local11[_local7].split(">");
var _local5 = _local8[0].split(".");
var _local1 = info;
var _local4 = rawDataType;
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2];
if (_local3 != "") {
_local4 = mx.data.binding.FieldAccessor.findElementType(_local4, _local3);
var _local6 = new mx.data.binding.FieldAccessor(null, null, _local1, _local3, _local4, null, null);
_local1 = _local6.getValue();
}
_local2++;
}
if (typeof(_local1) != "string") {
_local1 = mx.data.binding.ObjectDumper.toString(_local1);
}
if (_local1.indexOf("_level0.") == 0) {
_local1 = _local1.substr(8);
}
if ((maxlen != null) && (_local1.length > maxlen)) {
_local1 = _local1.substr(0, maxlen) + "...";
}
_local9 = _local9 + _local1;
_local9 = _local9 + _local8[1];
_local7++;
}
var _local14 = _local9.split(">");
_local9 = _local14.join(">");
_local14 = _local9.split("<");
_local9 = _local14.join("<");
return(_local9);
}
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
static var INFO = 2;
static var WARNING = 1;
static var ERROR = 0;
var showDetails = false;
var nestLevel = 0;
}
Symbol 541 MovieClip [__Packages.mx.data.binding.DataType] Frame 0
class mx.data.binding.DataType extends mx.data.binding.DataAccessor
{
var errorArray, type, kind, dataAccessor, encoder, formatter, getAnyTypedValue, setAnyTypedValue, component, location, property;
function DataType () {
super();
errorArray = null;
}
function setupDataAccessor(component, property, location) {
super.setupDataAccessor(component, property, location);
type = component.findSchema(property, location);
if (type.kind != undefined) {
kind = mx.data.binding.Binding.getRuntimeObject(type.kind);
} else {
kind = new mx.data.kinds.Data();
}
kind.setupDataAccessor(component, property, location);
dataAccessor = kind;
if (type.encoder != undefined) {
encoder = mx.data.binding.Binding.getRuntimeObject(type.encoder);
encoder.setupDataAccessor(component, property, location);
encoder.dataAccessor = dataAccessor;
dataAccessor = encoder;
}
if (type.formatter != undefined) {
formatter = mx.data.binding.Binding.getRuntimeObject(type.formatter);
formatter.setupDataAccessor(component, property, location);
formatter.dataAccessor = dataAccessor;
}
}
function getAsBoolean() {
var _local2 = getAnyTypedValue(["Boolean"]);
return(_local2.value);
}
function getAsNumber() {
var _local2 = getAnyTypedValue(["Number"]);
return(_local2.value);
}
function getAsString() {
var _local2 = getAnyTypedValue(["String"]);
return(_local2.value);
}
function setAsBoolean(newValue) {
setAnyTypedValue(new mx.data.binding.TypedValue(newValue, "Boolean"));
}
function setAsNumber(newValue) {
setAnyTypedValue(new mx.data.binding.TypedValue(newValue, "Number"));
}
function setAsString(newValue) {
setAnyTypedValue(new mx.data.binding.TypedValue(newValue, "String"));
}
function validationError(errorMessage) {
if (errorArray == null) {
errorArray = new Array();
}
errorArray.push(errorMessage);
}
function validate(value) {
}
function getTypedValue(requestedType) {
var _local2;
if ((requestedType == "String") && (formatter != null)) {
_local2 = formatter.getTypedValue(requestedType);
} else {
_local2 = dataAccessor.getTypedValue(requestedType);
if (_local2.type == null) {
_local2.type = type;
}
if (_local2.typeName == null) {
_local2.typeName = type.name;
}
}
if ((_local2.typeName != requestedType) && (requestedType != null)) {
_local2 = null;
} else if (((!requestedType) && (_local2.typeName == "XML")) && (_local2.type.name == "String")) {
_local2 = null;
}
return(_local2);
}
function getGettableTypes() {
var _local2 = new Array();
var _local3 = gettableTypes();
if (_local3 != null) {
_local2 = _local2.concat(_local3);
}
if (type.name != null) {
_local2 = _local2.concat(type.name);
}
if (formatter != null) {
_local2 = _local2.concat(formatter.getGettableTypes());
}
if (_local2.length == 0) {
return(null);
}
return(_local2);
}
function setTypedValue(newValue) {
if ((newValue.typeName == "String") && (formatter != null)) {
return(formatter.setTypedValue(newValue));
}
var _local3 = dataAccessor.getSettableTypes();
if ((_local3 == null) || (-1 != mx.data.binding.DataAccessor.findString(newValue.typeName, _local3))) {
return(dataAccessor.setTypedValue(newValue));
}
return(["Can't set a value of type " + newValue.typeName]);
}
function getSettableTypes() {
var _local2 = new Array();
var _local3 = settableTypes();
if (_local3 != null) {
_local2 = _local2.concat(_local3);
}
if (type.name != null) {
_local2 = _local2.concat(type.name);
}
if (formatter != null) {
_local2 = _local2.concat(formatter.getSettableTypes());
}
if (_local2.length == 0) {
return(null);
}
return(_local2);
}
function gettableTypes() {
return(dataAccessor.getGettableTypes());
}
function settableTypes() {
return(dataAccessor.getSettableTypes());
}
function validateAndNotify(returnData, noEvent, initialMessages) {
var _local4 = false;
errorArray = null;
for (var _local6 in initialMessages) {
validationError(initialMessages[_local6]);
_local4 = true;
}
var _local7 = getTypedValue();
if ((_local7.value == null) || (_local7.value == "")) {
if (type.required == false) {
_global.__dataLogger.logData(component, "Validation of null value succeeded because field '<property>/<m_location>' is not required", this);
} else {
var _local8 = ((location == null) ? "" : (":" + String(location)));
validationError((("Required item '" + property) + _local8) + "' is missing");
_local4 = true;
}
} else {
validate(_local7.value);
_local4 = true;
}
if (_local4 && (noEvent != true)) {
var _local5 = new Object();
_local5.type = ((errorArray == null) ? "valid" : "invalid");
_local5.property = property;
_local5.location = location;
_local5.messages = errorArray;
component.dispatchEvent(_local5);
returnData.event = _local5;
}
return(errorArray);
}
}
Symbol 542 MovieClip [__Packages.mx.data.kinds.Data] Frame 0
class mx.data.kinds.Data extends mx.data.binding.DataAccessor
{
var component, property, location;
function Data () {
super();
}
function getTypedValue(requestedType) {
var _local5;
var _local2 = getFieldAccessor().getValue();
var _local3 = null;
if (_local2 != null) {
if (_local2 instanceof Array) {
_local3 = "Array";
} else if ((_local2 instanceof XMLNode) || (_local2 instanceof XMLNode)) {
_local3 = "XML";
} else {
var _local4 = typeof(_local2);
_local3 = _local4.charAt(0).toUpperCase() + _local4.slice(1);
}
} else {
_local2 = null;
}
_local5 = new mx.data.binding.TypedValue(_local2, _local3, null);
return(_local5);
}
function getGettableTypes() {
return(null);
}
function setTypedValue(newValue) {
getFieldAccessor().setValue(newValue.value, newValue);
return(null);
}
function getSettableTypes() {
return(null);
}
function getFieldAccessor() {
return(component.createFieldAccessor(property, location, false));
}
}
Symbol 543 MovieClip [__Packages.mx.data.binding.Formatter] Frame 0
class mx.data.binding.Formatter extends mx.data.binding.DataAccessor
{
function Formatter () {
super();
}
}
Symbol 544 MovieClip [__Packages.mx.utils.ClassFinder] Frame 0
class mx.utils.ClassFinder
{
function ClassFinder () {
}
static function findClass(fullClassName) {
if (fullClassName == null) {
return(null);
}
var _local3 = _global;
var _local4 = fullClassName.split(".");
var _local2 = 0;
while (_local2 < _local4.length) {
_local3 = _local3[_local4[_local2]];
_local2++;
}
if (_local3 == null) {
_global.__dataLogger.logData(null, "Could not find class '<classname>'", {classname:fullClassName}, mx.data.binding.Log.BRIEF);
}
return(_local3);
}
}
Symbol 545 MovieClip [__Packages.Fontanna] Frame 0
class Fontanna extends MovieClip
{
var getNextHighestDepth, getInstanceAtDepth, attachMovie;
function Fontanna () {
super();
}
function getNextHighestDepthDODATNI() {
var _local2 = getNextHighestDepth();
if (_local2 <= 0) {
_local2 = 1;
while (getInstanceAtDepth(_local2)) {
_local2++;
}
}
return(_local2);
}
function wystrzel(klip, xod, yod, xdo, ydo, skalaod, skalado, alfaod, alfado, rotacjaod, rotacjado, czas, jakieasing) {
var _local5 = getNextHighestDepthDODATNI();
var _local2 = attachMovie(klip, "klipleci" + _local5, _local5, {_x:xod, _y:yod, _xscale:skalaod, _yscale:skalaod, _alpha:alfaod});
new mx.transitions.Tween(_local2, "_x", jakieasing, xod, xdo, czas, true);
new mx.transitions.Tween(_local2, "_y", jakieasing, yod, ydo, czas, true);
new mx.transitions.Tween(_local2, "_xscale", jakieasing, skalaod, skalado, czas, true);
new mx.transitions.Tween(_local2, "_yscale", jakieasing, skalaod, skalado, czas, true);
new mx.transitions.Tween(_local2, "_rotation", jakieasing, rotacjaod, rotacjado, czas, true);
var _local7 = new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Regular.easeIn, alfaod, alfado, czas, true);
_local7.onMotionFinished = function () {
this.obj.removeMovieClip();
};
}
function wystrzellosowo(klip, xx, yy, skalaod, skalado, alfaod, alfado, rotacjaod, rotacjado, czas, jakieasing, katod, katdo, odlod, odldo) {
var _local3 = katod + random(katdo - katod);
var _local2 = odlod + random(odldo - odlod);
var _local5 = xx + (Math.cos((Math.PI * _local3) / 180) * _local2);
var _local4 = yy + (Math.sin((Math.PI * _local3) / 180) * _local2);
wystrzel(klip, xx, yy, _local5, _local4, skalaod, skalado, alfaod, alfado, rotacjaod, rotacjado, czas, jakieasing);
}
}
Symbol 546 MovieClip [__Packages.FieldBuyplace] Frame 0
class FieldBuyplace extends Field
{
var highlightmc, krokpion, krokpoziom, _car, _x, _y;
function FieldBuyplace () {
super();
}
function onLoad() {
highlightmc._visible = false;
krokpion = 3;
krokpoziom = 5;
super.onLoad();
}
function testdrop(car) {
return("-");
}
function testdrag() {
return(_car._owned);
}
function cardoubleclicked() {
}
function tiktak() {
if (_car == null) {
_car._statustexxt = "";
_root.yesnobuy._visible = false;
if (countdown <= 0) {
countdown = CONFIGcoilemin + (random(10 * (CONFIGcoilemax - CONFIGcoilemin)) / 10);
trace("auto nadjedzie za sekund: " + countdown);
} else {
countdown = countdown - _root.roznicaczasu;
if (countdown <= 0) {
var _local8 = _root.getNextHighestDepthDODATNI();
var _local11 = _x + (ilekrokow * krokpoziom);
var _local10 = _y - (ilekrokow * krokpion);
var _local6 = "";
var _local7 = false;
var _local9 = Math.random() > 0.2;
if (_root.currentlevel == 1) {
_local9 = true;
}
if (_root.currentlevel < 4) {
var _local5 = ["pickup", "sedan"];
_local6 = _local5[(getTimer() + Math.round(Math.random() * 100)) % _local5.length];
if (_local6 == lastcartype) {
_local6 = _local5[(getTimer() + Math.round(Math.random() * 100)) % _local5.length];
}
} else if (_root.currentlevel == 4) {
var _local5 = new Array();
var _local3 = 0;
while (_local3 < 20) {
_local5.push("sedan");
_local3++;
}
_local3 = 0;
while (_local3 < 35) {
_local5.push("pickup");
_local3++;
}
_local3 = 0;
while (_local3 < 45) {
_local5.push("wagon");
_local3++;
}
_local6 = _local5[(getTimer() + Math.round(Math.random() * 100)) % _local5.length];
if (_local6 == lastcartype) {
_local6 = _local5[(getTimer() + Math.round(Math.random() * 100)) % _local5.length];
}
if (_local6 != "wagon") {
_local7 = Math.random() > 0.7;
}
}
lastcartype = _local6;
_car = _root.attachMovie("car", "car" + _local8, _local8, {_x:_local11, _y:_local10, _dirty:false, _broken:_local9, _bodyworked:_local7, _cartype:_local6, _owned:false});
_root.pilnujpoziomow();
_car._field = this;
bylodglos = false;
new mx.transitions.Tween(_car, "_x", mx.transitions.easing.Regular.easeOut, _car._x, _x, 5, true);
new mx.transitions.Tween(_car, "_y", mx.transitions.easing.Regular.easeOut, _car._y, _y, 5, true);
}
}
} else if (!_car._owned) {
if (_car._x > _x) {
_car._statustext = _root.langtxt("actionOwned");
_car._statuspercent = -1;
_car._statusicon = "";
_root.yesnobuy._visible = false;
} else if (_car._x == _x) {
if (!bylodglos) {
bylodglos = true;
_root.playsound("carhorn");
}
if (countdown <= 0) {
countdown = CONFIGrezygnacjamin + (random(10 * (CONFIGrezygnacjamax - CONFIGrezygnacjamin)) / 10);
trace("sprzedawca zrezygnuje za: " + countdown);
} else {
if (_root.SELECTED == _car) {
_root.yesnobuy._visible = true;
_root.yesnobuy.gotoAndStop(1);
_root.yesnobuy.label = _root.formatcurrency(_car.getPrice());
} else {
_root.yesnobuy._visible = true;
_root.yesnobuy.gotoAndStop(2);
_root.yesnobuy.turningarrow.tiktak();
}
if (_car.getPrice() <= _root.FINANCES) {
_root.yesnobuy.tradepossible.gotoAndStop(1);
} else if (_car.getPrice() <= (_root.FINANCES + _root.zarobek)) {
_root.yesnobuy.tradepossible.gotoAndStop(3);
} else {
_root.yesnobuy.tradepossible.gotoAndStop(2);
}
countdown = countdown - _root.roznicaczasu;
if (countdown <= 0) {
new mx.transitions.Tween(_car, "_x", mx.transitions.easing.Regular.easeIn, _x, _x - (ilekrokow * krokpoziom), 5, true);
new mx.transitions.Tween(_car, "_y", mx.transitions.easing.Regular.easeIn, _y, _y + (ilekrokow * krokpion), 5, true);
_root.yesnobuy._visible = false;
}
if (_car._broken && (random(100) > 90)) {
var _local3 = 0;
while (_local3 < (20 / _root.tiktakownasekunde)) {
var _local4 = random(360);
_root.fontanna.wystrzellosowo("fontannadym", _x - 20, _y - 30, 50, 150, 40, 0, _local4, (_local4 + random(180)) - 90, 2, mx.transitions.easing.Regular.easeOut, 230, 240, 60, 70);
_local3++;
}
}
}
} else {
_root.yesnobuy._visible = false;
if (_car._x <= (_x - (krokpoziom * ilekrokow))) {
_car.removeMovieClip();
if (_car == _root.SELECTED) {
_root.SELECTED = null;
}
_car = null;
}
}
}
}
function klikyes() {
var _local3 = _car.getPrice();
countdown = 0;
if (_root.FINANCES >= _local3) {
_car._owned = true;
_car._statustext = _root.langtxt("actionField");
_root.FINANCES = _root.FINANCES - _local3;
_root.yesnobuy._visible = false;
} else {
_root.mbkomunikat = _root.langtxt("lackOfMoney") + _root.formatcurrency(_local3);
}
}
function klikno() {
countdown = 0;
new mx.transitions.Tween(_car, "_x", mx.transitions.easing.Regular.easeIn, _x, _x - (ilekrokow * krokpoziom), 5, true);
new mx.transitions.Tween(_car, "_y", mx.transitions.easing.Regular.easeIn, _y, _y + (ilekrokow * krokpion), 5, true);
_root.yesnobuy._visible = false;
}
function carclicked() {
if ((_car != null) && (_car._x == _x)) {
countdown = Math.max(2, countdown);
trace("przed\u0142u\u017Canie oczekiwania sprzedawcy");
}
}
function rent() {
if (_car != null) {
if (_car._owned) {
_root.napisdymek(_root.langtxt("floatingNotOnField"), _x, _y, "991a1a");
}
}
}
var ilekrokow = 100;
var CONFIGcoilemin = 1;
var CONFIGcoilemax = 3;
var CONFIGrezygnacjamin = 10;
var CONFIGrezygnacjamax = 15;
var countdown = -1;
var lastcartype = "sedan";
var bylodglos = false;
}
Symbol 547 MovieClip [__Packages.FieldSaleplace] Frame 0
class FieldSaleplace extends Field
{
var highlightmc, _x, _y;
function FieldSaleplace () {
super();
}
function onLoad() {
highlightmc._visible = false;
super.onLoad();
}
function carclicked() {
if ((_car != null) && (_root.yesnosell._visible)) {
countdown = Math.max(2, countdown);
trace("przed\u0142u\u017Canie oczekiwania kupujacego");
}
}
function testdrop(car) {
if (car == null) {
highlightmc._visible = false;
} else if (_car == null) {
highlightmc._visible = true;
} else {
highlightmc._visible = false;
}
if (car._broken) {
highlightmc._visible = false;
return(_root.langtxt("carBrokenForSale"));
}
if (car._dirty) {
highlightmc._visible = false;
return(_root.langtxt("carDirtyForSale"));
}
if (_car != null) {
if (_car != car) {
// unexpected jump
}
return("-");
}
return("");
}
function testdrag() {
return(((_car != null) && (_car._owned)) && (!_root.yesnosell._visible));
}
function tiktak() {
if (_car) {
if (_car._owned) {
if (_root.dragged != _car) {
if (_root.yesnosell._visible) {
if (_root.SELECTED == _car) {
_root.yesnosell.gotoAndStop(1);
_root.yesnosell.label = _root.formatcurrency(_car.getPrice());
} else {
_root.yesnosell.gotoAndStop(2);
_root.yesnosell.turningarrow.tiktak();
}
if (countdown <= 0) {
countdown = CONFIGrezygnacjamin + (random(10 * (CONFIGrezygnacjamax - CONFIGrezygnacjamin)) / 10);
trace("kupuj\u0105cy zrezygnuje za sekund: " + countdown);
} else {
countdown = countdown - _root.roznicaczasu;
if (countdown <= 0) {
_root.yesnosell._visible = false;
}
}
} else if (countdown <= 0) {
countdown = CONFIGcoilemin + (random(10 * (CONFIGcoilemax - CONFIGcoilemin)) / 10);
trace("oferta kupna za sekund: " + countdown);
_car._statustext = _root.langtxt("actionSell");
_car._statuspercent = -1;
_car._statusicon = "";
if (!pierwszaoferta) {
_root.playsound("goodbye_" + aktsound);
}
pierwszaoferta = false;
} else {
countdown = countdown - _root.roznicaczasu;
if (countdown <= 0) {
if (random(100) > 50) {
aktsound = "f";
} else {
aktsound = "m";
}
_root.playsound("hello_" + aktsound);
if (_root.SELECTED == _car) {
_root.yesnosell._visible = true;
_root.yesnosell.gotoAndStop(1);
_root.yesnosell.label = _root.formatcurrency(_car.getPrice());
} else {
_root.yesnosell._visible = true;
_root.yesnosell.gotoAndStop(2);
_root.yesnosell.turningarrow.tiktak();
}
}
}
}
} else {
_car._alpha = _car._alpha - 10;
if (_car._alpha < 1) {
_car.removeMovieClip();
if (_car == _root.SELECTED) {
_root.SELECTED = null;
}
_car = null;
}
}
}
}
function cardoubleclicked() {
}
function drop(car) {
trace("drop: " + car);
testdrop(null);
_car = car;
if (_car._field != null) {
_car._field._car = null;
_car._field.aktualizujwyglad();
}
_car._field = this;
_car._statustext = _root.langtxt("actionSell");
_car._statuspercent = -1;
_car._statusicon = "";
if (random(100) > 50) {
aktsound = "f";
} else {
aktsound = "m";
}
pierwszaoferta = true;
}
function klikyes() {
_root.FINANCES = _root.FINANCES + _car.getPrice();
_car._owned = false;
_root.yesnosell._visible = false;
fontannajeszcze = 1;
var _local3;
_local3 = 0;
while (_local3 < 15) {
_root.fontanna.wystrzellosowo("fontannadolar", _x + 20, _y - 30, 0, 100, 100, 0, 0, 0, 1, mx.transitions.easing.Regular.easeOut, _local3 * 24, _local3 * 24, 60, 60);
_local3++;
}
_root.fontanna.wystrzel("fontannadolar", _x + 20, _y - 30, _x + 20, _y - 30, 0, 300, 100, 0, 300, 360, 1.5, mx.transitions.easing.Regular.easeOut);
}
function klikno() {
countdown = 0;
_root.yesnosell._visible = false;
_root.playsound("goodbye_" + aktsound);
}
function rent() {
if (_car != null) {
_root.napisdymek(_root.langtxt("floatingNotOnField"), _x, _y, "991a1a");
}
}
var _car = null;
var _ostdymek = 0;
var CONFIGcoilemin = 1;
var CONFIGcoilemax = 3;
var CONFIGrezygnacjamin = 5;
var CONFIGrezygnacjamax = 8;
var countdown = -1;
var fontannajeszcze = 0;
var aktsound = "f";
var pierwszaoferta = false;
}
Symbol 548 MovieClip [__Packages.FieldMechanics] Frame 0
class FieldMechanics extends Field
{
var _car, motionmc, turningarrow, _parent, _x, _y;
function FieldMechanics () {
super();
}
function testdrop(car) {
trace("TESTDROP!");
if ((_car != null) && (car == _car)) {
return("-");
}
if ((_car != null) && (_car._broken)) {
return(_root.langtxt("carProcess"));
}
if (((car == null) || (!car._broken)) || (car.getSparesNeeded("workshop") > _root.SPAREPARTS)) {
if (_car != null) {
motionmc.gotoAndStop(2);
trace("TESTDROP! " + _car._broken);
if (_car._broken) {
return(_root.langtxt("carProcess"));
}
return(_root.langtxt("buildingOccupied"));
}
motionmc.gotoAndStop(1);
if (!car._broken) {
return(_root.langtxt("alreadyRepaired"));
}
if (car == null) {
return("-");
}
return(_root.langtxt("lackOfSpares"));
}
if (_car != null) {
motionmc.gotoAndStop(2);
if (_car != car) {
return("");
}
return("-");
}
motionmc.gotoAndStop(2);
return("");
}
function testdrag() {
_root.debugdopisz("FieldMechanics.testdrag");
if ((_car != null) && (_car._broken)) {
return(false);
}
return(true);
}
function aktualizujwyglad() {
if (_car != null) {
motionmc.gotoAndStop(2);
turningarrow._visible = !_car._broken;
} else {
motionmc.gotoAndStop(1);
turningarrow._visible = false;
}
}
function tiktak() {
ileminelo = ileminelo + _root.roznicaczasu;
if ((_car != null) && (_car._broken)) {
if (ileminelo > _car.getTimeNeeded("workshop")) {
_car._broken = false;
_car.makedirty("workshop");
fontannajeszcze = 0.5;
_parent.progressrepair.val = 0;
_car._statustext = _root.langtxt("actionField");
_car._statusicon = "";
_car._statuspercent = 0;
var _local3;
_local3 = 0;
while (_local3 < 10) {
_root.fontanna.wystrzellosowo("fontannagwiazdka", _x + 20, _y - 30, 0, 100, 100, 0, _local3 * 36, (_local3 * 36) + 20, 1, mx.transitions.easing.Regular.easeOut, _local3 * 36, _local3 * 36, 60, 60);
_root.fontanna.wystrzellosowo("fontannagwiazdka", _x + 20, _y - 30, 0, 100, 100, 0, (_local3 * 36) - 2, (_local3 * 36) + 18, 1, mx.transitions.easing.Regular.easeOut, (_local3 * 36) + 18, (_local3 * 36) + 18, 30, 30);
_local3++;
}
} else {
var _local4 = (100 * ileminelo) / _car.getTimeNeeded("workshop");
_local4 = Math.max(_local4, 0);
_local4 = 100 - Math.min(_local4, 100);
_car._statustext = _root.langtxt("actionWorkshop");
_car._statuspercent = 100 - _local4;
_car._statusicon = "mechanical";
_car.zepsuciemc._visible = true;
_car.zepsuciemc._alpha = _local4;
_parent.progressrepair.val = 100 - _local4;
}
aktualizujwyglad();
} else {
turningarrow._visible = _car != null;
}
turningarrow.tiktak();
}
function drop(car) {
super.drop(car);
_root.SPAREPARTS = _root.SPAREPARTS - car.getSparesNeeded("workshop");
ileminelo = 0;
motionmc.gotoAndStop(2);
_root.playsound("wiertara");
}
function rent() {
if (_car != null) {
if (!_car._broken) {
_root.napisdymek(_root.langtxt("floatingNotOnField"), _x, _y, "991a1a");
} else if (_car._broken) {
_root.napisdymek(_root.langtxt("floatingProcessing"), _x, _y, "991a1a");
}
}
}
var ileminelo = 0;
var fontannajeszcze = 0;
}
Symbol 549 MovieClip [__Packages.FieldBodywork] Frame 0
class FieldBodywork extends Field
{
var _car, frontmc, turningarrow, _parent, _x, _y;
function FieldBodywork () {
super();
}
function testdrop(car) {
if ((_car != null) && (car == _car)) {
return("-");
}
if ((_car != null) && (!_car._bodyworked)) {
return(_root.langtxt("carProcess"));
}
if ((((car == null) || (car._bodyworked)) || (car.getSparesNeeded("bodywork") > _root.SPAREPARTS)) || (car._broken)) {
if (_car != null) {
frontmc.gotoAndStop(2);
if (!_car._bodyworked) {
return(_root.langtxt("carProcess"));
}
return(_root.langtxt("buildingOccupied"));
}
frontmc.gotoAndStop(1);
if (car._bodyworked) {
return(_root.langtxt("alreadyBodyworked"));
}
if (car._broken) {
return(_root.langtxt("carBroken"));
}
if (car == null) {
return("-");
}
return(_root.langtxt("lackOfSpares"));
}
if (_car != null) {
if (_car != car) {
return("");
}
return("-");
}
frontmc.gotoAndStop(2);
return("");
}
function testdrag() {
_root.debugdopisz("FieldBodywork.testdrag");
if ((_car != null) && (!_car._bodyworked)) {
return(false);
}
return(true);
}
function aktualizujwyglad() {
if (_car != null) {
frontmc.gotoAndStop(2);
turningarrow._visible = _car._bodyworked;
} else {
frontmc.gotoAndStop(1);
turningarrow._visible = false;
}
}
function drop(car) {
super.drop(car);
_root.SPAREPARTS = _root.SPAREPARTS - car.getSparesNeeded("bodywork");
ileminelo = 0;
frontmc.gotoAndStop(2);
_root.playsound("spray");
}
function tiktak() {
ileminelo = ileminelo + _root.roznicaczasu;
if ((_car != null) && (!_car._bodyworked)) {
if (ileminelo > _car.getTimeNeeded("bodywork")) {
_car._bodyworked = true;
_car._dirty = false;
_parent.progressbodywork.val = 0;
if (_car._broken) {
_car._statustext = _root.langtxt("actionBroken");
_car._statusicon = "mechanical";
_car._statuspercent = 0;
} else {
_car._statustext = _root.langtxt("actionField");
_car._statusicon = "";
_car._statuspercent = 0;
}
} else {
_car._statustext = _root.langtxt("actionBodywork");
var _local3 = (100 * ileminelo) / _car.getTimeNeeded("bodywork");
_local3 = Math.max(_local3, 0);
_local3 = Math.min(_local3, 100);
_car._statuspercent = _local3;
_car._statusicon = "bodywork";
_car.autopomalowanemc._visible = true;
_car.autopomalowanemc._alpha = _local3;
_car.brudmc._alpha = 100 - _local3;
_parent.progressbodywork.val = _local3;
}
aktualizujwyglad();
} else {
turningarrow._visible = _car != null;
}
turningarrow.tiktak();
}
function rent() {
if (_car != null) {
if (_car._bodyworked) {
_root.napisdymek(_root.langtxt("floatingNotOnField"), _x, _y, "991a1a");
} else if (_car._broken) {
_root.napisdymek(_root.langtxt("floatingProcessing"), _x, _y, "991a1a");
}
}
}
var ileminelo = 0;
}