Frame 1
totalBytes = Math.round(getBytesTotal() / 1024);
loadedBytes = Math.round(getBytesLoaded() / 1024);
percentDone = Math.round((loadedBytes / totalBytes) * 100);
percentone = totalBytes / 100;
percent = Math.round(loadedBytes / percentone);
if (_root._framesloaded >= _root._totalframes) {
gotoAndStop (5);
}
Instance of Symbol 11 MovieClip in Frame 1
onClipEvent (enterFrame) {
_xscale = (_root.percentDone * 4);
}
Frame 2
gotoAndPlay (1);
Frame 5
stop();
stopAllSounds();
fscommand ("allowscale", false);
Frame 6
stop();
fscommand ("allowscale", false);
Frame 15
fscommand ("allowscale", false);
function getAlphaNum(number) {
toReturn = "";
while (number > 0) {
unite = number % baseAlphaNum;
if (unite < 10) {
toReturn = String.fromCharCode(unite + 48) + toReturn;
} else if (unite < 36) {
toReturn = String.fromCharCode(unite + 55) + toReturn;
} else {
toReturn = String.fromCharCode(unite + 61) + toReturn;
}
number = (number - unite) / baseAlphaNum;
}
return(toReturn);
}
function getNumber(alphanum) {
toReturn = 0;
l = alphanum.length;
i = 0;
while (i < l) {
unite = alphanum.charCodeAt(i);
if ((unite >= 48) && (unite < 58)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 48;
} else if ((unite >= 65) && (unite < 91)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 55;
} else if ((unite >= 97) && (unite < 123)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 61;
}
i++;
}
return(toReturn);
}
function playSurround(show) {
if (show) {
playback._visible = play_btn._visible;
playback.gotoAndPlay(1);
} else {
playback._visible = false;
}
}
function showButtons(vis) {
pause_btn._visible = vis;
play_btn._visible = vis;
stop_btn._visible = vis;
playback._visible = vis;
}
function clicStart() {
if (!_root.timing) {
menuder._visible = false;
if (_root.voitureverte.gare && (_root.voitureverte.replayPlay == false)) {
_root.timer_txt = "00:00:00:00";
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
if (_root.paused) {
} else {
startFrame = frame;
}
_root.paused = false;
_root.timing = true;
}
}
function clicStop() {
_root.timing = false;
_root.paused = false;
_root.timer_txt = "00:00:00:00";
playSurround(true);
menuder._visible = true;
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
amitavaplay = true;
amitavafrm = "2nd";
var vX = _root.voitureverte._x;
var vY = _root.voitureverte._y;
var vRot = _root.voitureverte._rotation;
var xCorps = _root.voitureverte.bustebras._x;
var yCorps = _root.voitureverte.bustebras._y;
var xTete = _root.voitureverte.tete._x;
var yTete = _root.voitureverte.tete._y;
var frame = 0;
var startFrame = 0;
var baseAlphaNum = 62;
var timing = false;
_root.play_btn.onPress = function () {
clicStart();
};
_root.stop_btn.onPress = function () {
clicStop();
};
_root.pause_btn.onPress = function () {
if (_root.timing) {
_root.timing = false;
_root.paused = true;
playSurround(true);
}
};
_root.onEnterFrame = function () {
if (amitavaplay == true) {
if (timing) {
playSurround(false);
elapsedTime = ((frame - startFrame) * 100) / 3;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - (elapsedHours * 3600000);
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - (elapsedM * 60000);
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - (elapsedS * 1000);
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
_root.timer_txt = (((((hours + ":") + minutes) + ":") + seconds) + ":") + hundredths;
frame++;
}
}
};
clicStart();
cr = new Sound();
cr.attachSound("crsh");
Instance of Symbol 117 MovieClip "voitureverte" in Frame 15
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / Math.PI;
Angle2 = ((2 * beta) * 180) / Math.PI;
bustebras.brasgaucheplein._rotation = Angle1;
bustebras.contourbrasgauche._rotation = Angle1;
bustebras.contourbrasgauche.avantbras._rotation = Angle2;
yVolantDroit = corpsDeltaY - posBrasDroitVolant;
yDiff = yVolantDroit + lEpaule;
lEpauleDroiteVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / Math.PI;
Angle2 = ((-(2 * beta)) * 180) / Math.PI;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.75;
maxSpeed = 6;
incRotation = 0;
maxWheelAngle = 38;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 90;
incy = 0;
incx = 0;
_x = _root.vX;
_y = _root.vY;
_rotation = _root.vRot;
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
gare = false;
_root.gagnos._visible = false;
reposBonhommeVolant = 20;
rayonVolant = 8;
posBrasGaucheVolant = 0;
posBrasDroitVolant = 0;
corpsDeltaX = 0;
corpsDeltaY = 0;
maxCorpsDeltaY = 4;
corpsSpeedX = 0;
maxCorpsDeltaX = 8;
minCorpsDeltaX = -5;
corpsDecay = 0.5;
bustebras._x = _root.xCorps + corpsDeltaX;
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaX = 0;
teteDeltaY = 0;
teteDecay = 0.5;
maxTeteDeltaX = 10;
minTeteDeltaX = -8;
teteSpeedX = 0;
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
bustebras._x = _root.xCorps;
bustebras._y = _root.yCorps;
lBras = 14;
lEpaule = 10;
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
}
function initReplayRec() {
replayPlay = false;
}
function hit(clip) {
return(((((((((((((clip.hitTest(arriere) || (clip.hitTest(arrieregauche))) || (clip.hitTest(arrieregauche2))) || (clip.hitTest(gauche))) || (clip.hitTest(avantgauche3))) || (clip.hitTest(avantgauche2))) || (clip.hitTest(avantgauche))) || (clip.hitTest(avant))) || (clip.hitTest(avantdroite))) || (clip.hitTest(avantdroite3))) || (clip.hitTest(avantdroite2))) || (clip.hitTest(droite))) || (clip.hitTest(arrieredroite))) || (clip.hitTest(arrieredroite2)));
}
function keyDownAction(t) {
toreturn = false;
if (t == 39) {
if (incRotation != 5) {
incRotation = 5;
toreturn = true;
}
} else if (t == 37) {
if (incRotation != -5) {
incRotation = -5;
toreturn = true;
}
} else if (t == 40) {
if (incSpeed != -1) {
_root.acc.play();
back = 1;
frnt = 0;
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 1) {
_root.acc.play();
back = 0;
frnt = 1;
incSpeed = 1;
toreturn = true;
}
}
return(toreturn);
}
function keyUpAction(t) {
if (t == 39) {
if (incRotation > 0) {
incRotation = 0;
}
} else if (t == 37) {
if (incRotation < 0) {
incRotation = 0;
}
} else if (t == 40) {
if (incSpeed < 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
}
}
frnt = 0;
back = 0;
init();
initReplayRec();
}
onClipEvent (keyDown) {
if ((_root.timing == true) && (replayPlay == false)) {
t = Key.getCode();
if (keyDownAction(t)) {
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:1, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
}
onClipEvent (keyUp) {
t = Key.getCode();
a = Key.getAscii();
if (a == 115) {
if (((_root.timing == false) && (replayPlay == false)) && (_root.gagnos._visible == false)) {
_root.clicStart();
} else if (_root.timing == true) {
_root.clicStop();
}
} else if ((_root.timing == true) && (replayPlay == false)) {
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if (_root.amitavaplay == true) {
if ((_root.timing == true) && (_root.paused == false)) {
memoX = _x;
memoY = _y;
memoRot = _rotation;
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
if (frnt == 1) {
if (speed > 0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
if (back == 1) {
if (speed < -0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
tuturevertefeuxarr.gotoAndStop(1);
} else {
tuturevertefeuxarr.gotoAndStop(2);
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
}
wheelRotation = wheelRotation + incRotation;
if (wheelRotation > maxWheelAngle) {
wheelRotation = maxWheelAngle;
} else if (wheelRotation < (-maxWheelAngle)) {
wheelRotation = -maxWheelAngle;
}
if (oldRot != wheelRotation) {
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
}
incx = Math.sin((wheelRotation * Math.PI) / 180) * speed;
_rotation = (_rotation + ((Math.atan(incx / carLength) * 180) / Math.PI));
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
incy = Math.cos((wheelRotation * Math.PI) / 180) * speed;
_y = (_y + (Math.sin(((_rotation + 0) * Math.PI) / 180) * incy));
_x = (_x + (Math.cos(((_rotation + 0) * Math.PI) / 180) * incy));
if (_y < 0) {
_y = 550;
}
if (_y > 550) {
_y = 0;
}
if (_x < 0) {
_x = 550;
}
if (_x > 550) {
_x = 0;
}
A = hit(_root.card1.hitarea);
B = hit(_root.caru.hitarea);
C = hit(_root.bound);
CA = hit(_root.boundb);
CB = hit(_root.boundc);
CC = hit(_root.boundd);
D = hit(_root.card2.hitarea);
E = hit(_root.card3.hitarea);
F = hit(_root.card4.hitarea);
G = hit(_root.card5.hitarea);
H = hit(_root.card6.hitarea);
I = hit(_root.caru1.hitarea);
J = hit(_root.caru2.hitarea);
K = hit(_root.caru3.hitarea);
L = hit(_root.caru4.hitarea);
M = hit(_root.caru5.hitarea);
N = hit(_root.caru6.hitarea);
if ((((((((((((((((A || (B)) || (C)) || (CA)) || (CB)) || (CC)) || (D)) || (E)) || (F)) || (M)) || (N)) || (G)) || (H)) || (I)) || (J)) || (K)) || (L)) {
if (Math.abs(speed) > 4) {
_root.cr.start();
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
_root.damg._width = _root.damg._width - 23;
}
if (_root.damg._width < 1) {
_root.mssg = "YOU CRASHED";
_root.gov.play();
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
speed = 0;
incSpeed = 0;
} else {
gagne = ((((((((_root.parking.hitTest(arriere) && (_root.parking.hitTest(arrieregauche))) && (_root.parking.hitTest(gauche))) && (_root.parking.hitTest(avantgauche2))) && (_root.parking.hitTest(avantgauche))) && (_root.parking.hitTest(avant))) && (_root.parking.hitTest(avantdroite))) && (_root.parking.hitTest(avantdroite2))) && (_root.parking.hitTest(droite))) && (_root.parking.hitTest(arrieredroite));
if (((gagne == true) && (speed > -1)) && (speed < 1)) {
gare = true;
if (replayPlay) {
_root.timing = false;
replayPlay = false;
_root.replayos.gotoAndPlay(2);
} else {
_root.gagnos._visible = true;
_root.gagnos.gotoAndPlay(1);
_root.elapsedTime = (Math.ceil(_root.elapsedTime) + 8) - random(16);
score = (500000 / _root.elapsedTime) - forceChocs;
_root.timing = false;
_root.paused = false;
}
_root.playSurround(true);
if (_root.amitavaplay == true) {
_root.lev.play();
}
}
forceAccelerationY = oldSpeed - speed;
if (corpsDeltaY > 0) {
forceBack = (-corpsDeltaX) * 0.5;
} else {
forceBack = (-corpsDeltaX) * 2;
}
corpsSpeedX = corpsSpeedX + (forceAccelerationY + forceBack);
oldCorpsDeltaX = corpsDeltaX;
corpsDeltaX = corpsDeltaX + corpsSpeedX;
if (corpsDeltaX > maxCorpsDeltaX) {
corpsDeltaX = maxCorpsDeltaX;
} else if (corpsDeltaX < minCorpsDeltaX) {
corpsDeltaX = minCorpsDeltaX;
}
bustebras._x = _root.xCorps + corpsDeltaX;
corpsSpeedX = corpsSpeedX * corpsDecay;
teteDeltaX = teteDeltaX + (oldCorpsDeltaX - corpsDeltaX);
teteSpeedX = teteSpeedX + ((-teteDeltaX) * 0.5);
teteDeltaX = teteDeltaX + teteSpeedX;
if (teteDeltaX > maxTeteDeltaX) {
teteDeltaX = maxTeteDeltaX;
} else if (teteDeltaX < minTeteDeltaX) {
teteDeltaX = minTeteDeltaX;
}
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
teteSpeedX = teteSpeedX * teteDecay;
if (((oldRot != wheelRotation) || (oldSpeed != speed)) || (oldCorpsSpeedX != corpsSpeedX)) {
corpsDeltaY = ((wheelRotation * Math.abs(speed)) * maxCorpsDeltaY) / (maxWheelAngle * maxSpeed);
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaY = corpsDeltaY * 0.3;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
posBrasDroitVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
posBrasGaucheVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
setBrasRotation();
}
if (!replayPlay) {
replayRecFrame = replayRecFrame + 1;
}
}
}
}
}
Instance of Symbol 165 MovieClip "gov" in Frame 15
onClipEvent (load) {
pl = 1;
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if ((_root.minutes == "01") && (_root.seconds == "00")) {
this.vis = true;
if (pl == 1) {
_root.mssg = "TIME OUT";
this.play();
pl = 0;
}
}
}
Frame 17
fscommand ("allowscale", false);
function getAlphaNum(number) {
toReturn = "";
while (number > 0) {
unite = number % baseAlphaNum;
if (unite < 10) {
toReturn = String.fromCharCode(unite + 48) + toReturn;
} else if (unite < 36) {
toReturn = String.fromCharCode(unite + 55) + toReturn;
} else {
toReturn = String.fromCharCode(unite + 61) + toReturn;
}
number = (number - unite) / baseAlphaNum;
}
return(toReturn);
}
function getNumber(alphanum) {
toReturn = 0;
l = alphanum.length;
i = 0;
while (i < l) {
unite = alphanum.charCodeAt(i);
if ((unite >= 48) && (unite < 58)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 48;
} else if ((unite >= 65) && (unite < 91)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 55;
} else if ((unite >= 97) && (unite < 123)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 61;
}
i++;
}
return(toReturn);
}
function playSurround(show) {
if (show) {
playback._visible = play_btn._visible;
playback.gotoAndPlay(1);
} else {
playback._visible = false;
}
}
function showButtons(vis) {
pause_btn._visible = vis;
play_btn._visible = vis;
stop_btn._visible = vis;
playback._visible = vis;
}
function clicStart() {
if (!_root.timing) {
menuder._visible = false;
if (_root.voitureverte.gare && (_root.voitureverte.replayPlay == false)) {
_root.timer_txt = "00:00:00:00";
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
if (_root.paused) {
} else {
startFrame = frame;
}
_root.paused = false;
_root.timing = true;
}
}
function clicStop() {
_root.timing = false;
_root.paused = false;
_root.timer_txt = "00:00:00:00";
playSurround(true);
menuder._visible = true;
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
amitavaplay = true;
amitavafrm = "3rd";
var vX = _root.voitureverte._x;
var vY = _root.voitureverte._y;
var vRot = _root.voitureverte._rotation;
var xCorps = _root.voitureverte.bustebras._x;
var yCorps = _root.voitureverte.bustebras._y;
var xTete = _root.voitureverte.tete._x;
var yTete = _root.voitureverte.tete._y;
var frame = 0;
var startFrame = 0;
var baseAlphaNum = 62;
var timing = false;
_root.play_btn.onPress = function () {
clicStart();
};
_root.stop_btn.onPress = function () {
clicStop();
};
_root.pause_btn.onPress = function () {
if (_root.timing) {
_root.timing = false;
_root.paused = true;
playSurround(true);
}
};
_root.onEnterFrame = function () {
if (amitavaplay == true) {
if (timing) {
playSurround(false);
elapsedTime = ((frame - startFrame) * 100) / 3;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - (elapsedHours * 3600000);
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - (elapsedM * 60000);
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - (elapsedS * 1000);
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
_root.timer_txt = (((((hours + ":") + minutes) + ":") + seconds) + ":") + hundredths;
frame++;
}
}
};
clicStart();
Instance of Symbol 117 MovieClip "voitureverte" in Frame 17
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / Math.PI;
Angle2 = ((2 * beta) * 180) / Math.PI;
bustebras.brasgaucheplein._rotation = Angle1;
bustebras.contourbrasgauche._rotation = Angle1;
bustebras.contourbrasgauche.avantbras._rotation = Angle2;
yVolantDroit = corpsDeltaY - posBrasDroitVolant;
yDiff = yVolantDroit + lEpaule;
lEpauleDroiteVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / Math.PI;
Angle2 = ((-(2 * beta)) * 180) / Math.PI;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.75;
maxSpeed = 6;
incRotation = 0;
maxWheelAngle = 38;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 90;
incy = 0;
incx = 0;
_x = _root.vX;
_y = _root.vY;
_rotation = _root.vRot;
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
gare = false;
_root.gagnos._visible = false;
reposBonhommeVolant = 20;
rayonVolant = 8;
posBrasGaucheVolant = 0;
posBrasDroitVolant = 0;
corpsDeltaX = 0;
corpsDeltaY = 0;
maxCorpsDeltaY = 4;
corpsSpeedX = 0;
maxCorpsDeltaX = 8;
minCorpsDeltaX = -5;
corpsDecay = 0.5;
bustebras._x = _root.xCorps + corpsDeltaX;
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaX = 0;
teteDeltaY = 0;
teteDecay = 0.5;
maxTeteDeltaX = 10;
minTeteDeltaX = -8;
teteSpeedX = 0;
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
bustebras._x = _root.xCorps;
bustebras._y = _root.yCorps;
lBras = 14;
lEpaule = 10;
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
}
function initReplayRec() {
replayPlay = false;
}
function hit(clip) {
return(((((((((((((clip.hitTest(arriere) || (clip.hitTest(arrieregauche))) || (clip.hitTest(arrieregauche2))) || (clip.hitTest(gauche))) || (clip.hitTest(avantgauche3))) || (clip.hitTest(avantgauche2))) || (clip.hitTest(avantgauche))) || (clip.hitTest(avant))) || (clip.hitTest(avantdroite))) || (clip.hitTest(avantdroite3))) || (clip.hitTest(avantdroite2))) || (clip.hitTest(droite))) || (clip.hitTest(arrieredroite))) || (clip.hitTest(arrieredroite2)));
}
function keyDownAction(t) {
toreturn = false;
if (t == 39) {
if (incRotation != 5) {
incRotation = 5;
toreturn = true;
}
} else if (t == 37) {
if (incRotation != -5) {
incRotation = -5;
toreturn = true;
}
} else if (t == 40) {
if (incSpeed != -1) {
_root.acc.play();
back = 1;
frnt = 0;
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 1) {
_root.acc.play();
back = 0;
frnt = 1;
incSpeed = 1;
toreturn = true;
}
}
return(toreturn);
}
function keyUpAction(t) {
if (t == 39) {
if (incRotation > 0) {
incRotation = 0;
}
} else if (t == 37) {
if (incRotation < 0) {
incRotation = 0;
}
} else if (t == 40) {
if (incSpeed < 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
}
}
frnt = 0;
back = 0;
init();
initReplayRec();
}
onClipEvent (keyDown) {
if ((_root.timing == true) && (replayPlay == false)) {
t = Key.getCode();
if (keyDownAction(t)) {
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:1, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
}
onClipEvent (keyUp) {
t = Key.getCode();
a = Key.getAscii();
if (a == 115) {
if (((_root.timing == false) && (replayPlay == false)) && (_root.gagnos._visible == false)) {
_root.clicStart();
} else if (_root.timing == true) {
_root.clicStop();
}
} else if ((_root.timing == true) && (replayPlay == false)) {
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if (_root.amitavaplay == true) {
if ((_root.timing == true) && (_root.paused == false)) {
memoX = _x;
memoY = _y;
memoRot = _rotation;
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
if (frnt == 1) {
if (speed > 0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
if (back == 1) {
if (speed < -0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
tuturevertefeuxarr.gotoAndStop(1);
} else {
tuturevertefeuxarr.gotoAndStop(2);
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
}
wheelRotation = wheelRotation + incRotation;
if (wheelRotation > maxWheelAngle) {
wheelRotation = maxWheelAngle;
} else if (wheelRotation < (-maxWheelAngle)) {
wheelRotation = -maxWheelAngle;
}
if (oldRot != wheelRotation) {
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
}
incx = Math.sin((wheelRotation * Math.PI) / 180) * speed;
_rotation = (_rotation + ((Math.atan(incx / carLength) * 180) / Math.PI));
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
incy = Math.cos((wheelRotation * Math.PI) / 180) * speed;
_y = (_y + (Math.sin(((_rotation + 0) * Math.PI) / 180) * incy));
_x = (_x + (Math.cos(((_rotation + 0) * Math.PI) / 180) * incy));
if (_y < 0) {
_y = 550;
}
if (_y > 550) {
_y = 0;
}
if (_x < 0) {
_x = 550;
}
if (_x > 550) {
_x = 0;
}
A = hit(_root.card1.hitarea);
B = hit(_root.caru.hitarea);
C = hit(_root.bound);
CA = hit(_root.boundb);
CB = hit(_root.boundc);
CC = hit(_root.boundd);
D = hit(_root.card2.hitarea);
E = hit(_root.card3.hitarea);
F = hit(_root.card4.hitarea);
G = hit(_root.card5.hitarea);
H = hit(_root.card6.hitarea);
I = hit(_root.caru1.hitarea);
J = hit(_root.caru2.hitarea);
K = hit(_root.caru3.hitarea);
L = hit(_root.caru4.hitarea);
M = hit(_root.caru5.hitarea);
N = hit(_root.caru6.hitarea);
if ((((((((((((((((A || (B)) || (C)) || (CA)) || (CB)) || (CC)) || (D)) || (E)) || (F)) || (M)) || (N)) || (G)) || (H)) || (I)) || (J)) || (K)) || (L)) {
if (Math.abs(speed) > 4) {
_root.cr.start();
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
_root.damg._width = _root.damg._width - 23;
}
if (_root.damg._width < 1) {
_root.mssg = "YOU CRASHED";
_root.gov.play();
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
speed = 0;
incSpeed = 0;
} else {
gagne = ((((((((_root.parking.hitTest(arriere) && (_root.parking.hitTest(arrieregauche))) && (_root.parking.hitTest(gauche))) && (_root.parking.hitTest(avantgauche2))) && (_root.parking.hitTest(avantgauche))) && (_root.parking.hitTest(avant))) && (_root.parking.hitTest(avantdroite))) && (_root.parking.hitTest(avantdroite2))) && (_root.parking.hitTest(droite))) && (_root.parking.hitTest(arrieredroite));
if (((gagne == true) && (speed > -1)) && (speed < 1)) {
gare = true;
if (replayPlay) {
_root.timing = false;
replayPlay = false;
_root.replayos.gotoAndPlay(2);
} else {
_root.gagnos._visible = true;
_root.gagnos.gotoAndPlay(1);
_root.elapsedTime = (Math.ceil(_root.elapsedTime) + 8) - random(16);
score = (500000 / _root.elapsedTime) - forceChocs;
_root.timing = false;
_root.paused = false;
}
_root.playSurround(true);
if (_root.amitavaplay == true) {
_root.lev.play();
}
}
forceAccelerationY = oldSpeed - speed;
if (corpsDeltaY > 0) {
forceBack = (-corpsDeltaX) * 0.5;
} else {
forceBack = (-corpsDeltaX) * 2;
}
corpsSpeedX = corpsSpeedX + (forceAccelerationY + forceBack);
oldCorpsDeltaX = corpsDeltaX;
corpsDeltaX = corpsDeltaX + corpsSpeedX;
if (corpsDeltaX > maxCorpsDeltaX) {
corpsDeltaX = maxCorpsDeltaX;
} else if (corpsDeltaX < minCorpsDeltaX) {
corpsDeltaX = minCorpsDeltaX;
}
bustebras._x = _root.xCorps + corpsDeltaX;
corpsSpeedX = corpsSpeedX * corpsDecay;
teteDeltaX = teteDeltaX + (oldCorpsDeltaX - corpsDeltaX);
teteSpeedX = teteSpeedX + ((-teteDeltaX) * 0.5);
teteDeltaX = teteDeltaX + teteSpeedX;
if (teteDeltaX > maxTeteDeltaX) {
teteDeltaX = maxTeteDeltaX;
} else if (teteDeltaX < minTeteDeltaX) {
teteDeltaX = minTeteDeltaX;
}
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
teteSpeedX = teteSpeedX * teteDecay;
if (((oldRot != wheelRotation) || (oldSpeed != speed)) || (oldCorpsSpeedX != corpsSpeedX)) {
corpsDeltaY = ((wheelRotation * Math.abs(speed)) * maxCorpsDeltaY) / (maxWheelAngle * maxSpeed);
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaY = corpsDeltaY * 0.3;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
posBrasDroitVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
posBrasGaucheVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
setBrasRotation();
}
if (!replayPlay) {
replayRecFrame = replayRecFrame + 1;
}
}
}
}
}
Frame 19
fscommand ("allowscale", false);
function getAlphaNum(number) {
toReturn = "";
while (number > 0) {
unite = number % baseAlphaNum;
if (unite < 10) {
toReturn = String.fromCharCode(unite + 48) + toReturn;
} else if (unite < 36) {
toReturn = String.fromCharCode(unite + 55) + toReturn;
} else {
toReturn = String.fromCharCode(unite + 61) + toReturn;
}
number = (number - unite) / baseAlphaNum;
}
return(toReturn);
}
function getNumber(alphanum) {
toReturn = 0;
l = alphanum.length;
i = 0;
while (i < l) {
unite = alphanum.charCodeAt(i);
if ((unite >= 48) && (unite < 58)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 48;
} else if ((unite >= 65) && (unite < 91)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 55;
} else if ((unite >= 97) && (unite < 123)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 61;
}
i++;
}
return(toReturn);
}
function playSurround(show) {
if (show) {
playback._visible = play_btn._visible;
playback.gotoAndPlay(1);
} else {
playback._visible = false;
}
}
function showButtons(vis) {
pause_btn._visible = vis;
play_btn._visible = vis;
stop_btn._visible = vis;
playback._visible = vis;
}
function clicStart() {
if (!_root.timing) {
menuder._visible = false;
if (_root.voitureverte.gare && (_root.voitureverte.replayPlay == false)) {
_root.timer_txt = "00:00:00:00";
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
if (_root.paused) {
} else {
startFrame = frame;
}
_root.paused = false;
_root.timing = true;
}
}
function clicStop() {
_root.timing = false;
_root.paused = false;
_root.timer_txt = "00:00:00:00";
playSurround(true);
menuder._visible = true;
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
amitavaplay = true;
amitavafrm = "4th";
var vX = _root.voitureverte._x;
var vY = _root.voitureverte._y;
var vRot = _root.voitureverte._rotation;
var xCorps = _root.voitureverte.bustebras._x;
var yCorps = _root.voitureverte.bustebras._y;
var xTete = _root.voitureverte.tete._x;
var yTete = _root.voitureverte.tete._y;
var frame = 0;
var startFrame = 0;
var baseAlphaNum = 62;
var timing = false;
_root.play_btn.onPress = function () {
clicStart();
};
_root.stop_btn.onPress = function () {
clicStop();
};
_root.pause_btn.onPress = function () {
if (_root.timing) {
_root.timing = false;
_root.paused = true;
playSurround(true);
}
};
_root.onEnterFrame = function () {
if (amitavaplay == true) {
if (timing) {
playSurround(false);
elapsedTime = ((frame - startFrame) * 100) / 3;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - (elapsedHours * 3600000);
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - (elapsedM * 60000);
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - (elapsedS * 1000);
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
_root.timer_txt = (((((hours + ":") + minutes) + ":") + seconds) + ":") + hundredths;
frame++;
}
}
};
clicStart();
Instance of Symbol 117 MovieClip "voitureverte" in Frame 19
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / Math.PI;
Angle2 = ((2 * beta) * 180) / Math.PI;
bustebras.brasgaucheplein._rotation = Angle1;
bustebras.contourbrasgauche._rotation = Angle1;
bustebras.contourbrasgauche.avantbras._rotation = Angle2;
yVolantDroit = corpsDeltaY - posBrasDroitVolant;
yDiff = yVolantDroit + lEpaule;
lEpauleDroiteVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / Math.PI;
Angle2 = ((-(2 * beta)) * 180) / Math.PI;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.75;
maxSpeed = 6;
incRotation = 0;
maxWheelAngle = 38;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 90;
incy = 0;
incx = 0;
_x = _root.vX;
_y = _root.vY;
_rotation = _root.vRot;
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
gare = false;
_root.gagnos._visible = false;
reposBonhommeVolant = 20;
rayonVolant = 8;
posBrasGaucheVolant = 0;
posBrasDroitVolant = 0;
corpsDeltaX = 0;
corpsDeltaY = 0;
maxCorpsDeltaY = 4;
corpsSpeedX = 0;
maxCorpsDeltaX = 8;
minCorpsDeltaX = -5;
corpsDecay = 0.5;
bustebras._x = _root.xCorps + corpsDeltaX;
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaX = 0;
teteDeltaY = 0;
teteDecay = 0.5;
maxTeteDeltaX = 10;
minTeteDeltaX = -8;
teteSpeedX = 0;
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
bustebras._x = _root.xCorps;
bustebras._y = _root.yCorps;
lBras = 14;
lEpaule = 10;
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
}
function initReplayRec() {
replayPlay = false;
}
function hit(clip) {
return(((((((((((((clip.hitTest(arriere) || (clip.hitTest(arrieregauche))) || (clip.hitTest(arrieregauche2))) || (clip.hitTest(gauche))) || (clip.hitTest(avantgauche3))) || (clip.hitTest(avantgauche2))) || (clip.hitTest(avantgauche))) || (clip.hitTest(avant))) || (clip.hitTest(avantdroite))) || (clip.hitTest(avantdroite3))) || (clip.hitTest(avantdroite2))) || (clip.hitTest(droite))) || (clip.hitTest(arrieredroite))) || (clip.hitTest(arrieredroite2)));
}
function keyDownAction(t) {
toreturn = false;
if (t == 39) {
if (incRotation != 5) {
incRotation = 5;
toreturn = true;
}
} else if (t == 37) {
if (incRotation != -5) {
incRotation = -5;
toreturn = true;
}
} else if (t == 40) {
if (incSpeed != -1) {
_root.acc.play();
back = 1;
frnt = 0;
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 1) {
_root.acc.play();
back = 0;
frnt = 1;
incSpeed = 1;
toreturn = true;
}
}
return(toreturn);
}
function keyUpAction(t) {
if (t == 39) {
if (incRotation > 0) {
incRotation = 0;
}
} else if (t == 37) {
if (incRotation < 0) {
incRotation = 0;
}
} else if (t == 40) {
if (incSpeed < 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
}
}
frnt = 0;
back = 0;
init();
initReplayRec();
}
onClipEvent (keyDown) {
if ((_root.timing == true) && (replayPlay == false)) {
t = Key.getCode();
if (keyDownAction(t)) {
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:1, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
}
onClipEvent (keyUp) {
t = Key.getCode();
a = Key.getAscii();
if (a == 115) {
if (((_root.timing == false) && (replayPlay == false)) && (_root.gagnos._visible == false)) {
_root.clicStart();
} else if (_root.timing == true) {
_root.clicStop();
}
} else if ((_root.timing == true) && (replayPlay == false)) {
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if (_root.amitavaplay == true) {
if ((_root.timing == true) && (_root.paused == false)) {
memoX = _x;
memoY = _y;
memoRot = _rotation;
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
if (frnt == 1) {
if (speed > 0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
if (back == 1) {
if (speed < -0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
tuturevertefeuxarr.gotoAndStop(1);
} else {
tuturevertefeuxarr.gotoAndStop(2);
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
}
wheelRotation = wheelRotation + incRotation;
if (wheelRotation > maxWheelAngle) {
wheelRotation = maxWheelAngle;
} else if (wheelRotation < (-maxWheelAngle)) {
wheelRotation = -maxWheelAngle;
}
if (oldRot != wheelRotation) {
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
}
incx = Math.sin((wheelRotation * Math.PI) / 180) * speed;
_rotation = (_rotation + ((Math.atan(incx / carLength) * 180) / Math.PI));
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
incy = Math.cos((wheelRotation * Math.PI) / 180) * speed;
_y = (_y + (Math.sin(((_rotation + 0) * Math.PI) / 180) * incy));
_x = (_x + (Math.cos(((_rotation + 0) * Math.PI) / 180) * incy));
if (_y < 0) {
_y = 550;
}
if (_y > 550) {
_y = 0;
}
if (_x < 0) {
_x = 550;
}
if (_x > 550) {
_x = 0;
}
A = hit(_root.card1.hitarea);
B = hit(_root.caru.hitarea);
C = hit(_root.bound);
CA = hit(_root.boundb);
CB = hit(_root.boundc);
CC = hit(_root.boundd);
D = hit(_root.card2.hitarea);
E = hit(_root.card3.hitarea);
F = hit(_root.card4.hitarea);
G = hit(_root.card5.hitarea);
H = hit(_root.card6.hitarea);
I = hit(_root.caru1.hitarea);
J = hit(_root.caru2.hitarea);
K = hit(_root.caru3.hitarea);
L = hit(_root.caru4.hitarea);
M = hit(_root.caru5.hitarea);
N = hit(_root.caru6.hitarea);
if ((((((((((((((((A || (B)) || (C)) || (CA)) || (CB)) || (CC)) || (D)) || (E)) || (F)) || (M)) || (N)) || (G)) || (H)) || (I)) || (J)) || (K)) || (L)) {
if (Math.abs(speed) > 4) {
_root.cr.start();
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
_root.damg._width = _root.damg._width - 23;
}
if (_root.damg._width < 1) {
_root.mssg = "YOU CRASHED";
_root.gov.play();
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
speed = 0;
incSpeed = 0;
} else {
gagne = ((((((((_root.parking.hitTest(arriere) && (_root.parking.hitTest(arrieregauche))) && (_root.parking.hitTest(gauche))) && (_root.parking.hitTest(avantgauche2))) && (_root.parking.hitTest(avantgauche))) && (_root.parking.hitTest(avant))) && (_root.parking.hitTest(avantdroite))) && (_root.parking.hitTest(avantdroite2))) && (_root.parking.hitTest(droite))) && (_root.parking.hitTest(arrieredroite));
if (((gagne == true) && (speed > -1)) && (speed < 1)) {
gare = true;
if (replayPlay) {
_root.timing = false;
replayPlay = false;
_root.replayos.gotoAndPlay(2);
} else {
_root.gagnos._visible = true;
_root.gagnos.gotoAndPlay(1);
_root.elapsedTime = (Math.ceil(_root.elapsedTime) + 8) - random(16);
score = (500000 / _root.elapsedTime) - forceChocs;
_root.timing = false;
_root.paused = false;
}
_root.playSurround(true);
if (_root.amitavaplay == true) {
_root.lev.play();
}
}
forceAccelerationY = oldSpeed - speed;
if (corpsDeltaY > 0) {
forceBack = (-corpsDeltaX) * 0.5;
} else {
forceBack = (-corpsDeltaX) * 2;
}
corpsSpeedX = corpsSpeedX + (forceAccelerationY + forceBack);
oldCorpsDeltaX = corpsDeltaX;
corpsDeltaX = corpsDeltaX + corpsSpeedX;
if (corpsDeltaX > maxCorpsDeltaX) {
corpsDeltaX = maxCorpsDeltaX;
} else if (corpsDeltaX < minCorpsDeltaX) {
corpsDeltaX = minCorpsDeltaX;
}
bustebras._x = _root.xCorps + corpsDeltaX;
corpsSpeedX = corpsSpeedX * corpsDecay;
teteDeltaX = teteDeltaX + (oldCorpsDeltaX - corpsDeltaX);
teteSpeedX = teteSpeedX + ((-teteDeltaX) * 0.5);
teteDeltaX = teteDeltaX + teteSpeedX;
if (teteDeltaX > maxTeteDeltaX) {
teteDeltaX = maxTeteDeltaX;
} else if (teteDeltaX < minTeteDeltaX) {
teteDeltaX = minTeteDeltaX;
}
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
teteSpeedX = teteSpeedX * teteDecay;
if (((oldRot != wheelRotation) || (oldSpeed != speed)) || (oldCorpsSpeedX != corpsSpeedX)) {
corpsDeltaY = ((wheelRotation * Math.abs(speed)) * maxCorpsDeltaY) / (maxWheelAngle * maxSpeed);
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaY = corpsDeltaY * 0.3;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
posBrasDroitVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
posBrasGaucheVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
setBrasRotation();
}
if (!replayPlay) {
replayRecFrame = replayRecFrame + 1;
}
}
}
}
}
Frame 21
fscommand ("allowscale", false);
function getAlphaNum(number) {
toReturn = "";
while (number > 0) {
unite = number % baseAlphaNum;
if (unite < 10) {
toReturn = String.fromCharCode(unite + 48) + toReturn;
} else if (unite < 36) {
toReturn = String.fromCharCode(unite + 55) + toReturn;
} else {
toReturn = String.fromCharCode(unite + 61) + toReturn;
}
number = (number - unite) / baseAlphaNum;
}
return(toReturn);
}
function getNumber(alphanum) {
toReturn = 0;
l = alphanum.length;
i = 0;
while (i < l) {
unite = alphanum.charCodeAt(i);
if ((unite >= 48) && (unite < 58)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 48;
} else if ((unite >= 65) && (unite < 91)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 55;
} else if ((unite >= 97) && (unite < 123)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 61;
}
i++;
}
return(toReturn);
}
function playSurround(show) {
if (show) {
playback._visible = play_btn._visible;
playback.gotoAndPlay(1);
} else {
playback._visible = false;
}
}
function showButtons(vis) {
pause_btn._visible = vis;
play_btn._visible = vis;
stop_btn._visible = vis;
playback._visible = vis;
}
function clicStart() {
if (!_root.timing) {
menuder._visible = false;
if (_root.voitureverte.gare && (_root.voitureverte.replayPlay == false)) {
_root.timer_txt = "00:00:00:00";
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
if (_root.paused) {
} else {
startFrame = frame;
}
_root.paused = false;
_root.timing = true;
}
}
function clicStop() {
_root.timing = false;
_root.paused = false;
_root.timer_txt = "00:00:00:00";
playSurround(true);
menuder._visible = true;
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
amitavaplay = true;
amitavafrm = "5th";
var vX = _root.voitureverte._x;
var vY = _root.voitureverte._y;
var vRot = _root.voitureverte._rotation;
var xCorps = _root.voitureverte.bustebras._x;
var yCorps = _root.voitureverte.bustebras._y;
var xTete = _root.voitureverte.tete._x;
var yTete = _root.voitureverte.tete._y;
var frame = 0;
var startFrame = 0;
var baseAlphaNum = 62;
var timing = false;
_root.play_btn.onPress = function () {
clicStart();
};
_root.stop_btn.onPress = function () {
clicStop();
};
_root.pause_btn.onPress = function () {
if (_root.timing) {
_root.timing = false;
_root.paused = true;
playSurround(true);
}
};
_root.onEnterFrame = function () {
if (amitavaplay == true) {
if (timing) {
playSurround(false);
elapsedTime = ((frame - startFrame) * 100) / 3;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - (elapsedHours * 3600000);
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - (elapsedM * 60000);
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - (elapsedS * 1000);
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
_root.timer_txt = (((((hours + ":") + minutes) + ":") + seconds) + ":") + hundredths;
frame++;
}
}
};
clicStart();
Instance of Symbol 65 MovieClip "bound" in Frame 21
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 65 MovieClip "boundb" in Frame 21
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 65 MovieClip "boundc" in Frame 21
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 117 MovieClip "voitureverte" in Frame 21
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / Math.PI;
Angle2 = ((2 * beta) * 180) / Math.PI;
bustebras.brasgaucheplein._rotation = Angle1;
bustebras.contourbrasgauche._rotation = Angle1;
bustebras.contourbrasgauche.avantbras._rotation = Angle2;
yVolantDroit = corpsDeltaY - posBrasDroitVolant;
yDiff = yVolantDroit + lEpaule;
lEpauleDroiteVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / Math.PI;
Angle2 = ((-(2 * beta)) * 180) / Math.PI;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.75;
maxSpeed = 6;
incRotation = 0;
maxWheelAngle = 38;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 90;
incy = 0;
incx = 0;
_x = _root.vX;
_y = _root.vY;
_rotation = _root.vRot;
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
gare = false;
_root.gagnos._visible = false;
reposBonhommeVolant = 20;
rayonVolant = 8;
posBrasGaucheVolant = 0;
posBrasDroitVolant = 0;
corpsDeltaX = 0;
corpsDeltaY = 0;
maxCorpsDeltaY = 4;
corpsSpeedX = 0;
maxCorpsDeltaX = 8;
minCorpsDeltaX = -5;
corpsDecay = 0.5;
bustebras._x = _root.xCorps + corpsDeltaX;
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaX = 0;
teteDeltaY = 0;
teteDecay = 0.5;
maxTeteDeltaX = 10;
minTeteDeltaX = -8;
teteSpeedX = 0;
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
bustebras._x = _root.xCorps;
bustebras._y = _root.yCorps;
lBras = 14;
lEpaule = 10;
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
}
function initReplayRec() {
replayPlay = false;
}
function hit(clip) {
return(((((((((((((clip.hitTest(arriere) || (clip.hitTest(arrieregauche))) || (clip.hitTest(arrieregauche2))) || (clip.hitTest(gauche))) || (clip.hitTest(avantgauche3))) || (clip.hitTest(avantgauche2))) || (clip.hitTest(avantgauche))) || (clip.hitTest(avant))) || (clip.hitTest(avantdroite))) || (clip.hitTest(avantdroite3))) || (clip.hitTest(avantdroite2))) || (clip.hitTest(droite))) || (clip.hitTest(arrieredroite))) || (clip.hitTest(arrieredroite2)));
}
function keyDownAction(t) {
toreturn = false;
if (t == 39) {
if (incRotation != 5) {
incRotation = 5;
toreturn = true;
}
} else if (t == 37) {
if (incRotation != -5) {
incRotation = -5;
toreturn = true;
}
} else if (t == 40) {
if (incSpeed != -1) {
_root.acc.play();
back = 1;
frnt = 0;
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 1) {
_root.acc.play();
back = 0;
frnt = 1;
incSpeed = 1;
toreturn = true;
}
}
return(toreturn);
}
function keyUpAction(t) {
if (t == 39) {
if (incRotation > 0) {
incRotation = 0;
}
} else if (t == 37) {
if (incRotation < 0) {
incRotation = 0;
}
} else if (t == 40) {
if (incSpeed < 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
}
}
frnt = 0;
back = 0;
init();
initReplayRec();
}
onClipEvent (keyDown) {
if ((_root.timing == true) && (replayPlay == false)) {
t = Key.getCode();
if (keyDownAction(t)) {
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:1, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
}
onClipEvent (keyUp) {
t = Key.getCode();
a = Key.getAscii();
if (a == 115) {
if (((_root.timing == false) && (replayPlay == false)) && (_root.gagnos._visible == false)) {
_root.clicStart();
} else if (_root.timing == true) {
_root.clicStop();
}
} else if ((_root.timing == true) && (replayPlay == false)) {
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if (_root.amitavaplay == true) {
if ((_root.timing == true) && (_root.paused == false)) {
memoX = _x;
memoY = _y;
memoRot = _rotation;
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
if (frnt == 1) {
if (speed > 0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
if (back == 1) {
if (speed < -0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
tuturevertefeuxarr.gotoAndStop(1);
} else {
tuturevertefeuxarr.gotoAndStop(2);
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
}
wheelRotation = wheelRotation + incRotation;
if (wheelRotation > maxWheelAngle) {
wheelRotation = maxWheelAngle;
} else if (wheelRotation < (-maxWheelAngle)) {
wheelRotation = -maxWheelAngle;
}
if (oldRot != wheelRotation) {
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
}
incx = Math.sin((wheelRotation * Math.PI) / 180) * speed;
_rotation = (_rotation + ((Math.atan(incx / carLength) * 180) / Math.PI));
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
incy = Math.cos((wheelRotation * Math.PI) / 180) * speed;
_y = (_y + (Math.sin(((_rotation + 0) * Math.PI) / 180) * incy));
_x = (_x + (Math.cos(((_rotation + 0) * Math.PI) / 180) * incy));
if (_y < 0) {
_y = 550;
}
if (_y > 550) {
_y = 0;
}
if (_x < 0) {
_x = 550;
}
if (_x > 550) {
_x = 0;
}
A = hit(_root.card1.hitarea);
B = hit(_root.caru.hitarea);
C = hit(_root.bound);
CA = hit(_root.boundb);
CB = hit(_root.boundc);
CC = hit(_root.boundd);
CD = hit(_root.bounde);
CE = hit(_root.boundf);
D = hit(_root.card2.hitarea);
E = hit(_root.card3.hitarea);
F = hit(_root.card4.hitarea);
G = hit(_root.card5.hitarea);
H = hit(_root.card6.hitarea);
I = hit(_root.caru1.hitarea);
J = hit(_root.caru2.hitarea);
K = hit(_root.caru3.hitarea);
L = hit(_root.caru4.hitarea);
M = hit(_root.caru5.hitarea);
N = hit(_root.caru6.hitarea);
if ((((((((((((((((((A || (B)) || (C)) || (CA)) || (CB)) || (CC)) || (CD)) || (CE)) || (D)) || (E)) || (F)) || (M)) || (N)) || (G)) || (H)) || (I)) || (J)) || (K)) || (L)) {
if (Math.abs(speed) > 4) {
_root.cr.start();
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
_root.damg._width = _root.damg._width - 23;
}
if (_root.damg._width < 1) {
_root.mssg = "YOU CRASHED";
_root.gov.play();
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
speed = 0;
incSpeed = 0;
} else {
gagne = ((((((((_root.parking.hitTest(arriere) && (_root.parking.hitTest(arrieregauche))) && (_root.parking.hitTest(gauche))) && (_root.parking.hitTest(avantgauche2))) && (_root.parking.hitTest(avantgauche))) && (_root.parking.hitTest(avant))) && (_root.parking.hitTest(avantdroite))) && (_root.parking.hitTest(avantdroite2))) && (_root.parking.hitTest(droite))) && (_root.parking.hitTest(arrieredroite));
if (((gagne == true) && (speed > -1)) && (speed < 1)) {
gare = true;
if (replayPlay) {
_root.timing = false;
replayPlay = false;
_root.replayos.gotoAndPlay(2);
} else {
_root.gagnos._visible = true;
_root.gagnos.gotoAndPlay(1);
_root.elapsedTime = (Math.ceil(_root.elapsedTime) + 8) - random(16);
score = (500000 / _root.elapsedTime) - forceChocs;
_root.timing = false;
_root.paused = false;
}
_root.playSurround(true);
if (_root.amitavaplay == true) {
_root.lev.play();
}
}
forceAccelerationY = oldSpeed - speed;
if (corpsDeltaY > 0) {
forceBack = (-corpsDeltaX) * 0.5;
} else {
forceBack = (-corpsDeltaX) * 2;
}
corpsSpeedX = corpsSpeedX + (forceAccelerationY + forceBack);
oldCorpsDeltaX = corpsDeltaX;
corpsDeltaX = corpsDeltaX + corpsSpeedX;
if (corpsDeltaX > maxCorpsDeltaX) {
corpsDeltaX = maxCorpsDeltaX;
} else if (corpsDeltaX < minCorpsDeltaX) {
corpsDeltaX = minCorpsDeltaX;
}
bustebras._x = _root.xCorps + corpsDeltaX;
corpsSpeedX = corpsSpeedX * corpsDecay;
teteDeltaX = teteDeltaX + (oldCorpsDeltaX - corpsDeltaX);
teteSpeedX = teteSpeedX + ((-teteDeltaX) * 0.5);
teteDeltaX = teteDeltaX + teteSpeedX;
if (teteDeltaX > maxTeteDeltaX) {
teteDeltaX = maxTeteDeltaX;
} else if (teteDeltaX < minTeteDeltaX) {
teteDeltaX = minTeteDeltaX;
}
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
teteSpeedX = teteSpeedX * teteDecay;
if (((oldRot != wheelRotation) || (oldSpeed != speed)) || (oldCorpsSpeedX != corpsSpeedX)) {
corpsDeltaY = ((wheelRotation * Math.abs(speed)) * maxCorpsDeltaY) / (maxWheelAngle * maxSpeed);
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaY = corpsDeltaY * 0.3;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
posBrasDroitVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
posBrasGaucheVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
setBrasRotation();
}
if (!replayPlay) {
replayRecFrame = replayRecFrame + 1;
}
}
}
}
}
Frame 23
fscommand ("allowscale", false);
function getAlphaNum(number) {
toReturn = "";
while (number > 0) {
unite = number % baseAlphaNum;
if (unite < 10) {
toReturn = String.fromCharCode(unite + 48) + toReturn;
} else if (unite < 36) {
toReturn = String.fromCharCode(unite + 55) + toReturn;
} else {
toReturn = String.fromCharCode(unite + 61) + toReturn;
}
number = (number - unite) / baseAlphaNum;
}
return(toReturn);
}
function getNumber(alphanum) {
toReturn = 0;
l = alphanum.length;
i = 0;
while (i < l) {
unite = alphanum.charCodeAt(i);
if ((unite >= 48) && (unite < 58)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 48;
} else if ((unite >= 65) && (unite < 91)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 55;
} else if ((unite >= 97) && (unite < 123)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 61;
}
i++;
}
return(toReturn);
}
function playSurround(show) {
if (show) {
playback._visible = play_btn._visible;
playback.gotoAndPlay(1);
} else {
playback._visible = false;
}
}
function showButtons(vis) {
pause_btn._visible = vis;
play_btn._visible = vis;
stop_btn._visible = vis;
playback._visible = vis;
}
function clicStart() {
if (!_root.timing) {
menuder._visible = false;
if (_root.voitureverte.gare && (_root.voitureverte.replayPlay == false)) {
_root.timer_txt = "00:00:00:00";
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
if (_root.paused) {
} else {
startFrame = frame;
}
_root.paused = false;
_root.timing = true;
}
}
function clicStop() {
_root.timing = false;
_root.paused = false;
_root.timer_txt = "00:00:00:00";
playSurround(true);
menuder._visible = true;
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
amitavaplay = true;
amitavafrm = "6th";
var vX = _root.voitureverte._x;
var vY = _root.voitureverte._y;
var vRot = _root.voitureverte._rotation;
var xCorps = _root.voitureverte.bustebras._x;
var yCorps = _root.voitureverte.bustebras._y;
var xTete = _root.voitureverte.tete._x;
var yTete = _root.voitureverte.tete._y;
var frame = 0;
var startFrame = 0;
var baseAlphaNum = 62;
var timing = false;
_root.play_btn.onPress = function () {
clicStart();
};
_root.stop_btn.onPress = function () {
clicStop();
};
_root.pause_btn.onPress = function () {
if (_root.timing) {
_root.timing = false;
_root.paused = true;
playSurround(true);
}
};
_root.onEnterFrame = function () {
if (amitavaplay == true) {
if (timing) {
playSurround(false);
elapsedTime = ((frame - startFrame) * 100) / 3;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - (elapsedHours * 3600000);
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - (elapsedM * 60000);
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - (elapsedS * 1000);
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
_root.timer_txt = (((((hours + ":") + minutes) + ":") + seconds) + ":") + hundredths;
frame++;
}
}
};
clicStart();
Instance of Symbol 65 MovieClip "bound" in Frame 23
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 65 MovieClip "boundb" in Frame 23
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 117 MovieClip "voitureverte" in Frame 23
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / Math.PI;
Angle2 = ((2 * beta) * 180) / Math.PI;
bustebras.brasgaucheplein._rotation = Angle1;
bustebras.contourbrasgauche._rotation = Angle1;
bustebras.contourbrasgauche.avantbras._rotation = Angle2;
yVolantDroit = corpsDeltaY - posBrasDroitVolant;
yDiff = yVolantDroit + lEpaule;
lEpauleDroiteVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / Math.PI;
Angle2 = ((-(2 * beta)) * 180) / Math.PI;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.75;
maxSpeed = 6;
incRotation = 0;
maxWheelAngle = 38;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 90;
incy = 0;
incx = 0;
_x = _root.vX;
_y = _root.vY;
_rotation = _root.vRot;
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
gare = false;
_root.gagnos._visible = false;
reposBonhommeVolant = 20;
rayonVolant = 8;
posBrasGaucheVolant = 0;
posBrasDroitVolant = 0;
corpsDeltaX = 0;
corpsDeltaY = 0;
maxCorpsDeltaY = 4;
corpsSpeedX = 0;
maxCorpsDeltaX = 8;
minCorpsDeltaX = -5;
corpsDecay = 0.5;
bustebras._x = _root.xCorps + corpsDeltaX;
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaX = 0;
teteDeltaY = 0;
teteDecay = 0.5;
maxTeteDeltaX = 10;
minTeteDeltaX = -8;
teteSpeedX = 0;
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
bustebras._x = _root.xCorps;
bustebras._y = _root.yCorps;
lBras = 14;
lEpaule = 10;
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
}
function initReplayRec() {
replayPlay = false;
}
function hit(clip) {
return(((((((((((((clip.hitTest(arriere) || (clip.hitTest(arrieregauche))) || (clip.hitTest(arrieregauche2))) || (clip.hitTest(gauche))) || (clip.hitTest(avantgauche3))) || (clip.hitTest(avantgauche2))) || (clip.hitTest(avantgauche))) || (clip.hitTest(avant))) || (clip.hitTest(avantdroite))) || (clip.hitTest(avantdroite3))) || (clip.hitTest(avantdroite2))) || (clip.hitTest(droite))) || (clip.hitTest(arrieredroite))) || (clip.hitTest(arrieredroite2)));
}
function keyDownAction(t) {
toreturn = false;
if (t == 39) {
if (incRotation != 5) {
incRotation = 5;
toreturn = true;
}
} else if (t == 37) {
if (incRotation != -5) {
incRotation = -5;
toreturn = true;
}
} else if (t == 40) {
if (incSpeed != -1) {
_root.acc.play();
back = 1;
frnt = 0;
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 1) {
_root.acc.play();
back = 0;
frnt = 1;
incSpeed = 1;
toreturn = true;
}
}
return(toreturn);
}
function keyUpAction(t) {
if (t == 39) {
if (incRotation > 0) {
incRotation = 0;
}
} else if (t == 37) {
if (incRotation < 0) {
incRotation = 0;
}
} else if (t == 40) {
if (incSpeed < 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
}
}
frnt = 0;
back = 0;
init();
initReplayRec();
}
onClipEvent (keyDown) {
if ((_root.timing == true) && (replayPlay == false)) {
t = Key.getCode();
if (keyDownAction(t)) {
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:1, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
}
onClipEvent (keyUp) {
t = Key.getCode();
a = Key.getAscii();
if (a == 115) {
if (((_root.timing == false) && (replayPlay == false)) && (_root.gagnos._visible == false)) {
_root.clicStart();
} else if (_root.timing == true) {
_root.clicStop();
}
} else if ((_root.timing == true) && (replayPlay == false)) {
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if (_root.amitavaplay == true) {
if ((_root.timing == true) && (_root.paused == false)) {
memoX = _x;
memoY = _y;
memoRot = _rotation;
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
if (frnt == 1) {
if (speed > 0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
if (back == 1) {
if (speed < -0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
tuturevertefeuxarr.gotoAndStop(1);
} else {
tuturevertefeuxarr.gotoAndStop(2);
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
}
wheelRotation = wheelRotation + incRotation;
if (wheelRotation > maxWheelAngle) {
wheelRotation = maxWheelAngle;
} else if (wheelRotation < (-maxWheelAngle)) {
wheelRotation = -maxWheelAngle;
}
if (oldRot != wheelRotation) {
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
}
incx = Math.sin((wheelRotation * Math.PI) / 180) * speed;
_rotation = (_rotation + ((Math.atan(incx / carLength) * 180) / Math.PI));
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
incy = Math.cos((wheelRotation * Math.PI) / 180) * speed;
_y = (_y + (Math.sin(((_rotation + 0) * Math.PI) / 180) * incy));
_x = (_x + (Math.cos(((_rotation + 0) * Math.PI) / 180) * incy));
if (_y < 0) {
_y = 550;
}
if (_y > 550) {
_y = 0;
}
if (_x < 0) {
_x = 550;
}
if (_x > 550) {
_x = 0;
}
A = hit(_root.card1.hitarea);
B = hit(_root.caru.hitarea);
C = hit(_root.bound);
CA = hit(_root.boundb);
CB = hit(_root.boundc);
CC = hit(_root.boundd);
D = hit(_root.card2.hitarea);
E = hit(_root.card3.hitarea);
F = hit(_root.card4.hitarea);
G = hit(_root.card5.hitarea);
H = hit(_root.card6.hitarea);
I = hit(_root.caru1.hitarea);
J = hit(_root.caru2.hitarea);
K = hit(_root.caru3.hitarea);
L = hit(_root.caru4.hitarea);
M = hit(_root.caru5.hitarea);
N = hit(_root.caru6.hitarea);
if ((((((((((((((((A || (B)) || (C)) || (CA)) || (CB)) || (CC)) || (D)) || (E)) || (F)) || (M)) || (N)) || (G)) || (H)) || (I)) || (J)) || (K)) || (L)) {
if (Math.abs(speed) > 4) {
_root.cr.start();
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
_root.damg._width = _root.damg._width - 23;
}
if (_root.damg._width < 1) {
_root.mssg = "YOU CRASHED";
_root.gov.play();
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
speed = 0;
incSpeed = 0;
} else {
gagne = ((((((((_root.parking.hitTest(arriere) && (_root.parking.hitTest(arrieregauche))) && (_root.parking.hitTest(gauche))) && (_root.parking.hitTest(avantgauche2))) && (_root.parking.hitTest(avantgauche))) && (_root.parking.hitTest(avant))) && (_root.parking.hitTest(avantdroite))) && (_root.parking.hitTest(avantdroite2))) && (_root.parking.hitTest(droite))) && (_root.parking.hitTest(arrieredroite));
if (((gagne == true) && (speed > -1)) && (speed < 1)) {
gare = true;
if (replayPlay) {
_root.timing = false;
replayPlay = false;
_root.replayos.gotoAndPlay(2);
} else {
_root.gagnos._visible = true;
_root.gagnos.gotoAndPlay(1);
_root.elapsedTime = (Math.ceil(_root.elapsedTime) + 8) - random(16);
score = (500000 / _root.elapsedTime) - forceChocs;
_root.timing = false;
_root.paused = false;
}
_root.playSurround(true);
if (_root.amitavaplay == true) {
_root.lev.play();
}
}
forceAccelerationY = oldSpeed - speed;
if (corpsDeltaY > 0) {
forceBack = (-corpsDeltaX) * 0.5;
} else {
forceBack = (-corpsDeltaX) * 2;
}
corpsSpeedX = corpsSpeedX + (forceAccelerationY + forceBack);
oldCorpsDeltaX = corpsDeltaX;
corpsDeltaX = corpsDeltaX + corpsSpeedX;
if (corpsDeltaX > maxCorpsDeltaX) {
corpsDeltaX = maxCorpsDeltaX;
} else if (corpsDeltaX < minCorpsDeltaX) {
corpsDeltaX = minCorpsDeltaX;
}
bustebras._x = _root.xCorps + corpsDeltaX;
corpsSpeedX = corpsSpeedX * corpsDecay;
teteDeltaX = teteDeltaX + (oldCorpsDeltaX - corpsDeltaX);
teteSpeedX = teteSpeedX + ((-teteDeltaX) * 0.5);
teteDeltaX = teteDeltaX + teteSpeedX;
if (teteDeltaX > maxTeteDeltaX) {
teteDeltaX = maxTeteDeltaX;
} else if (teteDeltaX < minTeteDeltaX) {
teteDeltaX = minTeteDeltaX;
}
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
teteSpeedX = teteSpeedX * teteDecay;
if (((oldRot != wheelRotation) || (oldSpeed != speed)) || (oldCorpsSpeedX != corpsSpeedX)) {
corpsDeltaY = ((wheelRotation * Math.abs(speed)) * maxCorpsDeltaY) / (maxWheelAngle * maxSpeed);
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaY = corpsDeltaY * 0.3;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
posBrasDroitVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
posBrasGaucheVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
setBrasRotation();
}
if (!replayPlay) {
replayRecFrame = replayRecFrame + 1;
}
}
}
}
}
Frame 25
fscommand ("allowscale", false);
function getAlphaNum(number) {
toReturn = "";
while (number > 0) {
unite = number % baseAlphaNum;
if (unite < 10) {
toReturn = String.fromCharCode(unite + 48) + toReturn;
} else if (unite < 36) {
toReturn = String.fromCharCode(unite + 55) + toReturn;
} else {
toReturn = String.fromCharCode(unite + 61) + toReturn;
}
number = (number - unite) / baseAlphaNum;
}
return(toReturn);
}
function getNumber(alphanum) {
toReturn = 0;
l = alphanum.length;
i = 0;
while (i < l) {
unite = alphanum.charCodeAt(i);
if ((unite >= 48) && (unite < 58)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 48;
} else if ((unite >= 65) && (unite < 91)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 55;
} else if ((unite >= 97) && (unite < 123)) {
toReturn = ((toReturn * baseAlphaNum) + unite) - 61;
}
i++;
}
return(toReturn);
}
function playSurround(show) {
if (show) {
playback._visible = play_btn._visible;
playback.gotoAndPlay(1);
} else {
playback._visible = false;
}
}
function showButtons(vis) {
pause_btn._visible = vis;
play_btn._visible = vis;
stop_btn._visible = vis;
playback._visible = vis;
}
function clicStart() {
if (!_root.timing) {
menuder._visible = false;
if (_root.voitureverte.gare && (_root.voitureverte.replayPlay == false)) {
_root.timer_txt = "00:00:00:00";
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
if (_root.paused) {
} else {
startFrame = frame;
}
_root.paused = false;
_root.timing = true;
}
}
function clicStop() {
_root.timing = false;
_root.paused = false;
_root.timer_txt = "00:00:00:00";
playSurround(true);
menuder._visible = true;
_root.voitureverte.init();
_root.voitureverte.initReplayRec();
}
amitavaplay = true;
var vX = _root.voitureverte._x;
var vY = _root.voitureverte._y;
var vRot = _root.voitureverte._rotation;
var xCorps = _root.voitureverte.bustebras._x;
var yCorps = _root.voitureverte.bustebras._y;
var xTete = _root.voitureverte.tete._x;
var yTete = _root.voitureverte.tete._y;
var frame = 0;
var startFrame = 0;
var baseAlphaNum = 62;
var timing = false;
_root.play_btn.onPress = function () {
clicStart();
};
_root.stop_btn.onPress = function () {
clicStop();
};
_root.pause_btn.onPress = function () {
if (_root.timing) {
_root.timing = false;
_root.paused = true;
playSurround(true);
}
};
_root.onEnterFrame = function () {
if (amitavaplay == true) {
if (timing) {
playSurround(false);
elapsedTime = ((frame - startFrame) * 100) / 3;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - (elapsedHours * 3600000);
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - (elapsedM * 60000);
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - (elapsedS * 1000);
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
_root.timer_txt = (((((hours + ":") + minutes) + ":") + seconds) + ":") + hundredths;
frame++;
}
}
};
clicStart();
Instance of Symbol 65 MovieClip "bound" in Frame 25
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 65 MovieClip "boundb" in Frame 25
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 65 MovieClip "boundc" in Frame 25
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 65 MovieClip "boundd" in Frame 25
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 117 MovieClip "voitureverte" in Frame 25
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / Math.PI;
Angle2 = ((2 * beta) * 180) / Math.PI;
bustebras.brasgaucheplein._rotation = Angle1;
bustebras.contourbrasgauche._rotation = Angle1;
bustebras.contourbrasgauche.avantbras._rotation = Angle2;
yVolantDroit = corpsDeltaY - posBrasDroitVolant;
yDiff = yVolantDroit + lEpaule;
lEpauleDroiteVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = Math.atan(yDiff / xVolant);
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / Math.PI;
Angle2 = ((-(2 * beta)) * 180) / Math.PI;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.75;
maxSpeed = 6;
incRotation = 0;
maxWheelAngle = 38;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 90;
incy = 0;
incx = 0;
_x = _root.vX;
_y = _root.vY;
_rotation = _root.vRot;
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
gare = false;
_root.gagnos._visible = false;
reposBonhommeVolant = 20;
rayonVolant = 8;
posBrasGaucheVolant = 0;
posBrasDroitVolant = 0;
corpsDeltaX = 0;
corpsDeltaY = 0;
maxCorpsDeltaY = 4;
corpsSpeedX = 0;
maxCorpsDeltaX = 8;
minCorpsDeltaX = -5;
corpsDecay = 0.5;
bustebras._x = _root.xCorps + corpsDeltaX;
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaX = 0;
teteDeltaY = 0;
teteDecay = 0.5;
maxTeteDeltaX = 10;
minTeteDeltaX = -8;
teteSpeedX = 0;
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
bustebras._x = _root.xCorps;
bustebras._y = _root.yCorps;
lBras = 14;
lEpaule = 10;
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
}
function initReplayRec() {
replayPlay = false;
}
function hit(clip) {
return(((((((((((((clip.hitTest(arriere) || (clip.hitTest(arrieregauche))) || (clip.hitTest(arrieregauche2))) || (clip.hitTest(gauche))) || (clip.hitTest(avantgauche3))) || (clip.hitTest(avantgauche2))) || (clip.hitTest(avantgauche))) || (clip.hitTest(avant))) || (clip.hitTest(avantdroite))) || (clip.hitTest(avantdroite3))) || (clip.hitTest(avantdroite2))) || (clip.hitTest(droite))) || (clip.hitTest(arrieredroite))) || (clip.hitTest(arrieredroite2)));
}
function keyDownAction(t) {
toreturn = false;
if (t == 39) {
if (incRotation != 5) {
incRotation = 5;
toreturn = true;
}
} else if (t == 37) {
if (incRotation != -5) {
incRotation = -5;
toreturn = true;
}
} else if (t == 40) {
if (incSpeed != -1) {
_root.acc.play();
back = 1;
frnt = 0;
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 1) {
_root.acc.play();
back = 0;
frnt = 1;
incSpeed = 1;
toreturn = true;
}
}
return(toreturn);
}
function keyUpAction(t) {
if (t == 39) {
if (incRotation > 0) {
incRotation = 0;
}
} else if (t == 37) {
if (incRotation < 0) {
incRotation = 0;
}
} else if (t == 40) {
if (incSpeed < 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
_root.acc.gotoAndStop(1);
incSpeed = 0;
}
}
}
frnt = 0;
back = 0;
init();
initReplayRec();
}
onClipEvent (keyDown) {
if ((_root.timing == true) && (replayPlay == false)) {
t = Key.getCode();
if (keyDownAction(t)) {
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:1, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
}
onClipEvent (keyUp) {
t = Key.getCode();
a = Key.getAscii();
if (a == 115) {
if (((_root.timing == false) && (replayPlay == false)) && (_root.gagnos._visible == false)) {
_root.clicStart();
} else if (_root.timing == true) {
_root.clicStop();
}
} else if ((_root.timing == true) && (replayPlay == false)) {
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if (_root.amitavaplay == true) {
if ((_root.timing == true) && (_root.paused == false)) {
memoX = _x;
memoY = _y;
memoRot = _rotation;
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
if (frnt == 1) {
if (speed > 0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
if (back == 1) {
if (speed < -0.01) {
speed = speed * speedDecay;
} else {
speed = 0;
}
}
tuturevertefeuxarr.gotoAndStop(1);
} else {
tuturevertefeuxarr.gotoAndStop(2);
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
}
wheelRotation = wheelRotation + incRotation;
if (wheelRotation > maxWheelAngle) {
wheelRotation = maxWheelAngle;
} else if (wheelRotation < (-maxWheelAngle)) {
wheelRotation = -maxWheelAngle;
}
if (oldRot != wheelRotation) {
rouedroite._rotation = wheelRotation;
rouegauche._rotation = wheelRotation;
}
incx = Math.sin((wheelRotation * Math.PI) / 180) * speed;
_rotation = (_rotation + ((Math.atan(incx / carLength) * 180) / Math.PI));
ombrevoiture._x = Math.cos((((-_rotation) + 45) * Math.PI) / 180) * 15;
ombrevoiture._y = Math.sin((((-_rotation) + 45) * Math.PI) / 180) * 15;
incy = Math.cos((wheelRotation * Math.PI) / 180) * speed;
_y = (_y + (Math.sin(((_rotation + 0) * Math.PI) / 180) * incy));
_x = (_x + (Math.cos(((_rotation + 0) * Math.PI) / 180) * incy));
if (_y < 0) {
_y = 550;
}
if (_y > 550) {
_y = 0;
}
if (_x < 0) {
_x = 550;
}
if (_x > 550) {
_x = 0;
}
A = hit(_root.card1.hitarea);
B = hit(_root.caru.hitarea);
C = hit(_root.bound);
CA = hit(_root.boundb);
CB = hit(_root.boundc);
CC = hit(_root.boundd);
D = hit(_root.card2.hitarea);
E = hit(_root.card3.hitarea);
F = hit(_root.card4.hitarea);
G = hit(_root.card5.hitarea);
H = hit(_root.card6.hitarea);
I = hit(_root.caru1.hitarea);
J = hit(_root.caru2.hitarea);
K = hit(_root.caru3.hitarea);
L = hit(_root.caru4.hitarea);
M = hit(_root.caru5.hitarea);
N = hit(_root.caru6.hitarea);
if ((((((((((((((((A || (B)) || (C)) || (CA)) || (CB)) || (CC)) || (D)) || (E)) || (F)) || (M)) || (N)) || (G)) || (H)) || (I)) || (J)) || (K)) || (L)) {
if (Math.abs(speed) > 4) {
_root.cr.start();
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
_root.damg._width = _root.damg._width - 23;
}
if (_root.damg._width < 1) {
_root.mssg = "YOU CRASHED";
_root.gov.play();
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
speed = 0;
incSpeed = 0;
} else {
gagne = ((((((((_root.parking.hitTest(arriere) && (_root.parking.hitTest(arrieregauche))) && (_root.parking.hitTest(gauche))) && (_root.parking.hitTest(avantgauche2))) && (_root.parking.hitTest(avantgauche))) && (_root.parking.hitTest(avant))) && (_root.parking.hitTest(avantdroite))) && (_root.parking.hitTest(avantdroite2))) && (_root.parking.hitTest(droite))) && (_root.parking.hitTest(arrieredroite));
if (((gagne == true) && (speed > -1)) && (speed < 1)) {
gare = true;
if (replayPlay) {
_root.timing = false;
replayPlay = false;
_root.replayos.gotoAndPlay(2);
} else {
_root.gagnos._visible = true;
_root.gagnos.gotoAndPlay(1);
_root.elapsedTime = (Math.ceil(_root.elapsedTime) + 8) - random(16);
score = (500000 / _root.elapsedTime) - forceChocs;
_root.timing = false;
_root.paused = false;
}
_root.playSurround(true);
if (_root.amitavaplay == true) {
_root.wel.play();
}
}
forceAccelerationY = oldSpeed - speed;
if (corpsDeltaY > 0) {
forceBack = (-corpsDeltaX) * 0.5;
} else {
forceBack = (-corpsDeltaX) * 2;
}
corpsSpeedX = corpsSpeedX + (forceAccelerationY + forceBack);
oldCorpsDeltaX = corpsDeltaX;
corpsDeltaX = corpsDeltaX + corpsSpeedX;
if (corpsDeltaX > maxCorpsDeltaX) {
corpsDeltaX = maxCorpsDeltaX;
} else if (corpsDeltaX < minCorpsDeltaX) {
corpsDeltaX = minCorpsDeltaX;
}
bustebras._x = _root.xCorps + corpsDeltaX;
corpsSpeedX = corpsSpeedX * corpsDecay;
teteDeltaX = teteDeltaX + (oldCorpsDeltaX - corpsDeltaX);
teteSpeedX = teteSpeedX + ((-teteDeltaX) * 0.5);
teteDeltaX = teteDeltaX + teteSpeedX;
if (teteDeltaX > maxTeteDeltaX) {
teteDeltaX = maxTeteDeltaX;
} else if (teteDeltaX < minTeteDeltaX) {
teteDeltaX = minTeteDeltaX;
}
tete._x = (_root.xTete + corpsDeltaX) + teteDeltaX;
teteSpeedX = teteSpeedX * teteDecay;
if (((oldRot != wheelRotation) || (oldSpeed != speed)) || (oldCorpsSpeedX != corpsSpeedX)) {
corpsDeltaY = ((wheelRotation * Math.abs(speed)) * maxCorpsDeltaY) / (maxWheelAngle * maxSpeed);
bustebras._y = _root.yCorps + corpsDeltaY;
teteDeltaY = corpsDeltaY * 0.3;
tete._y = (_root.yTete + corpsDeltaY) + teteDeltaY;
posBrasDroitVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
posBrasGaucheVolant = rayonVolant * Math.sin((Math.abs(2 * wheelRotation) * Math.PI) / (2 * maxWheelAngle));
setBrasRotation();
}
if (!replayPlay) {
replayRecFrame = replayRecFrame + 1;
}
}
}
}
}
Symbol 19 Button
on (release) {
getURL ("http://www.dailyfreegames.com", "_blank");
}
Symbol 20 MovieClip Frame 22
stop();
Symbol 28 Button
on (press) {
_root.gotoAndStop(6);
}
Symbol 31 MovieClip Frame 12
stop();
Symbol 32 Button
on (release) {
getURL ("http://www.dailyfreegames.com", "_blank");
}
Symbol 34 Button
on (release) {
getURL ("http://www.dailyfreegames.com/free-games.html", "_blank");
}
Symbol 43 Button
on (press) {
_root.gotoAndStop(15);
}
Symbol 52 Button
on (press) {
_root.gotoAndStop(5);
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 71 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 73 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 75 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 77 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 79 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 81 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 83 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 87 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 89 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 91 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 93 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 69 MovieClip "hitarea" in Symbol 95 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 116 MovieClip "tuturevertefeuxarr" in Symbol 117 MovieClip Frame 1
onClipEvent (load) {
}
Symbol 141 Button
on (press) {
_root.damg._width = 115;
_root.gotoAndStop(_root.amitavafrm);
gotoAndStop (1);
}
Symbol 142 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 2
_root.amitavaplay = false;
Symbol 142 MovieClip Frame 10
stop();
Symbol 146 MovieClip Frame 52
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 159 Button
on (press) {
_root.gov.pl = 0;
_root.gotoAndStop(5);
}
Symbol 165 MovieClip Frame 1
stop();
var vis = false;
Symbol 165 MovieClip Frame 8
_root.amitavaplay = false;
_root.clicStop();
_root.minutes = "00";
_root.seconds = "00";
var ssc = _root.mssg;
var sscb = _root.mssg;
Instance of Symbol 153 MovieClip "timo" in Symbol 165 MovieClip Frame 8
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_parent.vis == true) {
_visible = true;
}
}
Symbol 165 MovieClip Frame 31
stop();
Symbol 177 Button
on (press) {
_root.gotoAndStop(5);
}
Symbol 178 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 2
_root.amitavaplay = false;
Symbol 178 MovieClip Frame 25
stop();