Frame 1
stop();
ver = $version;
Frame 10
stop();
_global.sndobj = new com.sound.CSound();
Frame 15
var gameLevel = 4;
var currentlevel = 1;
var gamescore1 = 0;
var levelscore = 0;
var dieCount = 0;
var sndon = true;
Symbol 6 MovieClip Frame 1
gotoAndStop(_root.currentlevel);
Symbol 7 MovieClip [bg] Frame 1
#initclip 12
Object.registerClass("bg", com.UI.Game);
#endinitclip
Symbol 15 MovieClip [hitCopac] Frame 1
stop();
var removeClip = false;
Symbol 15 MovieClip [hitCopac] Frame 45
stop();
removeClip = true;
Symbol 19 MovieClip Frame 1
stop();
var removeClip = false;
Symbol 19 MovieClip Frame 72
stop();
removeClip = true;
Symbol 20 MovieClip Frame 1
stop();
var removeClip = false;
Symbol 20 MovieClip Frame 26
stop();
removeClip = true;
Symbol 21 MovieClip Frame 1
stop();
var removeClip = false;
Symbol 21 MovieClip Frame 86
stop();
removeClip = true;
Symbol 25 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 321
gotoAndPlay (2);
Symbol 26 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 352
gotoAndPlay (51);
Symbol 46 MovieClip Frame 20
gotoAndPlay (1);
Symbol 46 MovieClip Frame 50
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 50
stop();
Symbol 61 MovieClip [Tanti] Frame 1
stop();
Symbol 61 MovieClip [Tanti] Frame 39
stop();
_root.game.b.gameNewEnd();
Symbol 61 MovieClip [Tanti] Frame 73
stop();
Symbol 61 MovieClip [Tanti] Frame 74
stop();
Symbol 61 MovieClip [Tanti] Frame 75
stop();
Symbol 61 MovieClip [Tanti] Frame 76
stop();
Symbol 61 MovieClip [Tanti] Frame 77
stop();
Symbol 61 MovieClip [Tanti] Frame 78
stop();
Symbol 61 MovieClip [Tanti] Frame 79
stop();
Symbol 61 MovieClip [Tanti] Frame 80
stop();
Symbol 61 MovieClip [Tanti] Frame 81
stop();
Symbol 61 MovieClip [Tanti] Frame 82
stop();
Symbol 61 MovieClip [Tanti] Frame 84
stop();
Symbol 61 MovieClip [Tanti] Frame 88
stop();
Symbol 61 MovieClip [Tanti] Frame 92
stop();
Symbol 61 MovieClip [Tanti] Frame 116
stop();
Symbol 61 MovieClip [Tanti] Frame 135
stop();
Symbol 79 Button
on (release) {
getURL ("http://www.cartitans.com", "_blank");
}
Symbol 82 MovieClip Frame 1
thePreloaderClip = this;
stop();
this.exitAnim = false;
this.onEnterFrame = function () {
this._x = _root.Stage.width / 2;
pL = Math.floor((this._parent.getBytesLoaded() / this._parent.getBytesTotal()) * 100);
if (pL < 100) {
this.growBar._xscale = (pL / 100) * 100;
this._parent.stop();
} else {
thePreloaderClip._parent.gotoAndStop("start");
}
};
Symbol 225 MovieClip [__Packages.com.UI.Game] Frame 0
class com.UI.Game extends MovieClip
{
static var m_instance;
var inPostGame, m_pauseOn, hitcount, min, sec, snd, m_level, attachMovie, m_pEngine, _parent, setint, inProcess, scen, m_car, hitspace, bodyCrash, score, onEnterFrame, _scrPause;
function Game () {
super();
m_instance = this;
}
function set pauseOn(pauseState) {
if (inPostGame) {
return;
}
m_pauseOn = pauseState;
enableProcess(!m_pauseOn);
//return(pauseOn);
}
function get pauseOn() {
return(m_pauseOn);
}
function onLoad() {
init();
pauseOn = (false);
}
function init() {
_root.levelscore = 0;
hitcount = 0;
min = 0;
sec = 60;
snd = com.sound.CSound.instance;
m_level = attachMovie("level" + _root.currentlevel, "_Level", 1001, {x:0, y:0});
m_level.mcHit._alpha = 0;
m_pEngine = new com.ACA.DynamicsEngine(m_level.mcHit, 7);
var mc = attachMovie("popup", "popup", 1002);
mc._x = 300;
mc._y = 200;
mc.gotoAndStop("startup");
var sco = this;
_parent.scorepanel.gscore1 = _root.gamescore1;
_parent.scorepanel._visible = false;
_parent.sbar._visible = false;
if (_root.sndon == true) {
_parent.scorepanel.music.txt = "ON";
snd.sndvolon();
} else {
_parent.scorepanel.music.txt = "OFF";
snd.sndvoloff();
}
mc.onEnterFrame = function () {
if (mc.lev._currentframe >= 90) {
sco.str();
mc.onEnterFrame = null;
}
};
_parent.scorepanel.music.onRelease = function () {
if (_root.sndon == true) {
this.gotoAndStop(2);
_root.sndon = false;
sco.snd.sndvoloff();
} else {
this.gotoAndStop(1);
_root.sndon = true;
sco.snd.sndvolon();
}
};
}
function str() {
newRace();
setint = setInterval(this, "tim", 1000);
}
function tim() {
sec--;
if (sec <= 0) {
sec = 59;
min--;
if (min < 0) {
_parent.scorepanel.timer = "00:00";
clearInterval(setint);
}
}
if (min == 0) {
_parent.scorepanel.timer = "00:" + sec;
if (sec < 10) {
_parent.scorepanel.timer = "00:0" + sec;
}
} else {
_parent.scorepanel.timer = (("0" + min) + ":") + sec;
if (sec < 10) {
_parent.scorepanel.timer = ((("0" + min) + ":") + "0") + sec;
}
}
}
function newRace() {
inPostGame = false;
inProcess = true;
scen._x = 0;
scen._y = 0;
snd.playBgsnd();
if (_root.sndon == true) {
_parent.scorepanel.music.gotoAndStop(1);
snd.sndvolon();
} else {
_parent.scorepanel.music.gotoAndStop(2);
snd.sndvoloff();
}
m_pEngine.clear();
m_car = new com.UI.Truck();
m_car.init(m_level.mcVehiclePlace, m_pEngine);
setObstruct_mc();
setPosition(true);
}
function setObstruct_mc() {
for (var _local2 in m_level.obstruct) {
m_level.obstruct[_local2].gotoAndStop(1);
}
}
function gameNewEnd() {
hitspace._visible = false;
var _local3 = attachMovie("popup", "popup", 1002);
_local3._x = 300;
_local3._y = 200;
if (_root.currentlevel >= _root.gameLevel) {
_local3.gotoAndStop("congrats");
} else {
_local3.gotoAndStop("levelup");
}
_root.levelscore = _root.levelscore + (sec * 100);
_root.gamescore1 = _root.gamescore1 + _root.levelscore;
snd.stopSnds();
_parent.scorepanel._visible = false;
_parent.sbar._visible = false;
clearInterval(setint);
}
function processRace() {
m_pEngine.process();
m_car.process();
var _local3 = m_car.getHitForBonus();
setPosition();
i = 1;
while (i <= 24) {
if (_local3.hitTest(m_level.mcHit["copac" + i])) {
m_level.mcHit["copac" + i].play();
m_level["copac" + i].play();
}
i++;
}
i = 1;
while (i <= 10) {
if (_local3.hitTest(m_level.mcHit["platforma" + i])) {
m_level.mcHit["platforma" + i].play();
m_level["platforma" + i].play();
}
i++;
}
_local3 = m_car.getHitForBonus();
if (_local3.hitTest(m_level.bonus_mc)) {
i = 1;
while (i <= 50) {
if (_local3.hitTest(m_level.bonus_mc["bonus" + i])) {
if (m_level.bonus_mc["bonus" + i]._alpha == 100) {
m_level.bonus_mc["bonus" + i]._alpha = 90;
m_level.bonus_mc["bonus" + i].gotoAndPlay(21);
_root.levelscore = _root.levelscore + 100;
_root.game.scorepanel.gscore1 = _root.game.scorepanel.gscore1 + 100;
}
}
i++;
}
}
if ((m_level.mcFinish._x < (m_car.__get__backWheel().pos.x - 50)) && (!inPostGame)) {
inPostGame = true;
}
_local3 = m_car.getHitForBonus();
if ((_local3.hitTest(m_level.end) && (_local3._parent._rotation < 100)) && (_local3._parent._rotation > -100)) {
if (inProcess) {
m_level.tanti_anim.play();
m_car.inProcess = false;
}
}
for (var i in m_level.obstruct) {
if ((_local3.hitTest(m_level.obstruct[i].mc) == true) && (inProcess)) {
m_level.obstruct[i].gotoAndPlay("die");
snd.zoombiesnd.start(0, 1);
updatescore(100);
}
}
if (inProcess && ((getTimer() - m_car.bornTime) > 200)) {
if (!inPostGame) {
if (m_level._y < -890) {
m_car.inProcess = false;
inProcess = false;
inPostGame = true;
var _local4 = attachMovie("popup", "dieMessage", 1002);
_local4.gotoAndStop("die");
_parent.scorepanel._visible = false;
_parent.sbar._visible = false;
_root.dieCount++;
_local4.level = _root.currentlevel;
_local4.lscore = _root.levelscore;
_root.gamescore1 = _root.gamescore1 + 0;
_local4.gscore = _root.gamescore1;
snd.stopSnds();
snd.playBlastsnd();
_local4._x = 300;
_local4._y = 200;
clearInterval(setint);
}
if (m_car.checkDeathPoints(m_level.mcHit)) {
bodyCrash = true;
if (inProcess) {
hitcount++;
if (hitcount >= 1) {
hitcount = 0;
_parent.sbar.nextFrame();
}
if ((_parent.sbar._currentframe >= 200) || (min < 0)) {
m_car.inProcess = false;
inProcess = false;
inPostGame = true;
var _local4 = attachMovie("popup", "dieMessage", 1002);
_local4.gotoAndStop("die");
_parent.scorepanel._visible = false;
_parent.sbar._visible = false;
_root.dieCount++;
_local4.level = _root.currentlevel;
_local4.lscore = 0;
_root.gamescore1 = _root.gamescore1 + 0;
_local4.gscore = _root.gamescore1;
snd.stopSnds();
snd.playBlastsnd();
_local4._x = 300;
_local4._y = 200;
clearInterval(setint);
}
}
} else {
bodyCrash = false;
}
if (m_car.chkDeath(m_level.mcHit.Deathhit) || (min < 0)) {
_parent.scorepanel.timer = "00:00";
m_car.inProcess = false;
inProcess = false;
inPostGame = true;
var _local4 = attachMovie("popup", "dieMessage", 1002);
_local4.gotoAndStop("die");
_parent.scorepanel._visible = false;
_parent.sbar._visible = false;
_local4.level = _root.currentlevel;
_root.dieCount++;
_local4.lscore = 0;
_root.gamescore1 = _root.gamescore1 + 0;
_local4.gscore = _root.gamescore1;
snd.stopSnds();
snd.playBlastsnd();
_local4._x = 300;
_local4._y = 200;
clearInterval(setint);
}
}
}
}
function updatescore(no) {
score = score + no;
trace("updade score");
_root.levelscore = score;
_parent.scorepanel.gscore = _root.gamescore;
}
function enableProcess(enable) {
if (enable) {
onEnterFrame = processRace;
_scrPause.removeMovieClip();
} else {
attachMovie("popup", "_scrPause", 32001);
_scrPause.gotoAndStop("pause");
_scrPause._x = 300;
_scrPause._y = 200;
}
}
function setPosition(b) {
var _local4 = m_car.__get__image()._x;
var _local3 = m_car.__get__image()._y;
var _local5 = leftOffset;
var _local6 = rightOffset;
if (!m_car.mode) {
_local5 = rightOffset;
_local6 = leftOffset;
}
var _local2 = m_level._x;
if (_local2 < (_local5 - _local4)) {
_local2 = _local5 - _local4;
}
if (_local2 > ((550 - _local6) - _local4)) {
_local2 = (550 - _local6) - _local4;
}
if (b) {
m_level._x = _local2;
} else {
m_level._x = m_level._x + ((_local2 - m_level._x) / xScrollFactor);
scen._x = scen._x + (((_local2 - m_level._x) / xScrollFactor) * 0.03);
}
if (m_level._y < (topOffset - _local3)) {
m_level._y = topOffset - _local3;
}
if (m_level._y > ((400 - bottomOffset) - _local3)) {
m_level._y = (400 - bottomOffset) - _local3;
}
}
static function get instance() {
return(m_instance);
}
function endOfLevel(n) {
if (n == 1) {
} else if (n == 2) {
}
}
var leftOffset = 190;
var rightOffset = 410;
var topOffset = 250;
var bottomOffset = 120;
var xScrollFactor = 5;
var spacePressed = false;
}
Symbol 226 MovieClip [__Packages.com.ACA.DynamicsEngine] Frame 0
class com.ACA.DynamicsEngine
{
var m_particles, m_constraints, m_gravity, m_hitMovie, m_koeffDamp;
function DynamicsEngine (hitMovie, nGravity, koeffDamp) {
m_particles = new Array();
m_constraints = new Array();
setHitMovie(hitMovie);
init(nGravity, koeffDamp);
}
function set gravity(nGravity) {
m_gravity = nGravity;
//return(gravity);
}
function get gravity() {
return(m_gravity);
}
function setHitMovie(hitMovie) {
if (hitMovie == undefined) {
hitMovie = null;
}
m_hitMovie = hitMovie;
}
function getHitMovie() {
return(m_hitMovie);
}
function init(nGravity, koeffDamp) {
if (nGravity == undefined) {
nGravity = 9.8;
}
if (koeffDamp == undefined) {
koeffDamp = 0.99;
}
gravity = (nGravity);
m_koeffDamp = koeffDamp;
}
function addParticle(p) {
m_particles.push(p);
}
function process() {
var _local2 = 0;
while (_local2 < m_particles.length) {
m_particles[_local2].accelerate.plusXY(0, m_gravity * m_particles[_local2].mass);
m_particles[_local2].accelerate.mult(1 / REPEAT_COUNT);
_local2++;
}
var _local3 = 0;
while (_local3 < REPEAT_COUNT) {
_local2 = 0;
while (_local2 < m_particles.length) {
m_particles[_local2].verlet(D_TIME, m_koeffDamp);
_local2++;
}
_local2 = 0;
while (_local2 < m_constraints.length) {
m_constraints[_local2].resolve();
_local2++;
}
_local2 = 0;
while (_local2 < m_particles.length) {
m_particles[_local2].checkCollision(m_hitMovie);
_local2++;
}
_local3++;
}
_local2 = 0;
while (_local2 < m_particles.length) {
m_particles[_local2].accelerate.init(0, 0);
_local2++;
}
}
function addConstraint(c) {
m_constraints.push(c);
}
function clear() {
while (m_particles.pop() != undefined) {
}
clearConstraints();
}
function clearConstraints() {
while (m_constraints.pop() != undefined) {
}
}
static var SEC_PER_FRAME = 0.04;
static var REPEAT_COUNT = 3;
static var D_TIME = SEC_PER_FRAME / REPEAT_COUNT;
}
Symbol 227 MovieClip [__Packages.com.ACA.Vehicle] Frame 0
class com.ACA.Vehicle
{
var m_vehicleDir, m_vehicleNormal, m_vehicleParam, m_vehicleAngle, m_vehicleMovie, m_bodyMovie, m_backWheel, m_forwardWheel, m_accPercMultForTurn, m_normalYLimitForTurn, m_koeffPrimaryForTurn, m_koeffSecondaryForTurn, m_accPercBaseForTurn, m_accForwardWheel, m_accBackWheel, m_brakeForwardWheel, m_brakeBackWheel, t_turnToPerc;
function Vehicle () {
m_vehicleDir = new com.ACA.util.Vector(0, 0);
m_vehicleNormal = new com.ACA.util.Vector(0, 0);
}
function get vehicleParam() {
return(m_vehicleParam);
}
function set vehicleParam(nParam) {
m_vehicleParam = nParam;
//return(vehicleParam);
}
function get vehicleAngle() {
return(m_vehicleAngle);
}
function get vehicleDir() {
return(m_vehicleDir);
}
function getVehiclePoint(mc) {
var _local2 = new Object();
_local2.x = mc._x;
_local2.y = mc._y;
mc._parent.localToGlobal(_local2);
m_vehicleMovie._parent.globalToLocal(_local2);
return(_local2);
}
function moveMovieToMovieGlobal(movie, moviePos) {
var _local1 = {x:movie._x, y:movie._y};
movie._parent.localToGlobal(_local1);
moviePos._parent.globalToLocal(_local1);
moviePos._x = _local1.x;
moviePos._y = _local1.y;
}
function rotateMovieToMovieLocal(movie, moviePos) {
movie._rotation = Math.atan2(moviePos._y - movie._y, moviePos._x - movie._x) * VAL_180_DIV_PI;
}
function construct(vehicleParam, bodyMovie, vehicleMovie, mcWBack, mcWForward) {
m_vehicleParam = vehicleParam;
m_bodyMovie = bodyMovie;
m_vehicleMovie = vehicleMovie;
m_vehicleParam.changeGeometry(getVehiclePoint(m_bodyMovie.mcA), getVehiclePoint(m_bodyMovie.mcB), getVehiclePoint(m_bodyMovie.mcC), getVehiclePoint(m_bodyMovie.mcD));
m_backWheel = m_vehicleParam.A;
m_forwardWheel = m_vehicleParam.D;
if (mcWBack != undefined) {
m_backWheel.setMovie(mcWBack);
m_backWheel.setRotationMovie(mcWBack.mcSpoke);
}
if (mcWForward != undefined) {
m_forwardWheel.setMovie(mcWForward);
m_forwardWheel.setRotationMovie(mcWForward.mcSpoke);
}
setVehicleParam(getDefaultVehicleParam());
}
static function getDefaultVehicleParam() {
var _local1 = new Object();
_local1.accPercMult = 39.2;
_local1.normalYLimit = 0.4;
_local1.koeffPrimary = 1.3;
_local1.koeffSecondary = 0.7;
_local1.accPercBase = 0.6;
_local1.accelerateForwardWheel = 0;
_local1.accelerateBackWheel = 50;
_local1.brakeForwardWheel = 0;
_local1.brakeBackWheel = 0;
return(_local1);
}
function setVehicleParam(param) {
m_accPercMultForTurn = param.accPercMult;
m_normalYLimitForTurn = param.normalYLimit;
m_koeffPrimaryForTurn = param.koeffPrimary;
m_koeffSecondaryForTurn = param.koeffSecondary;
m_accPercBaseForTurn = param.accPercBase;
m_accForwardWheel = param.accelerateForwardWheel;
m_accBackWheel = param.accelerateBackWheel;
m_brakeForwardWheel = param.brakeForwardWheel;
m_brakeBackWheel = param.brakeBackWheel;
}
function processKey(mask) {
if ((mask & KM_ACCELERATE) != 0) {
accelerate();
} else if ((mask & KM_BRAKE) != 0) {
brake();
} else {
stopAccelerate();
}
if ((mask & KM_MOVE_BODY_FORWARD) != 0) {
turnTo(DIR_RIGHT, m_accPercMultForTurn);
} else if ((mask & KM_MOVE_BODY_BACK) != 0) {
turnTo(DIR_LEFT, m_accPercMultForTurn);
}
}
function process() {
m_vehicleDir.init(m_forwardWheel.__get__pos().x - m_backWheel.__get__pos().x, m_forwardWheel.__get__pos().y - m_backWheel.__get__pos().y);
m_vehicleNormal.init(m_vehicleDir.x, m_vehicleDir.y);
m_vehicleNormal.normalize();
var _local4 = m_vehicleNormal.x;
m_vehicleNormal.x = -m_vehicleNormal.y;
m_vehicleNormal.y = _local4;
m_vehicleAngle = Math.atan2(m_vehicleDir.y, m_vehicleDir.x) * VAL_180_DIV_PI;
m_vehicleMovie._rotation = m_vehicleAngle;
var _local3 = new Object();
_local3.x = m_bodyMovie.mcB._x;
_local3.y = m_bodyMovie.mcB._y;
m_bodyMovie.localToGlobal(_local3);
m_vehicleMovie._parent.globalToLocal(_local3);
var _local2 = new Object();
_local2.x = m_bodyMovie.mcC._x;
_local2.y = m_bodyMovie.mcC._y;
m_bodyMovie.localToGlobal(_local2);
m_vehicleMovie._parent.globalToLocal(_local2);
m_vehicleMovie._x = m_vehicleMovie._x + ((((m_vehicleParam.__get__B().__get__pos().x - _local3.x) + m_vehicleParam.__get__C().__get__pos().x) - _local2.x) / 2);
m_vehicleMovie._y = m_vehicleMovie._y + ((((m_vehicleParam.__get__B().__get__pos().y - _local3.y) + m_vehicleParam.__get__C().__get__pos().y) - _local2.y) / 2);
}
function drawSuspension() {
if (!m_vehicleMovie._parent.sus_mc) {
m_vehicleMovie._parent.createEmptyMovieClip("sus_mc", 1015);
m_vehicleMovie._parent.sus_mc._x = (m_vehicleMovie._parent.sus_mc._y = 0);
}
var _local2 = m_vehicleMovie._parent.sus_mc;
_local2.clear();
_local2.lineStyle(5, 16777215, 100);
_local2.moveTo(m_vehicleParam.__get__A().__get__pos().x, m_vehicleParam.__get__A().__get__pos().y);
_local2.lineTo(m_vehicleParam.__get__B().__get__pos().x, m_vehicleParam.__get__B().__get__pos().y);
_local2.lineTo(m_vehicleParam.__get__C().__get__pos().x, m_vehicleParam.__get__C().__get__pos().y);
_local2.lineTo(m_vehicleParam.__get__A().__get__pos().x, m_vehicleParam.__get__A().__get__pos().y);
_local2.moveTo(m_vehicleParam.__get__D().__get__pos().x, m_vehicleParam.__get__D().__get__pos().y);
_local2.lineTo(m_vehicleParam.__get__B().__get__pos().x, m_vehicleParam.__get__B().__get__pos().y);
_local2.lineTo(m_vehicleParam.__get__C().__get__pos().x, m_vehicleParam.__get__C().__get__pos().y);
_local2.lineTo(m_vehicleParam.__get__D().__get__pos().x, m_vehicleParam.__get__D().__get__pos().y);
}
function turnTo(dir, turnPower) {
t_turnToPerc = ((Math.abs(m_vehicleNormal.y) * (1 - m_accPercBaseForTurn)) + m_accPercBaseForTurn) * turnPower;
var _local3;
var _local2;
_local3 = m_vehicleNormal.x * t_turnToPerc;
_local2 = m_vehicleNormal.y * t_turnToPerc;
if (m_vehicleNormal.y > (-m_normalYLimitForTurn)) {
if (dir == DIR_RIGHT) {
if (!m_forwardWheel.hasIntersection()) {
m_forwardWheel.__get__accelerate().plusXY(_local3 * m_koeffPrimaryForTurn, _local2 * m_koeffPrimaryForTurn);
}
m_backWheel.__get__accelerate().plusXY((-_local3) * m_koeffSecondaryForTurn, (-_local2) * m_koeffSecondaryForTurn);
} else {
m_forwardWheel.__get__accelerate().plusXY((-_local3) * m_koeffSecondaryForTurn, (-_local2) * m_koeffSecondaryForTurn);
if (!m_backWheel.hasIntersection()) {
m_backWheel.__get__accelerate().plusXY(_local3 * m_koeffPrimaryForTurn, _local2 * m_koeffPrimaryForTurn);
}
}
}
}
function accelerate() {
if (!m_vehicleMovie._parent._parent._parent.bodyCrash) {
m_backWheel.setAccelerate(m_accBackWheel);
m_forwardWheel.setAccelerate(m_accForwardWheel);
}
}
function brake() {
if (!m_vehicleMovie._parent._parent._parent.bodyCrash) {
m_backWheel.setAccelerate(m_brakeBackWheel);
m_forwardWheel.setAccelerate(m_brakeForwardWheel);
}
}
function stopAccelerate() {
m_backWheel.setAccelerate(0);
m_forwardWheel.setAccelerate(0);
}
function get backWheel() {
return(m_backWheel);
}
function get forwardWheel() {
return(m_forwardWheel);
}
function onGround() {
return(m_backWheel.hasIntersection() || (m_forwardWheel.hasIntersection()));
}
static var VAL_180_DIV_PI = 57.2957795130823;
static var DIR_RIGHT = 0;
static var DIR_LEFT = 1;
static var KM_NONE = 0;
static var KM_ACCELERATE = 1;
static var KM_BRAKE = 2;
static var KM_MOVE_BODY_FORWARD = 4;
static var KM_MOVE_BODY_BACK = 8;
}
Symbol 228 MovieClip [__Packages.com.ACA.util.Vector] Frame 0
class com.ACA.util.Vector
{
var x, y;
function Vector (nx, ny) {
init(nx, ny);
}
function init(nx, ny) {
x = nx;
y = ny;
}
function copyFrom(v) {
x = v.x;
y = v.y;
}
function copyTo(v) {
v.x = x;
v.y = y;
}
function plusXY(nx, ny) {
x = x + nx;
y = y + ny;
}
static function getDistanceBetween(p1, p2) {
var _local2 = p1.x - p2.x;
var _local1 = p1.y - p2.y;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
function duplicate() {
return(new com.ACA.util.Vector(x, y));
}
function minus(v) {
x = x - v.x;
y = y - v.y;
}
function minusNew(v) {
return(new com.ACA.util.Vector(x - v.x, y - v.y));
}
function normalize() {
var _local2 = Math.sqrt((x * x) + (y * y));
x = x / _local2;
y = y / _local2;
}
function reverseNew() {
return(new com.ACA.util.Vector(-x, -y));
}
function scalar(v) {
return((x * v.x) + (y * v.y));
}
function modul() {
return(Math.sqrt((x * x) + (y * y)));
}
function rotate(u) {
var _local4 = x;
var _local3 = y;
x = (_local4 * Math.cos(u)) - (_local3 * Math.sin(u));
y = (_local4 * Math.sin(u)) + (_local3 * Math.cos(u));
}
function rotateNew(u) {
return(new com.ACA.util.Vector((x * Math.cos(u)) - (y * Math.sin(u)), (x * Math.sin(u)) + (y * Math.cos(u))));
}
function mult(k) {
x = x * k;
y = y * k;
return(this);
}
function multNew(k) {
return(new com.ACA.util.Vector(x * k, y * k));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
}
function plusNew(v) {
return(new com.ACA.util.Vector(x + v.x, y + v.y));
}
function getDistanceTo(p1, p2) {
var _local2 = p1.y - p2.y;
var _local3 = p2.x - p1.x;
var _local5 = (p1.x * (p2.y - p1.y)) - (p1.y * (p2.x - p1.x));
var _local6 = Math.sqrt((_local2 * _local2) + (_local3 * _local3));
_local2 = _local2 / _local6;
_local3 = _local3 / _local6;
_local5 = _local5 / _local6;
return(((_local2 * x) + (_local3 * y)) + _local5);
}
}
Symbol 229 MovieClip [__Packages.com.ACA.composites.Composite] Frame 0
class com.ACA.composites.Composite
{
var m_A, m_B, m_C, m_D, m_AB, m_AC, m_AD, m_BC, m_BD, m_CD, m_ABC, m_DCB;
function Composite () {
}
function get A() {
return(m_A);
}
function get B() {
return(m_B);
}
function get C() {
return(m_C);
}
function get D() {
return(m_D);
}
function get AB() {
return(m_AB);
}
function get AC() {
return(m_AC);
}
function get AD() {
return(m_AD);
}
function get BC() {
return(m_BC);
}
function get BD() {
return(m_BD);
}
function get CD() {
return(m_CD);
}
function init(a, b, c, d, ab, ac, ad, bc, bd, cd) {
m_A = a;
m_B = b;
m_C = c;
m_D = d;
m_AB = ab;
m_AB.__set__p1(a);
m_AB.__set__p2(b);
m_AC = ac;
m_AC.__set__p1(a);
m_AC.__set__p2(c);
m_AD = ad;
m_AD.__set__p1(a);
m_AD.__set__p2(d);
m_BC = bc;
m_BC.__set__p1(b);
m_BC.__set__p2(c);
m_BD = bd;
m_BD.__set__p1(b);
m_BD.__set__p2(d);
m_CD = cd;
m_CD.__set__p1(c);
m_CD.__set__p2(d);
m_ABC = new com.ACA.constraints.AngularConstraint(m_D, m_C, m_B);
m_DCB = new com.ACA.constraints.AngularConstraint(m_A, m_B, m_C);
return(this);
}
function changeGeometry(pA, pB, pC, pD) {
m_A.moveTo(pA.x, pA.y);
m_B.moveTo(pB.x, pB.y);
m_C.moveTo(pC.x, pC.y);
m_D.moveTo(pD.x, pD.y);
m_AB.fixDistance();
m_AC.fixDistance();
m_AD.fixDistance();
m_BC.fixDistance();
m_BD.fixDistance();
m_CD.fixDistance();
m_ABC.fixDistance();
m_DCB.fixDistance();
}
function addToEngine(engine) {
engine.addParticle(m_A);
engine.addParticle(m_B);
engine.addParticle(m_C);
engine.addParticle(m_D);
engine.addConstraint(m_AB);
engine.addConstraint(m_AC);
engine.addConstraint(m_AD);
engine.addConstraint(m_BC);
engine.addConstraint(m_BD);
engine.addConstraint(m_CD);
engine.addConstraint(m_ABC);
engine.addConstraint(m_DCB);
}
}
Symbol 230 MovieClip [__Packages.com.ACA.primitives.Particle] Frame 0
class com.ACA.primitives.Particle
{
var m_curPosition, m_prevPosition, m_accelerate, m_buckup, m_mass, m_mc;
function Particle () {
m_curPosition = new com.ACA.util.Vector();
m_prevPosition = new com.ACA.util.Vector();
m_accelerate = new com.ACA.util.Vector();
m_buckup = new com.ACA.util.Vector();
}
function get mass() {
return(m_mass);
}
function set mass(nMass) {
m_mass = nMass;
//return(mass);
}
function get accelerate() {
return(m_accelerate);
}
function set accelerate(acc) {
m_accelerate = acc;
//return(accelerate);
}
function get prevPos() {
return(m_prevPosition);
}
function set prevPos(pos) {
m_prevPosition = pos;
//return(prevPos);
}
function get pos() {
return(m_curPosition);
}
function set pos(pos) {
m_curPosition = pos;
//return(this.pos);
}
function initParticle(x, y, mass, mc) {
if (x == undefined) {
x = 0;
}
if (y == undefined) {
y = 0;
}
if (mass == undefined) {
mass = 1;
}
moveTo(x, y);
m_mass = mass;
m_accelerate.x = 0;
m_accelerate.y = 0;
if (mc) {
setMovie(mc);
}
return(this);
}
function moveTo(nx, ny) {
m_curPosition.x = (m_prevPosition.x = nx);
m_curPosition.y = (m_prevPosition.y = ny);
synchronizeMovie();
}
function verlet(dTime, koeffDamp) {
m_buckup.copyFrom(m_curPosition);
m_curPosition.x = m_curPosition.x + (((m_curPosition.x - m_prevPosition.x) * koeffDamp) + (m_accelerate.x * dTime));
m_curPosition.y = m_curPosition.y + (((m_curPosition.y - m_prevPosition.y) * koeffDamp) + (m_accelerate.y * dTime));
m_buckup.copyTo(m_prevPosition);
synchronizeMovie();
}
function checkCollision(hitMovie) {
}
function synchronizeMovie() {
}
function moveMovieToCurentPosition() {
m_mc._x = m_curPosition.x;
m_mc._y = m_curPosition.y;
}
function setMovie(mc) {
if ((mc == null) || (mc == undefined)) {
synchronizeMovie = function () {
};
m_mc = null;
} else {
m_mc = mc;
synchronizeMovie = moveMovieToCurentPosition;
}
}
function getMovie() {
return(m_mc);
}
}
Symbol 231 MovieClip [__Packages.com.ACA.primitives.Wheel] Frame 0
class com.ACA.primitives.Wheel extends com.ACA.primitives.Particle
{
var m_rim, m_speed, rot, m_radius, m_acceleration, initParticle, m_koeffSpring, m_koeffSlip, m_maxAccSpeed, m_accSpeed, intersectionFlag, lastIntersPoint, lastN, hitPointArray, normalArray, hitArray, intersArray, n_part, oldPos, _p, _n, p3, m_prevPosition, synchronizeMovie, m_mc, m_curPosition;
function Wheel () {
super();
}
function setRotationMovie(rotationMovie) {
if ((rotationMovie == undefined) || (rotationMovie == null)) {
rotateMovie = function () {
};
m_rim = null;
} else {
rotateMovie = rmovie;
m_rim = rotationMovie;
}
}
function rmovie() {
if ((m_speed < 0.5) && (m_speed > -0.5)) {
_root.game.b._Level.mcVehiclePlace._dmCarBody.hamsteri.hamster1.hamster_in.stop();
_root.game.b._Level.mcVehiclePlace._dmCarBody.hamsteri.hamster2.hamster_in.stop();
} else {
_root.game.b._Level.mcVehiclePlace._dmCarBody.hamsteri.hamster1.hamster_in.play();
_root.game.b._Level.mcVehiclePlace._dmCarBody.hamsteri.hamster2.hamster_in.play();
}
rot.rotate(m_speed / m_radius);
m_rim._rotation = Math.atan2(rot.y, rot.x) * ANGLE_180_DIV_PI;
_root.game.b._Level.mcVehiclePlace._dmCarBody.hamsteri.gotoAndStop(Math.floor(m_rim._rotation + 180));
}
function setAccelerate(nAccelerate) {
m_acceleration = nAccelerate;
}
function getAccelerate() {
return(m_acceleration);
}
function initWheel(x, y, mass, rad, maxAccSpeed, mc, rotationMovie, koeffSpring, koeffSlip) {
_innerInit();
initParticle(x, y, mass, mc);
if (koeffSpring == undefined) {
koeffSpring = 0.1;
}
if (koeffSlip == undefined) {
koeffSlip = 0.1;
}
m_koeffSpring = koeffSpring;
m_koeffSlip = koeffSlip;
setRotationMovie(rotationMovie);
m_radius = rad;
m_maxAccSpeed = maxAccSpeed;
m_speed = 0;
m_accSpeed = 0;
rot = new com.ACA.util.Vector(1, 0);
intersectionFlag = false;
lastIntersPoint = new com.ACA.util.Vector(0, 0);
lastN = new com.ACA.util.Vector(0, 0);
var _local3 = (Math.PI*2) / m_hitCount;
hitPointArray = new Array(m_hitCount);
normalArray = new Array(m_hitCount);
hitArray = new Array(m_hitCount);
intersArray = new Array();
var _local2 = 0;
while (_local2 < m_hitCount) {
hitPointArray[_local2] = new com.ACA.util.Vector(Math.sin(_local3 * _local2) * m_radius, (-Math.cos(_local3 * _local2)) * m_radius);
normalArray[_local2] = hitPointArray[_local2].multNew(-1);
normalArray[_local2].normalize();
_local2++;
}
m_acceleration = 0;
return(this);
}
function verlet(dTime, koeffDamp) {
super.verlet(dTime, koeffDamp);
m_accSpeed = Math.max(-m_maxAccSpeed, Math.min(m_maxAccSpeed, m_accSpeed + (m_acceleration * dTime)));
m_speed = Math.max((-m_maxSpeed) * dTime, Math.min((m_speed * koeffDamp) + m_accSpeed, m_maxSpeed * dTime));
rotateMovie();
}
function rotateMovie() {
}
function _innerInit() {
n_part = new com.ACA.util.Vector(0, 0);
oldPos = new com.ACA.util.Vector(0, 0);
_p = new com.ACA.util.Vector(0, 0);
_n = new com.ACA.util.Vector(0, 0);
p3 = new com.ACA.util.Vector(0, 0);
}
function checkCollision(hit_mc) {
var _local14 = false;
var _local3 = 0;
var _local4 = 0;
var _local15 = 0;
_p.init(0, 0);
oldPos.init(m_prevPosition.x, m_prevPosition.y);
_n.init(0, 0);
n_part.init(0, 0);
synchronizeMovie();
var _local6 = 0;
while (_local6 < m_hitCount) {
hitPointArray[_local6].copyTo(_p);
m_mc.localToGlobal(_p);
hitArray[_local6] = hit_mc.hitTest(_p.x, _p.y, true);
if (hitArray[_local6]) {
_local14 = true;
_local3 = _local6;
_local15++;
}
_local6++;
}
if (_local15 == m_hitCount) {
m_curPosition.x = m_prevPosition.x + ((m_curPosition.x - m_prevPosition.x) * 0.3);
m_curPosition.y = m_prevPosition.y + ((m_curPosition.y - m_prevPosition.y) * 0.3);
synchronizeMovie();
return(undefined);
}
if (_local14) {
var _local2 = 0;
while (true) {
_local2++;
if (_local2 == m_hitCount) {
_local2 = 0;
}
if (!hitArray[_local2]) {
_local3 = -1;
var _local5 = 0;
while (_local5 < m_hitCount) {
_local2++;
if (_local2 == m_hitCount) {
_local2 = 0;
}
if (_local3 == -1) {
if (hitArray[_local2]) {
_local3 = _local2;
_n.plus(normalArray[_local2]);
normalArray[_local2].copyTo(n_part);
}
} else if (!hitArray[_local2]) {
_local4 = _local2 - 1;
if (_local4 < 0) {
_local4 = m_hitCount - 1;
}
intersArray.push({k1:_local3, k2:_local4, n:new com.ACA.util.Vector(n_part.x, n_part.y)});
_local3 = -1;
} else {
_n.plus(normalArray[_local2]);
n_part.plus(normalArray[_local2]);
}
_local5++;
}
break;
}
}
p3.init(0, 0);
if (intersArray.length > 0) {
_n.normalize();
if (intersectionFlag) {
_n.x = _n.x + lastN.x;
_n.y = _n.y + lastN.y;
_n.x = _n.x / 2;
_n.y = _n.y / 2;
}
var _local16 = intersArray.length;
var _local7;
var _local10 = 0;
while (_local10 < _local16) {
_local7 = intersArray.pop();
_local3 = _local7.k1;
_local4 = _local7.k2;
_local7.n.copyTo(n_part);
m_curPosition.minusNew(m_prevPosition).copyTo(p3);
if (_n.scalar(p3) < 0) {
var _local12 = Math.atan2(_n.y, _n.x);
p3.rotate(-_local12);
p3.x = (-p3.x) * m_koeffSpring;
p3.rotate(_local12);
pushOut(_local3, _local4, n_part, hit_mc);
m_prevPosition.x = m_curPosition.x - p3.x;
m_prevPosition.y = m_curPosition.y - p3.y;
} else {
pushOut(_local3, _local4, n_part, hit_mc);
}
_local10++;
}
validateRotation(_n, oldPos);
intersectionFlag = true;
m_curPosition.copyTo(lastIntersPoint);
_n.copyTo(lastN);
}
} else if (intersectionFlag) {
validateRotation(lastN, oldPos);
intersectionFlag = false;
}
synchronizeMovie();
}
function pushOut(k1, k2, n, hit_mc) {
n.normalize();
if (k1 != k2) {
var _local9 = new com.ACA.util.Vector(0, 0);
var _local8 = _local9.getDistanceTo(hitPointArray[k1], hitPointArray[k2]);
_local8 = m_radius - Math.abs(_local8);
m_curPosition.plus(n.multNew(_local8));
m_prevPosition.plus(n.multNew(_local8));
} else {
var _local6 = n.multNew(-m_radius);
var _local4 = new com.ACA.util.Vector(0, 0);
var _local5 = 0;
var _local3 = 0.03;
if (true) {
_local6.copyTo(_local4);
m_mc.localToGlobal(_local4);
if (hit_mc.hitTest(_local4.x, _local4.y, true)) {
_local5++;
m_curPosition.x = m_curPosition.x + (n.x * _local3);
m_curPosition.y = m_curPosition.y + (n.y * _local3);
synchronizeMovie();
// unexpected jump
}
_local5--;
m_curPosition.x = m_curPosition.x - (n.x * _local3);
m_curPosition.y = m_curPosition.y - (n.y * _local3);
m_prevPosition.plus(n.multNew(_local3 * _local5));
}
}
}
function validateRotation(n, oldPos) {
if ((!intersectionFlag) && (Math.abs(m_accSpeed) > 0.01)) {
if (Math.abs(m_accSpeed) < ((m_maxAccSpeed * 0.02) / 2)) {
m_accSpeed = 0;
} else if (m_accSpeed > 0) {
m_accSpeed = m_maxAccSpeed * 0.02;
} else {
m_accSpeed = (-m_maxAccSpeed) * 0.02;
}
}
var _local3 = new com.ACA.util.Vector(-n.y, n.x);
var _local6 = m_curPosition.minusNew(oldPos);
var _local5 = Math.atan2(_local3.y, _local3.x);
var _local2 = _local6.rotateNew(-_local5);
m_speed = _local2.x + m_accSpeed;
_local2.y = 0;
_local2.rotate(_local5);
var _local4 = 1 - m_koeffSlip;
m_curPosition.x = (m_curPosition.x + ((_local3.x * m_accSpeed) * _local4)) - (m_koeffFriction * _local2.x);
m_curPosition.y = (m_curPosition.y + ((_local3.y * m_accSpeed) * _local4)) - (m_koeffFriction * _local2.y);
m_accSpeed = m_accSpeed * m_koeffSlip;
}
function hasIntersection() {
return(intersectionFlag);
}
static var m_maxSpeed = 270;
static var m_hitCount = 16;
static var m_koeffFriction = 0.03;
static var ANGLE_180_DIV_PI = 57.2957795130823;
}
Symbol 232 MovieClip [__Packages.com.ACA.constraints.SpringConstraint] Frame 0
class com.ACA.constraints.SpringConstraint
{
var _p1, _p2, coeffV, coeffH, restLen;
function SpringConstraint () {
}
function set p1(nP1) {
_p1 = nP1;
//return(p1);
}
function get p1() {
return(_p1);
}
function set p2(nP2) {
_p2 = nP2;
//return(p2);
}
function get p2() {
return(_p2);
}
function init(cV, cH, p1, p2) {
if (p1) {
_p1 = p1;
_p2 = p2;
}
if (cV) {
coeffV = cV;
coeffH = cH;
}
fixDistance();
return(this);
}
function fixDistance() {
restLen = com.ACA.util.Vector.getDistanceBetween(_p1.__get__pos(), _p2.__get__pos());
}
function resolve() {
var _local9 = _p1.__get__pos().minusNew(_p2.__get__pos());
var _local2 = com.ACA.util.Vector.getDistanceBetween(_p1.__get__pos(), _p2.__get__pos());
var _local8 = (_local2 - restLen) / _local2;
var _local3;
if (_local2 > restLen) {
_local3 = coeffH;
} else {
_local3 = coeffV;
}
var _local6 = _p1.__get__mass();
var _local5 = _p2.__get__mass();
var _local7 = (_local8 * _local3) / (_local6 + _local5);
var _local4 = _local9.multNew(_local7);
_p1.__get__pos().minus(_local4.multNew(_local6));
_p2.__get__pos().plus(_local4.multNew(_local5));
}
}
Symbol 233 MovieClip [__Packages.com.ACA.constraints.AngularConstraint] Frame 0
class com.ACA.constraints.AngularConstraint
{
var p0, p1, p2, sign;
function AngularConstraint (np0, np1, np2) {
p0 = np0;
p1 = np1;
p2 = np2;
fixDistance();
}
function fixDistance() {
sign = p0.__get__pos().getDistanceTo(p1.__get__pos(), p2.__get__pos());
if (sign < 0) {
sign = -1;
} else {
sign = 1;
}
}
function resolve() {
var _local3 = p0.__get__pos().getDistanceTo(p1.__get__pos(), p2.__get__pos());
if ((sign * _local3) <= 1) {
var _local2 = new com.ACA.util.Vector(p2.__get__pos().x, p2.__get__pos().y);
_local2.minus(p1.__get__pos());
_local2.normalize();
_local2.rotate(PI2 * sign);
_local2.mult(Math.abs(_local3) + 1);
p1.__get__pos().minus(_local2);
}
}
static var PI2 = (Math.PI/2);
}
Symbol 234 MovieClip [__Packages.com.UI.Truck] Frame 0
class com.UI.Truck extends com.ACA.Vehicle
{
var bornTime, inProcess, mode, getKeys, m_vehicleMovie, cartemp, flipTime, construct, setVehicleParam, m_forwardWheel, m_backWheel, m_accForwardWheel, processKey;
function Truck () {
super();
bornTime = getTimer();
inProcess = true;
mode = true;
getKeys = true;
}
function get image() {
return(m_vehicleMovie);
}
function init(carPlace, engine) {
cartemp = carPlace;
flipTime = getTimer();
if (carPlace.xx == undefined) {
carPlace.xx = carPlace._x;
}
if (carPlace.yy == undefined) {
carPlace.yy = carPlace._y;
}
carPlace._x = (carPlace._y = 0);
var _local4 = carPlace.attachMovie("truckbody", "_dmCarBody", 100);
var _local15 = carPlace.attachMovie("wheel", "_dmWheel1", 1010);
var _local12 = carPlace.attachMovie("wheel", "_dmWheel2", 1020);
_local4._x = carPlace.xx;
_local4._y = carPlace.yy;
var _local16 = new com.ACA.primitives.Wheel();
var _local13 = new com.ACA.primitives.Wheel();
var _local10 = new com.ACA.primitives.Particle();
var _local9 = new com.ACA.primitives.Particle();
var _local8 = new com.ACA.constraints.SpringConstraint();
var _local7 = new com.ACA.constraints.SpringConstraint();
var _local6 = new com.ACA.constraints.SpringConstraint();
var _local18 = new com.ACA.constraints.SpringConstraint();
var _local17 = new com.ACA.constraints.SpringConstraint();
var _local14 = new com.ACA.constraints.SpringConstraint();
var _local5 = new com.ACA.composites.Composite();
_local5.init(_local16.initWheel(0, 0, 5, 35, 160), _local10.initParticle(0, 0, 4), _local9.initParticle(0, 0, 4), _local13.initWheel(0, 0, 5, 35, 180), _local8.init(0.2, 0.2), _local7.init(0.5, 0.5), _local6.init(0.7, 0.7), _local18.init(0.9, 0.9), _local17.init(0.8, 0.8), _local14.init(0.2, 0.2));
construct(_local5, _local4, _local4, _local15, _local12);
engine.__set__gravity(7);
var _local3 = com.ACA.Vehicle.getDefaultVehicleParam();
_local3.accelerateForwardWheel = 40;
_local3.accelerateBackWheel = 40;
_local3.brakeForwardWheel = -10;
_local3.brakeBackWheel = -20;
_local3.accPercMult = engine.__get__gravity() * 6;
_local3.normalYLimit = 0.9;
setVehicleParam(_local3);
_local5.addToEngine(engine);
}
function killmen() {
m_vehicleMovie.catapulta.play();
}
function stopCar(stopPoint) {
if (m_forwardWheel.m_speed > 2) {
m_backWheel.setAccelerate(-10);
m_forwardWheel.setAccelerate(-10);
} else if (m_vehicleMovie._x < stopPoint) {
m_forwardWheel.setAccelerate(m_accForwardWheel);
} else if (m_vehicleMovie._x > (stopPoint + 50)) {
m_backWheel.setAccelerate(-10);
m_forwardWheel.setAccelerate(-10);
}
}
function process() {
var _local3 = 0;
if (inProcess) {
if (!m_vehicleMovie._parent._parent._parent.bodyCrash) {
if (getKeys) {
if (Key.isDown(37)) {
_local3 = _local3 | com.ACA.Vehicle.KM_MOVE_BODY_BACK;
} else if (Key.isDown(39)) {
_local3 = _local3 | com.ACA.Vehicle.KM_MOVE_BODY_FORWARD;
}
}
if (Key.isDown(38)) {
_local3 = _local3 | com.ACA.Vehicle.KM_ACCELERATE;
m_vehicleMovie.carlegs.play();
} else if (Key.isDown(40)) {
_local3 = _local3 | com.ACA.Vehicle.KM_BRAKE;
m_vehicleMovie.carlegs.gotoAndPlay(6);
}
} else if (Key.isDown(38) && (Key.isDown(37))) {
moveFor();
} else if (Key.isDown(38) && (Key.isDown(39))) {
moveBack();
}
}
processKey(_local3);
super.process();
}
function moveFor() {
m_backWheel.__get__accelerate().plusXY(0, -100);
}
function moveBack() {
m_forwardWheel.__get__accelerate().plusXY(0, -100);
}
function getMC() {
return(m_vehicleMovie);
}
function getHitForBonus() {
return(m_vehicleMovie.mcHit);
}
function checkDeathPoints(hitMov) {
var _local2 = new Object();
for (var _local4 in m_vehicleMovie.mcDeathPoints) {
_local2.x = m_vehicleMovie.mcDeathPoints[_local4]._x;
_local2.y = m_vehicleMovie.mcDeathPoints[_local4]._y;
m_vehicleMovie.mcDeathPoints.localToGlobal(_local2);
if (hitMov.hitTest(_local2.x, _local2.y, true)) {
return(true);
}
}
return(false);
}
function chkDeath(ht) {
var _local2 = new Object();
for (var _local4 in m_vehicleMovie.mcDeathPoints) {
_local2.x = m_vehicleMovie.mcDeathPoints[_local4]._x;
_local2.y = m_vehicleMovie.mcDeathPoints[_local4]._y;
m_vehicleMovie.mcDeathPoints.localToGlobal(_local2);
if (ht.hitTest(_local2.x, _local2.y, true)) {
return(true);
}
}
return(false);
}
static var TRICK_ANGLE = 130;
static var EVENT_TRICK = "trick";
static var TRICK_FRONT_FLIP = 0;
static var TRICK_BACK_FLIP = 1;
}
Symbol 235 MovieClip [__Packages.com.sound.CSound] Frame 0
class com.sound.CSound
{
static var instance;
var engineStart, engineLoop, bgsnd, truck_snd, welcome, trickotreat, sndVol, truckstart, truckblast, zoombiesnd, truckidle;
function CSound () {
engineStart = new Sound();
engineStart.attachSound("engineStart");
engineLoop = new Sound();
engineLoop.attachSound("engineLoop");
bgsnd = new Sound();
bgsnd.attachSound("bgsnd");
truck_snd = new Sound();
truck_snd.attachSound("truck_snd");
welcome = new Sound();
welcome.attachSound("welcome");
trickotreat = new Sound();
trickotreat.attachSound("trickotreat");
sndVol = new Sound();
truckstart = new Sound();
truckstart.attachSound("bg1");
truckstart.setVolume(40);
truckblast = new Sound();
truckblast.attachSound("blast");
zoombiesnd = new Sound();
zoombiesnd.attachSound("zoombiesnd");
truckstart.onSoundComplete = function () {
this.start(0, 1);
};
truckidle.onSoundComplete = function () {
this.start(0, 1);
};
instance = this;
}
function sndvolon() {
sndVol.setVolume(100);
}
function sndvoloff() {
sndVol.setVolume(0);
}
function playBgsnd() {
stopBgsnd();
truckstart.start(0.999999);
bgsnd.start(0, 999999999);
bgsnd.setVolume(50);
}
function stopBgsnd() {
bgsnd.stop();
}
function playStartsnd() {
truckstart.stop();
truckstart.start(0, 9999999);
}
function stopSnds() {
stopBgsnd();
truckstart.stop();
truckidle.stop();
}
function playWelcome() {
welcome.start(0, 1);
}
function playEngineStart() {
engineStart.start(0, 1);
}
function playEngineLoop() {
engineLoop.start(0, 9999999);
}
function playBlastsnd() {
truckblast.start(0, 1);
}
function playTrick() {
trickotreat.start(0, 1);
}
}
Symbol 102 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 5
stop();
Symbol 104 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 5
stop();
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 25
_root.ins = false;
_root.gotoAndStop("game");
gotoAndStop (1);
Instance of Symbol 102 MovieClip in Symbol 107 MovieClip Frame 1
on (rollOver) {
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (6);
}
on (release, keyPress "<Space>") {
_parent.the_black.play();
}
Instance of Symbol 104 MovieClip in Symbol 107 MovieClip Frame 1
on (rollOver) {
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (6);
}
on (release) {
getURL ("http://www.cartitans.com", "_blank");
}
Symbol 116 MovieClip Frame 1
gscore = _root.gamescore1;
tim = _parent._parent._parent._parent._parent.scorepanel.timer;
Symbol 118 MovieClip Frame 1
stop();
Symbol 118 MovieClip Frame 5
stop();
Instance of Symbol 118 MovieClip in Symbol 119 MovieClip Frame 1
on (rollOver) {
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (6);
}
on (release) {
_root.gamescore = _root.gamescore - _root.levelscore;
_root.game.gotoAndPlay(2);
_parent._parent.removeMovieClip();
}
Instance of Symbol 104 MovieClip in Symbol 119 MovieClip Frame 1
on (rollOver) {
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (6);
}
on (press) {
getURL ("http://www.cartitans.com", "_blank");
}
Symbol 120 MovieClip Frame 21
stop();
Symbol 121 MovieClip Frame 1
Symbol 121 MovieClip Frame 21
stop();
Symbol 122 MovieClip Frame 6
stop();
Symbol 129 MovieClip Frame 1
var se = _parent._parent._parent._parent._parent.scorepanel.timer;
var s = se.split(":")[1];
lscore = (_root.levelscore - (_root.dieCount * 100)) + (Number(s) * 100);
gscore = _root.gamescore1;
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 5
stop();
Instance of Symbol 131 MovieClip in Symbol 132 MovieClip Frame 1
on (rollOver) {
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (6);
}
on (release) {
_root.dieCount = 0;
_root.gamescore1 = 0;
_root.currentlevel = 1;
_root.gotoAndStop("start");
_parent._parent.removeMovieClip();
}
Instance of Symbol 104 MovieClip in Symbol 132 MovieClip Frame 1
on (rollOver) {
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (6);
}
on (release) {
getURL ("http://www.cartitans.com", "_blank");
}
Symbol 133 MovieClip Frame 21
stop();
Symbol 134 MovieClip Frame 12
stop();
Symbol 135 MovieClip Frame 39
stop();
Symbol 144 MovieClip Frame 1
stop();
gotoAndStop(_root.currentlevel);
Symbol 149 MovieClip Frame 1
var se = _parent._parent._parent._parent._parent.scorepanel.timer;
var s = se.split(":")[1];
lscore = (_root.levelscore - (_root.dieCount * 100)) + (Number(s) * 100);
gscore = _root.gamescore1;
Instance of Symbol 102 MovieClip in Symbol 150 MovieClip Frame 1
on (rollOver) {
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (11);
}
on (release) {
_root.dieCount = 0;
_root.currentlevel++;
_parent._parent._parent._parent.play();
}
Instance of Symbol 104 MovieClip in Symbol 150 MovieClip Frame 1
on (rollOver) {
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (6);
}
on (release) {
getURL ("http://www.cartitans.com", "_blank");
}
Symbol 151 MovieClip Frame 21
stop();
Symbol 152 MovieClip Frame 12
stop();
Symbol 153 MovieClip Frame 21
stop();
Symbol 153 MovieClip Frame 32
_root.game.gotoAndPlay(1);
Symbol 161 MovieClip Frame 1
stop();
gotoAndStop(_root.currentlevel);
Symbol 162 MovieClip Frame 90
stop();
_root.game.scorepanel._visible = true;
_root.game.sbar._visible = true;
Symbol 165 MovieClip Frame 81
_parent.gotoAndStop("die");
Symbol 166 MovieClip [popup] Frame 1
stop();
Symbol 166 MovieClip [popup] Frame 8
stop();
Symbol 166 MovieClip [popup] Frame 14
stop();
Symbol 166 MovieClip [popup] Frame 21
stop();
Symbol 166 MovieClip [popup] Frame 27
stop();
Symbol 166 MovieClip [popup] Frame 33
stop();
Instance of Symbol 94 MovieClip "hamster_in" in Symbol 172 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._parent._parent._parent._rotation;
}
Symbol 197 MovieClip Frame 1
stop();
Symbol 208 MovieClip Frame 1
stop();
Symbol 215 Button
on (release) {
getURL ("http://www.cartitans.com", "_blank");
}
Symbol 223 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 2
stop();