Frame 1
function onTimeout() {
if (!vc_lv.loaded) {
vc_lv.onLoad = null;
delete vc_lv;
play();
}
clearInterval(tOIntId);
delete tOIntId;
}
_global.root = this;
if (!kv_v) {
kv_v = {c:645, a:0, da:["distralytics.com", "5.n.distralytics.com", "distralytics.co.uk"]};
kv_v.i = 0;
while (kv_v.i < kv_v.da.length) {
System.security.allowDomain(kv_v.da[kv_v.i], (kv_v.c + ".c.") + kv_v.da[kv_v.i], "*." + kv_v.da[kv_v.i]);
kv_v.i++;
}
kv_v.lc = function () {
var _local1 = ((("http://" + kv_v.c) + ".c.") + kv_v.da[kv_v.a % kv_v.da.length]) + kv_v.lurl;
System.security.allowDomain(_local1);
kv_v.l_mcl.loadClip(_local1, kv_v.t_mc);
};
kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_v.lurl = "/control/tracking/tracker.swf?r=" + Math.floor(Math.random() * 10000);
kv_v.t_mc = createEmptyMovieClip("kv_tracker", -16734);
kv_v.l_mcl = new MovieClipLoader();
kv_v.mcl_l = {onLoadError:function () {
kv_v.a++;
kv_v.lc();
}, onLoadStart:function (m) {
System.security.allowDomain(m._url);
}};
kv_v.l_mcl.addListener(kv_v.mcl_l);
kv_v.lc();
}
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
this.menu = my_cm;
_global.masterDomain = "media.tinymania.com";
_global.assetsURL = "http://media.tinymania.com/raygun/";
_global.isMaster = _root._url.indexOf(_global.masterDomain) >= 0;
_global.domain = ((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]));
_global.playerVersion = Number(getVersion().substr(getVersion().indexOf(" ") + 1).split(",")[0]);
_global.movieVersion = (_root.getSWFVersion ? (_root.getSWFVersion()) : 8);
_global.ori_dom = (_root.ori_dom ? (_root.ori_dom) : (domain));
System.security.allowDomain(_global.masterDomain);
var game_version = 2;
if (!testMode) {
stop();
if (playerVersion < 8) {
loadMovie (_global.assetsURL + "error.swf", _root);
} else if (isMaster) {
play();
} else {
var vc_lv = new LoadVars();
vc_lv.onLoad = function (success) {
clearInterval(tOIntId);
delete tOIntId;
if (success) {
if (Number(vc_lv.v) > game_version) {
loadMovie ((_global.assetsURL + "game.swf?ori_dom=") + ori_dom, _root);
} else {
play();
}
} else {
play();
}
delete vc_lv;
};
tOIntId = setInterval(onTimeout, 2000);
vc_lv.load("http://www.memecounter.com/comms/v.php?v=1&cId=645");
}
}
killerviral_btn.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.kvClick(1092);
}
};
sponsor_btn.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.kvClick(1088);
}
};
Frame 2
function onEnterFrame() {
var _local1 = getBytesLoaded() / getBytesTotal();
if (_local1 == 1) {
delete onEnterFrame;
play();
} else {
preloader.gotoAndStop(Math.floor(_local1 * preloader._totalframes) + 1);
}
}
stop();
Frame 3
function getSo() {
var _local1 = SharedObject.getLocal("raygun", "/");
if (!_local1.data.highscores) {
_local1.data.highscores = defaultHighscores;
_local1.data.flush();
}
return(_local1);
}
function getHighscores() {
var _local2 = getSo();
var _local1 = [].concat(_local2.data.highscores);
_local1.sortOn(["score", "datetime", "name"], [Array.DESCENDING | Array.NUMERIC, Array.NUMERIC, Array.CASEINSENSITIVE]);
return(_local1);
}
function submitHighscore(name, score, other) {
var _local1 = getSo();
_local1.data.highscores.push({name:name, score:score, datetime:new Date(), other:other});
_local1.flush();
}
function changePage(p) {
transition.nextPage = p;
transition.play();
}
function beginGame() {
curLevel = 1;
score = 0;
changePage("game");
}
function gotoRaygun() {
getURL ("http://www.raygunofficial.com", "_blank");
_root.kvClick(1088);
}
function watchTheVideo() {
getURL ("http://www.youtube.com/watch?v=gSJyzLzWYi0", "_blank");
_root.kvClick(1089);
}
function gotoKV() {
getURL ("http://killerviral.com", "_blank");
_root.kvClick(1092);
}
var defaultHighscores = [{name:"Ray Gun", score:15000, datetime:new Date(1205865112000)}, {name:"The Adj ", score:14000, datetime:new Date(1205864212000)}, {name:"Benny", score:13000, datetime:new Date(1205864911000)}, {name:"Sam", score:12000, datetime:new Date(1205865112000)}, {name:"Crash", score:11000, datetime:new Date(1205865112000)}, {name:"Bowie", score:10000, datetime:new Date(1205865112000)}, {name:"Gary", score:9000, datetime:new Date(1205865112000)}, {name:"Jools", score:8000, datetime:new Date(1205865112000)}, {name:"Jake", score:7000, datetime:new Date(1205865112000)}, {name:"Stu", score:6000, datetime:new Date(1205865112000)}];
stop();
if (!_global.sndman) {
_global.sndman = new SoundManager(_global.root);
_global.musicman = new SoundManager(_global.root.createEmptyMovieClip("music_mc", _global.root.getNextHighestDepth()));
_global.changePage = changePage;
_global.music = _global.musicman.newSound("music");
_global.music.volume = 0;
_global.music.loop();
_global.music.fadeTo(50, 2);
if (_root.initSilent) {
_global.sndman.mute = true;
}
totalLevels = 5;
curVideo = 1;
}
Instance of Symbol 283 MovieClip "mute" in Frame 3
onClipEvent (load) {
if (new Sound().getVolume() == 0) {
gotoAndStop ("off");
}
this.onRelease = function () {
if (new Sound().getVolume() == 0) {
gotoAndStop ("on");
_global.isMuted = false;
new Sound().setVolume(100);
} else {
gotoAndStop ("off");
_global.isMuted = true;
new Sound().setVolume(0);
}
};
}
Frame 4
stop();
engine.startLevel(curLevel);
Frame 5
function onEnterFrame() {
if (videos.video._currentframe == (videos.video._totalframes - 10)) {
if (curLevel > totalLevels) {
changePage("endGame");
} else if (_global.root.complete) {
changePage("game");
} else {
changePage("retry");
}
}
}
videos.gotoAndStop(curVideo++);
if (curVideo > 3) {
curVideo = 1;
}
if (_global.root.complete) {
_global.root.kvEvent(2927 + curLevel);
curLevel++;
}
Frame 6
menus.gotoAndStop("endOfGame");
Frame 7
menus.gotoAndStop("gameOver");
Frame 8
gotoAndStop ("game");
Symbol 20 MovieClip [road] Frame 1
#initclip 39
Object.registerClass("road", Road);
#endinitclip
Symbol 50 MovieClip Frame 1
function nextAnim() {
gotoAndPlay("anim" + Math.floor(Math.random() * totalAnims));
}
totalAnims = 7;
nextAnim();
Symbol 50 MovieClip Frame 10
nextAnim();
Symbol 50 MovieClip Frame 25
nextAnim();
Symbol 50 MovieClip Frame 33
nextAnim();
Symbol 50 MovieClip Frame 46
nextAnim();
Symbol 50 MovieClip Frame 52
nextAnim();
Symbol 50 MovieClip Frame 61
nextAnim();
Symbol 50 MovieClip Frame 70
nextAnim();
Symbol 53 MovieClip Frame 10
gotoAndPlay (1);
Symbol 61 MovieClip Frame 1
stop();
Symbol 61 MovieClip Frame 9
_global.root.engine.sndman.playAndRemove("whoops");
Instance of Symbol 58 MovieClip in Symbol 61 MovieClip Frame 9
onClipEvent (load) {
if (Math.random() < 0.5) {
gotoAndPlay ("yell2");
}
}
Symbol 61 MovieClip Frame 18
_global.root.engine.sndman.playAndRemove("whoops");
Symbol 62 MovieClip [guy] Frame 1
#initclip 24
Object.registerClass("guy", Guy);
#endinitclip
Symbol 63 MovieClip Frame 1
stop();
Symbol 65 MovieClip [car] Frame 1
#initclip 25
Object.registerClass("car", Car);
#endinitclip
Symbol 69 MovieClip [cop] Frame 1
#initclip 26
Object.registerClass("cop", Cop);
#endinitclip
Symbol 98 MovieClip [pickup] Frame 1
#initclip 27
Object.registerClass("pickup", Pickup);
#endinitclip
Symbol 111 MovieClip [trafficCone] Frame 1
#initclip 28
Object.registerClass("trafficCone", GameObjectHittable);
#endinitclip
Symbol 112 MovieClip [cone] Frame 1
#initclip 29
Object.registerClass("cone", Marker);
#endinitclip
type = "trafficCone";
Symbol 119 MovieClip [truck marker] Frame 1
#initclip 30
Object.registerClass("truck marker", Marker);
#endinitclip
type = "truck";
Symbol 122 MovieClip [truck] Frame 1
#initclip 31
Object.registerClass("truck", GameObjectVehicle);
#endinitclip
Symbol 123 MovieClip [fast_cop_car] Frame 1
#initclip 32
Object.registerClass("fast_cop_car", CopFast);
#endinitclip
Symbol 124 MovieClip [slow_cop_car] Frame 1
#initclip 33
Object.registerClass("slow_cop_car", CopSlow);
#endinitclip
Symbol 126 MovieClip [truck_moving] Frame 1
#initclip 34
Object.registerClass("truck_moving", Truck);
#endinitclip
Symbol 128 MovieClip [points] Frame 17
this.removeMovieClip();
Symbol 132 MovieClip [jcb] Frame 1
#initclip 35
Object.registerClass("jcb", GameObjectVehicle);
#endinitclip
Symbol 137 MovieClip [box] Frame 1
#initclip 36
Object.registerClass("box", GameObjectHittable);
#endinitclip
Symbol 151 MovieClip Frame 1
stop();
Symbol 164 Button
on (release) {
_global.root.gotoRaygun();
}
Symbol 170 Button
on (release) {
_global.root.beginGame();
}
Symbol 177 Button
on (release) {
_global.root.gotoKV();
}
Symbol 186 Button
on (release) {
_global.root.watchTheVideo();
}
Symbol 199 Button
on (release) {
changePage("game");
}
Symbol 210 Button
on (release) {
_global.root.score = _global.root.deadScore;
changeMenuPage("submitScore");
}
Symbol 212 MovieClip Frame 1
stop();
Symbol 212 MovieClip Frame 7
_parent.gotoAndStop(_parent.nextPage);
Symbol 214 MovieClip [click blocker] Frame 1
#initclip 37
Object.registerClass("click blocker", ClickBlocker);
#endinitclip
Symbol 225 Button
on (release) {
copy();
}
Symbol 232 Button
on (release) {
redeem();
}
Symbol 238 Button
on (release) {
_visible = false;
}
Symbol 239 MovieClip [instantWinClip] Frame 1
#initclip 38
Object.registerClass("instantWinClip", InstantWin);
#endinitclip
Symbol 242 Button
on (release) {
changeMenuPage("submitScore");
}
Symbol 248 Button
on (release) {
if (name_txt.text) {
changeMenuPage("highscores");
_global.root.submitHighscore(name_txt.text, _global.root.score);
_root.kvEvent(2935);
}
}
Symbol 255 Button
on (release) {
_global.root.beginGame();
}
Symbol 256 MovieClip Frame 12
stop();
Symbol 277 MovieClip Frame 1
function changeMenuPage(p) {
transition.gotoAndPlay("start");
nextPage = p;
}
stop();
Symbol 277 MovieClip Frame 2
scoreDisplay.text = Format.number(_global.root.deadScore);
Symbol 277 MovieClip Frame 3
scoreDisplay.text = Format.number(_global.root.score);
Symbol 277 MovieClip Frame 5
highscores = _global.root.getHighscores();
var i = 0;
while (i < 10) {
p = i + 1;
this["name_" + p].text = (p + ". ") + highscores[i].name;
this["score_" + p].text = Format.number(highscores[i].score);
i++;
}
Symbol 283 MovieClip Frame 1
stop();
Symbol 283 MovieClip Frame 5
stop();
Symbol 286 MovieClip Frame 1
stop();
Symbol 286 MovieClip Frame 7
_parent.gotoAndStop(nextPage);
Symbol 449 MovieClip [__Packages.Snd] Frame 0
class Snd extends Sound
{
var target, manager, _volume, start, onSoundComplete, position, duration, onFadeComplete, fId, setPan;
function Snd (targ, sndman) {
super(targ);
target = (targ ? (targ) : _root);
manager = sndman;
_volume = super.getVolume();
}
function loop() {
start(0, 100000);
onSoundComplete = loop;
}
function switchSound(id, loops) {
var _local3 = position;
super.stop();
super.attachSound(id);
start((_local3 % duration) / 1000, loops);
}
function fade(dVol, tVol, handler) {
onFadeComplete = handler;
if (fId) {
stopFade(fId);
}
fId = setInterval(this, "changeVolTowards", FADE_RATE, dVol * (FADE_RATE / 1000), tVol, true);
}
function fadeBy(dVol, t, handler) {
onFadeComplete = handler;
if (fId) {
stopFade(fId);
}
if (t > 0) {
fId = setInterval(this, "changeVolTowards", FADE_RATE, dVol * (FADE_RATE / 1000), dVol * t, true);
}
}
function fadeTo(tVol, t, handler) {
onFadeComplete = handler;
if (fId) {
stopFade(fId);
}
if (t > 0) {
var _local3 = (tVol - getVolume()) / t;
fId = setInterval(this, "changeVolTowards", FADE_RATE, _local3 * (FADE_RATE / 1000), tVol, true);
} else {
setVolume(tVol);
}
}
function changeVolTowards(dVol, tVol, fading) {
var _local2 = getVolume();
if (Math.abs(dVol) < Math.abs(tVol - _local2)) {
changeVolume(dVol);
} else {
setVolume(tVol);
if (fading) {
stopFade();
}
}
}
function stopFade() {
if (fId) {
clearInterval(fId);
delete fId;
onFadeComplete();
delete onFadeComplete;
}
}
function positionSound(a, d, f, t) {
if (d < f) {
t = (isNaN(t) ? 100 : (((t < 0) ? 0 : (t))));
d = ((d < 1) ? 1 : (d));
var _local4 = 1 / ((d / f) * 100);
setVolume(Math.ceil(_local4 * t));
setPan((-Math.sin(a)) * 100);
} else {
setVolume(0);
}
}
function positionSoundLinear(a, d, f, t) {
if (d < f) {
t = (isNaN(t) ? 100 : (((t < 0) ? 0 : (t))));
setVolume(((f - d) / f) * t);
setPan((-Math.sin(a)) * 100);
} else {
setVolume(0);
}
}
function setVolume(n) {
_volume = n;
super.setVolume(n);
}
function getVolume() {
return(_volume);
}
function changeVolume(n) {
setVolume(getVolume() + n);
}
function remove() {
super.stop();
delete onSoundComplete;
stopFade();
delete manager.sounds[target.getDepth()];
target.removeMovieClip();
}
function toString() {
return(("(target=" + target) + ")");
}
function get volume() {
return(getVolume());
}
function set volume(n) {
setVolume(n);
//return(volume);
}
static var FADE_RATE = 100;
}
Symbol 450 MovieClip [__Packages.SoundManager] Frame 0
class SoundManager extends Snd
{
var sounds, mc_holder, getVolume;
function SoundManager (hld_mc) {
super();
sounds = new Object();
mc_holder = (hld_mc ? (hld_mc) : _root);
}
function playAndRemove(snd_id, offset, loops) {
offset = (isNaN(offset) ? 0 : (offset));
loops = (isNaN(loops) ? 0 : (loops));
var _local2 = newSound(snd_id);
_local2.start(offset, loops);
_local2.onSoundComplete = _local2.remove;
return(_local2);
}
function playAndLoop(snd_id, offset) {
offset = (isNaN(offset) ? 0 : (offset));
var _local2 = newSound(snd_id);
_local2.start(offset, 999999);
_local2.onSoundComplete = _local2.loop;
return(_local2);
}
function clearAllSounds() {
for (var _local2 in sounds) {
sounds[_local2].remove();
}
}
function newSound() {
var _local5 = mc_holder.getNextHighestDepth();
var _local6 = mc_holder.createEmptyMovieClip("sh_mc" + _local5, _local5);
var _local4 = new Snd(_local6, this);
var _local3 = 0;
while (_local3 < arguments.length) {
if (arguments[_local3] != undefined) {
_local4.attachSound(arguments[_local3]);
}
_local3++;
}
sounds[_local5] = _local4;
return(_local4);
}
function deleteSound(snd) {
snd.remove();
}
function setVolume(vol) {
if (muted) {
curVol = vol;
} else {
super.setVolume(vol);
}
}
function get mute() {
return(muted);
}
function set mute(b) {
muted = b;
if (b) {
curVol = getVolume();
super.setVolume(0);
} else {
super.setVolume(curVol);
}
//return(mute);
}
var muted = false;
var curVol = 100;
}
Symbol 451 MovieClip [__Packages.Format] Frame 0
class Format
{
function Format () {
}
static function strReplace(f, r, s) {
var _local1 = 0;
while (_local1 = s.indexOf(f, _local1) , _local1 != -1) {
s = (s.substring(0, _local1) + r) + s.substr(_local1 + f.length);
_local1 = _local1 + r.length;
}
return(s);
}
static function numberFormat(n, decimalPlaces) {
var _local7 = n < 0;
var _local3 = Math.floor(Math.abs(n)) + "";
var _local4 = Math.abs(n % 1);
var _local6 = Math.pow(10, decimalPlaces);
var _local5 = zerofill(Math.round(_local4 * _local6), decimalPlaces);
var _local2 = "";
var _local1 = _local3.length - 1;
while (_local1 >= 0) {
if (((_local3.length - _local1) % 3) == 1) {
_local2 = " " + _local2;
}
_local2 = _local3.charAt(_local1) + _local2;
_local1--;
}
_local2 = _local2.substr(0, _local2.length - 1);
return((((_local7 ? "-" : "") + _local2) + ".") + _local5);
}
static function zerofill(n, z) {
var _local2 = String(n);
var _local1 = _local2.length;
while (_local1 < z) {
_local2 = "0" + _local2;
_local1++;
}
return(_local2);
}
static function time(t, minp, maxp) {
var _local1 = (isNaN(t) ? (new Date()) : (new Date(t)));
var _local2 = _local1.getSeconds();
var _local3 = Math.round(_local1.getMilliseconds() / 10);
var _local4 = (((_local1.getMinutes() + ":") + ((_local2 < 10) ? ("0" + _local2) : (_local2))) + ":") + ((_local3 < 10) ? ("0" + _local3) : (_local3));
return(_local4);
}
static function date(f, t) {
var _local2 = (isNaN(t) ? (new Date()) : (new Date(t)));
var _local6 = _local2.getSeconds();
_local6 = ((_local6 < 10) ? ("0" + _local6) : (_local6));
var _local10 = _local2.getMinutes();
_local10 = ((_local10 < 10) ? ("0" + _local10) : (_local10));
var _local8 = _local2.getHours() % 12;
_local8 = ((_local8 < 10) ? ("0" + _local8) : (_local8));
var _local11 = _local2.getHours();
_local11 = ((_local11 < 10) ? ("0" + _local11) : (_local11));
var _local7 = _local2.getDate();
_local7 = ((_local7 < 10) ? ("0" + _local7) : (_local7));
var _local9 = _local2.getMonth();
_local9 = ((_local9 < 10) ? ("0" + _local9) : (_local9));
var _local1 = "";
var _local5 = false;
var _local3 = 0;
while (_local3 < f.length) {
if (_local5) {
_local5 = false;
_local1 = _local1 + f[_local3];
}
switch (f[_local3]) {
case "/" :
_local5 = true;
break;
case "s" :
_local1 = _local1 + _local6;
break;
case "i" :
_local1 = _local1 + _local10;
break;
case "h" :
_local1 = _local1 + _local8;
break;
case "H" :
_local1 = _local1 + _local11;
break;
case "g" :
_local1 = _local1 + String(_local2.getHours() % 12);
break;
case "G" :
_local1 = _local1 + String(_local2.getHours());
break;
case "d" :
_local1 = _local1 + _local7;
break;
case "j" :
_local1 = _local1 + String(_local2.getDate());
break;
case "m" :
_local1 = _local1 + _local9;
break;
case "n" :
_local1 = _local1 + String(_local2.getMonth());
break;
case "y" :
_local1 = _local1 + String(_local2.getFullYear() % 100);
break;
case "Y" :
_local1 = _local1 + String(_local2.getFullYear());
break;
default :
_local1 = _local1 + f[_local3];
}
_local3++;
}
return(_local1);
}
static function number(n, d, c, l) {
d = (isNaN(d) ? undefined : (d));
c = ((c == undefined) ? "," : (c));
var _local1 = String(n).split(".");
if (!(d === undefined)) {
if (_local1[1]) {
var _local3 = String(Math.round(Number("." + _local1[1]) * Math.pow(10, d)) * Math.pow(10, -d));
_local3 = ((_local3.indexOf(".") < 0) ? (_local3) : (_local3.split(".")[1]));
} else {
var _local3 = "";
}
var _local2 = 0;
while (_local3.length < d) {
var _local3 = _local3 + "0";
_local2++;
}
_local1[1] = _local3;
}
var _local6 = false;
if (_local1[0].charAt(0) == "-") {
_local6 = true;
_local1[0] = _local1[0].substr(1);
}
var _local2 = 3;
while (_local1[0].length > _local2) {
_local1[0] = (_local1[0].substring(0, _local1[0].length - _local2) + c) + _local1[0].substring(_local1[0].length - _local2);
_local2 = _local2 + 4;
}
if (!isNaN(l)) {
_local1[0] = zerofill(_local1[0], l);
}
if (_local6) {
_local1[0] = "-" + _local1[0];
}
if ((_local1.length > 1) && (d > 0)) {
return((_local1[0] + ".") + _local1[1]);
}
return(_local1[0]);
}
static function ordinal(n) {
if (((n % 100) >= 11) && ((n % 100) <= 13)) {
return("th");
}
if ((n % 10) == 1) {
return("st");
}
if ((n % 10) == 2) {
return("nd");
}
if ((n % 10) == 3) {
return("rd");
}
return("th");
}
static function truncate(s, l, r) {
l = (isNaN(l) ? 20 : (l));
r = ((r == undefined) ? "..." : (r));
if (s.length > l) {
s = s.substr(0, l - r.length);
s = s + r;
}
return(s);
}
}
Symbol 452 MovieClip [__Packages.Engine] Frame 0
class Engine extends MovieClip
{
var messages, sndman, levels, templates, levelNum, level, f, allObjs, skid, engine, car, onEnterFrame, hud, road, perfMon, onMouseUp, _xmouse, endLevelSnd, points, pickups, revvingUp, revving, objects, flying_guy;
function Engine () {
super();
messages.gotoAndStop(OFF);
sndman = _global.sndman;
levels._visible = false;
templates._visible = false;
}
function startLevel(num) {
levelNum = num;
levels.gotoAndStop(num);
level = levels.level;
score = (_global.root.score);
f = 0;
allObjs = [];
skid = sndman.newSound(SKID_SND);
skid.__set__volume(0);
skid.loop();
engine = sndman.playAndLoop(ENGINE_SND);
engine.__set__volume(0);
engine.fadeTo(30, 3);
car.init(this);
onEnterFrame = introLoop;
}
function introLoop() {
if (!level.inited) {
level.init(this);
} else {
hud.update(car, score, 0);
}
road.update(level.scrollSpeed / FPS);
}
function start() {
perfMon = new PerformanceController();
onEnterFrame = gameLoop;
road.onPress = Delegate.create(this, onRoadPress);
onMouseUp = onRoadRelease;
road.useHandCursor = false;
}
function gameLoop() {
var _local4;
var _local3;
perfMon.onEnterFrame();
f++;
var _local9 = f / FPS;
var _local7 = level.travel();
if (gameEnded) {
return(undefined);
}
var _local5;
var _local6;
_local4 = _local7.length - 1;
while (_local4 > -1) {
_local5 = _local7[_local4];
if (!(_local5.type === TEMPLATE)) {
} else {
var _local2 = templates[_local5.template];
for (_local3 in _local2) {
if (_local2[_local3] instanceof Marker) {
_local6 = spawnObj(_local2[_local3].type, _local5.x + _local2[_local3]._x);
_local6._y = _local6._y + _local2[_local3]._y;
}
}
_local2.removeMovieClip();
}
spawnObj(_local5.type, _local5.x);
_local4--;
}
road.update(level.scrollSpeed / FPS);
car.turnSpeed = (_xmouse - car._x) / CAR_MOVEMENT_BUFFER;
carXVel = car.turnSpeed;
appliedCarXVel = (carXVel + (oldCarXVel * 2)) / 3;
car._x = car._x + appliedCarXVel;
oldCarXVel = appliedCarXVel;
skid.__set__volume(100 * (Math.min(SKID_TURN_MAX, Math.max(3, Math.abs(car.turnSpeed)) - 3) / SKID_TURN_MAX));
if ((car._x - (car.__get__width() / 2)) < ROAD_EDGE) {
car._x = ROAD_EDGE + (car.__get__width() / 2);
if (car.initX != car._x) {
sndman.playAndRemove(CLUNK_SND);
}
} else if ((car._x + (car.__get__width() / 2)) > (WIDTH - ROAD_EDGE)) {
car._x = (WIDTH - (car.__get__width() / 2)) - ROAD_EDGE;
if (car.initX != car._x) {
sndman.playAndRemove(CLUNK_SND);
}
}
var _local8;
_local4 = allObjs.length - 1;
while (_local4 > -1) {
_local8 = allObjs[_local4];
_local8.update(car, level.scrollSpeed);
_local4--;
}
car.update(car._x - car.initX, isMouseDown);
hud.update(car, score, level.distTravelled / level.totalDist);
}
function end() {
messages.gotoAndStop(WELL_DONE);
gameEnded = true;
endGame();
car.realign();
endLevelSnd = sndman.newSound(REVVING_UP_SND);
endLevelSnd.start();
endLevelSnd.fadeTo(0, 1);
onEnterFrame = driveOff;
}
function driveOff() {
road.update(level.scrollSpeed / FPS);
car.yVel++;
car._y = car._y - car.yVel;
if (car._y < -100) {
exit(true);
}
}
function pickupCollected(x, y) {
score = score + POINT_PER_PICKUP;
var _local2 = points.attachMovie("points", "points" + pickups.getNextHighestDepth(), pickups.getNextHighestDepth());
sndman.playAndRemove(PICKUP_SND).__set__volume(50);
_local2._x = x;
_local2._y = y;
}
function onRoadPress() {
isMouseDown = true;
engine.fadeTo(0, 0.2);
revvingUp = sndman.newSound(REVVING_UP_SND);
revvingUp.onSoundComplete = Delegate.create(this, onRevved);
revvingUp.start();
}
function onRevved() {
revvingUp.remove();
delete revvingUp;
revving = sndman.playAndLoop(REVVING_SND);
}
function onRoadRelease() {
if (revvingUp) {
revvingUp.onSoundComplete = revvingUp.remove;
revvingUp.fadeTo(0, 0.2);
} else {
revving.remove();
delete revving;
}
sndman.playAndRemove(REVVING_DOWN_SND);
engine.fadeTo(30, 0.3);
isMouseDown = false;
}
function spawnObj(type, x) {
var _local4 = ((type == PICKUP) ? (pickups) : (objects));
var _local3 = _local4.getNextHighestDepth();
var _local2 = _local4.attachMovie(type, type + _local3, _local3);
_local2.init(this);
_local2._x = x;
_local2._y = -100;
allObjs.push(_local2);
return(_local2);
}
function removeObj(obj) {
var _local2 = allObjs.length - 1;
while (_local2 > -1) {
if (allObjs[_local2] == obj) {
allObjs.splice(_local2, 1);
return(undefined);
}
_local2--;
}
}
function collision(obj) {
messages.gotoAndStop(OH_NO);
endGame();
if (revvingUp) {
delete revvingUp.onSoundComplete;
}
skid.__set__volume(0);
engine.fadeTo(0, 0.2);
revvingUp.fadeTo(0, 1);
revving.fadeTo(0, 1);
sndman.playAndRemove(CRASH_SND);
var _local3 = {x:0, y:0};
car.guy.localToGlobal(_local3);
car.guy._visible = false;
flying_guy._x = _local3.x;
flying_guy._y = _local3.y;
flying_guy.gotoAndPlay("flying");
f = 0;
_root.kvEvent(2935 + levelNum);
onEnterFrame = guyFlying;
}
function guyLanded() {
onEnterFrame = guySliding;
sndman.playAndRemove(SPLAT_SND);
}
function guySliding() {
if ((f++) > GUY_SLIDING_TIME) {
delete onEnterFrame;
exit(false);
}
}
function guyFlying() {
level.scrollSpeed = level.scrollSpeed * 0.997;
road.update(level.scrollSpeed / FPS);
var _local3 = 50;
flying_guy._y = (CAR_START + (flying_guy._y * (_local3 - 1))) / _local3;
var _local2 = allObjs.length - 1;
while (_local2 > -1) {
allObjs[_local2]._y = allObjs[_local2]._y + (level.scrollSpeed / FPS);
_local2--;
}
car._y = car._y + (level.scrollSpeed / FPS);
}
function endGame() {
delete onEnterFrame;
delete road.onPress;
delete onMouseUp;
}
function exit(complete) {
sndman.clearAllSounds();
_root._quality = "HIGH";
_global.root.complete = complete;
if (!complete) {
_global.root.deadScore = score;
} else {
_global.root.score = score;
}
_global.changePage("postGame");
_global.music.fadeTo(50, 2);
}
function get score() {
return(_score);
}
function set score(s) {
_score = s;
//return(score);
}
static function get HEIGHT() {
return(_HEIGHT);
}
static function get WIDTH() {
return(_WIDTH);
}
static function get FPS() {
return(_FPS);
}
static function get EDGE_BOUNCE_SPEED() {
return(_EDGE_BOUNCE_SPEED);
}
static function get CAR_START() {
return(_CAR_START);
}
static function get CAR_MAX_FORWARD() {
return(_CAR_MAX_FORWARD);
}
var gameEnded = false;
var carXVel = 0;
var oldCarXVel = 0;
var appliedCarXVel = 0;
var _score = 0;
var carYVel = 0;
var isMouseDown = false;
static var CAR_LINKAGE = "car";
static var PICKUP = "pickup";
static var COP = "cop";
static var TRAFFIC_CONE = "trafficCone";
static var TEMPLATE = "template";
static var SKID_SND = "skid";
static var ENGINE_SND = "engine_loop";
static var REVVING_UP_SND = "engine_rev_up";
static var REVVING_SND = "engine_revving";
static var REVVING_DOWN_SND = "engine_rev_down";
static var CRASH_SND = "crash";
static var CLUNK_SND = "clunk";
static var DONK_SND = "donk";
static var SPLAT_SND = "splat";
static var PICKUP_SND = "pickup_collected";
static var ROAD_EDGE = 15;
static var _EDGE_BOUNCE_SPEED = 15;
static var CAR_MOVEMENT_BUFFER = 3;
static var POINTS_PER_BOOGY = 1;
static var POINT_PER_PICKUP = 100;
static var SKID_TURN_MAX = 10;
static var _CAR_START = 360;
static var _CAR_MAX_FORWARD = 320;
static var GUY_SLIDING_TIME = 60;
static var _WIDTH = 400;
static var _HEIGHT = 420;
static var _FPS = 30;
static var OFF = "off";
static var WELL_DONE = "well done";
static var OH_NO = "oh no";
}
Symbol 453 MovieClip [__Packages.Level] Frame 0
class Level extends MovieClip
{
var engine, baseScrollSpeed, onEnterFrame, allMarkers, totalDist, base;
function Level () {
super();
}
function init(e) {
engine = e;
baseScrollSpeed = scrollSpeed;
onEnterFrame = parse;
}
function parse() {
delete onEnterFrame;
allMarkers = [];
totalDist = base._width * SCALE;
var _local7 = Engine.__get__WIDTH() / base._height;
var _local2;
for (var _local8 in this) {
if (this[_local8] instanceof Marker) {
_local2 = {type:this[_local8].type, x:this[_local8]._y * _local7, y:this[_local8]._x * SCALE, template:this[_local8].template};
allMarkers.push(_local2);
}
}
allMarkers.sortOn("y", Array.NUMERIC | Array.DESCENDING);
inited = true;
}
function travel() {
var _local6 = distTravelled;
var _local4 = distTravelled + (scrollSpeed / Engine.__get__FPS());
var _local5 = [];
var _local3;
var _local2 = allMarkers.length - 1;
while (_local2 > -1) {
_local3 = allMarkers[_local2];
if (_local3.y >= _local6) {
if (_local3.y <= _local4) {
_local5.push(allMarkers.pop());
} else {
break;
}
} else {
break;
}
_local2--;
}
distTravelled = _local4;
if (distTravelled > totalDist) {
engine.end();
}
return(_local5);
}
var scrollSpeed = 600;
var distTravelled = 0;
var inited = false;
static var SCALE = 42;
}
Symbol 454 MovieClip [__Packages.Marker] Frame 0
class Marker extends MovieClip
{
var _y, _x, _name;
function Marker () {
super();
}
function toString() {
return(((((("[name=" + _name) + ", _x=") + _x) + ", _y=") + _y) + "]");
}
}
Symbol 455 MovieClip [__Packages.Road] Frame 0
class Road extends MovieClip
{
var usedRoadTiles, scrollRect, rect, cacheAsBitmap, roadClips, getNextHighestDepth, attachMovie;
function Road () {
super();
var _local3;
usedRoadTiles = [];
scrollRect = (rect = new flash.geom.Rectangle(0, 0, Engine.__get__WIDTH(), Engine.__get__HEIGHT()));
cacheAsBitmap = true;
roadClips = [];
_local3 = 0;
while (_local3 < Engine.__get__HEIGHT()) {
spawnTile(_local3);
_local3 = _local3 + _ROAD_TILE_HEIGHT;
}
}
function spawnTile(y) {
var _local3 = getNextHighestDepth();
var _local5;
var _local2;
var _local4 = randomNoRepeat(0, _ROAD_TILES.length - 1, usedRoadTiles);
_local5 = _ROAD_TILES[_local4];
_local2 = attachMovie(_ROAD_LINKAGE + _local5, _ROAD_LINKAGE + _local3, _local3);
if (usedRoadTiles.length >= 3) {
usedRoadTiles.shift();
}
usedRoadTiles.push(_local4);
_local2._y = y;
roadClips.push(_local2);
return(_local2);
}
function update(moved) {
rect.y = rect.y - moved;
scrollRect = rect;
var _local3;
var _local2;
var _local5;
var _local4 = Number.MAX_VALUE;
_local3 = roadClips.length - 1;
while (_local3 > -1) {
_local2 = roadClips[_local3];
if (_local2._y > rect.bottom) {
roadClips.splice(_local3, 1);
_local2.removeMovieClip();
} else if (_local2._y < _local4) {
_local4 = _local2._y;
_local5 = _local2;
}
_local3--;
}
if (_local4 > rect.top) {
spawnTile(_local4 - _ROAD_TILE_HEIGHT);
}
}
function randomNoRepeat(start, end, repeat) {
var _local2;
do {
_local2 = Rand.random(start, end, 0);
} while (inArray(_local2, repeat));
return(_local2);
}
function inArray(val, arr) {
var _local1 = arr.length - 1;
while (_local1 > -1) {
if (arr[_local1] == val) {
return(true);
}
_local1--;
}
return(false);
}
static function get ROAD_LINKAGE() {
return(_ROAD_LINKAGE);
}
static var _ROAD_LINKAGE = "road";
static var _ROAD_TILES = [1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
static var _ROAD_TILE_HEIGHT = 100;
}
Symbol 456 MovieClip [__Packages.Rand] Frame 0
class Rand
{
function Rand () {
}
static function midBias(min, max, i, p) {
min = (isNaN(min) ? 0 : (min));
max = (isNaN(max) ? 1 : (max));
i = (isNaN(i) ? 2 : (i + 1));
var _local3 = 0;
var _local1 = 0;
while (_local1 < i) {
_local3 = _local3 + ((v() * (max - min)) + min);
_local1++;
}
_local3 = _local3 / i;
if (p != undefined) {
p = 1 / Math.pow(10, p);
var _local7 = _local3 % p;
if (_local7 <= (p / 2)) {
_local3 = _local3 - _local7;
} else {
_local3 = _local3 + (p - _local7);
}
}
return(_local3);
}
static function minBias(min, max, i, p) {
min = (isNaN(min) ? 0 : (min));
max = (isNaN(max) ? 1 : (max));
i = (isNaN(i) ? 1 : (i));
var _local1 = ((1 - Math.pow(v(), 1 / (i + 1))) * (max - min)) + min;
if (p != undefined) {
p = 1 / Math.pow(10, p);
var _local3 = _local1 % p;
if (_local3 <= (p / 2)) {
_local1 = _local1 - _local3;
} else {
_local1 = _local1 + (p - _local3);
}
}
return(_local1);
}
static function maxBias(min, max, i, p) {
min = (isNaN(min) ? 0 : (min));
max = (isNaN(max) ? 1 : (max));
i = (isNaN(i) ? 1 : (i));
var _local1 = (Math.pow(v(), 1 / (i + 1)) * (max - min)) + min;
if (p != undefined) {
p = 1 / Math.pow(10, p);
var _local3 = _local1 % p;
if (_local3 <= (p / 2)) {
_local1 = _local1 - _local3;
} else {
_local1 = _local1 + (p - _local3);
}
}
return(_local1);
}
static function value() {
if (arguments.length > 0) {
var _local2 = v() * arguments.length;
_local2 = _local2 - (_local2 % 1);
return(arguments[_local2]);
}
}
static function get number() {
return(v());
}
static function random(min, max, p) {
min = (isNaN(min) ? 0 : (min));
max = (isNaN(max) ? 1 : (max));
if (!isNaN(p)) {
p = 1 / Math.pow(10, p);
max = max + p;
} else {
}
var _local3 = (v() * (max - min)) + min;
if (p) {
_local3 = _local3 - (_local3 % p);
}
return(_local3);
}
static function shuffle(arr) {
var _local3;
var _local4;
var _local2 = 0;
while (_local2 < arr.length) {
_local3 = random(0, arr.length - 1, 0);
_local4 = arr[_local3];
arr[_local3] = arr[_local2];
arr[_local2] = _local4;
_local2++;
}
return(arr);
}
static var v = Math.random;
}
Symbol 457 MovieClip [__Packages.Car] Frame 0
class Car extends MovieClip
{
var stop, guy, inner, engine, initX, _x, _y, hit;
function Car () {
super();
stop();
guy = inner.guy;
inner.stop();
}
function init(e) {
engine = e;
initX = (_x = Engine.__get__WIDTH() / 2);
_y = Engine.CAR_START;
}
function update(ts, isMouseDown) {
if (isMouseDown) {
yVel = yVel + Y_VEL_ACCEL;
} else if (!isMouseDown) {
yVel = yVel - Y_VEL_DECEL;
}
inner._rotation = ts * TURN_CO;
inner.carShade._alpha = 50 + (ts * -25);
yVel = Math.min(MAX_Y_VEL, Math.max(MIN_Y_VEL, yVel));
_y = _y - yVel;
engine.level.scrollSpeed = engine.level.baseScrollSpeed + ((Engine.__get__CAR_START() - _y) * SPED_UP_SPEED);
if (_y > Engine.__get__CAR_START()) {
_y = Engine.CAR_START;
yVel = 0;
} else if (_y < Engine.__get__CAR_MAX_FORWARD()) {
_y = Engine.CAR_MAX_FORWARD;
yVel = 0;
}
initX = _x;
if (Math.abs(ts) > ROCK_THRESH) {
if (ts > 0) {
inner.gotoAndStop(LEFT);
} else {
inner.gotoAndStop(RIGHT);
}
} else if (isMouseDown) {
inner.gotoAndStop(BACK);
} else {
inner.gotoAndStop(NORMAL);
}
if (guy.tilt(ts)) {
engine.score = engine.score + (engine.isMouseDown ? (2 * Engine.POINTS_PER_BOOGY) : (Engine.POINTS_PER_BOOGY));
}
}
function realign() {
inner.gotoAndStop(NORMAL);
initX = _x;
inner._rotation = 0;
inner.carShade._alpha = 50;
}
function get width() {
return(hit._width);
}
function get height() {
return(hit._height);
}
var yVel = 0;
static var TURN_CO = 0.5;
static var NORMAL = "normal";
static var BACK = "back";
static var LEFT = "left";
static var RIGHT = "right";
static var ROCK_THRESH = 2;
static var MAX_Y_VEL = 5;
static var MIN_Y_VEL = -3;
static var Y_VEL_ACCEL = 0.3;
static var Y_VEL_DECEL = 0.5;
static var SPED_UP_SPEED = 1.5;
}
Symbol 458 MovieClip [__Packages.HUD] Frame 0
class HUD extends MovieClip
{
var stop, gotoAndStop, speedo, score_txt, dist;
function HUD () {
super();
stop();
}
function update(car, score, distance) {
if (car.guy.state == Guy.S_EDGE) {
gotoAndStop(car.guy.state);
} else if (car.engine.isMouseDown) {
gotoAndStop("good");
} else {
gotoAndStop(car.guy.state);
}
var _local3 = (car.yVel / Car.MAX_Y_VEL) * 90;
speedo.arrow._rotation = (speedo.arrow._rotation + _local3) / 2;
score_txt.text = Format.number(score, 0);
dist.gotoAndStop(Math.ceil((distance * dist._totalframes) - 1) + 1);
}
}
Symbol 459 MovieClip [__Packages.PerformanceController] Frame 0
class PerformanceController
{
var aFrmTms;
function PerformanceController () {
aFrmTms = [];
nLFT = getTimer();
}
function onEnterFrame() {
var _local4 = getTimer();
aFrmTms.push(_local4 - nLFT);
if (aFrmTms.length > nFA) {
var _local3 = 1000 / arrMean(aFrmTms);
_global.root.performanceDisplay.text = ((("fps=" + _local3) + newline) + "detailLevel=") + cdl;
if (_local3 > uf) {
if (cdl < mdl) {
setDetailLvl(cdl + 1);
}
} else if (_local3 < lf) {
if (cdl > 1) {
setDetailLvl(cdl - 1);
}
}
aFrmTms.length = 0;
}
nLFT = _local4;
}
function arrMean(arr) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < arr.length) {
_local3 = _local3 + arr[_local1];
_local1++;
}
return(_local3 / arr.length);
}
function setDetailLvl(l) {
switch (l) {
case 1 :
_root._quality = "LOW";
break;
case 2 :
_root._quality = "MEDIUM";
break;
case 3 :
_root._quality = "HIGH";
}
cdl = l;
}
static var nFA = 10;
var nLFT = 0;
var cdl = 3;
static var lf = 20;
static var uf = 29;
static var mdl = 3;
}
Symbol 460 MovieClip [__Packages.Delegate] Frame 0
class Delegate
{
function Delegate () {
}
static function create(target, handler) {
var _local3 = arguments.slice(2);
var _local2 = function () {
return(arguments.callee.handler.apply(arguments.callee.target, arguments.concat(arguments.callee.extraArgs)));
};
_local2.extraArgs = _local3;
_local2.handler = handler;
_local2.target = target;
return(_local2);
}
}
Symbol 461 MovieClip [__Packages.GameObject] Frame 0
class GameObject extends MovieClip
{
var engine, _y, _height, removeMovieClip;
function GameObject () {
super();
}
function init(e) {
engine = e;
}
function update(car, scrollSpeed) {
_y = _y + (scrollSpeed / Engine.__get__FPS());
if ((_y - _height) > Engine.__get__HEIGHT()) {
die();
} else {
checkHit(car, scrollSpeed);
}
}
function checkHit(car, scrollSpeed) {
}
function die() {
engine.removeObj(this);
removeMovieClip();
}
}
Symbol 462 MovieClip [__Packages.Guy] Frame 0
class Guy extends MovieClip
{
var inner, state;
function Guy () {
super();
spriteScale = inner.sprite._xscale;
inner.stop();
state = S_OK;
}
function tilt(turn) {
switch (state) {
case S_OK :
var _local2 = getBalanceChange(turn);
balancePos = balancePos + _local2;
balancePos = Math.max(-RANGE, Math.min(RANGE, balancePos));
if (balancePos != 0) {
inner.sprite.gotoAndStop("run1");
inner.sprite._rotation = balancePos;
if (turn < 0) {
inner.sprite._xscale = spriteScale * -1;
} else {
inner.sprite._xscale = spriteScale;
}
} else {
inner.sprite.gotoAndStop("stable");
}
lastBalanceChange = _local2;
if (Math.abs(balancePos) >= RANGE) {
state = S_EDGE;
if (balancePos > 0) {
inner.gotoAndStop(DANGLE_RIGHT);
} else {
inner.gotoAndStop(DANGLE_LEFT);
}
} else {
edgeTime = 0;
if (balancePos > 0) {
if (balancePos < BALANCE_CENTER_FORCE) {
balancePos = 0;
} else {
balancePos = balancePos - BALANCE_CENTER_FORCE;
}
} else if (balancePos > (-BALANCE_CENTER_FORCE)) {
balancePos = 0;
} else {
balancePos = balancePos + BALANCE_CENTER_FORCE;
}
}
inner._x = balancePos;
return(true);
case S_EDGE :
_local2 = getBalanceChange(turn);
if (((_local2 / Math.abs(_local2)) != (balancePos / Math.abs(balancePos))) && (Math.abs(_local2) > MIN_RECOVER_BALANCE_FORCE)) {
state = S_OK;
inner.gotoAndStop(DANCING);
}
inner._x = balancePos;
return(false);
}
}
function getBalanceChange(turn) {
if (turn < 0) {
return(Math.pow((-turn) * BALANCE_CO, BALANCE_POW));
}
return(-Math.pow(turn * BALANCE_CO, BALANCE_POW));
}
var balancePos = 0;
var lastBalanceChange = 0;
var spriteScale = 0;
var edgeTime = 0;
static var S_OK = "ok";
static var S_EDGE = "edge";
static var BALANCE_CO = 0.12;
static var BALANCE_POW = 1.2;
static var RANGE = 15;
static var BALANCE_CENTER_FORCE = 0.3;
static var MAX_EDGE_TIME = Engine.__get__FPS() * 2;
static var MIN_RECOVER_BALANCE_FORCE = 3;
static var DANCING = "dancing";
static var DANGLE_LEFT = "dangleLeft";
static var DANGLE_RIGHT = "dangleRight";
}
Symbol 463 MovieClip [__Packages.GameObjectVehicle] Frame 0
class GameObjectVehicle extends GameObject
{
var _y, _height, die, hit, _x, engine;
function GameObjectVehicle () {
super();
cacheAsBitmap = true;
}
function update(car, scrollSpeed) {
_y = _y + ((scrollSpeed - speed) / Engine.__get__FPS());
if ((_y - _height) > Engine.__get__HEIGHT()) {
die();
} else {
checkHit(car, scrollSpeed);
}
}
function checkHit(car, scrollSpeed) {
if (car.hit.hitTest(hit)) {
if (((_y + (hit._height / 2)) - ((scrollSpeed - speed) / Engine.__get__FPS())) < (car._y - (car.__get__height() / 2))) {
if (Math.abs(car._x - _x) < (((car.__get__width() + hit._width) / 2) - CLIP_DEPTH)) {
engine.collision(this);
} else {
if (car._x > _x) {
car._x = _x + ((hit._width + car.__get__width()) / 2);
} else {
car._x = _x - ((hit._width + car.__get__width()) / 2);
}
engine.sndman.playAndRemove(Engine.CLUNK_SND);
}
} else {
if (car.initX > _x) {
car._x = _x + ((hit._width + car.__get__width()) / 2);
} else {
car._x = _x - ((hit._width + car.__get__width()) / 2);
}
if (car.initX != car._x) {
engine.sndman.playAndRemove(Engine.CLUNK_SND);
}
}
}
}
var cacheAsBitmap = true;
var speed = 0;
static var CLIP_DEPTH = 7;
}
Symbol 464 MovieClip [__Packages.Cop] Frame 0
class Cop extends GameObjectVehicle
{
function Cop () {
super();
}
var speed = 200;
}
Symbol 465 MovieClip [__Packages.Pickup] Frame 0
class Pickup extends GameObject
{
var engine, _x, _y, die;
function Pickup () {
super();
}
function checkHit(car, scrollSpeed) {
if (car.hit.hitTest(this)) {
pickedUp();
}
}
function pickedUp() {
engine.pickupCollected(_x, _y);
die();
}
var cacheAsBitmap = true;
}
Symbol 466 MovieClip [__Packages.GameObjectHittable] Frame 0
class GameObjectHittable extends GameObject
{
var stop, hit, gotoAndStop, engine, _y, _x, fx, fy, fr, onEnterFrame, _rotation, removeMovieClip;
function GameObjectHittable () {
super();
stop();
}
function checkHit(car, scrollSpeed) {
if (car.hit.hitTest(hit)) {
gotoAndStop("hit");
engine.sndman.playAndRemove(Engine.DONK_SND);
var _local2 = Math.atan2(_y - car._y, _x - car._x);
fx = Rand.random(FLY_SPEED, FLY_SPEED * 1.2) * Math.cos(_local2);
fy = Rand.random(FLY_SPEED, FLY_SPEED * 1.2) * Math.sin(_local2);
fr = Rand.random(-30, 30);
engine.removeObj(this);
cacheAsBitmap = false;
onEnterFrame = flyOff;
}
}
function flyOff() {
if ((ft++) < MAX_FLY_TIME) {
_x = _x + fx;
_y = _y + fy;
_rotation = _rotation + fr;
} else {
removeMovieClip();
}
}
var ft = 0;
var cacheAsBitmap = true;
static var FLY_SPEED = 20;
static var MAX_FLY_TIME = 100;
}
Symbol 467 MovieClip [__Packages.CopFast] Frame 0
class CopFast extends GameObjectVehicle
{
function CopFast () {
super();
}
var speed = 300;
}
Symbol 468 MovieClip [__Packages.CopSlow] Frame 0
class CopSlow extends GameObjectVehicle
{
function CopSlow () {
super();
}
var speed = 120;
}
Symbol 469 MovieClip [__Packages.Truck] Frame 0
class Truck extends GameObjectVehicle
{
function Truck () {
super();
}
var speed = 100;
}
Symbol 470 MovieClip [__Packages.ClickBlocker] Frame 0
class ClickBlocker extends MovieClip
{
function ClickBlocker () {
super();
}
function onPress() {
}
var useHandCursor = false;
}
Symbol 471 MovieClip [__Packages.InstantWin] Frame 0
class InstantWin extends MovieClip
{
var so, stop, _visible, lv, code_txt, getURL;
function InstantWin () {
super();
so = SharedObject.getLocal("comp");
stop();
_visible = false;
if ((_root.kvCountry() == "GB") && (!so.data.shown)) {
lv = new LoadVars();
lv.onLoad = Delegate.create(this, onLoaded);
lv.load("http://projects.kempt.co.uk/raygun/?action=check");
}
}
function getCode() {
lv.load("http://projects.kempt.co.uk/raygun/?action=get");
}
function copy() {
if (loaded) {
System.setClipboard(code_txt.text);
}
}
function redeem() {
if (loaded) {
getURL("http://projects.kempt.co.uk/raygun/?action=redeem&code=" + escape(code_txt.text), "_blank");
}
}
function onLoaded(success) {
if (state == "checking") {
if (success && (Number(lv.remaining) > 0)) {
_visible = true;
state = "showing";
getCode();
}
} else if (success && (lv.state == "ok")) {
loaded = true;
code_txt.text = lv.code;
so.data.shown = true;
so.flush();
} else {
code_txt.text = "loading error";
}
}
var loaded = false;
var state = "checking";
}
Symbol 303 MovieClip Frame 7
gotoAndPlay (1);
Symbol 304 MovieClip Frame 69
stop();
Symbol 325 MovieClip Frame 270
stop();
Symbol 326 MovieClip Frame 1
stop();
Symbol 326 MovieClip Frame 2
_global.root.engine.sndman.playAndRemove("argh");
Symbol 326 MovieClip Frame 47
_global.root.engine.guyLanded();
Symbol 326 MovieClip Frame 75
stop();
Symbol 348 MovieClip Frame 1
stop();
Symbol 358 MovieClip [HUD] Frame 1
#initclip 58
Object.registerClass("HUD", HUD);
#endinitclip
Symbol 360 MovieClip [cop marker] Frame 1
#initclip 40
Object.registerClass("cop marker", Marker);
#endinitclip
type = "cop";
Symbol 362 MovieClip [pickup marker] Frame 1
#initclip 41
Object.registerClass("pickup marker", Marker);
#endinitclip
type = "pickup";
Symbol 364 MovieClip [fast cop] Frame 1
#initclip 42
Object.registerClass("fast cop", Marker);
#endinitclip
type = "fast_cop_car";
Symbol 366 MovieClip [slow cop] Frame 1
#initclip 43
Object.registerClass("slow cop", Marker);
#endinitclip
type = "slow_cop_car";
Symbol 367 MovieClip [level1] Frame 1
#initclip 44
Object.registerClass("level1", Level);
#endinitclip
Symbol 368 MovieClip [moving truck marker] Frame 1
#initclip 45
Object.registerClass("moving truck marker", Marker);
#endinitclip
type = "truck_moving";
Symbol 369 MovieClip [level2] Frame 1
#initclip 46
Object.registerClass("level2", Level);
#endinitclip
Symbol 371 MovieClip [cones left marker] Frame 1
#initclip 47
Object.registerClass("cones left marker", Marker);
#endinitclip
type = "template";
template = "cones_left_template";
Symbol 373 MovieClip [cones right marker] Frame 1
#initclip 48
Object.registerClass("cones right marker", Marker);
#endinitclip
type = "template";
template = "cones_right_template";
Symbol 374 MovieClip [level3] Frame 1
#initclip 49
Object.registerClass("level3", Level);
#endinitclip
Symbol 375 MovieClip [box marker] Frame 1
#initclip 50
Object.registerClass("box marker", Marker);
#endinitclip
type = "box";
Symbol 376 MovieClip [cones double right marker] Frame 1
#initclip 51
Object.registerClass("cones double right marker", Marker);
#endinitclip
type = "template";
template = "cones_double_right_template";
Symbol 377 MovieClip [cones double left marker] Frame 1
#initclip 52
Object.registerClass("cones double left marker", Marker);
#endinitclip
type = "template";
template = "cones_double_left_template";
Symbol 378 MovieClip [level4] Frame 1
#initclip 53
Object.registerClass("level4", Level);
#endinitclip
Symbol 379 MovieClip [level5] Frame 1
#initclip 54
Object.registerClass("level5", Level);
#endinitclip
Symbol 380 MovieClip [levels] Frame 1
#initclip 55
Object.registerClass("levels", Level);
#endinitclip
Symbol 381 MovieClip [jcb marker] Frame 1
#initclip 56
Object.registerClass("jcb marker", Marker);
#endinitclip
type = "jcb";
Symbol 395 Button
on (release) {
_global.root.kvEvent(2933);
_global.music.fadeTo(30, 1);
_parent.play();
}
Symbol 400 Button
on (release) {
_parent.nextFrame();
}
Symbol 406 MovieClip Frame 47
if (!count) {
count = 0;
}
if (count < 3) {
count++;
gotoAndPlay (1);
} else {
_parent.nextFrame();
}
Instance of Symbol 58 MovieClip in Symbol 410 MovieClip Frame 1
onClipEvent (load) {
if (Math.random() < 0.5) {
gotoAndPlay ("yell2");
}
}
Symbol 410 MovieClip Frame 47
if (!count) {
count = 0;
}
if (count < 3) {
count++;
gotoAndPlay (1);
} else {
_parent.nextFrame();
}
Instance of Symbol 58 MovieClip in Symbol 414 MovieClip Frame 1
onClipEvent (load) {
if (Math.random() < 0.5) {
gotoAndPlay ("yell2");
}
}
Instance of Symbol 58 MovieClip in Symbol 414 MovieClip Frame 66
onClipEvent (load) {
if (Math.random() < 0.5) {
gotoAndPlay ("yell2");
}
}
Symbol 414 MovieClip Frame 70
if (!count) {
count = 0;
}
if (count < 2) {
count++;
gotoAndPlay (1);
} else {
_parent.nextFrame();
}
Symbol 415 Button
on (release) {
_parent.nextFrame();
}
Symbol 417 MovieClip Frame 47
if (!count) {
count = 0;
}
if (count < 3) {
count++;
gotoAndPlay (1);
} else {
_parent.nextFrame();
}
Symbol 418 Button
on (release) {
_parent.gotoAndStop(1);
}
Symbol 422 MovieClip Frame 47
if (!count) {
count = 0;
}
if (count < 3) {
count++;
gotoAndPlay (1);
} else {
_parent.gotoAndStop(1);
}
Symbol 427 MovieClip Frame 1
stop();
Symbol 427 MovieClip Frame 5
if (!_global.root.iViewedAllTheInstructions) {
_global.root.iViewedAllTheInstructions = true;
_global.root.kvEvent(2934);
}
Symbol 429 Button
on (release) {
_global.music.fadeTo(30, 1);
_parent.play();
}
Symbol 439 MovieClip Frame 1
stop();
inner.gotoAndStop(_global.root.curLevel);
Symbol 439 MovieClip Frame 10
stop();
_parent.start();
Symbol 440 MovieClip [engine] Frame 1
#initclip 57
Object.registerClass("engine", Engine);
#endinitclip
Symbol 448 Button
on (release) {
_global.root.gotoRaygun();
}