Frame 1
var debug = true;
var gameID = 42;
var gameName = "18wheeler";
stop();
fscommand ("showmenu", "false");
prel.onEnterFrame = function () {
prel.procent.text = Math.ceil((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
prel.gotoAndStop(prel.procent.text);
if (Number(prel.procent.text) >= 100) {
play();
delete this.onEnterFrame;
}
};
Frame 2
stop();
Frame 3
if (!okToPlay) {
gotoAndStop (3);
}
Frame 4
_fglv = new LoadVars();
_fglv.gid = 1;
_fglv.url = _root._url;
_fglv.sendAndLoad("http://www.freegamesforyourwebsite.com/stats.php", _fglv, "POST");
delete _fglv;
Instance of Symbol 199 MovieClip in Frame 4
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=211&area=minilogo2", "_blank");
}
Frame 7
stopAllSounds();
_root.score = (_root.score = 0);
stop();
Frame 8
myMusic = new Sound(this);
myMusic.start(0, 99);
slider.control._y = -50;
slider.control.onEnterFrame = function () {
myMusic.setVolume(-this._y);
};
slider.control.onPress = function () {
startDrag (this, false, this._x, -100, this._x, 0);
};
slider.control.onReleaseOutside = function () {
stopDrag();
};
slider.control.onRelease = function () {
stopDrag();
};
Instance of Symbol 269 MovieClip "slider" in Frame 8
onClipEvent (load) {
}
Instance of Symbol 272 MovieClip in Frame 8
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Instance of Symbol 296 MovieClip in Frame 8
onClipEvent (enterFrame) {
if (Key.isDown(72)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 9
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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;
stop();
_root.two = false;
stop();
_root.connected = true;
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 338 MovieClip "land" in Frame 9
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "you crashed";
}
}
Instance of Symbol 377 MovieClip "voitureverte" in Frame 9
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 9
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(2);
}
Instance of Symbol 470 MovieClip "time" in Frame 9
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
_root.time.gotoAndStop(_root.time._currentframe + 0);
} else if (_root.stoptime == false) {
_root.time.gotoAndStop(_root.time._currentframe + 1);
}
}
Instance of Symbol 472 MovieClip "speed" in Frame 9
onClipEvent (enterFrame) {
if (Key.isDown(65) and Key.isDown(17)) {
_root.score = Number(_root.score) + 10;
}
}
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 491 MovieClip "sounds" in Frame 9
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 10
if (_root.lvls < 1) {
_root.lvls = (Number_root.lvls = 1);
}
Instance of Symbol 272 MovieClip in Frame 10
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 11
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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;
stop();
_root.two = false;
stop();
_root.connected = true;
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 318 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 498 MovieClip "movecar" in Frame 11
onClipEvent (enterFrame) {
if (_root.move == true) {
this.stop();
} else if (_root.move == false) {
this.play();
}
}
Instance of Symbol 377 MovieClip "voitureverte" in Frame 11
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
Instance of Symbol 338 MovieClip "land" in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "you crashed";
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 11
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(1);
}
Instance of Symbol 470 MovieClip "time" in Frame 11
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
_root.time.gotoAndStop(_root.time._currentframe + 0);
} else if (_root.stoptime == false) {
_root.time.gotoAndStop(_root.time._currentframe + 2);
}
}
Instance of Symbol 472 MovieClip "speed" in Frame 11
onClipEvent (enterFrame) {
if (Key.isDown(65) and Key.isDown(17)) {
_root.score = Number(_root.score) + 10;
}
}
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 491 MovieClip "sounds" in Frame 11
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 12
if (_root.lvls < 2) {
_root.lvls = (Number_root.lvls = 2);
}
Instance of Symbol 272 MovieClip in Frame 12
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 13
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.time.play();
_root.play_btn.gotoAndPlay(51);
_root.ava.play();
};
stop();
_root.two = false;
Instance of Symbol 318 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 377 MovieClip "voitureverte" in Frame 13
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 338 MovieClip "land" in Frame 13
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "you crashed";
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 13
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(3);
}
Instance of Symbol 472 MovieClip "speed" in Frame 13
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 491 MovieClip "sounds" in Frame 13
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 14
if (_root.lvls < 3) {
_root.lvls = (Number_root.lvls = 3);
}
Instance of Symbol 272 MovieClip in Frame 14
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 15
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.time.play();
_root.play_btn.gotoAndPlay(51);
_root.ava.play();
};
stop();
_root.two = false;
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 318 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 510 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.lost == true) {
this.stop();
}
}
Instance of Symbol 514 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "you crashed";
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 318 MovieClip "car1" in Frame 15
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
this._y = this._y - 5;
}
onClipEvent (enterFrame) {
if (this._y < -100) {
this._y = 600;
}
}
Instance of Symbol 322 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 377 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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 470 MovieClip "time" in Frame 15
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
_root.time.gotoAndStop(_root.time._currentframe + 0);
} else if (_root.stoptime == false) {
_root.time.gotoAndStop(_root.time._currentframe + 1);
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 15
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(4);
}
Instance of Symbol 472 MovieClip "speed" in Frame 15
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 491 MovieClip "sounds" in Frame 15
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 16
if (_root.lvls < 4) {
_root.lvls = (Number_root.lvls = 4);
}
Instance of Symbol 272 MovieClip in Frame 16
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 17
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.time.play();
_root.play_btn.gotoAndPlay(51);
_root.ava.play();
};
stop();
_root.two = false;
stop();
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 377 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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 535 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "you crashed";
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 537 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this)) {
_root.finnished.gotoAndStop(2);
_root.voitureverte.maxSpeed = 0;
}
}
Instance of Symbol 470 MovieClip "time" in Frame 17
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
_root.time.gotoAndStop(_root.time._currentframe + 0);
} else if (_root.stoptime == false) {
_root.time.gotoAndStop(_root.time._currentframe + 1);
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 17
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(5);
}
Instance of Symbol 472 MovieClip "speed" in Frame 17
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 491 MovieClip "sounds" in Frame 17
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 18
if (_root.lvls < 5) {
_root.lvls = (Number_root.lvls = 5);
}
Instance of Symbol 272 MovieClip in Frame 18
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 19
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.play_btn.gotoAndPlay(51);
_root.time.play();
_root.ava.play();
};
stop();
_root.two = false;
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 318 MovieClip "car1" in Frame 19
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
this._y = this._y + 8;
_root.voitureverte.gotoAndStop(2);
} else if (_root.caravane.fronthit.hitTest(this.skinn)) {
_root.move = true;
this._y = this._y + 8;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
this._y = this._y - 8;
}
onClipEvent (enterFrame) {
if (this._y < -100) {
this._y = 600;
}
}
onClipEvent (enterFrame) {
if (_root.T.cant.hitTest(this.mask3)) {
this._y = this._y + 8;
} else if (_root.car2.hitTest(this.mask3)) {
this._y = this._y + 8;
} else if (_root.lost == true) {
this._y = this._y + 8;
} else if (_root.T2.cant.hitTest(this.mask3)) {
this._y = this._y + 8;
} else {
this._y = this._y - 8;
}
}
Instance of Symbol 318 MovieClip "car2" in Frame 19
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
this._y = this._y + 6;
_root.voitureverte.gotoAndStop(2);
} else if (_root.caravane.fronthit.hitTest(this.skinn)) {
_root.move = true;
this._y = this._y + 8;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
this._y = this._y - 7;
}
onClipEvent (enterFrame) {
if (this._y < -100) {
this._y = 600;
}
}
onClipEvent (enterFrame) {
if (_root.T.cant.hitTest(this.mask3)) {
this._y = this._y + 7;
} else if (_root.car1.hitTest(this.mask3)) {
this._y = this._y + 7;
} else if (_root.lost == true) {
this._y = this._y + 7;
} else if (_root.T2.cant.hitTest(this.mask3)) {
this._y = this._y + 7;
} else {
this._y = this._y - 6;
}
}
Instance of Symbol 318 MovieClip "car3" in Frame 19
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
this._y = this._y - 6;
} else if (_root.caravane.fronthit.hitTest(this.skinn)) {
_root.move = true;
this._y = this._y + 8;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
this._y = this._y + 6;
}
onClipEvent (enterFrame) {
if (this._y > 600) {
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (_root.T.cant.hitTest(this.mask3)) {
this._y = this._y - 6;
} else if (_root.car1.hitTest(this.mask3)) {
this._y = this._y - 6;
} else if (_root.lost == true) {
this._y = this._y - 6;
} else if (_root.T2.cant.hitTest(this.mask3)) {
this._y = this._y - 6;
} else {
this._y = this._y + 6;
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 377 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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (((((_root.palmfond.boxx.hitTest(this.front) or _root.palmfond.boxxx.hitTest(this.front)) or _root.palmfond.boxxxx.hitTest(this.front)) or _root.palmfond.boxx.hitTest(this.box1)) or _root.palmfond.boxxx.hitTest(this.box1)) or _root.palmfond.boxxxx.hitTest(this.box1)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 537 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this)) {
_root.finnished.gotoAndStop(2);
_root.voitureverte.maxSpeed = 0;
}
}
Instance of Symbol 304 MovieClip "box2" in Frame 19
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 557 MovieClip "palmfond" in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this.mask)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (((((_root.voitureverte.front.hitTest(this.boxx) or _root.voitureverte.front.hitTest(this.boxxx)) or _root.voitureverte.front.hitTest(this.boxxxx)) or _root.voitureverte.back.hitTest(this.boxx)) or _root.voitureverte.back.hitTest(this.boxxx)) or _root.voitureverte.back.hitTest(this.boxxxx)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 561 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "you crashed";
}
}
onClipEvent (enterFrame) {
if ((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 19
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(9);
}
Instance of Symbol 472 MovieClip "speed" in Frame 19
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 491 MovieClip "sounds" in Frame 19
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 20
_root.two = true;
Instance of Symbol 557 MovieClip "caravane" in Frame 20
onClipEvent (load) {
function getNewCoord(vx, vy, vax, vay, vbx, vby) {
return({a:((vy * vbx) - (vx * vby)) / ((vay * vbx) - (vax * vby)), b:((vy * vax) - (vx * vay)) / ((vby * vax) - (vbx * vay))});
}
function init() {
_rotation = 82;
setMemoTracteur();
r = 130;
}
function transMemoTracteur(x, y) {
old_tracteur_x = old_tracteur_x + x;
old_tracteur_y = old_tracteur_y + y;
}
function setMemoTracteur() {
old_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(old_tracteur);
old_tracteur_x = old_tracteur.x;
old_tracteur_y = old_tracteur.y;
_x = old_tracteur_x;
_y = old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function setMemo() {
_x = memoX;
_y = memoY;
_rotation = memoRot;
old_tracteur_x = memo_old_tracteur_x;
old_tracteur_y = memo_old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function saveMemo() {
memoX = _x;
memoY = _y;
memoRot = _rotation;
memo_old_tracteur_x = old_tracteur_x;
memo_old_tracteur_y = old_tracteur_y;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function isParked() {
toreturn = true;
i = 0;
while (i < 4) {
p = {x:colShape[i].x, y:colShape[i].y};
localToGlobal(p);
if ((((p.x > _root.parking._x) && (p.y > _root.parking._y)) && (p.x < (_root.parking._x + _root.parking._width))) && (p.y < (_root.parking._y + _root.parking._height))) {
} else {
toreturn = false;
}
i++;
}
if (toreturn) {
rot = _rotation % 360;
if (rot < 0) {
rot = rot + 360;
}
}
return(toreturn);
}
function compute() {
new_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(new_tracteur);
new_tracteur_x = new_tracteur.x;
new_tracteur_y = new_tracteur.y;
new_tracteur_rotation = _rotation;
centre = {x:-r, y:0};
localToGlobal(centre);
toutdroit_x = old_tracteur_x - centre.x;
toutdroit_y = old_tracteur_y - centre.y;
deptracteur_x = new_tracteur_x - old_tracteur_x;
deptracteur_y = new_tracteur_y - old_tracteur_y;
deptracteur = getNewCoord(deptracteur_x, deptracteur_y, toutdroit_x, toutdroit_y, -toutdroit_y, toutdroit_x);
new_tracteur_rotation = new_tracteur_rotation + ((deptracteur.b * 180) / 3.141593);
_x = new_tracteur.x;
_y = new_tracteur.y;
_rotation = new_tracteur_rotation;
old_tracteur_x = _x;
old_tracteur_y = _y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
init();
colShape = new Array();
colShape[0] = {x:-200, y:-60};
colShape[1] = {x:-50, y:-45};
colShape[2] = {x:-50, y:45};
colShape[3] = {x:-200, y:60};
colShape[4] = colShape[0];
}
Frame 21
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Instance of Symbol 272 MovieClip in Frame 21
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 22
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.time.play();
_root.play_btn.gotoAndPlay(51);
_root.ava.play();
};
stop();
_root.two = false;
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 377 MovieClip "voitureverte" in Frame 22
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 537 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this)) {
_root.finnished.gotoAndStop(2);
_root.voitureverte.maxSpeed = 0;
}
}
Instance of Symbol 557 MovieClip "caravane" in Frame 22
onClipEvent (load) {
function getNewCoord(vx, vy, vax, vay, vbx, vby) {
return({a:((vy * vbx) - (vx * vby)) / ((vay * vbx) - (vax * vby)), b:((vy * vax) - (vx * vay)) / ((vby * vax) - (vbx * vay))});
}
function init() {
_rotation = 260;
setMemoTracteur();
r = 130;
}
function transMemoTracteur(x, y) {
old_tracteur_x = old_tracteur_x + x;
old_tracteur_y = old_tracteur_y + y;
}
function setMemoTracteur() {
old_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(old_tracteur);
old_tracteur_x = old_tracteur.x;
old_tracteur_y = old_tracteur.y;
_x = old_tracteur_x;
_y = old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function setMemo() {
_x = memoX;
_y = memoY;
_rotation = memoRot;
old_tracteur_x = memo_old_tracteur_x;
old_tracteur_y = memo_old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function saveMemo() {
memoX = _x;
memoY = _y;
memoRot = _rotation;
memo_old_tracteur_x = old_tracteur_x;
memo_old_tracteur_y = old_tracteur_y;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function isParked() {
toreturn = true;
i = 0;
while (i < 4) {
p = {x:colShape[i].x, y:colShape[i].y};
localToGlobal(p);
if ((((p.x > _root.parking._x) && (p.y > _root.parking._y)) && (p.x < (_root.parking._x + _root.parking._width))) && (p.y < (_root.parking._y + _root.parking._height))) {
} else {
toreturn = false;
}
i++;
}
if (toreturn) {
rot = _rotation % 360;
if (rot < 0) {
rot = rot + 360;
}
}
return(toreturn);
}
function compute() {
new_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(new_tracteur);
new_tracteur_x = new_tracteur.x;
new_tracteur_y = new_tracteur.y;
new_tracteur_rotation = _rotation;
centre = {x:-r, y:0};
localToGlobal(centre);
toutdroit_x = old_tracteur_x - centre.x;
toutdroit_y = old_tracteur_y - centre.y;
deptracteur_x = new_tracteur_x - old_tracteur_x;
deptracteur_y = new_tracteur_y - old_tracteur_y;
deptracteur = getNewCoord(deptracteur_x, deptracteur_y, toutdroit_x, toutdroit_y, -toutdroit_y, toutdroit_x);
new_tracteur_rotation = new_tracteur_rotation + ((deptracteur.b * 180) / 3.141593);
_x = new_tracteur.x;
_y = new_tracteur.y;
_rotation = new_tracteur_rotation;
old_tracteur_x = _x;
old_tracteur_y = _y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
init();
colShape = new Array();
colShape[0] = {x:-200, y:-60};
colShape[1] = {x:-50, y:-45};
colShape[2] = {x:-50, y:45};
colShape[3] = {x:-200, y:60};
colShape[4] = colShape[0];
}
Instance of Symbol 575 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "you crashed";
}
}
onClipEvent (enterFrame) {
if ((_root.caravane.boxx.hitTest(this.skinn) or _root.caravane.boxxx.hitTest(this.skinn)) or _root.caravane.boxxxx.hitTest(this.skinn)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 22
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(6);
}
Instance of Symbol 472 MovieClip "speed" in Frame 22
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 491 MovieClip "sounds" in Frame 22
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 23
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Instance of Symbol 272 MovieClip in Frame 23
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 24
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.time.play();
_root.play_btn.gotoAndPlay(51);
_root.ava.play();
_root.cargo.play();
};
stop();
_root.two = false;
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 514 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "you crashed";
}
}
Instance of Symbol 514 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "you crashed";
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 581 MovieClip "cargo" in Frame 24
onClipEvent (enterFrame) {
if (_root.lost == true) {
this.stop();
}
}
Instance of Symbol 377 MovieClip "voitureverte" in Frame 24
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 537 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this)) {
_root.finnished.gotoAndStop(2);
_root.voitureverte.maxSpeed = 0;
}
}
Instance of Symbol 557 MovieClip "caravane" in Frame 24
onClipEvent (load) {
function getNewCoord(vx, vy, vax, vay, vbx, vby) {
return({a:((vy * vbx) - (vx * vby)) / ((vay * vbx) - (vax * vby)), b:((vy * vax) - (vx * vay)) / ((vby * vax) - (vbx * vay))});
}
function init() {
_rotation = 180;
setMemoTracteur();
r = 130;
}
function transMemoTracteur(x, y) {
old_tracteur_x = old_tracteur_x + x;
old_tracteur_y = old_tracteur_y + y;
}
function setMemoTracteur() {
old_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(old_tracteur);
old_tracteur_x = old_tracteur.x;
old_tracteur_y = old_tracteur.y;
_x = old_tracteur_x;
_y = old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function setMemo() {
_x = memoX;
_y = memoY;
_rotation = memoRot;
old_tracteur_x = memo_old_tracteur_x;
old_tracteur_y = memo_old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function saveMemo() {
memoX = _x;
memoY = _y;
memoRot = _rotation;
memo_old_tracteur_x = old_tracteur_x;
memo_old_tracteur_y = old_tracteur_y;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function isParked() {
toreturn = true;
i = 0;
while (i < 4) {
p = {x:colShape[i].x, y:colShape[i].y};
localToGlobal(p);
if ((((p.x > _root.parking._x) && (p.y > _root.parking._y)) && (p.x < (_root.parking._x + _root.parking._width))) && (p.y < (_root.parking._y + _root.parking._height))) {
} else {
toreturn = false;
}
i++;
}
if (toreturn) {
rot = _rotation % 360;
if (rot < 0) {
rot = rot + 360;
}
}
return(toreturn);
}
function compute() {
new_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(new_tracteur);
new_tracteur_x = new_tracteur.x;
new_tracteur_y = new_tracteur.y;
new_tracteur_rotation = _rotation;
centre = {x:-r, y:0};
localToGlobal(centre);
toutdroit_x = old_tracteur_x - centre.x;
toutdroit_y = old_tracteur_y - centre.y;
deptracteur_x = new_tracteur_x - old_tracteur_x;
deptracteur_y = new_tracteur_y - old_tracteur_y;
deptracteur = getNewCoord(deptracteur_x, deptracteur_y, toutdroit_x, toutdroit_y, -toutdroit_y, toutdroit_x);
new_tracteur_rotation = new_tracteur_rotation + ((deptracteur.b * 180) / 3.141593);
_x = new_tracteur.x;
_y = new_tracteur.y;
_rotation = new_tracteur_rotation;
old_tracteur_x = _x;
old_tracteur_y = _y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
init();
colShape = new Array();
colShape[0] = {x:-200, y:-60};
colShape[1] = {x:-50, y:-45};
colShape[2] = {x:-50, y:45};
colShape[3] = {x:-200, y:60};
colShape[4] = colShape[0];
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 24
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 24
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(7);
}
Instance of Symbol 472 MovieClip "speed" in Frame 24
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 491 MovieClip "sounds" in Frame 24
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 25
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Instance of Symbol 272 MovieClip in Frame 25
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 26
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.time.play();
_root.play_btn.gotoAndPlay(51);
_root.ava.play();
};
stop();
_root.two = false;
stop();
Instance of Symbol 304 MovieClip "box2" in Frame 26
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 510 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.lost == true) {
this.stop();
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 322 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if ((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 510 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.lost == true) {
this.stop();
}
}
Instance of Symbol 322 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if ((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 377 MovieClip "voitureverte" in Frame 26
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (((((_root.palmfond.boxx.hitTest(this.front) or _root.palmfond.boxxx.hitTest(this.front)) or _root.palmfond.boxxxx.hitTest(this.front)) or _root.palmfond.boxx.hitTest(this.box1)) or _root.palmfond.boxxx.hitTest(this.box1)) or _root.palmfond.boxxxx.hitTest(this.box1)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 527 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if ((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 527 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if ((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 527 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if ((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 527 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this.front) or _root.caravane.backhit.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if ((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 557 MovieClip "palmfond" in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this.mask)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 590 MovieClip "land" in Frame 26
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "you crashed";
}
}
onClipEvent (enterFrame) {
if ((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 557 MovieClip "palmfond" in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this.mask)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (((((_root.voitureverte.front.hitTest(this.boxx) or _root.voitureverte.front.hitTest(this.boxxx)) or _root.voitureverte.front.hitTest(this.boxxxx)) or _root.voitureverte.back.hitTest(this.boxx)) or _root.voitureverte.back.hitTest(this.boxxx)) or _root.voitureverte.back.hitTest(this.boxxxx)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 26
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(8);
}
Instance of Symbol 591 MovieClip "speed" in Frame 26
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 491 MovieClip "sounds" in Frame 26
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 27
_root.two = true;
Instance of Symbol 557 MovieClip "caravane" in Frame 27
onClipEvent (load) {
function getNewCoord(vx, vy, vax, vay, vbx, vby) {
return({a:((vy * vbx) - (vx * vby)) / ((vay * vbx) - (vax * vby)), b:((vy * vax) - (vx * vay)) / ((vby * vax) - (vbx * vay))});
}
function init() {
_rotation = 360;
setMemoTracteur();
r = 130;
}
function transMemoTracteur(x, y) {
old_tracteur_x = old_tracteur_x + x;
old_tracteur_y = old_tracteur_y + y;
}
function setMemoTracteur() {
old_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(old_tracteur);
old_tracteur_x = old_tracteur.x;
old_tracteur_y = old_tracteur.y;
_x = old_tracteur_x;
_y = old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function setMemo() {
_x = memoX;
_y = memoY;
_rotation = memoRot;
old_tracteur_x = memo_old_tracteur_x;
old_tracteur_y = memo_old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function saveMemo() {
memoX = _x;
memoY = _y;
memoRot = _rotation;
memo_old_tracteur_x = old_tracteur_x;
memo_old_tracteur_y = old_tracteur_y;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function isParked() {
toreturn = true;
i = 0;
while (i < 4) {
p = {x:colShape[i].x, y:colShape[i].y};
localToGlobal(p);
if ((((p.x > _root.parking._x) && (p.y > _root.parking._y)) && (p.x < (_root.parking._x + _root.parking._width))) && (p.y < (_root.parking._y + _root.parking._height))) {
} else {
toreturn = false;
}
i++;
}
if (toreturn) {
rot = _rotation % 360;
if (rot < 0) {
rot = rot + 360;
}
}
return(toreturn);
}
function compute() {
new_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(new_tracteur);
new_tracteur_x = new_tracteur.x;
new_tracteur_y = new_tracteur.y;
new_tracteur_rotation = _rotation;
centre = {x:-r, y:0};
localToGlobal(centre);
toutdroit_x = old_tracteur_x - centre.x;
toutdroit_y = old_tracteur_y - centre.y;
deptracteur_x = new_tracteur_x - old_tracteur_x;
deptracteur_y = new_tracteur_y - old_tracteur_y;
deptracteur = getNewCoord(deptracteur_x, deptracteur_y, toutdroit_x, toutdroit_y, -toutdroit_y, toutdroit_x);
new_tracteur_rotation = new_tracteur_rotation + ((deptracteur.b * 180) / 3.141593);
_x = new_tracteur.x;
_y = new_tracteur.y;
_rotation = new_tracteur_rotation;
old_tracteur_x = _x;
old_tracteur_y = _y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
init();
colShape = new Array();
colShape[0] = {x:-200, y:-60};
colShape[1] = {x:-50, y:-45};
colShape[2] = {x:-50, y:45};
colShape[3] = {x:-200, y:60};
colShape[4] = colShape[0];
}
Instance of Symbol 537 MovieClip in Frame 27
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this)) {
_root.finnished.gotoAndStop(2);
_root.voitureverte.maxSpeed = 0;
}
}
Frame 28
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Instance of Symbol 272 MovieClip in Frame 28
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 29
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.time.play();
_root.play_btn.gotoAndPlay(51);
_root.ava.play();
};
stop();
_root.two = false;
Instance of Symbol 537 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.caravane.backhit.hitTest(this) and _root.caravane.boxx.hitTest(_root.secondbox)) {
_root.finnished.gotoAndStop(2);
_root.voitureverte.maxSpeed = 0;
}
}
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 537 MovieClip "secondbox" in Frame 29
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 377 MovieClip "voitureverte" in Frame 29
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (((((_root.palmfond.boxx.hitTest(this.front) or _root.palmfond.boxxx.hitTest(this.front)) or _root.palmfond.boxxxx.hitTest(this.front)) or _root.palmfond.boxx.hitTest(this.box1)) or _root.palmfond.boxxx.hitTest(this.box1)) or _root.palmfond.boxxxx.hitTest(this.box1)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 557 MovieClip "caravane" in Frame 29
onClipEvent (load) {
function getNewCoord(vx, vy, vax, vay, vbx, vby) {
return({a:((vy * vbx) - (vx * vby)) / ((vay * vbx) - (vax * vby)), b:((vy * vax) - (vx * vay)) / ((vby * vax) - (vbx * vay))});
}
function init() {
_rotation = 0;
setMemoTracteur();
r = 130;
}
function transMemoTracteur(x, y) {
old_tracteur_x = old_tracteur_x + x;
old_tracteur_y = old_tracteur_y + y;
}
function setMemoTracteur() {
old_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(old_tracteur);
old_tracteur_x = old_tracteur.x;
old_tracteur_y = old_tracteur.y;
_x = old_tracteur_x;
_y = old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function setMemo() {
_x = memoX;
_y = memoY;
_rotation = memoRot;
old_tracteur_x = memo_old_tracteur_x;
old_tracteur_y = memo_old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function saveMemo() {
memoX = _x;
memoY = _y;
memoRot = _rotation;
memo_old_tracteur_x = old_tracteur_x;
memo_old_tracteur_y = old_tracteur_y;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function isParked() {
toreturn = true;
i = 0;
while (i < 4) {
p = {x:colShape[i].x, y:colShape[i].y};
localToGlobal(p);
if ((((p.x > _root.parking._x) && (p.y > _root.parking._y)) && (p.x < (_root.parking._x + _root.parking._width))) && (p.y < (_root.parking._y + _root.parking._height))) {
} else {
toreturn = false;
}
i++;
}
if (toreturn) {
rot = _rotation % 360;
if (rot < 0) {
rot = rot + 360;
}
}
return(toreturn);
}
function compute() {
new_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(new_tracteur);
new_tracteur_x = new_tracteur.x;
new_tracteur_y = new_tracteur.y;
new_tracteur_rotation = _rotation;
centre = {x:-r, y:0};
localToGlobal(centre);
toutdroit_x = old_tracteur_x - centre.x;
toutdroit_y = old_tracteur_y - centre.y;
deptracteur_x = new_tracteur_x - old_tracteur_x;
deptracteur_y = new_tracteur_y - old_tracteur_y;
deptracteur = getNewCoord(deptracteur_x, deptracteur_y, toutdroit_x, toutdroit_y, -toutdroit_y, toutdroit_x);
new_tracteur_rotation = new_tracteur_rotation + ((deptracteur.b * 180) / 3.141593);
_x = new_tracteur.x;
_y = new_tracteur.y;
_rotation = new_tracteur_rotation;
old_tracteur_x = _x;
old_tracteur_y = _y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
init();
colShape = new Array();
colShape[0] = {x:-200, y:-60};
colShape[1] = {x:-50, y:-45};
colShape[2] = {x:-50, y:45};
colShape[3] = {x:-200, y:60};
colShape[4] = colShape[0];
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 596 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "you crashed";
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 29
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(10);
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 472 MovieClip "speed" in Frame 29
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 491 MovieClip "sounds" in Frame 29
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 30
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Instance of Symbol 272 MovieClip in Frame 30
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 31
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.time.play();
_root.play_btn.gotoAndPlay(51);
_root.ava.play();
};
stop();
_root.two = false;
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 31
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 377 MovieClip "voitureverte" in Frame 31
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (((((_root.palmfond.boxx.hitTest(this.front) or _root.palmfond.boxxx.hitTest(this.front)) or _root.palmfond.boxxxx.hitTest(this.front)) or _root.palmfond.boxx.hitTest(this.box1)) or _root.palmfond.boxxx.hitTest(this.box1)) or _root.palmfond.boxxxx.hitTest(this.box1)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 557 MovieClip "caravane" in Frame 31
onClipEvent (load) {
function getNewCoord(vx, vy, vax, vay, vbx, vby) {
return({a:((vy * vbx) - (vx * vby)) / ((vay * vbx) - (vax * vby)), b:((vy * vax) - (vx * vay)) / ((vby * vax) - (vbx * vay))});
}
function init() {
_rotation = 40;
setMemoTracteur();
r = 130;
}
function transMemoTracteur(x, y) {
old_tracteur_x = old_tracteur_x + x;
old_tracteur_y = old_tracteur_y + y;
}
function setMemoTracteur() {
old_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(old_tracteur);
old_tracteur_x = old_tracteur.x;
old_tracteur_y = old_tracteur.y;
_x = old_tracteur_x;
_y = old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function setMemo() {
_x = memoX;
_y = memoY;
_rotation = memoRot;
old_tracteur_x = memo_old_tracteur_x;
old_tracteur_y = memo_old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function saveMemo() {
memoX = _x;
memoY = _y;
memoRot = _rotation;
memo_old_tracteur_x = old_tracteur_x;
memo_old_tracteur_y = old_tracteur_y;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function isParked() {
toreturn = true;
i = 0;
while (i < 4) {
p = {x:colShape[i].x, y:colShape[i].y};
localToGlobal(p);
if ((((p.x > _root.parking._x) && (p.y > _root.parking._y)) && (p.x < (_root.parking._x + _root.parking._width))) && (p.y < (_root.parking._y + _root.parking._height))) {
} else {
toreturn = false;
}
i++;
}
if (toreturn) {
rot = _rotation % 360;
if (rot < 0) {
rot = rot + 360;
}
}
return(toreturn);
}
function compute() {
new_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(new_tracteur);
new_tracteur_x = new_tracteur.x;
new_tracteur_y = new_tracteur.y;
new_tracteur_rotation = _rotation;
centre = {x:-r, y:0};
localToGlobal(centre);
toutdroit_x = old_tracteur_x - centre.x;
toutdroit_y = old_tracteur_y - centre.y;
deptracteur_x = new_tracteur_x - old_tracteur_x;
deptracteur_y = new_tracteur_y - old_tracteur_y;
deptracteur = getNewCoord(deptracteur_x, deptracteur_y, toutdroit_x, toutdroit_y, -toutdroit_y, toutdroit_x);
new_tracteur_rotation = new_tracteur_rotation + ((deptracteur.b * 180) / 3.141593);
_x = new_tracteur.x;
_y = new_tracteur.y;
_rotation = new_tracteur_rotation;
old_tracteur_x = _x;
old_tracteur_y = _y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
init();
colShape = new Array();
colShape[0] = {x:-200, y:-60};
colShape[1] = {x:-50, y:-45};
colShape[2] = {x:-50, y:45};
colShape[3] = {x:-200, y:60};
colShape[4] = colShape[0];
}
Instance of Symbol 472 MovieClip "speed" in Frame 31
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 31
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(11);
}
Instance of Symbol 491 MovieClip "sounds" in Frame 31
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 32
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Instance of Symbol 272 MovieClip in Frame 32
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 33
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.time.play();
_root.play_btn.gotoAndPlay(51);
_root.ava.play();
};
stop();
_root.two = false;
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 612 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 612 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 612 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 612 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 612 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 612 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 318 MovieClip "car1" in Frame 33
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
this._x = this._x + 8;
_root.voitureverte.gotoAndStop(2);
} else if (((((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) or _root.caravane.boxx.hitTest(this.b)) or _root.caravane.boxxx.hitTest(this.back)) or _root.caravane.boxxxx.hitTest(this.back)) {
_root.move = true;
this._x = this._x + 8;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
this._x = this._x - 8;
}
onClipEvent (enterFrame) {
if (this._x < -100) {
this._x = random(2000) + 1000;
}
}
onClipEvent (enterFrame) {
if (_root.T.cant.hitTest(this.mask3)) {
this._x = this._x + 8;
} else if (_root.car2.hitTest(this.mask3)) {
this._x = this._x + 8;
} else if (_root.lost == true) {
this._x = this._x + 8;
} else if (_root.T2.cant.hitTest(this.mask3)) {
this._x = this._x + 8;
} else {
this._x = this._x - 8;
}
}
Instance of Symbol 377 MovieClip "voitureverte" in Frame 33
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (((((_root.palmfond.boxx.hitTest(this.front) or _root.palmfond.boxxx.hitTest(this.front)) or _root.palmfond.boxxxx.hitTest(this.front)) or _root.palmfond.boxx.hitTest(this.box1)) or _root.palmfond.boxxx.hitTest(this.box1)) or _root.palmfond.boxxxx.hitTest(this.box1)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 557 MovieClip "caravane" in Frame 33
onClipEvent (load) {
function getNewCoord(vx, vy, vax, vay, vbx, vby) {
return({a:((vy * vbx) - (vx * vby)) / ((vay * vbx) - (vax * vby)), b:((vy * vax) - (vx * vay)) / ((vby * vax) - (vbx * vay))});
}
function init() {
_rotation = 0;
setMemoTracteur();
r = 130;
}
function transMemoTracteur(x, y) {
old_tracteur_x = old_tracteur_x + x;
old_tracteur_y = old_tracteur_y + y;
}
function setMemoTracteur() {
old_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(old_tracteur);
old_tracteur_x = old_tracteur.x;
old_tracteur_y = old_tracteur.y;
_x = old_tracteur_x;
_y = old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function setMemo() {
_x = memoX;
_y = memoY;
_rotation = memoRot;
old_tracteur_x = memo_old_tracteur_x;
old_tracteur_y = memo_old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function saveMemo() {
memoX = _x;
memoY = _y;
memoRot = _rotation;
memo_old_tracteur_x = old_tracteur_x;
memo_old_tracteur_y = old_tracteur_y;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function isParked() {
toreturn = true;
i = 0;
while (i < 4) {
p = {x:colShape[i].x, y:colShape[i].y};
localToGlobal(p);
if ((((p.x > _root.parking._x) && (p.y > _root.parking._y)) && (p.x < (_root.parking._x + _root.parking._width))) && (p.y < (_root.parking._y + _root.parking._height))) {
} else {
toreturn = false;
}
i++;
}
if (toreturn) {
rot = _rotation % 360;
if (rot < 0) {
rot = rot + 360;
}
}
return(toreturn);
}
function compute() {
new_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(new_tracteur);
new_tracteur_x = new_tracteur.x;
new_tracteur_y = new_tracteur.y;
new_tracteur_rotation = _rotation;
centre = {x:-r, y:0};
localToGlobal(centre);
toutdroit_x = old_tracteur_x - centre.x;
toutdroit_y = old_tracteur_y - centre.y;
deptracteur_x = new_tracteur_x - old_tracteur_x;
deptracteur_y = new_tracteur_y - old_tracteur_y;
deptracteur = getNewCoord(deptracteur_x, deptracteur_y, toutdroit_x, toutdroit_y, -toutdroit_y, toutdroit_x);
new_tracteur_rotation = new_tracteur_rotation + ((deptracteur.b * 180) / 3.141593);
_x = new_tracteur.x;
_y = new_tracteur.y;
_rotation = new_tracteur_rotation;
old_tracteur_x = _x;
old_tracteur_y = _y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
init();
colShape = new Array();
colShape[0] = {x:-200, y:-60};
colShape[1] = {x:-50, y:-45};
colShape[2] = {x:-50, y:45};
colShape[3] = {x:-200, y:60};
colShape[4] = colShape[0];
}
Instance of Symbol 470 MovieClip "time" in Frame 33
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
_root.time.gotoAndStop(_root.time._currentframe + 0);
} else if (_root.stoptime == false) {
_root.time.gotoAndStop(_root.time._currentframe + 2);
}
}
Instance of Symbol 472 MovieClip "speed" in Frame 33
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 33
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(12);
}
Instance of Symbol 491 MovieClip "sounds" in Frame 33
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 34
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Instance of Symbol 272 MovieClip in Frame 34
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 35
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.time.play();
_root.play_btn.gotoAndPlay(51);
_root.ava.play();
};
stop();
_root.two = false;
Instance of Symbol 612 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 35
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 318 MovieClip "car1" in Frame 35
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
this._x = this._x + 0;
this._y = this._y + 0;
_root.voitureverte.gotoAndStop(2);
} else if (((((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) or _root.caravane.boxx.hitTest(this.b)) or _root.caravane.boxxx.hitTest(this.back)) or _root.caravane.boxxxx.hitTest(this.back)) {
_root.move = true;
this._x = this._x + 0;
this._y = this._y + 0;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (this._y <= -100) {
this._x = -320;
this._y = 927.5;
}
}
onClipEvent (enterFrame) {
if (_root.T.cant.hitTest(this.mask3)) {
this._x = this._x - 0;
this._y = this._y + 0;
} else if (_root.car2.hitTest(this.mask3)) {
this._x = this._x - 0;
this._y = this._y + 0;
} else if (_root.lost == true) {
this._x = this._x - 0;
this._y = this._y + 0;
} else if (_root.T2.cant.hitTest(this.mask3)) {
this._x = this._x - 0;
this._y = this._y + 0;
} else {
this._x = this._x + 8;
this._y = this._y - 8;
}
}
Instance of Symbol 377 MovieClip "voitureverte" in Frame 35
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (((((_root.palmfond.boxx.hitTest(this.front) or _root.palmfond.boxxx.hitTest(this.front)) or _root.palmfond.boxxxx.hitTest(this.front)) or _root.palmfond.boxx.hitTest(this.box1)) or _root.palmfond.boxxx.hitTest(this.box1)) or _root.palmfond.boxxxx.hitTest(this.box1)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 557 MovieClip "caravane" in Frame 35
onClipEvent (load) {
function getNewCoord(vx, vy, vax, vay, vbx, vby) {
return({a:((vy * vbx) - (vx * vby)) / ((vay * vbx) - (vax * vby)), b:((vy * vax) - (vx * vay)) / ((vby * vax) - (vbx * vay))});
}
function init() {
_rotation = 315;
setMemoTracteur();
r = 130;
}
function transMemoTracteur(x, y) {
old_tracteur_x = old_tracteur_x + x;
old_tracteur_y = old_tracteur_y + y;
}
function setMemoTracteur() {
old_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(old_tracteur);
old_tracteur_x = old_tracteur.x;
old_tracteur_y = old_tracteur.y;
_x = old_tracteur_x;
_y = old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function setMemo() {
_x = memoX;
_y = memoY;
_rotation = memoRot;
old_tracteur_x = memo_old_tracteur_x;
old_tracteur_y = memo_old_tracteur_y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
function saveMemo() {
memoX = _x;
memoY = _y;
memoRot = _rotation;
memo_old_tracteur_x = old_tracteur_x;
memo_old_tracteur_y = old_tracteur_y;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function isParked() {
toreturn = true;
i = 0;
while (i < 4) {
p = {x:colShape[i].x, y:colShape[i].y};
localToGlobal(p);
if ((((p.x > _root.parking._x) && (p.y > _root.parking._y)) && (p.x < (_root.parking._x + _root.parking._width))) && (p.y < (_root.parking._y + _root.parking._height))) {
} else {
toreturn = false;
}
i++;
}
if (toreturn) {
rot = _rotation % 360;
if (rot < 0) {
rot = rot + 360;
}
}
return(toreturn);
}
function compute() {
new_tracteur = {x:-28, y:0};
_root.voitureverte.localToGlobal(new_tracteur);
new_tracteur_x = new_tracteur.x;
new_tracteur_y = new_tracteur.y;
new_tracteur_rotation = _rotation;
centre = {x:-r, y:0};
localToGlobal(centre);
toutdroit_x = old_tracteur_x - centre.x;
toutdroit_y = old_tracteur_y - centre.y;
deptracteur_x = new_tracteur_x - old_tracteur_x;
deptracteur_y = new_tracteur_y - old_tracteur_y;
deptracteur = getNewCoord(deptracteur_x, deptracteur_y, toutdroit_x, toutdroit_y, -toutdroit_y, toutdroit_x);
new_tracteur_rotation = new_tracteur_rotation + ((deptracteur.b * 180) / 3.141593);
_x = new_tracteur.x;
_y = new_tracteur.y;
_rotation = new_tracteur_rotation;
old_tracteur_x = _x;
old_tracteur_y = _y;
_root.ombrecaravane._x = _x + 25;
_root.ombrecaravane._y = _y + 25;
_root.ombrecaravane._rotation = _rotation;
_root.maskcaravane._x = _x;
_root.maskcaravane._y = _y;
_root.maskcaravane._rotation = _rotation;
}
init();
colShape = new Array();
colShape[0] = {x:-200, y:-60};
colShape[1] = {x:-50, y:-45};
colShape[2] = {x:-50, y:45};
colShape[3] = {x:-200, y:60};
colShape[4] = colShape[0];
}
Instance of Symbol 470 MovieClip "time" in Frame 35
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
_root.time.gotoAndStop(_root.time._currentframe + 0);
} else if (_root.stoptime == false) {
_root.time.gotoAndStop(_root.time._currentframe + 1);
}
}
Instance of Symbol 472 MovieClip "speed" in Frame 35
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 35
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(13);
}
Instance of Symbol 491 MovieClip "sounds" in Frame 35
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 36
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Instance of Symbol 272 MovieClip in Frame 36
onClipEvent (enterFrame) {
_root.gotoAndStop(_root._currentframe + 1);
}
Frame 37
function getCoordPolaire(p) {
dx = p.x;
dy = p.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({x:p.x, y:p.y, a:a, d:d});
}
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;
}
var _local2 = (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;
_root.paused = false;
_root.timing = 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.time.play();
_root.play_btn.gotoAndPlay(51);
_root.ava.play();
};
stop();
_root.two = false;
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 377 MovieClip "voitureverte" in Frame 37
onClipEvent (load) {
function setBrasRotation() {
xVolant = reposBonhommeVolant - corpsDeltaX;
yVolantGauche = corpsDeltaY + posBrasGaucheVolant;
yDiff = yVolantGauche - lEpaule;
lEpauleGaucheVolant = Math.sqrt((yDiff * yDiff) + (xVolant * xVolant));
alpha = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((-(alpha + beta)) * 180) / 3.141593;
Angle2 = ((2 * beta) * 180) / 3.141593;
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 = yDiff / xVolant;
beta = Math.acos(lEpauleGaucheVolant / (2 * lBras));
Angle1 = ((beta - alpha) * 180) / 3.141593;
Angle2 = ((-2 * beta) * 180) / 3.141593;
bustebras.brasdroitplein._rotation = Angle1;
bustebras.contourbrasdroit._rotation = Angle1;
bustebras.contourbrasdroit.avantbras._rotation = Angle2;
}
function init() {
speedDecay = 0.9;
incRotation = 0;
maxWheelAngle = 55;
incSpeed = 0;
speed = 0;
wheelRotation = 0;
carLength = 138.8;
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;
_root.ombrevoiture._x = _x + 10;
_root.ombrevoiture._y = _y + 10;
_root.ombrevoiture._rotation = _rotation;
_root.maskvoiture._x = _x;
_root.maskvoiture._y = _y;
_root.maskvoiture._rotation = _rotation;
setBrasRotation();
tuturevertefeuxarr.gotoAndStop(1);
chocs = 0;
forceChocs = 0;
score = 0;
_root.caravane.init();
}
function initReplayRec() {
replayRecFrame = 0;
replayPlayFrame = 0;
replayRecEventsIndex = 0;
replayPlayEventsIndex = 0;
replayEvents = new Array();
replayPlay = false;
_root.replayos.gotoAndStop(1);
_root.repclign.stop();
_root.repclign._visible = false;
}
function side(v, po) {
return((po.y * v.x) - (po.x * v.y));
}
function inShape(p) {
toreturn = true;
oldPoint = {x:colShape[0].x, y:colShape[0].y};
localToGlobal(oldPoint);
i = 0;
while (i < 4) {
newPoint = {x:colShape[i + 1].x, y:colShape[i + 1].y};
localToGlobal(newPoint);
vShape = {x:newPoint.x - oldPoint.x, y:newPoint.y - oldPoint.y};
testPoint = {x:p.x - oldPoint.x, y:p.y - oldPoint.y};
if (side(vShape, testPoint) < 0) {
toreturn = false;
break;
}
oldPoint = newPoint;
i++;
}
return(toreturn);
}
function hit(clip) {
return(inShape({x:clip._x, y:clip._y}) || (_root.caravane.inShape({x:clip._x, y:clip._y})));
}
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) {
incSpeed = -1;
toreturn = true;
}
} else if (t == 38) {
if (incSpeed != 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) {
incSpeed = 0;
}
} else if (t == 38) {
if (incSpeed > 0) {
incSpeed = 0;
}
}
}
init();
initReplayRec();
colShape = new Array();
colShape[0] = {x:-15, y:-30};
colShape[1] = {x:110, y:-30};
colShape[2] = {x:110, y:30};
colShape[3] = {x:-15, y:30};
colShape[4] = colShape[0];
}
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) {
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)) {
t = Key.getCode();
keyUpAction(t);
replayEvents[replayRecEventsIndex] = {framenb:replayRecFrame, updown:0, keycode:t};
replayRecEventsIndex = replayRecEventsIndex + 1;
}
}
onClipEvent (enterFrame) {
if ((_root.timing == true) && (_root.paused == false)) {
if (replayPlay) {
currentFrameIsEvented = true;
while (currentFrameIsEvented) {
nextFrame = replayEvents[replayPlayEventsIndex].framenb;
if (nextFrame == replayPlayFrame) {
if (replayEvents[replayPlayEventsIndex].updown == 0) {
keyUpAction(replayEvents[replayPlayEventsIndex].keycode);
} else {
keyDownAction(replayEvents[replayPlayEventsIndex].keycode);
}
replayPlayEventsIndex = replayPlayEventsIndex + 1;
}
currentFrameIsEvented = false;
}
replayPlayFrame = replayPlayFrame + 1;
}
memoX = _x;
memoY = _y;
memoRot = _rotation;
_root.caravane.saveMemo();
oldRot = wheelRotation;
oldSpeed = speed;
oldCorpsSpeedX = corpsSpeedX;
speed = speed + incSpeed;
if (speed > maxSpeed) {
speed = maxSpeed;
} else if (speed < (-maxSpeed)) {
speed = -maxSpeed;
}
if (incSpeed == 0) {
speed = speed * speedDecay;
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 * 0.017453) * speed;
_rotation = (_rotation + (((incx / carLength) * 250) / 3.141593));
incy = Math.cos(wheelRotation * 0.017453) * speed;
_y = (_y + (Math.sin((_rotation + 0) * 0.017453) * incy));
_x = (_x + (Math.cos((_rotation + 0) * 0.017453) * incy));
if (_y < 0) {
_y = (_y + widthScene);
_root.caravane.transMemoTracteur(0, widthScene);
} else if (_y > widthScene) {
_y = (_y - widthScene);
_root.caravane.transMemoTracteur(0, -widthScene);
}
if (_x < 0) {
_x = (_x + widthScene);
_root.caravane.transMemoTracteur(widthScene, 0);
} else if (_x > widthScene) {
_x = (_x - widthScene);
_root.caravane.transMemoTracteur(-widthScene, 0);
}
_root.caravane.compute();
A = hit(_root.palmhaut);
B = hit(_root.palmbas);
C = hit(_root.palmfond);
angVoitureCaravane = Math.abs(_rotation - _root.caravane._rotation) % 360;
if (angVoitureCaravane > 180) {
angVoitureCaravane = 360 - angVoitureCaravane;
}
if (angVoitureCaravane > 75) {
D = true;
} else {
D = false;
}
if (((A || (B)) || (C)) || (D)) {
if (Math.abs(speed) > 7) {
chocs = chocs + 1;
forceChocs = forceChocs + Math.abs(speed);
}
_x = memoX;
_y = memoY;
_rotation = memoRot;
_root.caravane.setMemo();
speed = 0;
} else {
gagne = _root.caravane.isParked();
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);
}
}
}
}
onClipEvent (load) {
maxSpeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
maxSpeed = 0;
}
}
onClipEvent (enterFrame) {
if (!Key.isDown(38)) {
incSpeed = 0;
} else if (_root.connected == false) {
maxSpeed = 3;
} else if (_root.connected == true) {
maxSpeed = 3;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.palmfond._x, _root.palmfond._y, true)) {
maxSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (!_root.road.hitTest(this._x, this._y, true)) {
_root.fault.gotoAndStop(_root.fault._currentframe + 1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
maxSpeed = 2;
incSpeed = -2;
}
}
onClipEvent (enterFrame) {
if (this._x > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._x < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y < 0) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
} else if (this._y > 550) {
this.play();
maxSpeed = 0;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (((((_root.palmfond.boxx.hitTest(this.front) or _root.palmfond.boxxx.hitTest(this.front)) or _root.palmfond.boxxxx.hitTest(this.front)) or _root.palmfond.boxx.hitTest(this.box1)) or _root.palmfond.boxxx.hitTest(this.box1)) or _root.palmfond.boxxxx.hitTest(this.box1)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 338 MovieClip "land" in Frame 37
onClipEvent (enterFrame) {
if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 510 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.lost == true) {
this.stop();
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 306 MovieClip in Frame 37
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.caravane.hitTest(this._x, this._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 470 MovieClip "time" in Frame 37
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
_root.time.gotoAndStop(_root.time._currentframe + 0);
} else if (_root.stoptime == false) {
_root.time.gotoAndStop(_root.time._currentframe + 1);
}
}
Instance of Symbol 472 MovieClip "speed" in Frame 37
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 411 MovieClip "ava" in Frame 37
onClipEvent (enterFrame) {
this.drivertext.gotoAndStop(14);
}
Instance of Symbol 491 MovieClip "sounds" in Frame 37
onClipEvent (load) {
stopAllSounds();
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
} else if (Key.isDown(38)) {
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(1);
}
}
Frame 38
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Instance of Symbol 272 MovieClip in Frame 38
onClipEvent (enterFrame) {
_root.gotoAndStop(43);
}
Frame 40
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Frame 42
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Frame 44
if (_root.lvls < 9) {
_root.lvls = (Number_root.lvls = 8);
}
Frame 46
submitScore.Score = _root.score;
Instance of Symbol 472 MovieClip "speed" in Frame 46
onClipEvent (enterFrame) {
if (Key.isDown(65) and Key.isDown(17)) {
_root.score = (_root.score = 1337);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68) and Key.isDown(17)) {
_root.score = (_root.score = 11333377);
}
}
onClipEvent (enterFrame) {
if (_root.score < 0) {
_root.score = (_root.score = 0);
}
}
Instance of Symbol 692 MovieClip [TMPd4lzhusf84] "submitScore" in Frame 46
//component parameters
onClipEvent (construct) {
btnMC = "submitMe";
gameID = 42;
}
Frame 47
function updateScoreboard(sNum) {
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
_root["mcScoreboard" + sNum].mcLoading._visible = false;
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = _root["mcScoreboard" + sNum].sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.item = myPlayer.length;
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.speedy = 0;
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.desty = 0;
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
trace("up");
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
trace((this._parent.mcBlock._height + " - ") + (this.mcScore._height * this.item));
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
trace("down");
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
if (sNum == 1) {
updateScoreboard(2);
}
};
if (sNum == 1) {
xmlPlayer.load((((("http://" + _root.Dsource) + ".freeonlinegames.com/scoreboard/getTopPlayer.php?id=") + _root.gameID) + "&rand=") + random(999999));
} else if (sNum == 2) {
xmlPlayer.load(((((("http://" + _root.Dsource) + ".freeonlinegames.com/scoreboard/getTopPlayer.php?id=") + _root.gameID) + "&rand=") + random(999999)) + "&filt=1");
}
}
stop();
var gameID = 42;
Dsource = "www";
mcScoreboard1.sboard.dir = "stop";
mcScoreboard2.sboard.dir = "stop";
mcScoreboard1.sboard.mcScoreHolder.mcScore._visible = false;
mcScoreboard2.sboard.mcScoreHolder.mcScore._visible = false;
updateScoreboard(1);
Instance of Symbol 726 MovieClip [TMP6ojzjuzm8i] in Frame 47
//component parameters
onClipEvent (construct) {
gameID = 42;
}
Instance of Symbol 733 MovieClip [TMP6pbk6uzm9i] in Frame 47
//component parameters
onClipEvent (construct) {
gameID = 42;
}
Symbol 12 Button
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=1&area=loader", "_blank");
}
Instance of Symbol 20 MovieClip "mcNotice" in Symbol 57 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 57 MovieClip Frame 120
stop();
if ((_url.indexOf("freeonlinegames.com") >= 0) && (_url.indexOf("file:") == -1)) {
_root.okToPlay = true;
_root.play();
} else if (_root.debug) {
_root.okToPlay = true;
_root.play();
} else {
_root.mcTaglines._visible = false;
mcNotice._visible = true;
}
Symbol 58 MovieClip Frame 71
stop();
var fogsound = new Sound();
fogsound.attachSound("fogaudio");
fogsound.start(0, 1);
Symbol 61 MovieClip Frame 1
_root.earl223 = function (val) {
var _local3 = new Array("_", "Z", "y", "x", "W", "v", "u", "T", "s", "r", "Q", "P", "O", "n", "m", "L", "K", "j", "i", "H", "g", "F", "e", "d", "C", "B", "a");
var _local2 = "";
val1 = 0;
while (val1 < val.length) {
if (val.substr(val1, 1) == ":") {
_local2 = _local2 + ":";
} else if (Number(val.substr(val1, 2)) > 26) {
_local2 = _local2 + _local3[Number(val.substr(val1, 1))];
} else if (Number(val.substr(val1, 1)) == 0) {
_local2 = _local2 + "_";
} else {
_local2 = _local2 + _local3[Number(val.substr(val1, 2))];
val1++;
}
val1++;
}
return(_local2);
};
Symbol 69 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 1
stop();
var tagctr = (random(55) + 1);
gotoAndStop(tagctr);
Symbol 130 MovieClip Frame 105
stop();
Symbol 137 MovieClip Frame 1
stop();
Symbol 148 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?18wheeler", "_blank");
}
Symbol 203 MovieClip Frame 1
stop();
Instance of Symbol 202 MovieClip "ex" in Symbol 203 MovieClip Frame 1
onClipEvent (enterFrame) {
removeMovieClip(_root.time);
}
onClipEvent (enterFrame) {
_root.exam2 = false;
}
Symbol 203 MovieClip Frame 2
stop();
Instance of Symbol 202 MovieClip in Symbol 203 MovieClip Frame 2
onClipEvent (enterFrame) {
exam2 = true;
}
Symbol 205 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?18wheeler", "_blank");
}
Symbol 213 MovieClip Frame 20
stop();
Symbol 218 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?18wheelerchallenge", "_blank");
}
Symbol 219 MovieClip Frame 10
stop();
Symbol 221 Button
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/?18wheeler", "_blank");
}
Symbol 223 Button
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/?18wheelerchallenge", "_blank");
}
Symbol 224 MovieClip Frame 20
stop();
Symbol 228 Button
on (release) {
play();
}
Symbol 231 Button
on (release) {
_root.gotoAndStop("level1");
}
Symbol 238 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 11
stop();
Symbol 243 Button
on (release) {
play();
}
Symbol 250 Button
on (release) {
_parent.gotoAndPlay(51);
}
Symbol 252 MovieClip Frame 1
stop();
Symbol 252 MovieClip Frame 11
stop();
Symbol 257 Button
on (release) {
_root.gotoAndStop(44);
}
Symbol 261 Button
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=1&area=menu", "_blank");
}
Symbol 263 MovieClip Frame 11
stop();
Instance of Symbol 265 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 276 Button
on (release) {
play();
}
Symbol 281 Button
on (release) {
_root.gotoAndStop("mainmenu");
}
Symbol 284 Button
on (release) {
_root.gotoAndStop("scoreboard");
}
Symbol 285 MovieClip Frame 1
stop();
Symbol 286 Button
on (release) {
_parent.gotoAndPlay(12);
}
Symbol 288 Button
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=1&area=paused", "_blank");
}
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 11
stop();
Symbol 291 MovieClip Frame 18
gotoAndStop (1);
Symbol 296 MovieClip Frame 1
stop();
Instance of Symbol 310 MovieClip "skinn" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 315 MovieClip "mask3" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 317 MovieClip "front" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 317 MovieClip "back" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 317 MovieClip "front" in Symbol 322 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 317 MovieClip "back" in Symbol 322 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 324 MovieClip in Symbol 330 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 339 MovieClip Frame 1
stop();
Symbol 359 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 1
stop();
Instance of Symbol 349 MovieClip "tuturevertefeuxarr" in Symbol 373 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Instance of Symbol 351 MovieClip "box1" in Symbol 373 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.box2.hitTest(this)) {
_root.gotoAndStop(6);
}
}
Symbol 374 MovieClip Frame 5
stop();
Symbol 377 MovieClip Frame 1
_root.lost = false;
stop();
Instance of Symbol 339 MovieClip in Symbol 377 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 351 MovieClip "box1" in Symbol 377 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 317 MovieClip "front" in Symbol 377 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 317 MovieClip "front2" in Symbol 377 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.park.box2.hitTest(this) and _root.voitureverte.box2.hitTest(_root.park.box1)) or (_root.park.box1.hitTest(this) and _root.voitureverte.box2.hitTest(_root.park.box2))) {
_root.finnished.gotoAndStop(2);
_root.voitureverte.maxSpeed = 0;
_root.speed.gotoAndStop(1);
}
}
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.park2.box1.hitTest(this) and _root.park2.box2.hitTest(_root.voitureverte.box2)) {
_root.finnished.gotoAndStop(2);
_root.voitureverte.maxSpeed = 0;
_root.speed.gotoAndStop(1);
}
}
Instance of Symbol 317 MovieClip "box2" in Symbol 377 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.box2.hitTest(this)) {
_root.gotoAndStop(_root._currentframe + 1);
}
}
Instance of Symbol 359 MovieClip in Symbol 377 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
this.gotoAndPlay(2);
}
}
Instance of Symbol 372 MovieClip in Symbol 377 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
this.gotoAndStop(2);
} else if (Key.isDown(39)) {
this.gotoAndStop(3);
} else {
this.gotoAndStop(1);
}
}
Symbol 377 MovieClip Frame 2
_root.finnished.gotoAndStop(3).play();
_root.voitureverte.maxSpeed = 0;
_root.lost = true;
Instance of Symbol 374 MovieClip in Symbol 377 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.voitureverte.maxSpeed = 0;
}
Symbol 410 MovieClip Frame 1
stop();
Symbol 411 MovieClip Frame 10
stop();
Symbol 411 MovieClip Frame 21
stop();
Symbol 415 Button
on (release, keyPress "<Space>") {
_root.voitureverte.clicStart();
_root.time.play();
_root.ava.play();
_root.paused = false;
_root.timing = true;
_root.cargo.play();
_root.play_btn.gotoAndPlay(51);
}
Symbol 420 MovieClip Frame 1
_root.stoptime = true;
Symbol 420 MovieClip Frame 2
_root.stoptime = true;
_root.time.stop();
Symbol 420 MovieClip Frame 3
_root.stoptime = true;
Symbol 420 MovieClip Frame 24
_root.stoptime = true;
Symbol 420 MovieClip Frame 50
gotoAndPlay (38);
Instance of Symbol 419 MovieClip in Symbol 420 MovieClip Frame 51
onClipEvent (enterFrame) {
_root.stoptime = false;
}
Symbol 420 MovieClip Frame 65
stop();
Symbol 431 MovieClip Frame 1
stop();
Symbol 431 MovieClip Frame 121
stop();
_root.voitureverte.gotoAndStop(2);
Symbol 438 Button
on (release, keyPress "<Space>") {
_root.gotoAndStop(_root._currentframe + 1);
}
Symbol 440 MovieClip Frame 42
stop();
Symbol 448 Button
on (release, keyPress "<Space>") {
_root.score = Number(_root.score) - 150;
_root.gotoAndStop(_root._currentframe - 1);
}
Symbol 449 Button
on (release, keyPress "<Space>") {
_root.score = Number(_root.score) - 25;
_root.gotoAndStop(_root._currentframe - 2);
}
Symbol 450 MovieClip Frame 1
stop();
Instance of Symbol 450 MovieClip in Symbol 451 MovieClip Frame 53
onClipEvent (enterFrame) {
if (_root.two == true) {
this.gotoAndStop(2);
}
}
Symbol 451 MovieClip Frame 55
stop();
Symbol 452 MovieClip Frame 1
stop();
NX = false;
Symbol 452 MovieClip Frame 2
NX = true;
Instance of Symbol 440 MovieClip "finnished" in Symbol 452 MovieClip Frame 2
onClipEvent (load) {
_root.time.stop();
}
Symbol 452 MovieClip Frame 3
NX = false;
Instance of Symbol 451 MovieClip "failed" in Symbol 452 MovieClip Frame 3
onClipEvent (load) {
_root.time.stop();
}
Symbol 456 MovieClip Frame 10
stop();
Symbol 457 MovieClip Frame 10
stop();
Symbol 458 MovieClip Frame 1
stop();
Symbol 462 MovieClip Frame 17
gotoAndPlay (15);
Symbol 463 MovieClip Frame 1
stop();
Instance of Symbol 458 MovieClip in Symbol 466 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
this.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(40)) {
this.gotoAndStop(2);
}
}
Instance of Symbol 463 MovieClip in Symbol 466 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 465 MovieClip in Symbol 466 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(12);
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
this.gotoAndStop(_currentframe - 1);
} else if (Key.isDown(39)) {
this.gotoAndStop(_currentframe + 1);
}
}
Symbol 468 MovieClip Frame 1
stop();
Symbol 468 MovieClip Frame 2
_root.score = Number(_root.score) + 1000;
Symbol 468 MovieClip Frame 3
_root.score = Number(_root.score) + 950;
Symbol 468 MovieClip Frame 4
_root.score = Number(_root.score) + 900;
Symbol 468 MovieClip Frame 5
_root.score = Number(_root.score) + 850;
Symbol 468 MovieClip Frame 6
_root.score = Number(_root.score) + 800;
Symbol 468 MovieClip Frame 7
_root.score = Number(_root.score) + 750;
Symbol 468 MovieClip Frame 8
_root.score = Number(_root.score) + 700;
Symbol 468 MovieClip Frame 9
_root.score = Number(_root.score) + 650;
Symbol 468 MovieClip Frame 10
_root.score = Number(_root.score) + 600;
Symbol 468 MovieClip Frame 11
_root.score = Number(_root.score) + 550;
Symbol 468 MovieClip Frame 12
_root.score = Number(_root.score) + 500;
Symbol 468 MovieClip Frame 13
_root.score = Number(_root.score) + 450;
Symbol 468 MovieClip Frame 14
_root.score = Number(_root.score) + 400;
Symbol 468 MovieClip Frame 15
_root.score = Number(_root.score) + 350;
Symbol 470 MovieClip Frame 1
stop();
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(2);
}
}
Symbol 470 MovieClip Frame 2
stop();
_root.speed.play();
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 126
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(3);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 210
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(4);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 309
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(5);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 398
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(6);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 524
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(7);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 608
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(8);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 740
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(9);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 830
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(10);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 925
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(11);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 1015
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(12);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 1093
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(13);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 1148
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(14);
}
}
Instance of Symbol 468 MovieClip in Symbol 470 MovieClip Frame 1184
onClipEvent (enterFrame) {
if (_root.finnished.NX == true) {
this.gotoAndStop(15);
}
}
Symbol 470 MovieClip Frame 1200
stop();
Instance of Symbol 469 MovieClip in Symbol 470 MovieClip Frame 1200
onClipEvent (enterFrame) {
_root.voitureverte.gotoAndStop(2);
_root.finnished.failed.whyfailed.textwhy = "out of time";
stop();
}
onClipEvent (load) {
_root.voitureverte.gotoAndStop(2);
}
Symbol 472 MovieClip Frame 1
stop();
Symbol 472 MovieClip Frame 3
gotoAndPlay (2);
_root.time.gotoAndStop(_root.time._currentframe + 1);
Symbol 478 Button
on (press) {
_quality = "LOW";
}
on (release) {
gotoAndStop (2);
}
Symbol 480 Button
on (press) {
_quality = "HIGH";
}
on (release) {
gotoAndStop (1);
}
Symbol 482 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 1
idle = true;
stop();
Symbol 491 MovieClip Frame 2
idle = false;
Symbol 491 MovieClip Frame 3
idle = false;
Symbol 494 MovieClip Frame 3
stop();
Instance of Symbol 318 MovieClip in Symbol 498 MovieClip Frame 1
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this.mask3)) {
_root.move = true;
} else {
_root.move = false;
}
}
Instance of Symbol 318 MovieClip in Symbol 498 MovieClip Frame 140
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 318 MovieClip in Symbol 510 MovieClip Frame 1
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this.mask3)) {
_root.move = true;
} else {
_root.move = false;
}
}
Instance of Symbol 318 MovieClip in Symbol 510 MovieClip Frame 95
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Symbol 518 MovieClip Frame 3
stop();
Instance of Symbol 317 MovieClip "front" in Symbol 527 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 317 MovieClip "back" in Symbol 527 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 545 MovieClip "cant" in Symbol 548 MovieClip Frame 80
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 545 MovieClip "cant" in Symbol 548 MovieClip Frame 256
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 552 MovieClip "backhit" in Symbol 557 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.land.hitTest(this)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 556 MovieClip "toit" in Symbol 557 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.land._x, _root.land._y, true)) {
_root.voitureverte.gotoAndStop(2);
}
}
Instance of Symbol 568 MovieClip in Symbol 574 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 570 MovieClip "hitpoint" in Symbol 574 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 318 MovieClip in Symbol 580 MovieClip Frame 1
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.voitureverte.hitTest(this.mask3)) {
_root.move = true;
} else {
_root.move = false;
}
}
onClipEvent (enterFrame) {
if (((((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) or _root.caravane.boxx.hitTest(this.back)) or _root.caravane.boxxx.hitTest(this.back)) or _root.caravane.boxxxx.hitTest(this.back)) {
_root.move = true;
_root.voitureverte.gotoAndStop(2);
}
}
Symbol 581 MovieClip Frame 1
stop();
Symbol 581 MovieClip Frame 185
gotoAndPlay (2);
Symbol 591 MovieClip Frame 1
stop();
Symbol 591 MovieClip Frame 4
gotoAndPlay (2);
_root.time.gotoAndStop(_root.time._currentframe + 1);
Symbol 640 MovieClip Frame 4
stop();
Instance of Symbol 318 MovieClip "car1" in Symbol 651 MovieClip Frame 1
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this.front) or _root.voitureverte.box1.hitTest(this.front)) or _root.voitureverte.front.hitTest(this.back)) or _root.voitureverte.box1.hitTest(this.back)) {
_root.move = true;
this._x = this._x + 0;
this._y = this._y + 0;
_root.voitureverte.gotoAndStop(2);
} else if (((((_root.caravane.boxx.hitTest(this.front) or _root.caravane.boxxx.hitTest(this.front)) or _root.caravane.boxxxx.hitTest(this.front)) or _root.caravane.boxx.hitTest(this.b)) or _root.caravane.boxxx.hitTest(this.back)) or _root.caravane.boxxxx.hitTest(this.back)) {
_root.move = true;
this._x = this._x + 0;
this._y = this._y + 0;
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.T.cant.hitTest(this.mask3)) {
this._x = this._x - 0;
this._y = this._y + 0;
} else if (_root.car2.hitTest(this.mask3)) {
this._x = this._x - 0;
this._y = this._y + 0;
} else if (_root.lost == true) {
this._x = this._x - 0;
this._y = this._y + 0;
} else if (_root.T2.cant.hitTest(this.mask3)) {
this._x = this._x - 0;
this._y = this._y + 0;
}
}
Instance of Symbol 659 MovieClip "doorhit" in Symbol 665 MovieClip Frame 1
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this) or _root.voitureverte.box1.hitTest(this)) or _root.voitureverte.front.hitTest(this)) or _root.voitureverte.box1.hitTest(this)) {
_root.voitureverte.gotoAndStop(2);
} else if (((((_root.caravane.boxx.hitTest(this) or _root.caravane.boxxx.hitTest(this)) or _root.caravane.boxxxx.hitTest(this)) or _root.caravane.boxx.hitTest(this)) or _root.caravane.boxxx.hitTest(this)) or _root.caravane.boxxxx.hitTest(this)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 659 MovieClip "doorhit" in Symbol 665 MovieClip Frame 172
onClipEvent (enterFrame) {
if (((_root.voitureverte.front.hitTest(this) or _root.voitureverte.box1.hitTest(this)) or _root.voitureverte.front.hitTest(this)) or _root.voitureverte.box1.hitTest(this)) {
_root.voitureverte.gotoAndStop(2);
} else if (((((_root.caravane.boxx.hitTest(this) or _root.caravane.boxxx.hitTest(this)) or _root.caravane.boxxxx.hitTest(this)) or _root.caravane.boxx.hitTest(this)) or _root.caravane.boxxx.hitTest(this)) or _root.caravane.boxxxx.hitTest(this)) {
_root.voitureverte.gotoAndStop(2);
}
}
onClipEvent (load) {
this._visible = false;
}
Symbol 684 Button
on (release) {
_root.gotoAndStop("mainmenu");
}
Symbol 685 Button
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=1&area=gameover", "_blank");
}
Symbol 692 MovieClip [TMPd4lzhusf84] Frame 1
function earl223(val) {
var _local3 = new Array("_", "Z", "y", "x", "W", "v", "u", "T", "s", "r", "Q", "P", "O", "n", "m", "L", "K", "j", "i", "H", "g", "F", "e", "d", "C", "B", "a");
var _local2 = "";
val1 = 0;
while (val1 < val.length) {
if (val.substr(val1, 1) == ":") {
_local2 = _local2 + ":";
} else if (Number(val.substr(val1, 2)) > 26) {
_local2 = _local2 + _local3[Number(val.substr(val1, 1))];
} else if (Number(val.substr(val1, 1)) == 0) {
_local2 = _local2 + "_";
} else {
_local2 = _local2 + _local3[Number(val.substr(val1, 2))];
val1++;
}
val1++;
}
return(_local2);
}
mcButtonMain.mcButton.FOG.swapDepths(0);
mcButtonMain.mcButton.attachMovie(btnMC, "btnMC", 0);
mcButtonMain.mcButton.btnMC.onRelease = function () {
var _local2 = new LoadVars();
_local2.onLoad = function () {
getURL ("http://www.freeonlinegames.com/scoreboard.php?", "_blank");
};
_local2.score = Score;
_local2.score2 = earl223(String(Score));
_local2.gamer = gameID;
_local2.id = random(9999999);
_local2.toString();
_local2.sendAndLoad("http://www.freeonlinegames.com/scoreboard/score_c.php", _local2, "POST");
delete this.onRelease;
};
Symbol 697 Button
on (release) {
_root.gotoAndPlay("mainmenu");
}
Symbol 708 Button
on (press) {
sboard.dir = "up";
}
on (release) {
sboard.dir = "stop";
}
Symbol 709 Button
on (press) {
sboard.dir = "down";
}
on (release) {
sboard.dir = "stop";
}
Symbol 716 MovieClip Frame 1
stop();
Symbol 716 MovieClip Frame 2
stop();
Symbol 726 MovieClip [TMP6ojzjuzm8i] Frame 1
var arrScore = new Array();
mcScoreboard.sboard.dir = "stop";
mcScoreboard.sboard.mcScoreHolder.mcScore._visible = false;
mcLabel._visible = false;
var main = this;
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = main.mcScoreboard.sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
main.mcScoreboard.mcLoading._visible = false;
main.mcScoreboard.sboard.mcScoreHolder.item = myPlayer.length;
main.mcScoreboard.sboard.mcScoreHolder.speedy = 0;
main.mcScoreboard.sboard.mcScoreHolder.desty = 0;
main.mcScoreboard.sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
};
xmlPlayer.load((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + _root.gameID) + "&rand=") + random(999999));
Symbol 733 MovieClip [TMP6pbk6uzm9i] Frame 1
var arrScore = new Array();
mcScoreboard.sboard.dir = "stop";
mcScoreboard.sboard.mcScoreHolder.mcScore._visible = false;
mcLabel._visible = false;
var main = this;
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = main.mcScoreboard.sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
main.mcScoreboard.mcLoading._visible = false;
main.mcScoreboard.sboard.mcScoreHolder.item = myPlayer.length;
main.mcScoreboard.sboard.mcScoreHolder.speedy = 0;
main.mcScoreboard.sboard.mcScoreHolder.desty = 0;
main.mcScoreboard.sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
};
xmlPlayer.load(((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + gameID) + "&rand=") + random(999999)) + "&filt=1");