STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228019
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2560 · P5119

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/87292412?noj=FRM87292412-18DC" width="1" height="1"></div>

18 Wheeler - Challenge.swf

This is the info page for
Flash #136275

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
movieClip 3 LogoFly { frame 1 { stop(); } frame 10 { stop(); } } frame 1 { FOG.AS2.FogServices.Connect({'id': 135, 'fogid': 13792, 'name': '18-wheeler', 'title': '18 Wheeler', 'category': 'arcade-games'}); FOG.AS2.FogPreloader.Start(); } movieClip 6 { } movieClip 13 { frame 1 { stop(); } } movieClip 55 { } instance of movieClip 55 { onClipEvent (release) { FOG.AS2.FogServices.TrackClick(); } } movieClip 58 { } button 60 { on (release) { FOG.AS2.FogServices.TrackClick(); } } movieClip 690 __Packages.FOG.AS2.FogServices { #initclip if (!_global.FOG) { _global.FOG = new Object(); } if (!_global.FOG.AS2) { _global.FOG.AS2 = new Object(); } if (!_global.FOG.AS2.FogServices) { var v1 = function () {}; FOG.AS2.FogServices = v1; var v2 = v1.prototype; v1.Connect = function (D) { FOG.AS2.FogServices.Data = D; FOG.AS2.FogServices.Data.domain = FOG.AS2.FogServices.GetHostedDomain(); FOG.AS2.FogUtils.Debug(D, 'Game Data'); }; v1.TrackClick = function (Url) { if (!Url) { Url = 'www.freeonlinegames.com'; } var v2 = '?utm_source=' + FOG.AS2.FogServices.Data.domain + '&utm_medium=api-game' + '&utm_campaign=' + FOG.AS2.FogServices.Data.name; FOG.AS2.FogUtils.Debug('Tracking Url: ' + Url); FOG.AS2.FogUtils.Debug('Tracking Query: ' + v2); getURL('http://' + Url + (Url.indexOf('.html') ? '' : '/') + v2, '_blank'); }; v1.TrackPlay = function () { FOG.AS2.FogUtils.Debug('Track Play Using FogDev'); FOG.AS2.FogDev.TrackPlay(); }; v1.GetHostedDomain = function () { var v2 = _url.indexOf('://') + 3; var v4 = _url.indexOf('/', v2); var v1 = _url.substring(v2, v4); var v3 = v1.lastIndexOf('.') - 1; var v5 = v1.lastIndexOf('.', v3) + 1; if (!v1) { v1 = 'local'; } return v1; }; v1.Version = '1.3'; v1.Data = new Object(); ASSetPropFlags(FOG.AS2.FogServices.prototype, null, 1); } #endinitclip } movieClip 691 __Packages.FOG.AS2.FogUtils { #initclip if (!_global.FOG) { _global.FOG = new Object(); } if (!_global.FOG.AS2) { _global.FOG.AS2 = new Object(); } if (!_global.FOG.AS2.FogUtils) { var v1 = function () {}; FOG.AS2.FogUtils = v1; var v2 = v1.prototype; v1.Debug = function (S, N) { if (typeof S == 'object') { if (N) { FOG.AS2.FogUtils.Debug(N); } else { FOG.AS2.FogUtils.Debug('Object'); } for (var v2 in S) { FOG.AS2.FogUtils.Debug('> ' + v2 + ': ' + S[v2]); } return undefined; } if (flash.external.ExternalInterface.available) { flash.external.ExternalInterface.call('fog.debug', S); } if (S.indexOf('>') != 0) { trace(' '); } trace(S); }; ASSetPropFlags(FOG.AS2.FogUtils.prototype, null, 1); } #endinitclip } movieClip 692 __Packages.FOG.AS2.FogDev { #initclip if (!_global.FOG) { _global.FOG = new Object(); } if (!_global.FOG.AS2) { _global.FOG.AS2 = new Object(); } if (!_global.FOG.AS2.FogDev) { var v1 = function () {}; FOG.AS2.FogDev = v1; var v2 = v1.prototype; v1.Connect = function () { System.security.allowDomain('*'); FOG.AS2.FogUtils.Debug('> Connecting'); FOG.AS2.FogUtils.Debug('> http://' + FOG.AS2.FogDev.Server + '/' + FOG.AS2.FogDev.LibFile + '?as=2&v=' + FOG.AS2.FogServices.Version); var v2 = new Object(); v2.onLoadInit = function (Clip) { FOG.AS2.FogDev.Remote = Clip; if (!FOG.AS2.FogDev.Remote.CanAccess) { FOG.AS2.FogUtils.Debug('> Corrupt Library'); return undefined; } FOG.AS2.FogDev.Remote.Connect(FOG.AS2.FogServices.Data.name, FOG.AS2.FogServices.Data.domain); }; v2.onLoadError = function (c, e) { FOG.AS2.FogUtils.Debug('> Can\'t Load Library'); }; _root.createEmptyMovieClip('conn_remote', _root.getNextHighestDepth()); var v3 = new MovieClipLoader(); v3.addListener(v2); v3.loadClip('http://' + FOG.AS2.FogDev.Server + '/' + FOG.AS2.FogDev.LibFile + '?as=2&v=' + FOG.AS2.FogServices.Version + '&c=' + Math.random(), _root.conn_remote); }; v1.TrackPlay = function () { FOG.AS2.FogUtils.Debug('> Tracking'); FOG.AS2.FogDev.Connect(); }; v1.Server = 'x.fogdev.com'; v1.LibFile = 'api/library-as2.swf'; v1.LibPath = ''; ASSetPropFlags(FOG.AS2.FogDev.prototype, null, 1); } #endinitclip } movieClip 693 __Packages.FOG.AS2.FogPreloader { #initclip if (!_global.FOG) { _global.FOG = new Object(); } if (!_global.FOG.AS2) { _global.FOG.AS2 = new Object(); } if (!_global.FOG.AS2.FogPreloader) { var v1 = function () {}; FOG.AS2.FogPreloader = v1; var v2 = v1.prototype; v1.Start = function () { FOG.AS2.FogUtils.Debug('Preloader Initialized'); _root.stop(); var v5 = _root.mcTaglines; var v4 = _root.btnFoggy; var mcLogo = _root.mcLogo; var prel = _root.prel; var fogNo = 0; var GameDura = 3000; var percent = 0; var percentGame = 0; var percentDura = 0; var stagewidth = Stage.width; var stageheight = Stage.height; var startTimer = getTimer(); v4._width = stagewidth; v4._height = stageheight; v5.swapDepths(99996); prel.swapDepths(99997); mcLogo.swapDepths(99998); v4.swapDepths(99999); prel.onEnterFrame = function () { var v4 = Math.random(); if (v4 < _root.getBytesLoaded() / _root.getBytesTotal() / 5) { if (fogNo > 999) { fogNo = 0; } var v5 = random(2) + 1; var v3 = _root.attachMovie('LogoFly', 'fog' + fogNo++, fogNo); v3.cacheAsBitmap = true; v3._x = stagewidth / 2; v3._y = stageheight / 2; v3._yscale = 0; v3._xscale = 0; v3.gotoAndStop(random(10) + 1); v3.speed = 100; v3._alpha = 0; v3.grow = Math.random(); v3.fade = false; v3.targetX = random(10); if (v3.targetX < 5) { v3.targetX = random(10); if (v3.targetX < 5) { v3.targetX = -100; } else { v3.targetX = stagewidth + 100; } v3.targetY = random(stageheight); } else { v3.targetY = random(10); if (v3.targetY < 5) { v3.targetY = -100; } else { v3.targetY = stageheight + 100; } v3.targetX = random(stagewidth); } v3.onEnterFrame = function () { this._x += ((this.targetX - this._x) / this.speed) * 0.5; this._y += ((this.targetY - this._y) / this.speed) * 0.5; this.speed *= 0.99; this._yscale += this.grow * 2; this._xscale = this._yscale; if (this._alpha < 100 && !this.fade) { this._alpha += 2; } if (this._x < -50 || this._y < -50 || this._x > stagewidth + 50 || this._y > stageheight + 50 || this._xscale > 200) { this.fade = true; } if (this.fade) { this._alpha -= 5; if (this._alpha <= 0) { delete this.onEnterFrame; this.removeMovieClip(); } } }; } percentGame = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100); percentDura = ((getTimer() - startTimer) / GameDura) * 100; percent = Math.round(Math.min(percentGame, percentDura, 100)); prel.gotoAndStop(percent); prel.procent.text = percent; if (percent > 99) { FOG.AS2.FogPreloader.onLoaded(); mcLogo.removeMovieClip(); delete this.onEnterFrame; play(); } }; }; v1.onLoaded = FOG.AS2.FogServices.TrackPlay; v2.onComplete = function () {}; ASSetPropFlags(FOG.AS2.FogPreloader.prototype, null, 1); } #endinitclip } frame 2 { stop(); mcLogo.swapDepths(99998); } movieClip 62 { } movieClip 103 { } movieClip 104 { instance mcNotice of movieClip 62 { onClipEvent (load) { _visible = false; } } frame 120 { _root.play(); } } movieClip 106 { frame 60 { stop(); } } movieClip 112 { frame 1 { stop(); } } // unknown tag 88 length 63 // unknown tag 88 length 135 movieClip 118 { } movieClip 119 { } frame 3 { prel.removeMovieClip(); btnFoggy.removeMovieClip(); mcTaglines.removeMovieClip(); mcLogo.removeMovieClip(); } frame 4 { gotoAndStop(8); } movieClip 126 { } movieClip 129 { } button 130 { on (release) { FOG.AS2.FogServices.TrackClick(); } } movieClip 131 { } movieClip 132 { } movieClip 133 { } movieClip 135 { } instance of movieClip 55 { onClipEvent (release) { FOG.AS2.FogServices.TrackClick(); } } instance of movieClip 55 { onClipEvent (release) { FOG.AS2.FogServices.TrackClick(); } } movieClip 139 { } movieClip 140 { frame 1 { stop(); } instance ex of movieClip 139 { onClipEvent (enterFrame) { removeMovieClip(_root.time); } onClipEvent (enterFrame) { _root.exam2 = false; } } frame 2 { stop(); } instance of movieClip 139 { onClipEvent (enterFrame) { exam2 = true; } } } button 142 { on (release) { getURL('http://www.freeonlinegames.com/?18wheeler', '_blank'); } } frame 8 { function i_fog() { FOG.AS2.FogServices.TrackClick(); } function add_game() { FOG.AS2.FogServices.TrackClick('www.freegamesforyourwebsite.com'); } function b18w2() { FOG.AS2.FogServices.TrackClick('www.freeonlinegames.com/racing-games/18-wheeler--2.html'); } function b18w3() { FOG.AS2.FogServices.TrackClick('www.freeonlinegames.com/adventure-games/18-wheeler-3.html'); } stopAllSounds(); _root.score = 0; _root.score = 0; var i_r_menu = new ContextMenu(); i_r_menu.hideBuiltInItems(); this.menu = i_r_menu; var i_r_fog = new ContextMenuItem('Play Other Games', i_fog); i_r_menu.customItems.push(i_r_fog); var add_game_v = new ContextMenuItem('Add This Game to Your Website', add_game); i_r_menu.customItems.push(add_game_v); var b18w2_v = new ContextMenuItem('Play 18 Wheeler 2', b18w2); i_r_menu.customItems.push(b18w2_v); var b18w3_v = new ContextMenuItem('Play 18 Wheeler 3', b18w3); i_r_menu.customItems.push(b18w3_v); } frame 8 { stop(); } // unknown tag 88 length 67 movieClip 147 { } movieClip 148 { } movieClip 150 { frame 20 { stop(); } } button 157 { on (release) { getURL('http://www.freeonlinegames.com/?18wheelerchallenge', '_blank'); } } movieClip 158 { frame 10 { stop(); } } button 160 { on (release) { getURL('http://www.freegamesforyourwebsite.com/?18wheeler', '_blank'); } } button 162 { on (release) { getURL('http://www.freegamesforyourwebsite.com/?18wheelerchallenge', '_blank'); } } movieClip 163 { frame 20 { stop(); } } // unknown tag 88 length 67 button 169 { on (release) { FOG.AS2.FogServices.TrackClick(); } } button 174 { on (release) { FOG.AS2.FogServices.TrackClick('www.freegamesforyourwebsite.com'); } } movieClip 177 { } button 178 { on (release) { FOG.AS2.FogServices.TrackClick('www.freeonlinegames.com/adventure-games/18-wheeler-3.html'); } } movieClip 181 { } button 182 { on (release) { FOG.AS2.FogServices.TrackClick('www.freeonlinegames.com/racing-games/18-wheeler--2.html'); } } button 187 { on (release) { play(); } } movieClip 192 { } button 196 { on (release) { _parent.gotoAndPlay(12); } } movieClip 197 { } movieClip 198 { frame 1 { stop(); } frame 11 { stop(); } } button 201 { on (release) { play(); } } movieClip 203 { } button 205 { on (release, keyPress '<Space>') { _root.gotoAndStop('level1'); } } movieClip 206 { } movieClip 209 { } movieClip 210 { } movieClip 211 { } movieClip 212 { frame 1 { stop(); } frame 25 { stop(); } } movieClip 214 { frame 11 { stop(); } } frame 9 { 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(); }; } movieClip 216 { } movieClip 219 { } movieClip 220 { instance of movieClip 216 { onClipEvent (load) { this._visible = false; } } } instance slider of movieClip 220 { onClipEvent (load) { } } instance of movieClip 55 { onClipEvent (release) { FOG.AS2.FogServices.TrackClick(); } } instance of movieClip 55 { onClipEvent (release) { FOG.AS2.FogServices.TrackClick(); } } movieClip 222 { } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } movieClip 224 { } button 225 { on (release) { play(); } } movieClip 227 { } movieClip 228 { } button 230 { on (release) { _root.gotoAndStop('mainmenu'); } } button 233 { on (release) { FOG.AS2.FogServices.TrackClick('www.freegamesforyourwebsite.com'); } } movieClip 234 { frame 1 { stop(); } } button 236 { on (release) { FOG.AS2.FogServices.TrackClick(); } } movieClip 237 { } movieClip 239 { frame 1 { stop(); } frame 11 { stop(); } frame 18 { gotoAndStop(1); } } movieClip 244 { frame 1 { stop(); } } instance of movieClip 244 { onClipEvent (enterFrame) { if (Key.isDown(72)) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } } frame 10 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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; } frame 10 { stop(); _root.connected = true; } movieClip 248 { } movieClip 250 { } movieClip 252 { } movieClip 254 { } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 256 { } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 258 { } movieClip 261 { } movieClip 263 { } movieClip 265 { } movieClip 266 { instance skinn of movieClip 258 { onClipEvent (load) { this._visible = false; } } instance mask3 of movieClip 263 { onClipEvent (load) { this._visible = false; } } instance front of movieClip 265 { onClipEvent (load) { this._visible = false; } } instance back of movieClip 265 { onClipEvent (load) { this._visible = false; } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 269 { } movieClip 270 { instance front of movieClip 265 { onClipEvent (load) { this._visible = false; } } instance back of movieClip 265 { onClipEvent (load) { this._visible = false; } } } instance of movieClip 270 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 272 { } movieClip 275 { } movieClip 277 { } movieClip 278 { instance of movieClip 272 { onClipEvent (load) { this._visible = false; } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 280 { } movieClip 284 { } movieClip 285 { } movieClip 286 { } instance land of movieClip 286 { onClipEvent (enterFrame) { if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) { _root.voitureverte.gotoAndStop(2); _root.finnished.failed.whyfailed.textwhy = 'you crashed'; } } } movieClip 287 { frame 1 { stop(); } } movieClip 290 { } movieClip 293 { } movieClip 296 { } movieClip 297 { } movieClip 299 { } movieClip 307 { frame 1 { stop(); } } movieClip 311 { } movieClip 318 { } movieClip 320 { frame 1 { stop(); } } movieClip 321 { instance tuturevertefeuxarr of movieClip 297 { onClipEvent (load) { stop(); } } instance box1 of movieClip 299 { onClipEvent (enterFrame) { if (_root.box2.hitTest(this)) { _root.gotoAndStop(6); } } } } movieClip 322 { frame 5 { stop(); } } movieClip 325 { frame 1 { _root.lost = false; } frame 1 { stop(); } instance of movieClip 287 { onClipEvent (enterFrame) { if (Key.isDown(38)) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } } instance box1 of movieClip 299 { onClipEvent (load) { this._visible = false; } } instance front of movieClip 265 { onClipEvent (load) { this._visible = false; } } instance front2 of movieClip 265 { 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 box2 of movieClip 265 { onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.box2.hitTest(this)) { _root.gotoAndStop(_root._currentframe + 1); } } } instance of movieClip 307 { onClipEvent (enterFrame) { if (Key.isDown(38)) { this.gotoAndPlay(2); } } } instance of movieClip 320 { onClipEvent (enterFrame) { if (Key.isDown(37)) { this.gotoAndStop(2); } else { if (Key.isDown(39)) { this.gotoAndStop(3); } else { this.gotoAndStop(1); } } } } frame 2 { (_root.finnished.gotoAndStop(3)).play(); _root.voitureverte.maxSpeed = 0; _root.lost = true; } instance of movieClip 322 { onClipEvent (enterFrame) { _root.voitureverte.maxSpeed = 0; } } } instance voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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; } } } movieClip 329 { } movieClip 358 { frame 1 { stop(); } } movieClip 359 { frame 10 { stop(); } frame 21 { stop(); } } instance ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(2); } } button 363 { 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); } } movieClip 364 { } movieClip 365 { } movieClip 367 { } movieClip 368 { frame 1 { _root.stoptime = true; } frame 2 { _root.stoptime = true; _root.time.stop(); } frame 3 { _root.stoptime = true; } frame 24 { _root.stoptime = true; } frame 50 { gotoAndPlay(38); } instance of movieClip 367 { onClipEvent (enterFrame) { _root.stoptime = false; } } frame 65 { stop(); } } movieClip 379 { frame 1 { stop(); } frame 121 { stop(); _root.voitureverte.gotoAndStop(2); } } button 386 { on (release, keyPress '<Space>') { _root.gotoAndStop(_root._currentframe + 1); } } movieClip 387 { } button 392 { on (release) { FOG.AS2.FogServices.TrackClick(); } } button 393 { on (release) { FOG.AS2.FogServices.TrackClick('www.freegamesforyourwebsite.com'); } } movieClip 394 { frame 42 { stop(); } } movieClip 396 { } movieClip 399 { } movieClip 401 { } button 402 { on (release, keyPress '<Space>') { _root.score = Number(_root.score) - 150; _root.gotoAndStop(_root._currentframe - 1); } } button 403 { on (release, keyPress '<Space>') { _root.score = Number(_root.score) - 25; _root.gotoAndStop(_root._currentframe - 2); } } movieClip 404 { frame 1 { stop(); } } button 409 { on (release) { FOG.AS2.FogServices.TrackClick('www.freegamesforyourwebsite.com'); } } button 410 { on (release) { FOG.AS2.FogServices.TrackClick(); } } movieClip 411 { instance of movieClip 404 { onClipEvent (enterFrame) { if (_root.two == true) { this.gotoAndStop(2); } } } frame 55 { stop(); } } movieClip 412 { frame 1 { stop(); NX = false; } frame 2 { NX = true; } instance finnished of movieClip 394 { onClipEvent (load) { _root.time.stop(); } } frame 3 { NX = false; } instance failed of movieClip 411 { onClipEvent (load) { _root.time.stop(); } } } movieClip 416 { frame 10 { stop(); } } movieClip 417 { frame 10 { stop(); } } movieClip 418 { frame 1 { stop(); } } movieClip 422 { frame 17 { gotoAndPlay(15); } } movieClip 423 { frame 1 { stop(); } } movieClip 425 { } movieClip 426 { instance of movieClip 418 { onClipEvent (enterFrame) { if (Key.isDown(38)) { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (Key.isDown(40)) { this.gotoAndStop(2); } } } instance of movieClip 423 { onClipEvent (enterFrame) { if (Key.isDown(38)) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } } instance of movieClip 425 { onClipEvent (load) { this.gotoAndStop(12); } onClipEvent (enterFrame) { if (Key.isDown(37)) { this.gotoAndStop(_currentframe - 1); } else { if (Key.isDown(39)) { this.gotoAndStop(_currentframe + 1); } } } } } movieClip 428 { frame 1 { stop(); } frame 2 { _root.score = Number(_root.score) + 1000; } frame 3 { _root.score = Number(_root.score) + 950; } frame 4 { _root.score = Number(_root.score) + 900; } frame 5 { _root.score = Number(_root.score) + 850; } frame 6 { _root.score = Number(_root.score) + 800; } frame 7 { _root.score = Number(_root.score) + 750; } frame 8 { _root.score = Number(_root.score) + 700; } frame 9 { _root.score = Number(_root.score) + 650; } frame 10 { _root.score = Number(_root.score) + 600; } frame 11 { _root.score = Number(_root.score) + 550; } frame 12 { _root.score = Number(_root.score) + 500; } frame 13 { _root.score = Number(_root.score) + 450; } frame 14 { _root.score = Number(_root.score) + 400; } frame 15 { _root.score = Number(_root.score) + 350; } } movieClip 429 { } movieClip 430 { frame 1 { stop(); } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(2); } } } frame 2 { stop(); _root.speed.play(); } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(3); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(4); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(5); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(6); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(7); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(8); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(9); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(10); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(11); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(12); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(13); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(14); } } } instance of movieClip 428 { onClipEvent (enterFrame) { if (_root.finnished.NX == true) { this.gotoAndStop(15); } } } frame 1200 { stop(); } instance of movieClip 429 { onClipEvent (enterFrame) { _root.voitureverte.gotoAndStop(2); _root.finnished.failed.whyfailed.textwhy = 'out of time'; stop(); } onClipEvent (load) { _root.voitureverte.gotoAndStop(2); } } } instance time of movieClip 430 { 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); } } } } movieClip 432 { frame 1 { stop(); } frame 3 { gotoAndPlay(2); _root.time.gotoAndStop(_root.time._currentframe + 1); } } instance speed of movieClip 432 { onClipEvent (enterFrame) { if (Key.isDown(65) and Key.isDown(17)) { _root.score = Number(_root.score) + 10; } } onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } movieClip 433 { } button 438 { on (press) { _quality = 'LOW'; } on (release) { gotoAndStop(2); } } button 440 { on (press) { _quality = 'HIGH'; } on (release) { gotoAndStop(1); } } movieClip 442 { frame 1 { stop(); } } movieClip 447 { } movieClip 451 { frame 1 { idle = true; } frame 1 { stop(); } frame 2 { idle = false; } frame 3 { idle = false; } } instance sounds of movieClip 451 { 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); } } } } } movieClip 454 { frame 3 { stop(); } } frame 11 { if (_root.lvls < 1) { Number_root.lvls = 1; _root.lvls = 1; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 12 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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; } frame 12 { stop(); _root.connected = true; } movieClip 457 { } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 266 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 458 { instance of movieClip 266 { 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 movieClip 266 { 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 movecar of movieClip 458 { onClipEvent (enterFrame) { if (_root.move == true) { this.stop(); } else { if (_root.move == false) { this.play(); } } } } instance voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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 land of movieClip 286 { onClipEvent (enterFrame) { if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) { _root.voitureverte.gotoAndStop(2); _root.finnished.failed.whyfailed.textwhy = 'you crashed'; } } } movieClip 461 { } instance ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(1); } } instance time of movieClip 430 { 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 speed of movieClip 432 { onClipEvent (enterFrame) { if (Key.isDown(65) and Key.isDown(17)) { _root.score = Number(_root.score) + 10; } } onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance sounds of movieClip 451 { 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 13 { if (_root.lvls < 2) { Number_root.lvls = 2; _root.lvls = 2; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 14 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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; } movieClip 465 { } instance of movieClip 266 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 270 { 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 movieClip 270 { 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 movieClip 270 { 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 voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance land of movieClip 286 { onClipEvent (enterFrame) { if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) { _root.voitureverte.gotoAndStop(2); _root.finnished.failed.whyfailed.textwhy = 'you crashed'; } } } instance ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(3); } } instance speed of movieClip 432 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance sounds of movieClip 451 { 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 15 { if (_root.lvls < 3) { Number_root.lvls = 3; _root.lvls = 3; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 16 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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; } movieClip 469 { } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 266 { 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); } } } movieClip 470 { instance of movieClip 266 { 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 movieClip 266 { 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 movieClip 470 { onClipEvent (enterFrame) { if (_root.lost == true) { this.stop(); } } } movieClip 473 { } movieClip 474 { } instance of movieClip 474 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance car1 of movieClip 266 { 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 -= 5; } onClipEvent (enterFrame) { if (this._y < -100) { this._y = 600; } } } instance of movieClip 270 { 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 movieClip 270 { 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 movieClip 270 { 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 voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance time of movieClip 430 { 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 ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(4); } } instance speed of movieClip 432 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance sounds of movieClip 451 { 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); } } } } } movieClip 478 { frame 3 { stop(); } } frame 17 { if (_root.lvls < 4) { Number_root.lvls = 4; _root.lvls = 4; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 18 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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; } frame 18 { stop(); } movieClip 480 { } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 270 { 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 movieClip 270 { 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 movieClip 270 { 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 movieClip 270 { 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 movieClip 270 { 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); } } } movieClip 482 { } instance of movieClip 270 { 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 voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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); } } } } } } movieClip 485 { } movieClip 487 { instance front of movieClip 265 { onClipEvent (load) { this._visible = false; } } instance back of movieClip 265 { onClipEvent (load) { this._visible = false; } } } movieClip 490 { } movieClip 492 { } movieClip 494 { } movieClip 495 { } instance of movieClip 495 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 497 { } instance of movieClip 497 { onClipEvent (enterFrame) { if (_root.caravane.backhit.hitTest(this)) { _root.finnished.gotoAndStop(2); _root.voitureverte.maxSpeed = 0; } } } instance time of movieClip 430 { 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 ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(5); } } instance speed of movieClip 432 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance sounds of movieClip 451 { 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 19 { if (_root.lvls < 5) { Number_root.lvls = 5; _root.lvls = 5; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 20 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 501 { } instance car1 of movieClip 266 { 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 += 8; _root.voitureverte.gotoAndStop(2); } else { if (_root.caravane.fronthit.hitTest(this.skinn)) { _root.move = true; this._y += 8; _root.voitureverte.gotoAndStop(2); } } } onClipEvent (enterFrame) { this._y -= 8; } onClipEvent (enterFrame) { if (this._y < -100) { this._y = 600; } } onClipEvent (enterFrame) { if (_root.T.cant.hitTest(this.mask3)) { this._y += 8; } else { if (_root.car2.hitTest(this.mask3)) { this._y += 8; } else { if (_root.lost == true) { this._y += 8; } else { if (_root.T2.cant.hitTest(this.mask3)) { this._y += 8; } else { this._y -= 8; } } } } } } instance car2 of movieClip 266 { 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 += 6; _root.voitureverte.gotoAndStop(2); } else { if (_root.caravane.fronthit.hitTest(this.skinn)) { _root.move = true; this._y += 8; _root.voitureverte.gotoAndStop(2); } } } onClipEvent (enterFrame) { this._y -= 7; } onClipEvent (enterFrame) { if (this._y < -100) { this._y = 600; } } onClipEvent (enterFrame) { if (_root.T.cant.hitTest(this.mask3)) { this._y += 7; } else { if (_root.car1.hitTest(this.mask3)) { this._y += 7; } else { if (_root.lost == true) { this._y += 7; } else { if (_root.T2.cant.hitTest(this.mask3)) { this._y += 7; } else { this._y -= 6; } } } } } } instance car3 of movieClip 266 { 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 -= 6; } else { if (_root.caravane.fronthit.hitTest(this.skinn)) { _root.move = true; this._y += 8; _root.voitureverte.gotoAndStop(2); } } } onClipEvent (enterFrame) { this._y += 6; } onClipEvent (enterFrame) { if (this._y > 600) { this._y = -100; } } onClipEvent (enterFrame) { if (_root.T.cant.hitTest(this.mask3)) { this._y -= 6; } else { if (_root.car1.hitTest(this.mask3)) { this._y -= 6; } else { if (_root.lost == true) { this._y -= 6; } else { if (_root.T2.cant.hitTest(this.mask3)) { this._y -= 6; } else { this._y += 6; } } } } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this.visible = false; } } instance voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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); } } } movieClip 505 { } movieClip 508 { instance cant of movieClip 505 { onClipEvent (load) { this._visible = false; } } instance cant of movieClip 505 { onClipEvent (load) { this._visible = false; } } } instance of movieClip 497 { onClipEvent (enterFrame) { if (_root.caravane.backhit.hitTest(this)) { _root.finnished.gotoAndStop(2); _root.voitureverte.maxSpeed = 0; } } } instance box2 of movieClip 252 { onClipEvent (load) { this._visible = false; } } movieClip 510 { } movieClip 512 { } movieClip 513 { } movieClip 515 { } movieClip 516 { } movieClip 517 { instance backhit of movieClip 512 { onClipEvent (enterFrame) { if (_root.land.hitTest(this)) { _root.voitureverte.gotoAndStop(2); } } } instance toit of movieClip 516 { onClipEvent (enterFrame) { if (this.hitTest(_root.land._x, _root.land._y, true)) { _root.voitureverte.gotoAndStop(2); } } } } instance palmfond of movieClip 517 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 520 { } movieClip 521 { } instance of movieClip 521 { 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 ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(9); } } instance speed of movieClip 432 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance sounds of movieClip 451 { 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 21 { _root.two = true; } instance caravane of movieClip 517 { 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 += x; 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 += 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 += 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 22 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 23 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 526 { } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 528 { } movieClip 530 { } movieClip 533 { } movieClip 534 { instance of movieClip 528 { onClipEvent (load) { this._visible = false; } } instance hitpoint of movieClip 530 { onClipEvent (load) { this._visible = false; } } } instance voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 497 { onClipEvent (enterFrame) { if (_root.caravane.backhit.hitTest(this)) { _root.finnished.gotoAndStop(2); _root.voitureverte.maxSpeed = 0; } } } instance caravane of movieClip 517 { 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 += x; 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 += 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 += 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]; } } movieClip 535 { } instance of movieClip 535 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(6); } } instance speed of movieClip 432 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance sounds of movieClip 451 { 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 24 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 25 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 539 { } instance of movieClip 474 { 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 movieClip 474 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 270 { 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); } } } movieClip 540 { instance of movieClip 266 { 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); } } } } movieClip 541 { frame 1 { stop(); } frame 185 { gotoAndPlay(2); } } instance cargo of movieClip 541 { onClipEvent (enterFrame) { if (_root.lost == true) { this.stop(); } } } instance voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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 movieClip 497 { onClipEvent (enterFrame) { if (_root.caravane.backhit.hitTest(this)) { _root.finnished.gotoAndStop(2); _root.voitureverte.maxSpeed = 0; } } } instance caravane of movieClip 517 { 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 += x; 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 += 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 += 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(7); } } instance speed of movieClip 432 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance sounds of movieClip 451 { 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 26 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 27 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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; } frame 27 { stop(); } movieClip 545 { } instance box2 of movieClip 252 { onClipEvent (load) { this._visible = false; } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 470 { onClipEvent (enterFrame) { if (_root.lost == true) { this.stop(); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 547 { } instance of movieClip 270 { 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 movieClip 470 { onClipEvent (enterFrame) { if (_root.lost == true) { this.stop(); } } } instance of movieClip 270 { 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); } } } movieClip 548 { } instance voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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 movieClip 487 { 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 movieClip 487 { 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 movieClip 487 { 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 movieClip 487 { 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 palmfond of movieClip 517 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this.mask)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 550 { } instance land of movieClip 550 { 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 palmfond of movieClip 517 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(8); } } movieClip 551 { frame 1 { stop(); } frame 4 { gotoAndPlay(2); _root.time.gotoAndStop(_root.time._currentframe + 1); } } instance speed of movieClip 551 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance sounds of movieClip 451 { 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 28 { _root.two = true; } instance caravane of movieClip 517 { 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 += x; 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 += 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 += 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 movieClip 497 { onClipEvent (enterFrame) { if (_root.caravane.backhit.hitTest(this)) { _root.finnished.gotoAndStop(2); _root.voitureverte.maxSpeed = 0; } } } frame 29 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 30 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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; } movieClip 555 { } instance of movieClip 497 { 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 secondbox of movieClip 497 { onClipEvent (load) { this._visible = false; } } instance voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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 caravane of movieClip 517 { 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 += x; 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 += 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 += 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 556 { } instance of movieClip 556 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(10); } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance speed of movieClip 432 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance sounds of movieClip 451 { 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 31 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 32 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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; } movieClip 561 { } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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 caravane of movieClip 517 { 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 += x; 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 += 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 += 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 speed of movieClip 432 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(11); } } instance sounds of movieClip 451 { 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 33 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 34 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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; } movieClip 568 { } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 570 { } movieClip 572 { } instance of movieClip 572 { 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 movieClip 572 { 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 movieClip 572 { 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 movieClip 572 { 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 movieClip 572 { 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 movieClip 572 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance car1 of movieClip 266 { 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 += 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 += 8; _root.voitureverte.gotoAndStop(2); } } } onClipEvent (enterFrame) { 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 += 8; } else { if (_root.car2.hitTest(this.mask3)) { this._x += 8; } else { if (_root.lost == true) { this._x += 8; } else { if (_root.T2.cant.hitTest(this.mask3)) { this._x += 8; } else { this._x -= 8; } } } } } } instance voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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); } } } movieClip 575 { } movieClip 577 { } instance caravane of movieClip 517 { 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 += x; 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 += 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 += 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]; } } movieClip 596 { } instance time of movieClip 430 { 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 speed of movieClip 432 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(12); } } instance sounds of movieClip 451 { 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); } } } } } movieClip 600 { frame 4 { stop(); } } frame 35 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 36 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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; } movieClip 602 { } movieClip 605 { } movieClip 607 { } movieClip 610 { } instance of movieClip 572 { 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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance car1 of movieClip 266 { 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 += 0; 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 += 0; 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 -= 0; this._y += 0; } else { if (_root.car2.hitTest(this.mask3)) { this._x -= 0; this._y += 0; } else { if (_root.lost == true) { this._x -= 0; this._y += 0; } else { if (_root.T2.cant.hitTest(this.mask3)) { this._x -= 0; this._y += 0; } else { this._x += 8; this._y -= 8; } } } } } } movieClip 611 { instance car1 of movieClip 266 { 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 += 0; 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 += 0; this._y += 0; _root.voitureverte.gotoAndStop(2); } } } onClipEvent (enterFrame) { if (_root.T.cant.hitTest(this.mask3)) { this._x -= 0; this._y += 0; } else { if (_root.car2.hitTest(this.mask3)) { this._x -= 0; this._y += 0; } else { if (_root.lost == true) { this._x -= 0; this._y += 0; } else { if (_root.T2.cant.hitTest(this.mask3)) { this._x -= 0; this._y += 0; } } } } } } } movieClip 613 { } instance voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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 caravane of movieClip 517 { 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 += x; 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 += 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 += 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 time of movieClip 430 { 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 speed of movieClip 432 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(13); } } instance sounds of movieClip 451 { 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 37 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(_root._currentframe + 1); } } frame 38 { function getCoordPolaire(p) { dx = p.x; dy = p.y; d = Math.sqrt(dx * dx + dy * dy); if (d == 0) { a = 0; return {'x': p.x, 'y': p.y, 'a': a, 'd': d}; } 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 v2 = (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 movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } movieClip 617 { } movieClip 619 { } movieClip 622 { } movieClip 624 { } movieClip 625 { instance doorhit of movieClip 619 { 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 doorhit of movieClip 619 { 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; } } } movieClip 628 { } movieClip 629 { } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 254 { onClipEvent (enterFrame) { if (_root.voitureverte.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.caravane.hitTest(this._x, this._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance voitureverte of movieClip 325 { 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; } return toreturn; } if (t == 37) { if (incRotation != -5) { incRotation = -5; toreturn = true; } return toreturn; } if (t == 40) { if (incSpeed != -1) { incSpeed = -1; toreturn = true; } return toreturn; } 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 += 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 += 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 += 1; } else {} currentFrameIsEvented = false; } replayPlayFrame += 1; } memoX = _x; memoY = _y; memoRot = _rotation; _root.caravane.saveMemo(); oldRot = wheelRotation; oldSpeed = speed; oldCorpsSpeedX = corpsSpeedX; speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } if (incSpeed == 0) { speed *= speedDecay; tuturevertefeuxarr.gotoAndStop(1); } else { tuturevertefeuxarr.gotoAndStop(2); speed += incSpeed; if (speed > maxSpeed) { speed = maxSpeed; } else { if (speed < -maxSpeed) { speed = -maxSpeed; } } } 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 += 1; 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; updateAfterEvent; } 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 land of movieClip 286 { onClipEvent (enterFrame) { if (this.hitTest(_root.voitureverte._x, _root.voitureverte._y, true)) { _root.voitureverte.gotoAndStop(2); } } } instance of movieClip 470 { onClipEvent (enterFrame) { if (_root.lost == true) { this.stop(); } } } instance of movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 movieClip 254 { 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 time of movieClip 430 { 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 speed of movieClip 432 { onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } instance ava of movieClip 359 { onClipEvent (enterFrame) { this.drivertext.gotoAndStop(14); } } instance sounds of movieClip 451 { 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 39 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } gotoAndStop(47); } instance of movieClip 222 { onClipEvent (enterFrame) { _root.gotoAndStop(43); } } frame 41 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } } frame 43 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } } frame 45 { if (_root.lvls < 9) { Number_root.lvls = 8; _root.lvls = 8; } } frame 47 { stopAllSounds(); } movieClip 634 { } movieClip 636 { } movieClip 639 { } button 644 { on (release) { _root.gotoAndStop('mainmenu'); } } instance speed of movieClip 432 { onClipEvent (enterFrame) { if (Key.isDown(65) and Key.isDown(17)) { _root.score = 1337; _root.score = 1337; } } onClipEvent (enterFrame) { if (Key.isDown(68) and Key.isDown(17)) { _root.score = 11333377; _root.score = 11333377; } } onClipEvent (enterFrame) { if (_root.score < 0) { _root.score = 0; _root.score = 0; } } } button 646 { on (release) { FOG.AS2.FogServices.TrackClick('www.freegamesforyourwebsite.com'); } } movieClip 648 { } instance of movieClip 55 { onClipEvent (release) { FOG.AS2.FogServices.TrackClick(); } } instance of movieClip 55 { onClipEvent (release) { FOG.AS2.FogServices.TrackClick(); } } movieClip 650 { frame 3 { stop(); } } frame 48 { 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 += 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 -= 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.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); } button 652 { on (release) { _root.gotoAndPlay('mainmenu'); } } movieClip 656 { } movieClip 659 { } button 663 { on (press) { sboard.dir = 'up'; } on (release) { sboard.dir = 'stop'; } } button 664 { on (press) { sboard.dir = 'down'; } on (release) { sboard.dir = 'stop'; } } movieClip 671 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 672 { } movieClip 674 { } movieClip 675 { } movieClip 676 { } movieClip 680 { } movieClip 681 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 += 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 -= 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.speedy; }; } }; xmlPlayer.load('http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=' + _root.gameID + '&rand=' + random(999999)); } } instance of movieClip 681 TMP6ojzjuzm8i { onClipEvent (construct) { gameID = 42; } } movieClip 687 { } movieClip 688 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 += 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 -= 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.speedy; }; } }; xmlPlayer.load('http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=' + gameID + '&rand=' + random(999999) + '&filt=1'); } } instance of movieClip 688 TMP6pbk6uzm9i { onClipEvent (construct) { gameID = 42; } }




http://swfchan.com/28/136275/info.shtml
Created: 9/2 -2019 06:04:04 Last modified: 9/2 -2019 06:04:04 Server time: 18/04 -2024 17:04:41