Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("2dd0d9c7", this, 10301, true);
stop();
Instance of Symbol 21 MovieClip in Frame 1
on (release) {
getURL ("http://www.hypegames.com", "_blank");
}
Frame 6
stop();
Frame 15
stop();
Symbol 6 MovieClip [dmSoundService] Frame 1
#initclip 14
Object.registerClass("dmSoundService", CSoundService);
#endinitclip
Instance of Symbol 8 MovieClip in Symbol 13 MovieClip [load_mc] Frame 1
onClipEvent (enterFrame) {
var tt = _root.getBytesLoaded();
if (int((tt / _root.getBytesTotal()) * 100) == 100) {
_parent._parent.gotoAndPlay("lbStart");
}
_parent.gotoAndPlay(int((tt / _root.getBytesTotal()) * 100));
}
Symbol 1067 MovieClip [__Packages.CSoundService] Frame 0
class CSoundService extends MovieClip
{
var m_sounds, m_soundsState, m_soundsNames, createEmptyMovieClip, onEnterFrame;
function CSoundService () {
super();
}
function realPlaySound(id, repeatCount) {
if (m_soundOff) {
return(undefined);
}
Sound(m_sounds[id]).start(0, repeatCount);
}
function processSounds() {
var _local2 = 0;
while (_local2 < m_sounds.length) {
if (m_soundsState[_local2] > 0) {
realPlaySound(_local2, m_soundsState[_local2]);
m_soundsState[_local2] = ST_PLAY;
break;
}
_local2++;
}
}
function init(soundNames) {
m_soundsNames = soundNames;
m_sounds = new Array(soundNames.length);
m_soundsState = new Array(soundNames.length);
var _local2 = 0;
while (_local2 < soundNames.length) {
var _local4 = createEmptyMovieClip("_contMovie" + _local2, 1000 + _local2);
var _local3 = new Sound(_local4);
_local3.attachSound(soundNames[_local2]);
m_soundsState[_local2] = ST_STOP;
_local3.sounID = _local2;
_local3.parent = m_instance;
_local3.onSoundComplete = function () {
this.parent.m_soundsState[this.sounID] = CSoundService.ST_STOP;
};
m_sounds[_local2] = _local3;
_local2++;
}
onEnterFrame = processSounds;
}
static function createSoundService(soundNames, soundsPlace, depthInSoundsPlace) {
m_instance = CSoundService(soundsPlace.attachMovie("dmSoundService", "__SoundServiceObject", depthInSoundsPlace));
m_instance.init(soundNames);
return(m_instance);
}
static function playLoopSound(soundID) {
if ((m_instance.m_loopSoundID >= 0) && (m_instance.m_loopSoundID != soundID)) {
stopSound(m_instance.m_loopSoundID);
}
m_instance.m_loopSoundID = soundID;
if (!soundIsPlay(m_instance.m_loopSoundID)) {
playCurLoopSound();
}
}
static function playCurLoopSound() {
playSound(m_instance.m_loopSoundID, true, 9999);
}
static function stopCurLoopSound() {
stopSound(m_instance.m_loopSoundID);
}
static function soundOff() {
var _local1 = 0;
while (_local1 < m_instance.m_sounds.length) {
stopSound(_local1);
_local1++;
}
m_instance.m_soundOff = true;
}
static function soundOn() {
m_instance.m_soundOff = false;
if (m_instance.m_loopSoundID >= 0) {
playCurLoopSound();
}
}
static function soundIsPlay(id) {
return(m_instance.m_soundsState[id] != ST_STOP);
}
static function playSound(id, ifSoundStop, repeatCount) {
if (repeatCount == undefined) {
repeatCount = 1;
}
if (ifSoundStop == undefined) {
ifSoundStop = false;
}
if (m_instance.m_soundOff) {
return(undefined);
}
if (ifSoundStop && (soundIsPlay(id))) {
return(undefined);
}
m_instance.m_soundsState[id] = repeatCount;
}
static function stopSound(id) {
Sound(m_instance.m_sounds[id]).stop(m_instance.m_soundsNames[id]);
m_instance.m_soundsState[id] = ST_STOP;
}
static function getSoundAt(soundNum) {
return(m_instance.m_sounds[soundNum]);
}
static function soundIsOn() {
return(!m_instance.m_soundOff);
}
static function stopAllSound() {
var _local1 = 0;
while (_local1 < m_instance.m_sounds.length) {
stopSound(_local1);
_local1++;
}
}
var m_loopSoundID = -1;
static var m_instance = null;
var m_soundOff = false;
static var ST_PLAY = -1;
static var ST_STOP = 0;
static var PLAY_OPT_ALWAYS = 0;
static var PLAY_OPT_IFSTOP = 1;
static var PLAY_OPT_STOPANDPLAY = 2;
}
Symbol 1068 MovieClip [__Packages.cGame] Frame 0
class cGame extends MovieClip
{
static var inst, _status, mcQuestion, prizCar;
var mcShirma;
function cGame () {
super();
CSoundService.createSoundService(["snd_music_intro", "snd_music_game", "snd_click", "snd_wrong", "snd_acsel", "snd_break", "snd_wizg", "snd_BigBoom", "snd_bye", "snd_bonus", "snd_win", "snd_lose", "snd_window", "snd_vzdyv", "snd_nitro", "nitroHitCar"], _root, 9999);
CSoundService.playLoopSound(0);
inst = this;
_status = 0;
mcShirma.useHandCursor = false;
var _local4 = SharedObject.getLocal("Urgen");
if (_local4.data.metka == true) {
mcShirma._visible = false;
}
_local4.close();
}
static function sendSubmit() {
score = cTrac.AllScore;
mcQuestion = inst.attachMovie("submitScreen", "_submitScreen", 31789);
mcQuestion.txtScore = score;
Selection.setFocus(mcQuestion.txtEnterName);
}
static function buttYes() {
var _local1 = new LoadVars();
_local1.player_name = mcQuestion.txtEnterName.text;
_local1.player_score = score;
_local1.player_mission = curentMission;
_local1.player_car = cTrac.MyCarParam.nazv;
_local1.send("http://www.hypegames.com/highway_madness.php", "_blank", "POST");
mcQuestion.removeMovieClip();
}
static function Cheet() {
var _local2;
var _local1 = 1;
while (_local1 < 7) {
_local2 = new cCarParam();
_local2.GenNewCarType(_local1);
arrMarket.push(_local2);
_local1++;
}
}
static function buttNo() {
mcQuestion.removeMovieClip();
}
static function resetArr() {
arrMarket = [];
arrGarag = [];
cBriff.costBriffArr = [5000, 8000, 0, 10000, 12000, 12000, 13000, 15000, 20000, 25000, 30000, 50000, 90000, 0];
cBriff.distBriffArr = [15000, 25000, 19000, 100, 35000, 15000, 20000, 23000, 37000, 100, 40000, 25000, 100, 0];
cBriff.MaxTimeBriffArr = [0, 100, 60, 300, 300, 150, 300, 55, 120, 120, 87, 300, 120, 0];
}
static function btNewGame() {
if (inst.mcShirma._visible) {
status = (ST_Zast);
} else {
mcQuestion = inst.attachMovie("newgamescreen", "newgamescreen", 31789);
}
}
static function newGame() {
mcQuestion.removeMovieClip();
maxMission = 0;
curentCar = 0;
curentMission = 0;
sumScore = 0;
resetArr();
Surviv = false;
_myMoney = 2000;
showGarag = true;
var _local1;
arrMarket = [];
_local1 = new cCarParam();
_local1.genNewCar();
arrMarket.push(_local1);
_local1 = new cCarParam();
_local1.GenNewCarType(2);
arrMarket.push(_local1);
_local1 = new cCarParam();
_local1.GenNewCarType(6);
arrMarket.push(_local1);
_local1 = new cCarParam();
arrGarag = [];
_local1.GenNewCarType(6);
_local1.__set__streng(_local1.maxStreng);
_local1.color = 923456789 /* 0x370AD515 */;
arrGarag.push(_local1);
}
static function loadData() {
Surviv = false;
showGarag = false;
resetArr();
var _local1 = SharedObject.getLocal("Urgen");
if (!_local1.data.sound) {
CSoundControl.soundIsOn = false;
}
if (_local1.data.sumScore != undefined) {
sumScore = _local1.data.sumScore;
} else {
sumScore = 0;
}
if (_local1.data.money != undefined) {
_myMoney = _local1.data.money;
} else {
_myMoney = 0;
}
if (_local1.data.maxMiss != undefined) {
maxMission = _local1.data.maxMiss;
} else {
maxMission = 0;
}
if (_local1.data.curCar != undefined) {
curentCar = _local1.data.curCar;
} else {
curentCar = 0;
}
var _local5 = _local1.data.garCount;
var _local3;
var _local4 = 0;
while (_local4 < _local5) {
_local3 = new cCarParam();
_local3.GenNewCarType(_local1.data["TypeCar" + _local4]);
_local3.color = _local1.data["ColorCar" + _local4];
_local3.MaxSpeed = _local1.data["speedCar" + _local4];
_local3.mass = _local1.data["massCar" + _local4];
_local3.aksel = _local1.data["acsCar" + _local4];
arrGarag.push(_local3);
_local4++;
}
var _local2 = 0;
while (_local2 < cBriff.costBriffArr.length) {
if (_local1.data["CostBrif" + _local2] != undefined) {
cBriff.costBriffArr[_local2] = _local1.data["CostBrif" + _local2];
}
if (_local1.data["DistBrif" + _local2] != undefined) {
cBriff.distBriffArr[_local2] = _local1.data["DistBrif" + _local2];
}
if (_local1.data["maxTimeBrif" + _local2] != undefined) {
cBriff.MaxTimeBriffArr[_local2] = _local1.data["maxTimeBrif" + _local2];
}
_local2++;
}
_local1.close();
_local3 = new cCarParam();
_local3.GenNewCarType(2);
arrMarket.push(_local3);
_local3 = new cCarParam();
_local3.GenNewCarType(6);
arrMarket.push(_local3);
_local4 = 1;
while (_local4 < maxMission) {
_local3 = new cCarParam();
_local3.genNewCar();
arrMarket.push(_local3);
_local4++;
}
}
static function saveData() {
if (!Surviv) {
var _local3 = SharedObject.getLocal("Urgen");
_local3.clear();
_local3.data.metka = true;
_local3.data.sound = CSoundControl.soundIsOn;
_local3.data.money = _myMoney;
_local3.data.maxMiss = maxMission;
_local3.data.curCar = curentCar;
_local3.data.garCount = arrGarag.length;
_local3.data.sumScore = sumScore;
var _local1 = 0;
while (_local1 < arrGarag.length) {
_local3.data["ColorCar" + _local1] = arrGarag[_local1].color;
_local3.data["TypeCar" + _local1] = arrGarag[_local1].type;
_local3.data["speedCar" + _local1] = arrGarag[_local1].MaxSpeed;
_local3.data["massCar" + _local1] = arrGarag[_local1].mass;
_local3.data["acsCar" + _local1] = arrGarag[_local1].aksel;
_local1++;
}
var _local2 = 0;
while (_local2 < cBriff.costBriffArr.length) {
_local3.data["CostBrif" + _local2] = cBriff.costBriffArr[_local2];
_local3.data["DistBrif" + _local2] = cBriff.distBriffArr[_local2];
_local3.data["maxTimeBrif" + _local2] = cBriff.MaxTimeBriffArr[_local2];
_local2++;
}
_local3.flush();
}
}
static function selSurv(n) {
Surviv = true;
arrGarag = [];
var _local1 = new cCarParam();
_local1.GenNewCarType(n);
var _local2 = [16587804, 4836921, 16028418, 9806809, 0, 0, 0, 16741657];
_local1.color = _local2[n];
arrGarag.push(_local1);
curentCar = 0;
cTrac.MaxDist = 0;
cTrac.StartMoney = 0;
cTrac.AllTime = 0;
cTrac.typeMission = 6;
cTrac.style = random(3);
curentMission = 13;
status = (ST_Tras);
}
static function get status() {
return(_status);
}
static function set status(value) {
trace("st " + cBriff.costBriffArr);
CSoundService.playSound(snd_click, true, 1);
if (value == ST_Back) {
value = tempStat;
}
if (value == ST_endRace) {
value = ST_Briff;
if (curentMission == 12) {
value = ST_Win;
inst.onEnterFrame = function () {
this.mcMoney.text = cGame._myMoney;
this.mcCarInGar.text = cGame.arrGarag.length;
this.mcScoreLev.text = cGame.sumScore;
this.onEnterFrame = function () {
};
};
}
if (Surviv) {
trace("survEnd=======================");
newGame();
value = ST_Start;
} else {
saveData();
}
}
if (value != ST_Tras) {
CSoundService.playLoopSound(0);
} else {
CSoundService.playLoopSound(1);
CSoundService.getSoundAt(1).setVolume(70);
saveData();
}
if (!CSoundControl.soundIsOn) {
CSoundService.stopCurLoopSound();
}
if (value == ST_Cont) {
value = ST_Briff;
loadData();
}
if (value == ST_Zast) {
newGame();
saveData();
}
inst.gotoAndStop(statusLbArr[value]);
if (value == ST_Start) {
var _local3 = SharedObject.getLocal("Urgen");
if (_local3.data.metka == true) {
inst.mcShirma._visible = false;
}
}
if (value == ST_Briff) {
curentMission = maxMission;
inst.mcBriff.init();
trace("show " + showGarag);
if (showGarag) {
inst.onEnterFrame = function () {
this.moveGar.mcGarag.PressButon("openBar");
this.onEnterFrame = function () {
};
};
showGarag = false;
}
}
tempStat = _status;
_status = value;
if ((curentMission == maxMission) and (value == ST_TrasOwer)) {
maxMission++;
}
if ((value == ST_TrasOwer) || (value == ST_Lose)) {
endTrac();
}
//return(status);
}
static function endTrac() {
cTrac.AllScore = int(((cTrac.AllBonuses * 100) - (cTrac.hitCarCount * 300)) - int(cTrac.myTime * 2));
if (cTrac.AllScore < 0) {
cTrac.AllScore = 0;
}
if (_status == ST_TrasOwer) {
myMoney = myMoney + int(cTrac.__get__myMoney());
cTrac.AllScore = cTrac.AllScore + int((30 * cTrac.MyCarParam.getPerRepair()) + cTrac.__get__myMoney());
if (cTrac.typeMission == 1) {
cTrac.AllScore = int(cTrac.AllScore * ((cTrac.valZadan / 100) + 1));
}
if (cTrac.typeMission == 2) {
cTrac.AllScore = int(cTrac.AllScore * ((cTrac.myTime / cTrac.AllTime) + 1));
}
if (cTrac.typeMission == 3) {
prizCar = random(4);
if (prizCar == 2) {
prizCar = 1;
}
showGarag = true;
var _local2 = new cCarParam();
_local2.GenNewCarType(prizCar);
cTrac.AllScore = cTrac.AllScore + ((_local2.__get__cost() * 2) + int(cTrac.AllScore * ((cTrac.myTime / cTrac.AllTime) + 1)));
}
}
if (cTrac.typeMission == 6) {
cTrac.AllScore = int((((cTrac.__get__myMoney() + (cTrac.AllBonuses * 100)) + (cTrac.dist * 5)) - (cTrac.hitCarCount * 300)) + (cTrac.myTime * 2));
}
if (curentMission == 1) {
cBriff.MaxTimeBriffArr[1] = cBriff.MaxTimeBriffArr[1] - 8;
cBriff.costBriffArr[1] = cBriff.costBriffArr[1] + 500;
}
if (curentMission == 8) {
cBriff.distBriffArr[5] = cBriff.distBriffArr[5] + 1500;
cBriff.costBriffArr[5] = cBriff.costBriffArr[5] + 1500;
}
if (curentMission == 9) {
cBriff.distBriffArr[6] = cBriff.distBriffArr[6] - 1500;
cBriff.costBriffArr[6] = cBriff.costBriffArr[6] + 2500;
}
sumScore = sumScore + cTrac.AllScore;
inst.onEnterFrame = function () {
this.mcMoney.text = String(int(cTrac.__get__myMoney())) + "$";
this.mcTime.text = cTrac.timer();
this.mcCarHit.text = cTrac.hitCarCount;
this.mcCarDemag.text = (100 - cTrac.MyCarParam.getPerRepair()) + "%";
this.repNadp._visible = false;
this.priz.gotoAndStop(1);
this.priz._visible = false;
this.mcScoreLev.text = cTrac.AllScore;
if (cGame._status == cGame.ST_TrasOwer) {
var _local3 = cBriff.addedMiss.toString();
if (_local3.indexOf(String(cGame.maxMission - 1)) > 0) {
this.repNadp._visible = true;
}
if (cGame.curentMission == cBriff.gonkaNum) {
cGame.myMoney = cGame.myMoney - 10000;
var _local2 = new cCarParam();
_local2.GenNewCarType(cGame.prizCar);
_local2.__set__streng(_local2.maxStreng);
cGame.arrGarag.push(_local2);
this.curentCar = cGame.arrGarag.length - 1;
cBriff.MaxTimeBriffArr[cBriff.gonkaNum] = int(cTrac.myTime / 24) - 4;
this.priz._visible = true;
this.priz.gotoAndPlay(2);
this.priz.anim.gotoAndStop(cGame.prizCar + 1);
this.priz.anim.carColor.gotoAndStop(cGame.prizCar + 1);
var _local4 = new Color(this.priz.anim.carColor);
_local4.setRGB(_local2.color);
}
}
this.onEnterFrame = function () {
};
};
}
static function endRace() {
if (Surviv) {
newGame();
} else {
saveData();
}
}
static function set myMoney(value) {
CSoundService.playSound(snd_bye, true, 1);
_myMoney = Math.max(int(value), 0);
inst.mcMoney.text = "$ " + _myMoney;
//return(myMoney);
}
static function get myMoney() {
return(_myMoney);
}
static var pausa = true;
static var arrGarag = [];
static var arrMarket = [];
static var curentMission = 0;
static var maxMission = 0;
static var curentCar = 0;
static var _myMoney = 0;
static var showGarag = true;
static var Surviv = false;
static var tempStat = 0;
static var statusLbArr = ["lbStart", "lbAbaut", "lbInstr", "lbZast", "lbBriff", "lbTras", "lbTrasOwer", "lbLose", "lbWin"];
static var ST_Start = 0;
static var ST_Abaut = 1;
static var ST_Instr = 2;
static var ST_Zast = 3;
static var ST_Briff = 4;
static var ST_Tras = 5;
static var ST_TrasOwer = 6;
static var ST_Lose = 7;
static var ST_Win = 8;
static var ST_Back = 9;
static var ST_Cont = 10;
static var ST_endRace = 11;
static var snd_music_intro = 0;
static var snd_music_game = 1;
static var snd_click = 2;
static var snd_wrong = 3;
static var snd_acsel = 4;
static var snd_break = 5;
static var snd_wizg = 6;
static var snd_NITROBOOM = 7;
static var snd_bye = 8;
static var snd_bonus = 9;
static var snd_win = 10;
static var snd_lose = 11;
static var snd_window = 12;
static var snd_boom = 13;
static var snd_nitro = 14;
static var snd_hitcar = 15;
static var score = 0;
static var sumScore = 0;
}
Symbol 1069 MovieClip [__Packages.cGarag] Frame 0
class cGarag extends MovieClip
{
var vis, maxSpeed, ACSEL, mass, maxSTR, maxStr, shirm, _name, massiv, curMarket, market, carIzo, mcColor, nazText, costText, _parent, numText;
function cGarag () {
super();
vis = false;
maxSpeed = maxSpeed;
ACSEL = ACSEL;
mass = mass;
maxSTR = maxStr;
shirm.useHandCursor = false;
}
function showMyScreen() {
CSoundService.playSound(cGame.snd_window, true, 1);
if (_name == "mcMarket") {
cGame.mcMar = this;
massiv = cGame.arrMarket;
curMarket = 0;
market = true;
} else {
cGame.mcGar = this;
massiv = cGame.arrGarag;
market = false;
}
setCar();
}
function setColor(color) {
var _local2 = new Color(carIzo.carColor);
_local2.setRGB(color);
trace(color);
}
function recolor() {
var _local3 = flash.display.BitmapData.loadBitmap("colo");
var _local2 = _local3.getPixel(mcColor._xmouse, mcColor._ymouse);
setColor(_local2);
if (market) {
cGame.arrMarket[curMarket].color = _local2;
} else {
cGame.arrGarag[cGame.curentCar].color = _local2;
}
}
function showCar(car) {
CSoundService.playSound(cGame.snd_click, true, 1);
nazText.text = car.nazv;
carIzo.gotoAndStop(car.type + 1);
carIzo.carColor.gotoAndStop(car.type + 1);
if (market) {
costText.text = "$ " + car.__get__cost();
} else {
costText.text = "$ " + int(car.__get__cost() * coofProd);
}
setColor(car.color);
maxSpeed.MaxVal = 280;
maxSpeed.__set__val(car.MaxSpeed);
ACSEL.MaxVal = 2;
ACSEL.__set__val(car.aksel);
mass.MaxVal = 17;
mass.__set__val(car.horSpeed);
maxSTR.MaxVal = 8000;
maxSTR.__set__val(car.maxStreng);
shirm._visible = false;
if (market) {
if (cGame.__get__myMoney() < car.__get__cost()) {
shirm._visible = true;
}
} else if (cGame.arrGarag.length < 2) {
shirm._visible = true;
}
trace((((((((car.nazv + " ") + car.MaxSpeed) + " ") + car.maxStreng) + " ") + car.aksel) + " ") + car.horSpeed);
}
function set visPanel(value) {
CSoundService.playSound(cGame.snd_window, true, 1);
vis = value;
if (!vis) {
_parent.gotoAndPlay(8);
} else {
_parent.gotoAndPlay(2);
}
//return(visPanel);
}
function get visPanel() {
return(vis);
}
function PressButon(comand) {
switch (comand) {
case "openBar" :
if (cGame.curentMission != 4) {
visPanel = (!visPanel);
}
showMyScreen();
break;
case "resetReg" :
market = !market;
showMyScreen(market);
break;
case "LeftAr" :
leftCar();
break;
case "rightAr" :
rightCar();
break;
case "sell" :
sellCar();
break;
case "Bye" :
byeCar();
}
}
function leftCar() {
if (market) {
curMarket--;
if (curMarket < 0) {
curMarket = cGame.arrMarket.length - 1;
}
} else {
cGame.curentCar--;
if (cGame.curentCar < 0) {
cGame.curentCar = cGame.arrGarag.length - 1;
}
}
setCar();
}
function rightCar() {
if (market) {
curMarket++;
if (curMarket >= cGame.arrMarket.length) {
curMarket = 0;
}
} else {
cGame.curentCar++;
if (cGame.curentCar >= cGame.arrGarag.length) {
cGame.curentCar = 0;
}
}
setCar();
}
function setCar() {
if (market) {
showCar(cGame.arrMarket[curMarket]);
numText.text = ((curMarket + 1) + "/") + cGame.arrMarket.length;
} else {
showCar(cGame.arrGarag[cGame.curentCar]);
numText.text = ((cGame.curentCar + 1) + "/") + cGame.arrGarag.length;
}
}
function byeCar() {
if (cGame.arrMarket[curMarket].cost <= cGame.__get__myMoney()) {
cGame.myMoney = cGame.myMoney - cGame.arrMarket[curMarket].cost;
var _local3 = new cCarParam();
_local3 = cGame.arrMarket.splice(curMarket, 1)[0];
cGame.arrGarag.push(_local3);
if (cGame.arrMarket.length < 3) {
var _local2 = new cCarParam();
_local2.genNewCar();
cGame.arrMarket.push(_local2);
}
leftCar();
cGame.curentCar = cGame.arrGarag.length - 1;
cGame.mcGar.setCar();
}
}
function sellCar() {
if (cGame.arrGarag.length > 1) {
cGame.myMoney = cGame.myMoney + (cGame.arrGarag[cGame.curentCar].cost * coofProd);
cGame.arrMarket.push(cGame.arrGarag.splice(cGame.curentCar, 1)[0]);
cGame.curentCar = 0;
leftCar();
cGame.mcMar.setCar();
}
}
var OpenPos = 275;
var ClosePos = 785;
var coofProd = 0.5;
}
Symbol 1070 MovieClip [__Packages.cSlider] Frame 0
class cSlider extends MovieClip
{
var MaxVal, _val, beg;
function cSlider () {
super();
MaxVal = 100;
val = (0);
}
function get val() {
return(_val);
}
function set val(value) {
if (value > MaxVal) {
value = MaxVal;
}
if (value < 0) {
value = 0;
}
_val = value;
beg._x = ((400 / MaxVal) * value) - 200;
//return(val);
}
}
Symbol 1071 MovieClip [__Packages.cCarParam] Frame 0
class cCarParam
{
var type, color, mass, aksel, MaxSpeed, horSpeed, nazv, maxStreng, _streng;
function cCarParam () {
type = 0;
color = 0;
mass = 0;
aksel = 0;
}
function copyParam(p) {
type = p.type;
color = p.color;
MaxSpeed = p.MaxSpeed;
mass = p.mass;
aksel = p.aksel;
horSpeed = p.horSpeed;
nazv = p.nazv;
streng = (p.streng);
maxStreng = p.maxStreng;
}
function set cost(value) {
//return(cost);
}
function get cost() {
var _local3 = ((((mass / arrMass[type]) + ((2 * MaxSpeed) / arrMaxSpeed[type])) + ((3 * aksel) / arrAcsel[type])) + (maxStreng / arrMaxStreng[type])) / 7;
var _local2 = int((arrCost[type] * _local3) / 100) * 100;
return(_local2);
}
function getCostRepair() {
return(int((arrCost[type] * (100 - getPerRepair())) / 100));
}
function getPerRepair() {
return(int((streng / maxStreng) * 100));
}
function recolor() {
color = arrColor[random(arrColor.length)];
}
function genNewCar() {
GenNewCarType(random(8));
}
function GenNewCarType(t) {
if (t > (arrMass.length - 1)) {
t = arrMass.length - 1;
}
color = arrColor[random(arrColor.length)];
type = t;
mass = int(arrMass[t] * (0.9 + (random(20) / 100)));
MaxSpeed = int(arrMaxSpeed[t] * (0.9 + (random(20) / 100)));
aksel = arrAcsel[t] * (0.9 + (random(20) / 100));
horSpeed = arrHSpeed[t];
nazv = arrNazv[t];
maxStreng = int(arrMaxStreng[t] * (0.9 + (random(20) / 100)));
streng = (maxStreng);
}
function set streng(value) {
_streng = value;
if (_streng > maxStreng) {
_streng = maxStreng;
}
if (_streng < 0) {
_streng = 0;
}
//return(streng);
}
function get streng() {
return(_streng);
}
var arrNazv = ["Lamborghini", "Aston Martin", "FerrariF430", "Ford GT 500", "Ford U", "Minivan", "Mazda", "Truck"];
var arrMaxSpeed = [180, 200, 250, 220, 130, 110, 165, 100];
var arrMass = [800, 1300, 700, 1000, 1000, 4000, 900, 4500];
var arrAcsel = [1, 0.5, 0.7, 1.1, 0.9, 0.2, 0.3, 0.2];
var arrHSpeed = [7, 15, 4, 10, 4, 3, 7, 2];
var arrMaxStreng = [2200, 2500, 2000, 1700, 2500, 4000, 1300, 6000];
var arrCost = [125000, 100000, 150000, 80000, 5000, 10000, 3000, 9000];
var arrColor = [9843486, 7087379, 16763904, 15180851, 3487029, 5329235, 15008002, 8388719, 9239071, 6272771, 2261527, 2540266, 625561, 1912957];
}
Symbol 1072 MovieClip [__Packages.cTrac] Frame 0
class cTrac extends MovieClip
{
static var inst, dist, mcGruz, mcZadan, MyCarParam, Car1, myTime, carTarget, valZadan, typeMission, StartMoney, MaxDist, AllDemage, AllBonuses, AllTime, _myMoney;
var timerTemp, oddRazm, numFrame, nextRazm, spidometr, mcSpidometr, mcStreng, mcDist, mcTime, mcGruz, mcNitro, mcTarget, mcZadan, contCar, mcFinishStr, contRazm, win, countCar, mcPausa, mcBack, mcTL, mcTimeLimit, mcTypeMis, TargetInGame, mcNitroPan, countNitro;
function cTrac () {
super();
inst = this;
timerTemp = 0;
oddRazm = 0;
Key.addListener(this);
numFrame = 0;
dist = 0;
nextRazm = 0;
polos = [polos1Arr, polos2Arr, polos3Arr, polos4Arr];
spidometr = mcSpidometr;
mcStreng = mcStreng;
mcDist = mcDist;
mcTime = mcTime;
mcGruz = mcGruz;
mcNitro = mcNitro;
mcTarget = mcTarget;
mcZadan = mcZadan;
MyCarParam = new cCarParam();
var _local4 = contCar.getNextHighestDepth();
var _local3 = contCar.attachMovie("Car1", "Car" + _local4, _local4);
if (cGame.curentMission == 4) {
MyCarParam.GenNewCarType(2);
MyCarParam.color = 15008002 /* 0xE50102 */;
_local3.init(MyCarParam, 7);
} else {
trace("init Car " + cGame.arrGarag[cGame.curentCar].nazv);
_local3.init(cGame.arrGarag[cGame.curentCar], 7);
}
Car1 = _local3;
Car1.regim = cCar.RG_HAND;
Car1.param.__set__streng(Car1.param.maxStreng);
checkFinish = function () {
};
onEnterFrame = first;
myTime = 0;
mcFinishStr._visible = false;
mcFinishStr.gotoAndStop(1);
}
static function distAB(a, b) {
return(Math.sqrt(((a.x - b.x) * (a.x - b.x)) + ((a.y - b.y) * (a.y - b.y))));
}
function getCarInForward(c1, d) {
var _local3 = false;
for (var _local5 in contCar) {
if ((Math.abs(c1.x - contCar[_local5].x) < (widthPolos * 1.2)) && (contCar[_local5]._name != c1._name)) {
if ((contCar[_local5].y > c1.y) && (contCar[_local5].y < (c1.y + d))) {
_local3 = true;
}
}
}
return(_local3);
}
static function inTrac(x) {
return(int(x / widthPolos) + 4);
}
static function speedInTrac(t) {
return(maxSpeed - ((t * maxSpeed) / 12));
}
static function hitCar(a, b) {
return(a.hitZ().hitTest(b.hitZ()));
}
static function onHitCar(a, b) {
a.x = a.x - a.dx;
b.x = b.x - b.dx;
if (Math.abs(a.y - b.y) > 40) {
var _local7 = ((a.dy * (a.m - b.m)) / (b.m + a.m)) + (((b.dy * 2) * b.m) / (b.m + a.m));
var _local6 = (((a.dy * 2) * a.m) / (b.m + a.m)) + ((b.dy * (b.m - a.m)) / (b.m + a.m));
a.dy = _local7;
b.dy = _local6;
}
var _local5 = ((a.dx * (a.m - b.m)) / (b.m + a.m)) + (((b.dx * 2) * b.m) / (b.m + a.m));
var _local8 = (((a.dx * 2) * a.m) / (b.m + a.m)) + ((b.dx * (b.m - a.m)) / (b.m + a.m));
a.dx = _local5 / 2;
b.dx = _local8 / 2;
if (Math(a.y - b.y) < 20) {
var _local3 = 10 / (a.m + b.m);
if (a.x < b.x) {
a.x = a.x - ((_local3 * b.m) + 1);
b.x = b.x + ((_local3 * a.m) + 1);
} else {
a.x = a.x + ((_local3 * b.m) + 1);
b.x = b.x - ((_local3 * a.m) + 1);
}
} else {
var _local3 = 10 / (a.m + b.m);
if (a.y < b.y) {
a.y = a.y - (_local3 * b.m);
b.y = b.y + (_local3 * a.m);
} else {
a.y = a.y + (_local3 * b.m);
b.y = b.y - (_local3 * a.m);
}
}
if ((a._name != Car1._name) && (a.y < b.y)) {
a.stopCar();
}
if ((b._name != Car1._name) && (a.y > b.y)) {
b.stopCar();
}
a.distab(b);
b.distab(a);
if ((a._name == "Car_tar") || (a._name == "Car_tar")) {
carTarget.maxSpeed = carTarget.param.MaxSpeed / 7;
valZadan = carTarget.param.getPerRepair();
carTarget.tx = random(350) - 175;
carTarget.t = inTrac(carTarget.tx);
if (inst.getCarInForward(carTarget, 100)) {
carTarget.stopCar();
}
}
if ((b._name == Car1._name) || (a._name == Car1._name)) {
hitCarCount++;
CSoundService.playSound(cGame.snd_hitcar, false, 1);
if (typeMission == cBriff.MT_1_NoDemag) {
mcGruz.val = mcGruz.val + int((7000 / Car1.param.__get__streng()) + 1);
myMoney = myMoney - ((StartMoney / 100) * int((7000 / Car1.param.__get__streng()) + 1));
}
var _local4 = b._name;
if (b._name == Car1._name) {
_local4 = a._name;
}
if ((typeMission == cBriff.MT_4_Terror) && (CarDem.toString().indexOf(_local4, 0) < 0)) {
CarDem.push(_local4);
valZadan--;
}
}
}
function addRazm() {
var _local4 = contRazm.getNextHighestDepth();
if (((dist + (MaxDistVidim * 0.7)) > MaxDist) && (!win)) {
var _local3 = contRazm.attachMovie("finishLine", "finish", contRazm.getNextHighestDepth());
_local3.init(0, MaxDist);
}
var _local3 = contRazm.attachMovie("razr", "r" + _local4, contRazm.getNextHighestDepth());
_local3.init(0, (nextRazm + (0.7 * MaxDistVidim)) - random(10));
oddRazm++;
if ((oddRazm % 2) == 1) {
if (random(10) > 2) {
_local3 = contRazm.attachMovie("zona1", "z" + _local4, contRazm.getNextHighestDepth());
_local3.gotoAndStop(((style * 10) + 1) + random(10));
_local3.init((-widthPolos) * 4, nextRazm + (0.9 * MaxDistVidim));
}
} else if ((random(10) > 2) && (!win)) {
_local3 = contRazm.attachMovie("zona2", "z_" + _local4, contRazm.getNextHighestDepth());
_local3.gotoAndStop(((style * 10) + 1) + random(10));
_local3.init(widthPolos * 4, nextRazm + (0.9 * MaxDistVidim));
}
var _local2 = 0;
while (_local2 < 2) {
_local3 = contRazm.attachMovie("razm3", (("razm" + _local2) + " ") + _local4, contRazm.getNextHighestDepth());
_local3.init(((-widthPolos) * 4) - 8, (nextRazm + (0.7 * MaxDistVidim)) - (_local2 * 60));
_local3.gotoAndStop(style + 1);
_local3 = contRazm.attachMovie("razm3", (("razm" + _local2) + "_") + _local4, contRazm.getNextHighestDepth());
_local3.init((widthPolos * 4) + 8, (nextRazm + (0.7 * MaxDistVidim)) - (_local2 * 60));
_local3.gotoAndStop(style + 1);
_local2++;
}
nextRazm = nextRazm + 150;
if (random(105) > Math.min(65 + (diff * 2), 100)) {
_local4 = contRazm.getNextHighestDepth();
_local3 = contRazm.attachMovie("bonus1", "bonus" + _local4, contRazm.getNextHighestDepth());
var _local5 = 2;
if (((typeMission != cBriff.MT_1_NoDemag) && (typeMission != cBriff.MT_5_Hunt)) && (random(100) > ChanceNitro)) {
_local5 = 3;
}
if ((random(100) + 20) > (Car1.param.getPerRepair() + random(50))) {
_local5 = 1;
}
_local3.init(_local5, random(4) + 1);
}
}
function addCar(typeCar, p, r) {
if (!win) {
var _local12 = contCar.getNextHighestDepth();
if (p < 0) {
var _local2 = 0;
var _local5 = 0;
var _local4 = [10000, 10000, 10000, 10000, 10000];
countCar = 0;
var _local8 = Car1.t;
var _local7 = 0;
for (var _local10 in contCar) {
countCar++;
_local2 = dist + MaxDistVidim;
if (speedInTrac(contCar[_local10].t) > speedCar) {
_local2 = dist + MinDistVidim;
}
_local2 = int(Math.abs(contCar[_local10].y - _local2));
_local5 = int(((contCar[_local10].x / widthPolos) / 2) + 3);
if (_local4[_local5] > _local2) {
_local4[_local5] = int(_local2);
}
if (contCar[_local10].t == _local8) {
_local7++;
}
}
_local2 = _local4[1];
p = 1;
var _local3 = 2;
while (_local3 < 5) {
if (_local4[_local3] > _local2) {
_local2 = _local4[_local3];
p = _local3;
}
_local3++;
}
if (_local7 < 2) {
p = int(((Car1.x / widthPolos) / 2) + 3);
}
}
var _local11 = contCar.attachMovie("Car1", "Car" + _local12, _local12);
_local11._x = -100 + (p * widthPolos);
var _local9 = new cCarParam();
if (typeCar < 0) {
typeCar = polos[p - 1][random(polos[p - 1].length)];
}
_local9.GenNewCarType(typeCar);
if (cGame.Surviv) {
_local9.maxStreng = _local9.maxStreng + (10 * diff);
_local9.__set__streng(_local9.maxStreng);
}
_local11.init(_local9, (p * 2) - 1);
_local11.nextStep();
_local11.regim = r;
}
}
function onKeyDown() {
if (Key.isDown(80)) {
cGame.pausa = !cGame.pausa;
if (cGame.pausa) {
mcPausa.gotoAndStop(1);
} else {
mcPausa.gotoAndStop(2);
}
}
}
function onEnterFrame() {
}
function first() {
nitroP = (0);
AllDemage = 0;
AllBonuses = 0;
mcBack.gotoAndStop(style + 1);
cGame.pausa = true;
CSoundService.playLoopSound(cGame.snd_music_game);
if (!CSoundControl.soundIsOn) {
CSoundService.stopCurLoopSound();
}
hitCarCount = 0;
mcTL._visible = false;
mcTimeLimit._visible = false;
nextRazm = -500;
dist = nextRazm;
addRazm();
dist = nextRazm;
addRazm();
dist = nextRazm;
addRazm();
mcTypeMis.gotoAndStop(typeMission + 1);
speedCar = Car1.dy;
Car1.y = 50;
Car1.param.__set__streng(Car1.param.maxStreng);
dist = 0;
nextRazm = 0;
mcNitro.MaxVal = 3;
mcDist.__set__val(dist);
mcDist._visible = true;
mcStreng.__set__val(Car1.param.streng);
mcGruz.__set__val(0);
mcGruz.MaxVal = 100;
mcGruz._visible = false;
mcDist.MaxVal = MaxDist;
mcStreng.MaxVal = Car1.param.maxStreng;
spidometr.MaxVal = int((Car1.param.MaxSpeed / 8) + 2);
myMoney = (StartMoney);
addCar(-1, 1, 0);
addCar(-1, 3, 0);
polos3Arr = [3, 1, 6, 5, 6, 4, 4, 7];
polos4Arr = [3, 4, 5, 6, 5, 4, 7, 7];
mcTarget._visible = false;
diffCar = normalDiffCar;
diff = int(cGame.maxMission / 2) + 7;
ChanceNitro = 75;
switch (typeMission) {
case cBriff.MT_0_Beginer :
trace("MT_0_Beginer:");
polos3Arr = [3, 1, 6, 5, 6, 4, 4];
polos4Arr = [3, 4, 5, 6, 5, 4];
checkFinish = chFin_0;
break;
case cBriff.MT_1_NoDemag :
mcGruz._visible = true;
mcGruz.MaxVal = 100;
mcGruz.__set__val(0);
myTime = AllTime;
mcTL._visible = true;
mcTimeLimit._visible = true;
mcTimeLimit.text = timer();
myTime = 0;
checkFinish = chFin_1;
break;
case cBriff.MT_2_Time :
myTime = AllTime;
mcTL._visible = true;
mcTimeLimit._visible = true;
mcTimeLimit.text = timer();
myTime = 0;
checkFinish = chFin_2;
break;
case cBriff.MT_3_Race :
myTime = AllTime;
mcTL._visible = true;
mcTimeLimit._visible = true;
mcTimeLimit.text = timer();
myTime = 0;
checkFinish = chFin_3;
break;
case cBriff.MT_4_Terror :
mcFinishStr._visible = true;
mcFinishStr.gotoAndPlay(2);
mcFinishStr.str.gotoAndStop(4);
CarDem = [];
mcTarget._visible = true;
mcTarget.gotoAndStop(4);
mcZadan._visible = true;
mcTarget.dem.text = "0%";
valZadan = 20;
checkFinish = chFin_4;
break;
case cBriff.MT_5_Hunt :
MaxDist = 20;
diff = int(cGame.maxMission / 2) + 4;
polos3Arr = [3, 1, 6, 5, 6, 4, 4];
polos4Arr = [3, 4, 5, 6, 5, 4, 7];
mcDist._visible = false;
mcTarget._visible = true;
myTime = AllTime;
mcTL._visible = true;
mcTimeLimit._visible = true;
mcTimeLimit.text = timer();
myTime = 0;
carTarget = new cCar();
TargetInGame = false;
var _local2 = new cCarParam();
var _local3 = 0;
if (cGame.curentMission < 5) {
_local3 = 6;
}
if (cGame.curentMission == 12) {
_local3 = 5;
}
_local2.GenNewCarType(_local3);
_local2.maxStreng = (_local2.maxStreng * 8) + (cGame.maxMission * 50);
_local2.__set__streng(_local2.maxStreng);
if (cGame.curentMission == 12) {
_local2.color = 0;
} else {
_local2.color = 13172993 /* 0xC90101 */;
}
carTarget.init(_local2, 2);
carTarget.maxSpeed = carTarget.param.MaxSpeed / 10;
carTarget.y = 2000 + random(500);
carTarget.dy = Math.min(carTarget.param.MaxSpeed / 10, speedInTrac(2) * 0.5);
mcTarget.gotoAndStop(1);
valZadan = 100;
checkFinish = chFin_5;
break;
case cBriff.MT_6_Surv :
myTime = 0;
ChanceNitro = 50;
mcDist._visible = false;
mcZadan._visible = true;
mcZadan.text = "0";
diffCar = survivDiffCar;
checkFinish = chFin_6;
}
onEnterFrame = process;
polos = [polos1Arr, polos2Arr, polos3Arr, polos4Arr];
}
function checkFinish() {
}
function chFin_0() {
myTime++;
if (Car1.param.__get__streng() <= 1) {
setFinish(false);
}
if (dist > MaxDist) {
setFinish(true);
}
}
function chFin_1() {
chFin_3();
if (mcGruz.__get__val() > 99) {
setFinish(false);
}
}
function chFin_2() {
chFin_3();
myMoney = myMoney - (StartMoney / AllTime);
}
function chFin_3() {
myTime++;
if (Car1.param.__get__streng() <= 1) {
setFinish(false);
}
if (myTime >= AllTime) {
setFinish(false);
}
if (dist > MaxDist) {
setFinish(true);
}
}
function chFin_4() {
myTime++;
mcTarget.dem.text = Math.min(100 - (valZadan * 5), 100) + "%";
if (Car1.param.__get__streng() <= 1) {
setFinish(false);
}
if (valZadan <= 0) {
setFinish(true);
}
if (dist > MaxDist) {
setFinish(false);
}
}
function chFin_5() {
myTime++;
if (carTarget.y > (dist + MaxDistVidim)) {
mcTarget.dem.text = int(carTarget.y - dist);
mcTarget.gotoAndStop(1);
if (!TargetInGame) {
carTarget.y = carTarget.y + carTarget.dy;
} else {
carTarget.stopCar();
}
} else {
mcTarget.dem.text = (100 - valZadan) + "%";
carTarget.y++;
if (carTarget.y > (dist + (MinDistVidim * 0.5))) {
mcTarget.gotoAndStop(2);
if (!TargetInGame) {
CSoundService.playSound(cGame.snd_window, true, 1);
var _local2 = contCar.attachMovie("Car1", "Car_tar", contCar.getNextHighestDepth());
_local2._x = 0;
_local2.attachMovie("tarCar", "tar", _local2.getNextHighestDepth());
_local2.init(carTarget.param, 5);
_local2.y = dist + (MaxDistVidim * 0.65);
_local2.dy = carTarget.dy;
_local2.nextStep();
_local2.addSpeed();
carTarget = _local2;
TargetInGame = true;
} else {
valZadan = carTarget.param.getPerRepair();
if (random(100) > (95 - (valZadan / 10))) {
carTarget.tx = ((random(4) - 2) * 2) * widthPolos;
}
if (random(100) > 95) {
carTarget.breakCar();
}
if (carTarget.y > (dist + (MaxDistVidim * 0.7))) {
carTarget.y = dist + (MaxDistVidim * 0.65);
trace((Car1.maxSpeed + " mt:") + carTarget.maxSpeed);
carTarget.maxSpeed = carTarget.param.MaxSpeed / 11;
carTarget.stopCar();
}
if ((carTarget.y < (dist + 150)) && (random(100) > 95)) {
if (getCarInForward(carTarget, 200)) {
carTarget.tx = ((random(4) - 2) * 2) * widthPolos;
}
carTarget.addSpeed();
}
}
} else {
mcTarget.gotoAndStop(3);
carTarget.addSpeed();
if (carTarget.y < (dist + (MinDistVidim * 0.8))) {
carTarget.y = dist + (MinDistVidim * 0.75);
carTarget.addSpeed();
carTarget.dy = carTarget.dy + 3;
}
}
}
if (Car1.param.__get__streng() <= 1) {
setFinish(false);
}
if (valZadan <= 0) {
setFinish(true);
}
if (myTime > AllTime) {
setFinish(false);
}
}
function chFin_6() {
myTime++;
if (Car1.param.__get__streng() <= 1) {
setFinish(false);
}
if (speedCar > 4) {
myMoney = myMoney + ((speedCar / 200) + (diff / 50));
}
}
static function StartNitro() {
timeNitro = timeNitro + 18;
Car1.dy = Car1.maxSpeed;
Car1.maxSpeed = Car1.param.MaxSpeed;
CSoundService.playSound(cGame.snd_nitro, false, 1);
inst.__set__nitroP((inst.__get__nitroP()-1));
}
function diffCar() {
}
function normalDiffCar() {
numFrame++;
if (numFrame == 70) {
addCar(-1, 2, 0);
}
if (numFrame == 100) {
addCar(-1, 4, 0);
}
if ((numFrame == 105) && (typeMission != cBriff.MT_5_Hunt)) {
addCar(7, 4, 3);
}
if (numFrame >= (280 - (diff * 5))) {
if (diff > countCar) {
addCar(-1, -1, 0);
} else {
diffCar = function () {
};
}
numFrame = 110;
}
}
function survivDiffCar() {
numFrame++;
if (numFrame == 100) {
addCar(-1, 4, 0);
}
if (numFrame == 105) {
addCar(7, 4, 3);
}
if (numFrame >= 550) {
addCar(-1, -1, 0);
if (diff < countCar) {
diff++;
}
numFrame = 110;
}
}
function process() {
if (cGame.pausa) {
checkFinish();
MyCarParam.copyParam(Car1.param);
mcTime.text = timer();
mcDist.__set__val(dist);
mcStreng.__set__val(Car1.param.streng);
diffCar();
if (Key.isDown(37)) {
Car1.leftSpeed();
}
if (Key.isDown(39)) {
Car1.rightSpeed();
}
if (Key.isDown(38)) {
Car1.addSpeed();
spidometr.__set__val(Car1.dy);
} else {
Car1.dy = Car1.dy * 0.99;
spidometr.__set__val(Car1.dy);
}
if (Key.isDown(40)) {
Car1.breakCar();
spidometr.__set__val(Car1.dy);
}
if (Key.isDown(32)) {
Car1.stopCar();
spidometr.__set__val(Car1.dy);
}
if (timeNitro > 0) {
timeNitro--;
if ((timeNitro % 2) == 1) {
mcNitroPan.n1._visible = false;
Car1._visible = false;
} else {
mcNitroPan.n1._visible = true;
Car1._visible = true;
}
Car1.dy = Car1.dy + 3;
if (timeNitro <= 0) {
Car1._visible = true;
Car1.maxSpeed = Car1.param.MaxSpeed / 8;
nitroP = nitroP + 0;
}
Car1.addSpeed();
} else if (Key.isDown(90) && (nitroP > 0)) {
StartNitro();
}
speedCar = Car1.dy;
dist = Car1.y;
c3d.renumZZ();
if (dist > nextRazm) {
addRazm();
}
var _local3 = [];
for (var _local4 in contCar) {
if (contCar[_local4] != Car1) {
if (Math.abs(contCar[_local4].y - dist) < DiffMoveCar) {
contCar[_local4].setTar();
}
if (getCarInForward(contCar[_local4], 40 + (contCar[_local4].dy * 7))) {
contCar[_local4].stopCar();
if (random(10) > 7) {
contCar[_local4].tx = contCar[_local4].tx - 10;
}
}
}
if (_local3.length > 0) {
var _local2 = 0;
while (_local2 < _local3.length) {
if (hitCar(contCar[_local4], contCar[_local3[_local2]])) {
onHitCar(contCar[_local3[_local2]], contCar[_local4]);
}
_local2++;
}
}
_local3.push(_local4);
contCar[_local4].nextStep();
}
for (var _local4 in contRazm) {
contRazm[_local4].nextStep();
}
}
}
function setFinish(_win) {
win = _win;
trace((((("win " + Car1.param.__get__streng()) + " ") + numFrame) + " t:") + myTime);
numFrame = 0;
mcFinishStr._visible = true;
mcFinishStr.gotoAndPlay(2);
if (_win) {
onEnterFrame = processWin;
var _local3 = contRazm.attachMovie("zona2", "z_ff", contRazm.getNextHighestDepth() + 100);
_local3.gotoAndStop(31);
_local3.init(widthPolos * 4, (speedInTrac(7) * 47) + dist);
valZadan = 0;
mcFinishStr.str.gotoAndStop(1);
CSoundService.playSound(cGame.snd_win, true, 1);
if (typeMission == 1) {
valZadan = int(mcGruz.__get__val());
}
} else {
onEnterFrame = badWin;
if (cGame.Surviv) {
mcFinishStr.str.gotoAndStop(3);
} else {
mcFinishStr.str.gotoAndStop(2);
}
CSoundService.playSound(cGame.snd_lose, true, 1);
}
for (var _local2 in contCar) {
contCar[_local2].maxSpeed = 10000;
}
Car1.maxSpeed = speedInTrac(7);
MyCarParam.copyParam(Car1.param);
}
function badWin() {
if (dist > nextRazm) {
addRazm();
}
speedCar = speedCar * 0.99;
dist = dist + speedCar;
numFrame++;
if (numFrame >= 60) {
if (cGame.Surviv) {
cGame.__set__status(cGame.ST_TrasOwer);
} else {
cGame.__set__status(cGame.ST_Lose);
}
process = function () {
};
}
for (var _local2 in contCar) {
contCar[_local2].nextStep();
trace((contCar[_local2]._y + " ") + Car1._y);
if (contCar[_local2]._y > -80) {
contCar[_local2].removeMovieClip();
}
}
for (var _local2 in contRazm) {
contRazm[_local2].nextStep();
}
}
function processWin() {
if (dist > nextRazm) {
addRazm();
}
numFrame++;
if (numFrame >= 60) {
if (win) {
cGame.__set__status(cGame.ST_TrasOwer);
}
process = function () {
};
}
if (Car1 == undefined) {
trace("car1 udeff");
speedCar = 1;
dist = dist + speedCar;
} else {
speedCar = Car1.dy;
dist = Car1.y;
if (((Car1.x < (widthPolos * 3.3)) && (Car1.param.__get__streng() > 0)) && (win)) {
Car1.dx = 5;
Car1.rightSpeed();
}
if ((Car1.dy > speedInTrac(7)) || (numFrame > 34)) {
Car1.stopCar();
}
if ((Car1.dy < speedInTrac(7)) && (numFrame < 34)) {
Car1.addSpeed();
}
}
c3d.renumZZ();
for (var _local2 in contCar) {
contCar[_local2].nextStep();
if (contCar[_local2]._name != carTarget._name) {
if (contCar[_local2]._y > (Car1._y + 10)) {
contCar[_local2].stopCar();
contCar[_local2].y--;
} else {
contCar[_local2].addSpeed();
}
if (contCar[_local2]._y < Car1._y) {
contCar[_local2].dy++;
}
} else {
contCar[_local2].stopCar();
}
}
for (var _local2 in contRazm) {
contRazm[_local2].nextStep();
}
}
static function set myMoney(value) {
_myMoney = value;
mcZadan.text = "$ " + int(value);
//return(myMoney);
}
static function get myMoney() {
return(_myMoney);
}
static function timer() {
var _local5 = int(myTime / 24);
var _local2 = myTime % 24;
var _local4 = int(_local5 / 60);
var _local3 = _local5 % 60;
var _local1 = "";
if (_local4 < 10) {
_local1 = "0" + _local4;
} else {
_local1 = String(_local4);
}
if (_local3 < 10) {
_local1 = (_local1 + ":0") + _local3;
} else {
_local1 = (_local1 + ":") + _local3;
}
if (_local2 < 10) {
_local1 = (_local1 + ":0") + _local2;
} else {
_local1 = (_local1 + ":") + _local2;
}
return(_local1);
}
static function addNitroBonus() {
inst.__set__nitroP((inst.__get__nitroP()+1));
}
function get nitroP() {
return(countNitro);
}
function set nitroP(value) {
value = Math.max(Math.min(value, MaxCountNitro), 0);
mcNitroPan.n1._visible = true;
mcNitroPan.mcHitZ._visible = value > 0;
mcNitro.__set__val(value);
countNitro = value;
//return(nitroP);
}
var MaxCountNitro = 3;
static var speedCar = 5;
var ChanceNitro = 75;
static var timeNitro = 0;
static var MaxDistVidim = 580;
static var MinDistVidim = -200;
static var widthPolos = 35;
static var maxSpeed = 33;
static var style = 0;
static var hitCarCount = 0;
static var diff = 0;
static var DiffMoveCar = 15;
static var CarDem = [];
var polos1Arr = [0, 1, 2, 3, 0, 2];
var polos2Arr = [0, 1, 3, 6, 2, 3];
var polos3Arr = [3, 1, 6, 5, 6, 4, 4, 7, 3, 1, 6, 5, 6, 4, 4];
var polos4Arr = [3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 7];
var polos = [];
}
Symbol 1073 MovieClip [__Packages.c3d] Frame 0
class c3d extends MovieClip
{
var cacheAsBitmap, u, x, y, _w, _width, _h, _height, t, zona1, zona2, shad, color, removeMovieClip, _x, _y;
function c3d () {
super();
cacheAsBitmap = true;
u = 0;
}
function init(nx, ny) {
x = nx;
y = ny;
_w = _width;
_h = _height;
t = cTrac.inTrac(x);
setCF();
}
function show(t) {
zona1.gotoAndStop(((t * 10) + 1) + random(10));
zona2.gotoAndStop(((t * 10) + 1) + random(10));
}
function inView() {
return(((y - cTrac.dist) < (cTrac.MaxDistVidim * 1.5)) && ((y - cTrac.dist) > (cTrac.MinDistVidim * 1.2)));
}
function setCF() {
if (shad._currentframe != t) {
shad.gotoAndStop((t + 1) + (u * 9));
color.gotoAndStop((t + 1) + (u * 9));
}
}
function nextStep() {
if (inView()) {
redraw3D();
} else {
removeMovieClip();
}
}
static function renumZZ() {
if (zdvigZ < int(-40 - ((cTrac.Car1.dy / cTrac.Car1.maxSpeed) * 100))) {
zdvigZ = zdvigZ + 0.5;
}
if (zdvigZ > int(-40 - ((cTrac.Car1.dy / cTrac.Car1.maxSpeed) * 100))) {
zdvigZ = zdvigZ - 0.5;
}
}
function redraw3D() {
var _local2 = CoofPersp / (CoofPersp - (cTrac.MaxDistVidim - (y - cTrac.dist)));
_width = _w * _local2;
_height = _h * _local2;
_x = x * _local2;
_y = ((-(y - cTrac.dist)) * _local2) + zdvigZ;
}
static var CoofPersp = 1725;
static var zdvigZ = -40;
}
Symbol 1074 MovieClip [__Packages.cCar] Frame 0
class cCar extends c3d
{
var relaxDemage, param, regim, color, smoke, maxSpeed, dy, _name, dx, inManevr, tempRegim, DestabTimer, m, expl, _parent, _y, x, y, attachMovie, getNextHighestDepth, shad, t, _w, _width, _h, _height, tx, inView, u, setCF, redraw3D, removeMovieClip;
function cCar () {
super();
relaxDemage = 0;
param = new cCarParam();
regim = RG_ZERO;
}
function hitZ() {
return(color.hit);
}
function takebonus() {
param.streng = param.streng + 250;
if (param.__get__streng() > (param.maxStreng / 10)) {
smoke._visible = false;
if (cTrac.timeNitro <= 0) {
maxSpeed = param.MaxSpeed / 8;
}
}
}
function addSpeed() {
if ((regim != RG_DESTAB) && (param.__get__streng() > 0)) {
dy = dy + param.aksel;
if ((_name == "Car0") && (dy < maxSpeed)) {
CSoundService.playSound(cGame.snd_acsel, true, 1);
}
setdy2MaxSpeed();
}
}
function breakCar() {
dy = (dy * 0.97) - (param.aksel / 2);
if (dy < 0) {
dy = 0;
}
setdy2MaxSpeed();
if (_name == "Car0") {
CSoundService.stopSound(cGame.snd_acsel);
}
}
function stopCar() {
dy = (dy * 0.96) - (param.aksel * 3);
dx = dx * 0.5;
if (dy < 0) {
dy = 0;
}
setdy2MaxSpeed();
if (_name == "Car0") {
CSoundService.playSound(cGame.snd_break, true, 1);
}
}
function leftSpeed() {
if (regim != RG_DESTAB) {
if (dx > 0) {
dx = dx * 0.3;
}
dx = dx - ((dy / 25) + 0.05);
if (Math.abs(dx) > param.horSpeed) {
dx = -param.horSpeed;
}
inManevr = true;
}
}
function rightSpeed() {
if (regim != RG_DESTAB) {
if (dx < 0) {
dx = dx * 0.3;
}
dx = dx + ((dy / 25) + 0.05);
if (Math.abs(dx) > param.horSpeed) {
dx = param.horSpeed;
}
inManevr = true;
}
}
function setdy2MaxSpeed() {
if (dy > maxSpeed) {
dy = dy - ((dy - maxSpeed) / 8);
}
}
function distab(a) {
if (regim != RG_DESTAB) {
tempRegim = int(regim);
}
regim = RG_DESTAB;
DestabTimer = int((2 * a.m) / m) + 2;
if (DestabTimer > 6) {
DestabTimer = 6;
}
var _local2 = int(((Math.abs(dx - a.dx) * 8) + Math.abs(dy - a.dy)) + 1) * 6;
if (relaxDemage == 0) {
if ((_name == "Car0") && ((cTrac.timeNitro > 0) || (dy > (maxSpeed * 1.2)))) {
_local2 = _local2 / 3;
}
if (cTrac.timeNitro > 0) {
if (_name == "Car0") {
DestabTimer = 0;
regim = tempRegim;
dy = maxSpeed / 4;
}
if (a._name == "Car0") {
_local2 = _local2 * 50;
}
}
param.streng = param.streng - int(_local2);
if (a._name == "Car0") {
param.streng = param.streng - (int(_local2) * 5);
}
relaxDemage = 2;
}
if (param.__get__streng() < (param.maxStreng / 10)) {
smoke._visible = true;
maxSpeed = param.MaxSpeed / 12;
if ((param.__get__streng() <= 0) && (expl._currentframe == 1)) {
expl.gotoAndPlay(2);
inManevr = false;
if (cTrac.timeNitro > 0) {
CSoundService.playSound(cGame.snd_NITROBOOM, false, 1);
} else {
CSoundService.playSound(cGame.snd_boom, true, 1);
}
hitZ = function () {
return(undefined);
};
if ((tempRegim == RG_BOMBA) || (regim == RG_BOMBA)) {
_parent._parent.addCar(7, 4, 3);
} else {
_parent._parent.addCar(-1, -1, 0);
}
}
breakCar();
}
}
function init(par, trac) {
relaxDemage = 0;
param.copyParam(par);
_y = 150;
x = (((-4 + trac) * cTrac.widthPolos) + random(30)) - 15;
dy = cTrac.speedInTrac(trac) * (0.9 + (random(20) / 100));
maxSpeed = param.MaxSpeed / 8;
if (dy > cTrac.speedCar) {
y = cTrac.dist + cTrac.MinDistVidim;
dy = dy * 1.1;
} else {
y = cTrac.dist + cTrac.MaxDistVidim;
dy = dy * 0.95;
}
color = attachMovie("color" + par.type, "color", getNextHighestDepth());
shad = attachMovie("shad" + par.type, "shad", getNextHighestDepth());
smoke = attachMovie("smoke", "smoke", getNextHighestDepth());
expl = attachMovie("mmmEx", "mmmEx", getNextHighestDepth());
if (par.type == 7) {
smoke.scaleX = smoke.scaleX * 1.3;
smoke.scaleY = smoke.scaleY * 1.3;
expl.scaleX = expl.scaleX * 1.3;
expl.scaleY = expl.scaleY * 1.3;
}
smoke._y = -10;
smoke._visible = false;
t = int((trac + 1) / 2);
var _local3 = new Color(color);
_local3.setRGB(param.color);
_w = _width;
_h = _height;
m = param.mass;
dx = 0;
tx = x;
regim = RG_ZERO;
tempRegim = RG_ZERO;
DestabTimer = 0;
}
function reCalcSpeed() {
if (relaxDemage > 0) {
relaxDemage--;
}
if (DestabTimer > 0) {
if (dy < 0) {
dy = dy * 0.7;
}
dx = dx * 0.98;
if (_name == "Car0") {
if (Math.abs(dx) > 0.5) {
CSoundService.playSound(cGame.snd_wizg, true, 1);
} else {
CSoundService.stopSound(cGame.snd_wizg);
}
}
DestabTimer--;
if (DestabTimer <= 0) {
DestabTimer = 0;
regim = int(tempRegim);
t = cTrac.inTrac(x);
tx = (((-4 + t) * cTrac.widthPolos) + random(10)) - 5;
}
} else {
if ((Math.abs(dx) > 0) and (!inManevr)) {
dx = dx * 0.5;
if (Math.abs(dx) < 0.2) {
dx = 0;
}
}
setdy2MaxSpeed();
if (regim == RG_HAND) {
tx = x;
} else {
if (dy < cTrac.speedInTrac(t)) {
addSpeed();
}
if ((tx + param.horSpeed) < x) {
leftSpeed();
}
if ((tx - param.horSpeed) > x) {
rightSpeed();
}
if ((Math.abs(x - tx) < (param.horSpeed / 2)) and (Math.abs(dx) < 0.3)) {
x = tx;
dx = 0;
}
}
}
}
function setTar() {
if ((random(100) > 90) && (param.type != 7)) {
t = cTrac.inTrac(x);
if (Math.abs(t - cTrac.Car1.t) < 3) {
t = cTrac.Car1.t;
tx = (((-4 + t) * cTrac.widthPolos) + random(10)) - 5;
}
}
}
function nextStep() {
t = cTrac.inTrac(x);
reCalcSpeed();
x = x + dx;
y = y + dy;
if (Math.abs(x) > ((cTrac.widthPolos * 4) - 10)) {
CSoundService.playSound(cGame.snd_hitcar, true, 1);
param.streng = param.streng - ((Math.abs(dx) + Math.abs(dy)) + 1);
dx = (-dx) * 0.8;
dy = dy * 0.9;
x = x + dx;
x = x * 0.999;
if (regim != RG_DESTAB) {
tempRegim = int(regim);
}
regim = RG_DESTAB;
DestabTimer = 5;
}
if (inView()) {
u = 0;
if (dx > 0.5) {
if (inManevr) {
u = 1;
}
if (DestabTimer > 0) {
u = 2;
}
}
if (dx < -0.5) {
if (inManevr) {
u = 2;
}
if (DestabTimer > 0) {
u = 1;
}
}
setCF();
redraw3D();
} else if (expl._currentframe == 1) {
if ((tempRegim == RG_BOMBA) || (regim == RG_BOMBA)) {
smoke._visible = false;
x = cTrac.Car1.x;
y = cTrac.dist + (cTrac.MaxDistVidim * 0.9);
dy = cTrac.Car1.dy;
param.__set__streng(param.maxStreng);
param.recolor();
var _local2 = new Color(color);
_local2.setRGB(param.color);
addSpeed();
dx = 0;
dy = dy * 0.9;
tx = x;
} else {
_parent._parent.addCar(-1, -1, 0);
removeMovieClip();
}
} else {
removeMovieClip();
}
inManevr = false;
}
static var RG_ZERO = 0;
static var RG_HAND = 1;
static var RG_DESTAB = 2;
static var RG_BOMBA = 3;
}
Symbol 1075 MovieClip [__Packages.cBriff] Frame 0
class cBriff extends MovieClip
{
static var costBriffArr, MaxTimeBriffArr, distBriffArr;
var useHandCursor, mcMiniMap, mcMap, textBrif, zagBrif, mcTim, mcRew, timeBrif, costBrif, FreePlay, animBrif, _curBriffSelect, _parent;
function cBriff () {
super();
useHandCursor = false;
var _local3 = 1;
while (_local3 <= typeBriffArr.length) {
cBriff["briftext" + _local3] = cBriff["briftext" + _local3].split("&").join("\r");
_local3++;
}
mcMiniMap = mcMap;
textBrif.text = briftext1;
zagBrif.text = brifzag1;
}
function init() {
var _local3;
if (cGame.arrMarket.length < (cGame.maxMission + 3)) {
_local3 = new cCarParam();
_local3.GenNewCarType(random(4));
cGame.arrMarket.push(_local3);
_local3 = new cCarParam();
_local3.GenNewCarType(random(4) + 3);
cGame.arrMarket.push(_local3);
}
if (cGame.arrMarket.length < (cGame.maxMission + 3)) {
_local3 = new cCarParam();
_local3.GenNewCarType(random(4));
cGame.arrMarket.push(_local3);
}
cGame.arrMarket.sortOn(["nazv", "cost"]);
cGame.myMoney = cGame.myMoney + 0;
openBriff = [];
openBriff.push(cGame.maxMission);
var _local2 = 0;
while (_local2 < addedMiss.length) {
if (cGame.maxMission > addedMiss[_local2]) {
openBriff.push(addedMiss[_local2]);
}
_local2++;
}
mcMiniMap.init(openBriff);
curBrifSelect = (openBriff[0]);
}
static function int2Time(n) {
var _local1 = "";
_local1 = _local1 + String(int(n / 60));
var _local2 = n % 60;
if (_local2 < 10) {
_local1 = (_local1 + ":0") + String(_local2);
} else {
_local1 = (_local1 + ":") + String(_local2);
}
return(_local1);
}
function setBriff() {
trace(costBriffArr);
mcTim._visible = true;
mcRew._visible = true;
timeBrif._visible = true;
costBrif._visible = true;
if (curBrifSelect != openBriff[0]) {
FreePlay._visible = true;
} else {
FreePlay._visible = false;
}
animBrif.gotoAndStop(typeBriffArr[_curBriffSelect] + 1);
textBrif.text = cBriff["briftext" + (_curBriffSelect + 1)];
zagBrif.text = cBriff["brifzag" + (_curBriffSelect + 1)];
costBrif.text = "$" + costBriffArr[_curBriffSelect];
timeBrif.text = int2Time(MaxTimeBriffArr[_curBriffSelect]);
if (MaxTimeBriffArr[_curBriffSelect] <= 0) {
mcTim._visible = false;
timeBrif._visible = false;
}
if (costBriffArr[_curBriffSelect] <= 0) {
mcRew._visible = false;
costBrif._visible = false;
}
if (cGame.curentMission == 4) {
_parent.moveGar._visible = false;
} else {
_parent.moveGar._visible = true;
}
cTrac.MaxDist = distBriffArr[_curBriffSelect];
cTrac.StartMoney = costBriffArr[_curBriffSelect];
cTrac.AllTime = MaxTimeBriffArr[_curBriffSelect] * 24;
cTrac.typeMission = typeBriffArr[_curBriffSelect];
cTrac.style = StyleMissArr[_curBriffSelect];
cGame.curentMission = _curBriffSelect;
if ((_curBriffSelect == gonkaNum) and (cGame.__get__myMoney() < 10000)) {
_parent.btRace._visible = false;
} else {
_parent.btRace._visible = true;
}
}
function set curBrifSelect(value) {
_curBriffSelect = value;
setBriff();
//return(curBrifSelect);
}
function get curBrifSelect() {
return(_curBriffSelect);
}
var openBriff = [0];
static var typeBriffArr = [0, 2, 3, 5, 4, 1, 5, 2, 1, 5, 3, 4, 5, 6];
static var StyleMissArr = [1, 2, 0, 2, 1, 2, 0, 2, 1, 1, 0, 1, 2, 1];
static var MT_0_Beginer = 0;
static var MT_1_NoDemag = 1;
static var MT_2_Time = 2;
static var MT_3_Race = 3;
static var MT_4_Terror = 4;
static var MT_5_Hunt = 5;
static var MT_6_Surv = 6;
static var brifzag1 = "Challenge";
static var briftext1 = "You have to deliver a cargo! And your main goal is to get to the place! If you manage to deliver the cargo you\u2019ll get the job!";
static var brifzag2 = "Rush order.";
static var briftext2 = "Time is money! And you can lose it! &Each wasted second will deprive you of a part of your reward! &Don\u2019t be late! &And remember! If you are late you\u2019ll be fined!";
static var brifzag3 = "Race Out of Town";
static var briftext3 = "Have you saved some money? You have a chance to invest it. The stake is $10000! The winner will get a car. Not a new one though\u2026 &Just finish in no time!&&Entrance Fee: $10000!";
static var gonkaNum = 2;
static var brifzag4 = "Candidate.";
static var briftext4 = "It seems like someone else would like to get your job, he was sent by a man whom I can't let down. &He has just set off to perform his first trial mission.&If he reaches the goal I'll have to hire him instead of you. &Have you got it?";
static var brifzag5 = "Double trouble";
static var briftext5 = "This is a car key of the man who is sitting in my office. This car must get in 20 different accidents in 5 minutes.&And hurry up lest he drink all my coffee!";
static var brifzag6 = "Valuable Cargo";
static var briftext6 = "Have you ever heard of Chinese vases? You have one in you trunk\u2026 Don\u2019t even think of breaking it\u2026 Even if there appears a scratch, you will pay tons of money! & But deliver on time, it\u2019s your job! ";
static var brifzag7 = "Underpayer";
static var briftext7 = "Can you see that lad? He swindled us!&He managed to pay thrice less than promised!&You are to make him regret... His car is rather an expensive toy. Mar it! ";
static var brifzag8 = "Getting Late!";
static var briftext8 = "This guy is to be at the airport! When? He is to be there NOW! The plane won\u2019t wait. So you\u2019d better not drive fast but fly low! Time is money!";
static var brifzag9 = "Crystal";
static var briftext9 = "You have to deliver the stolen crystals on time to the boss! It won't be easy, but the payload is good. &Don't damage the precious cargo!";
static var brifzag10 = "Competitor!";
static var briftext10 = "Damn! The order was taken away from under our very nose\u2026 The guy in the red car took it away a minute ago. &Hurry up and don\u2019t let him deliver the cargo on time!";
static var brifzag11 = "Supercup!";
static var briftext11String = "You have to uphold the honour of the company! &It\u2019s the best street racers\u2019 race. &And I want our car to be the first! Don\u2019t spare the car it\u2019ll be repaired at the company\u2019s expenses. Just finish first! ";
static var brifzag12 = "Road Hell!";
static var briftext12 = "Well, I even don\u2019t know how to explain. The strangest order we have ever had. Someone wants the street to have notoriety. In short: drive along it and damage tens of cars\u2026 &And it\u2019s a matter of course that you should vanish as soon as possible. &You are short of time but the business is worth the efforts!";
static var brifzag13 = "Burglary!";
static var briftext13 = "We are robbed! All the money from my safe is stolen! &They are getting away in the black car! Stop them!";
static var brifzag14 = "Survival";
static var briftext14 = "The faster and father you go the more money you get! Infinite game.";
static var addedMiss = [1, 2, 8, 9];
}
Symbol 1076 MovieClip [__Packages.cMiniMap] Frame 0
class cMiniMap extends MovieClip
{
var iconArr, bazisMiss, useHandCursor, _parent;
function cMiniMap () {
super();
iconArr = [];
trace("start");
var _local3 = 0;
while (_local3 < 14) {
iconArr.push(this["mis" + _local3]);
iconArr[_local3].hit.useHandCursor = false;
_local3++;
}
bazisMiss = 0;
useHandCursor = false;
}
function init(aInit) {
trace("miniInit" + aInit);
var _local2 = 0;
while (_local2 < iconArr.length) {
if (_local2 <= cGame.maxMission) {
iconArr[_local2].gotoAndStop(4);
} else {
iconArr[_local2]._visible = false;
}
_local2++;
}
bazisMiss = aInit[0];
this["mis" + aInit[0]].gotoAndStop(1);
this["mis" + aInit[0]].hit.useHandCursor = true;
if (aInit.length > 1) {
var _local3 = 1;
while (_local3 < aInit.length) {
this["mis" + aInit[_local3]].gotoAndStop(2);
this["mis" + aInit[_local3]].hit.useHandCursor = true;
_local3++;
}
}
iconArr[bazisMiss].gotoAndStop(3);
}
function myClic(mc) {
if (mc._currentframe < 4) {
var _local2 = 0;
while (_local2 < iconArr.length) {
if (iconArr[_local2]._currentframe < 4) {
iconArr[_local2].gotoAndStop(2);
}
_local2++;
}
iconArr[bazisMiss].gotoAndStop(1);
mc.gotoAndStop(3);
var _local4 = Number(mc._name.slice(3, 5));
_parent.curBrifSelect = _local4;
}
}
}
Symbol 1077 MovieClip [__Packages.CSoundControl] Frame 0
class CSoundControl extends MovieClip
{
var gotoAndStop;
function CSoundControl () {
super();
if (soundIsOn) {
gotoAndStop(1);
} else {
gotoAndStop(2);
}
Key.addListener(this);
}
function onKeyDown() {
if (Key.isDown(83)) {
PressKey(this);
}
}
static function PressKey(mc) {
if (soundIsOn) {
soundIsOn = false;
CSoundService.stopCurLoopSound();
mc.gotoAndStop(2);
} else {
soundIsOn = true;
CSoundService.playCurLoopSound();
mc.gotoAndStop(1);
}
}
static var soundIsOn = true;
}
Symbol 1078 MovieClip [__Packages.cInvis] Frame 0
class cInvis extends MovieClip
{
var _visible;
function cInvis () {
super();
_visible = false;
}
}
Symbol 1079 MovieClip [__Packages.cBonus] Frame 0
class cBonus extends c3d
{
var lifeTime, type, x, y, _w, _width, _h, _height, gotoAndStop, inView, redraw3D, removeMovieClip, hitTest;
function cBonus () {
super();
}
function hitZ() {
return(this);
}
function init(t, p) {
lifeTime = 0;
type = t;
x = ((-4 + (p * 2)) - 1) * cTrac.widthPolos;
y = cTrac.dist + (0.7 * cTrac.MaxDistVidim);
_w = _width;
_h = _height;
gotoAndStop(t);
}
function nextStep() {
if (inView()) {
redraw3D();
} else {
removeMovieClip();
}
if (lifeTime == 0) {
if (hitTest(cTrac.Car1.hitZ())) {
cTrac.AllBonuses++;
if (type == 1) {
cTrac.Car1.takebonus();
}
if (type == 2) {
cTrac.myMoney = cTrac.myMoney + 400;
}
if (type == 3) {
cTrac.addNitroBonus();
}
CSoundService.playSound(cGame.snd_bonus, false, 1);
lifeTime = 3;
}
} else {
lifeTime--;
if (lifeTime <= 1) {
removeMovieClip();
}
}
}
}
Symbol 38 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 3
stop();
Symbol 40 MovieClip [Car1] Frame 1
#initclip 24
Object.registerClass("Car1", cCar);
#endinitclip
stop();
Symbol 42 MovieClip [hitCar] Frame 1
#initclip 15
Object.registerClass("hitCar", cInvis);
#endinitclip
Symbol 70 MovieClip [color2] Frame 1
stop();
Symbol 105 MovieClip [bonus1] Frame 1
#initclip 16
Object.registerClass("bonus1", cBonus);
#endinitclip
stop();
Symbol 133 MovieClip [color4] Frame 1
stop();
Symbol 161 MovieClip [shad4] Frame 1
stop();
Symbol 206 MovieClip [color0] Frame 1
stop();
Symbol 233 MovieClip [shad0] Frame 1
stop();
stop();
Symbol 261 MovieClip [color3] Frame 1
stop();
Symbol 317 MovieClip [color1] Frame 1
stop();
Symbol 375 MovieClip [color6] Frame 1
stop();
Symbol 403 MovieClip [shad6] Frame 1
stop();
Symbol 432 MovieClip [color5] Frame 1
stop();
Symbol 488 MovieClip [shad7] Frame 1
stop();
Symbol 516 MovieClip [color7] Frame 1
stop();
Symbol 534 Button
on (press) {
PressButon("openBar");
}
Symbol 562 MovieClip Frame 1
stop();
Symbol 568 MovieClip [slider] Frame 1
#initclip 17
Object.registerClass("slider", cSlider);
#endinitclip
Symbol 574 Button
on (press) {
PressButon("rightAr");
}
Symbol 575 Button
on (press) {
PressButon("LeftAr");
}
Symbol 582 Button
on (press) {
PressButon("sell");
}
Symbol 609 MovieClip [Garag] Frame 1
#initclip 18
Object.registerClass("Garag", cGarag);
#endinitclip
Instance of Symbol 585 MovieClip "mcColor" in Symbol 609 MovieClip [Garag] Frame 1
on (press) {
_parent.recolor();
}
Symbol 613 MovieClip [razm3] Frame 1
#initclip 19
Object.registerClass("razm3", c3d);
#endinitclip
Symbol 628 MovieClip Frame 1
gotoAndStop(random(5));
stop();
Symbol 652 MovieClip [zona1] Frame 1
#initclip 20
Object.registerClass("zona1", c3d);
#endinitclip
stop();
Symbol 673 MovieClip [zona2] Frame 1
#initclip 21
Object.registerClass("zona2", c3d);
#endinitclip
stop();
Symbol 674 MovieClip [razr] Frame 1
#initclip 22
Object.registerClass("razr", c3d);
#endinitclip
stop();
Symbol 683 Button
on (press) {
cGame.buttNo();
}
Symbol 695 Button
on (press) {
cGame.buttYes();
}
Instance of Symbol 676 MovieClip in Symbol 696 MovieClip [submitScreen] Frame 1
onClipEvent (load) {
this.onPress = function () {
};
}
Symbol 702 Button
on (press) {
cGame.__set__status(cGame.ST_Zast);
}
Symbol 706 Button
on (press) {
cGame.buttNo();
}
Instance of Symbol 676 MovieClip in Symbol 707 MovieClip [newgamescreen] Frame 1
onClipEvent (load) {
this.onPress = function () {
};
}
Symbol 718 MovieClip Frame 6
stop();
Symbol 719 MovieClip [mmmEx] Frame 1
stop();
Symbol 719 MovieClip [mmmEx] Frame 18
_parent.removeMovieClip();
stop();
Symbol 721 MovieClip [finishLine] Frame 1
#initclip 23
Object.registerClass("finishLine", c3d);
#endinitclip
Symbol 739 MovieClip Frame 1
stop();
Symbol 740 MovieClip Frame 1
stop();
Symbol 755 MovieClip Frame 140
_root.gotoAndPlay("lbStartGame");
Symbol 756 Button
on (release) {
getURL ("http://www.hypegames.com");
}
Symbol 757 Button
on (press) {
getURL ("http://www.hypegames.com");
}
Symbol 761 Button
on (release) {
getURL ("http://www.hypegames.com", "_blank");
}
Symbol 765 Button
on (release) {
getURL ("http://www.iriysoft.ru", "_blank");
}
Symbol 770 Button
on (press) {
cGame.btNewGame();
}
Symbol 772 Button
on (press) {
cGame.__set__status(cGame.ST_Instr);
}
Symbol 774 Button
on (press) {
cGame.__set__status(cGame.ST_Cont);
}
Symbol 779 MovieClip [Sound] Frame 1
#initclip 35
Object.registerClass("Sound", CSoundControl);
#endinitclip
stop();
Instance of Symbol 777 MovieClip in Symbol 779 MovieClip [Sound] Frame 1
on (press) {
trace((("pppp" + this) + " ") + CSoundService.soundIsOn());
CSoundControl.PressKey(this._parent);
}
Symbol 783 Button
on (release) {
getURL ("http://www.hypegames.com", "_blank");
}
Symbol 785 Button
on (press) {
gotoAndStop ("lbSelect");
}
Symbol 792 Button
on (press) {
cGame.__set__status(cGame.ST_Back);
}
Symbol 801 MovieClip [PROGRESS] Frame 1
#initclip 25
Object.registerClass("PROGRESS", cSlider);
#endinitclip
Symbol 822 MovieClip Frame 50
stop();
Symbol 828 MovieClip Frame 40
stop();
Symbol 835 MovieClip Frame 40
stop();
Symbol 838 MovieClip Frame 40
stop();
Symbol 840 MovieClip Frame 367
cGame.__set__status(cGame.ST_Briff);
Symbol 843 Button
on (press) {
cGame.__set__status(cGame.ST_Briff);
}
Symbol 852 Button
on (press) {
trace(_parent);
_parent.myClic(this);
}
Symbol 859 MovieClip Frame 1
stop();
Symbol 859 MovieClip Frame 2
stop();
Symbol 859 MovieClip Frame 4
stop();
Symbol 861 Button
on (press) {
_parent.myClic(this);
}
Symbol 863 MovieClip Frame 1
stop();
Symbol 863 MovieClip Frame 2
stop();
Symbol 863 MovieClip Frame 4
stop();
Symbol 866 MovieClip Frame 1
stop();
Symbol 866 MovieClip Frame 2
stop();
Symbol 866 MovieClip Frame 4
stop();
Symbol 868 MovieClip Frame 1
stop();
Symbol 868 MovieClip Frame 2
stop();
Symbol 868 MovieClip Frame 4
stop();
Symbol 870 MovieClip Frame 1
stop();
Symbol 870 MovieClip Frame 2
stop();
Symbol 870 MovieClip Frame 4
stop();
Symbol 876 MovieClip Frame 1
stop();
stop();
Symbol 876 MovieClip Frame 2
stop();
Symbol 876 MovieClip Frame 4
stop();
Symbol 877 MovieClip [MiniMap] Frame 1
#initclip 26
Object.registerClass("MiniMap", cMiniMap);
#endinitclip
stop();
Symbol 890 MovieClip [briffMC] Frame 1
#initclip 27
Object.registerClass("briffMC", cBriff);
#endinitclip
Symbol 894 Button
on (press) {
cGame.__set__status(cGame.ST_Tras);
}
Symbol 897 Button
on (press) {
cGame.__set__status(cGame.ST_Instr);
}
Symbol 899 MovieClip Frame 1
stop();
Symbol 899 MovieClip Frame 7
stop();
Symbol 904 Button
on (press) {
PressButon("openBar");
}
Symbol 908 Button
on (press) {
PressButon("Bye");
}
Symbol 910 MovieClip [Market] Frame 1
#initclip 28
Object.registerClass("Market", cGarag);
#endinitclip
Instance of Symbol 585 MovieClip "mcColor" in Symbol 910 MovieClip [Market] Frame 1
on (press) {
_parent.recolor();
}
Symbol 911 MovieClip Frame 1
stop();
Symbol 911 MovieClip Frame 7
stop();
Symbol 915 Button
on (press) {
cGame.__set__status(cGame.ST_Start);
}
Symbol 920 MovieClip Frame 1
stop();
Symbol 920 MovieClip Frame 3
stop();
Symbol 931 MovieClip [PACKAGE_HEALTH] Frame 1
#initclip 29
Object.registerClass("PACKAGE_HEALTH", cSlider);
#endinitclip
Symbol 939 MovieClip [SpeedoMetr] Frame 1
#initclip 30
Object.registerClass("SpeedoMetr", cSlider);
#endinitclip
Symbol 952 MovieClip Frame 1
stop();
Symbol 952 MovieClip Frame 4
sortOn();
Symbol 957 MovieClip Frame 1
stop();
Symbol 958 MovieClip Frame 1
stop();
Symbol 958 MovieClip Frame 15
Symbol 958 MovieClip Frame 52
stop();
Symbol 962 Button
on (press) {
play();
cGame.pausa = !cGame.pausa;
}
Symbol 964 MovieClip Frame 1
stop();
Symbol 964 MovieClip Frame 2
stop();
Symbol 966 Button
on (press) {
cGame.__set__status(cGame.ST_Lose);
}
Symbol 983 MovieClip [slide] Frame 1
#initclip 31
Object.registerClass("slide", cSlider);
#endinitclip
Symbol 986 MovieClip [NitroMetr] Frame 1
#initclip 32
Object.registerClass("NitroMetr", cSlider);
#endinitclip
Symbol 990 MovieClip [Trac] Frame 1
#initclip 33
Object.registerClass("Trac", cTrac);
#endinitclip
Symbol 996 Button
on (press) {
cGame.__set__status(cGame.ST_endRace);
}
Symbol 1000 Button
on (press) {
cGame.sendSubmit();
}
Symbol 1007 MovieClip Frame 10
stop();
Symbol 1016 MovieClip Frame 50
stop();
Symbol 1023 Button
on (press) {
cGame.__set__status(cGame.ST_Tras);
}
Symbol 1028 MovieClip Frame 50
stop();
Symbol 1029 Button
on (press) {
cGame.__set__status(cGame.ST_Zast);
}
Symbol 1035 Button
on (press) {
cGame.__set__status(cGame.ST_Briff);
}
Symbol 1044 Button
on (press) {
cGame.selSurv(2);
}
Symbol 1049 Button
on (press) {
cGame.selSurv(3);
}
Symbol 1054 Button
on (press) {
cGame.selSurv(0);
}
Symbol 1056 Button
on (press) {
cGame.__set__status(cGame.ST_Start);
}
Symbol 1060 Button
on (press) {
cGame.selSurv(7);
}
Symbol 1065 Button
on (press) {
cGame.selSurv(1);
}
Symbol 1066 MovieClip [GameMC] Frame 1
#initclip 34
Object.registerClass("GameMC", cGame);
#endinitclip
stop();
Instance of Symbol 21 MovieClip in Symbol 1066 MovieClip [GameMC] Frame 10
on (release) {
getURL ("http://www.hypegames.com", "_blank");
}
Symbol 1066 MovieClip [GameMC] Frame 36
mcBriff.init();
mcMarket.visPanel = false;
mcGarag.visPanel = false;
Instance of Symbol 21 MovieClip in Symbol 1066 MovieClip [GameMC] Frame 36
on (release) {
getURL ("http://www.hypegames.com", "_blank");
}
Symbol 1066 MovieClip [GameMC] Frame 46
stop();
Instance of Symbol 21 MovieClip in Symbol 1066 MovieClip [GameMC] Frame 46
on (release) {
getURL ("http://www.hypegames.com", "_blank");
}