Frame 4
ifFrameLoaded (28) {
gotoAndPlay (8);
}
_quality = "HIGH";
Frame 5
gotoAndPlay (1);
Frame 8
duplicateMovieClip ("/msled", "msled2", 1002);
cnt = 0;
gravity = 8;
acceleration = 12;
grinding = -40;
maxspeed = 40;
friction = 0.8;
doodybase = 995;
Set("/:fram", 170);
musictrack = 0;
topspeed = 1.4;
adjustfactor = 4;
Set("/:xroll", 0);
x = 0;
y = 0;
z = 0;
sep = 1.2;
zoffset = 2.5;
xfactor = 1;
zstart = 3;
angle = 0;
initsegs = 900;
Set("/:speed", 0);
fov = 60;
toremove = initsegs + 1;
Set("/seg0:me", 0);
Set("/:basey", 236);
duplicateMovieClip ("/seg0", "seg" add t, t);
duplicateMovieClip ("/mask", "mask1", 1003);
Set("/mask1:message", "PUSH THE BOBSLED FORWARD\rTO START YOUR RUN");
Set(("/seg0" add t) add ":t", t);
Set(("/seg0" add t) add ":z", zstart);
prevz = zstart;
totalsegs = 20;
prevx = 0;
segz = zoffset;
trackangle = 0;
t = initsegs;
while ((initsegs - totalsegs) < Number(t)) {
call("anothersegment");
}
Frame 9
startDrag ("tracker", true);
Frame 12
mx = getProperty("/tracker", _x);
if (Number(mx) < 140) {
tellTarget ("/mask1/skates") {
gotoAndStop (1);
};
if (Number(mx) < 15) {
mx = 15;
}
} else if (200 < Number(mx)) {
tellTarget ("/mask1/skates") {
gotoAndStop (3);
};
if (Number(mx) < 308) {
mx = 308;
}
} else {
tellTarget ("/mask1/skates") {
gotoAndStop (2);
};
}
Set("/:xmomentum", /:xmomentum + ((mx - /:fram) / (/:acceleration / /:speed)));
Set("/:xmomentum", /:xmomentum * /:friction);
if ((18 < Number(/:roll)) or (Number(/:roll) < -18)) {
Set("/:currentsound", "hit");
}
if ((3 < Number(/:roll)) or (Number(/:roll) < -3)) {
Set("/:xmomentum", /:xmomentum + (((170 + (/:roll * 3)) - /:fram) / /:gravity));
tadjust = 0;
Set("/:speed", /:speed - (0.0008 * Math.abs(/:roll)));
} else if (Number(/:fram) < 120) {
Set("/:xmomentum", /:xmomentum + (10 * /:speed));
Set("/:speed", /:speed * 0.8);
Set("/:currentsound", "scrapeleft");
} else if (220 < Number(/:fram)) {
Set("/:xmomentum", /:xmomentu - (10 * /:speed));
Set("/:speed", /:speed * 0.8);
Set("/:currentsound", "scraperight");
}
if (/:maxspeed < Number(Math.abs(/:xmomentum))) {
Set("/:xmomentum", /:maxspeed * (Math.abs(/:xmomentum) / /:xmomentum));
}
if ((Number(/:speed) < /:topspeed) and (/:speed ne "0")) {
Set("/:speed", /:speed + (0.01 * eval (("/seg" add /:t) add ":sp")));
}
Set("/:xroll", Math.tan(/:roll / 58.08));
Set("/:fram", int(/:fram + /:xmomentum));
if (Number(280 < /:fram)) {
Set("/:currentsound", "turn2");
}
if (Number(/:fram < 60)) {
Set("/:currentsound", "turn2");
}
if (0 < Number(/:latest)) {
Set("/:roll2", ((-4 * /:speed) * eval (("/seg" add (/:latest - 3)) add ":tangle")) - ((170 - /:fram) * 0.2));
Set("/:roll", /:roll - ((/:roll - /:roll2) / 3));
if (70 < Number(/:roll)) {
Set("/:roll", 70);
} else if (Number(/:roll) < -70) {
Set("/:roll", -70);
}
vector = eval (("/seg" add (/:latest - (1 + int(/:speed * 3)))) add ":angle");
steer = (vector - angle) / adjustfactor;
angle = angle + steer;
}
z = z + (speed * Math.cos(/:angle / 58.08));
x = x + (speed * Math.sin(/:angle / 58.08));
tellTarget ("/mask1/steering") {
gotoAndStop(int(/:fram));
};
tellTarget ("/mask1/steering2") {
gotoAndStop(int(((/:xmomentum + /:maxspeed) * 340) / (/:maxspeed * 2)));
};
if (Number(/:speed) < 0) {
points = int(90000 - (time * 100));
gotoAndPlay (52);
} else if ((0 < Number(/:speed)) and (410 < Number(/:latest))) {
Set("/mask1:speed", (int(/:speed * 80) add ".") add random(9));
time = (getTimer() - timerindex) / 1000;
min = Math.floor(time / 60);
sec = time - (min * 60);
sec = int(sec * 10) / 10;
if (Number(sec) == Number(int(sec))) {
sec = sec add "0";
}
if (Number(sec) < 10) {
sec = "0" add sec;
}
if ((0 < Number(min)) and (go ne "true")) {
rtime = (min add ":") add sec;
} else if (go ne "true") {
rtime = "0:" add sec;
}
Set("/:mask1:timer", rtime);
gotoAndPlay (11);
} else {
timerindex = getTimer();
gotoAndPlay (11);
}
Frame 19
if (180 < realangle) {
Set(realangle, realangle - 360);
} else if (realangle < -180) {
Set(realangle, realangle + 360);
}
Frame 28
if (Number(/:latest - t) < Number(/:totalsegs)) {
tellTarget ("/mask1/progress") {
gotoAndStop(901 - /:t);
};
removeMovieClip("/seg" add /:toremove);
Set("/:toremove", "");
t--;
duplicateMovieClip ("/seg0", "seg" add t, t);
Set(("/seg" add /:t) add ":me", /:t);
run = substring(t, 2, 1);
sec = substring(t, 1, 1);
if (sec eq "3") {
if (Number(t) == "399") {
tellTarget ("/seg410") {
gotoAndPlay (5);
};
}
Set("/:currentsound", "brake");
Set(("/seg" add t) add ":sp", -2);
} else if (((sec eq "9") or (sec eq "7")) or (sec eq "5")) {
if ((run eq "8") or (run eq "2")) {
Set(("/seg" add t) add ":f", 135);
Set(("/seg" add t) add ":tangle", 6);
Set("/:trackangle", /:trackangle + 6);
}
if ((run eq "6") or (run eq "5")) {
Set(("/seg" add t) add ":f", 101);
Set("/:trackangle", /:trackangle - 3);
Set(("/seg" add t) add ":tangle", -3);
}
if (run eq "3") {
Set(("/seg" add t) add ":f", 101);
Set(("/seg" add t) add ":tangle", -6);
Set("/:trackangle", /:trackangle - 6);
}
Set(("/seg" add t) add ":sp", 1);
} else {
if ((run eq "8") or (run eq "2")) {
Set(("/seg" add t) add ":f", 135);
Set(("/seg" add t) add ":tangle", 2);
Set("/:trackangle", /:trackangle + 2);
}
if ((run eq "6") or (run eq "5")) {
Set(("/seg" add t) add ":f", 101);
Set("/:trackangle", /:trackangle - 1);
Set(("/seg" add t) add ":tangle", -1);
}
if (run eq "3") {
Set(("/seg" add t) add ":f", 101);
Set(("/seg" add t) add ":tangle", -2);
Set("/:trackangle", /:trackangle - 2);
}
Set(("/seg" add t) add ":sp", 1);
}
Set(("/seg" add t) add ":r", trackangle);
prevx = prevx + ((Math.sin(trackangle / 58.08) * zoffset) * xfactor);
prevz = prevz + (Math.cos(trackangle / 58.08) * zoffset);
Set(("/seg" add t) add ":x", prevx);
Set(("/seg" add t) add ":z", prevz);
}
Frame 40
call("anothersegment");
call("anothersegment");
call("anothersegment");
call("anothersegment");
call("anothersegment");
call("anothersegment");
call("anothersegment");
call("anothersegment");
call("anothersegment");
call("anothersegment");
Frame 53
if (Number(cnt) < 30) {
removeMovieClip("/seg" add t);
t++;
cnt++;
gotoAndPlay (52);
stopAllSounds();
}
Frame 56
_quality = "HIGH";
setProperty("/background", _alpha , 50);
if (Number(points) < 1) {
points = 1;
}
stop();
Frame 59
stop();
Symbol 2 MovieClip Frame 1
stop();
Symbol 1 MovieClip Frame 1
if (/:shadowbase eq "") {
Set("/:shadowbase", getProperty("shadow", _y));
Set("/:shadowbasex", getProperty("shadow", _x));
}
stop();
Symbol 21 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 1
stop();
Symbol 20 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 2
if (/:currentsound ne "") {
gotoAndPlay(/:currentsound);
} else {
gotoAndPlay (1);
}
Symbol 51 MovieClip Frame 56
Set("/:currentsound", "");
gotoAndPlay (1);
Symbol 51 MovieClip Frame 112
Set("/:currentsound", "");
gotoAndPlay (1);
Symbol 51 MovieClip Frame 115
Set("/:currentsound", "");
gotoAndPlay (1);
Symbol 51 MovieClip Frame 161
Set("/:currentsound", "");
gotoAndPlay (1);
Symbol 51 MovieClip Frame 172
Set("/:currentsound", "");
gotoAndPlay (1);
Symbol 51 MovieClip Frame 176
stopAllSounds();
Symbol 51 MovieClip Frame 318
Set("/:currentsound", "");
gotoAndPlay (1);
Symbol 51 MovieClip Frame 397
Set("/:currentsound", "");
gotoAndPlay (1);
Symbol 51 MovieClip Frame 418
Set("/:currentsound", "");
gotoAndPlay (1);
Symbol 51 MovieClip Frame 467
Set("/:currentsound", "");
gotoAndPlay (1);
Symbol 51 MovieClip Frame 514
Set("/:currentsound", "");
gotoAndPlay (1);
Symbol 51 MovieClip Frame 542
Set("/:currentsound", "");
gotoAndPlay (1);
Symbol 64 MovieClip Frame 155
stop();
Symbol 64 MovieClip Frame 229
stop();
Symbol 67 MovieClip Frame 1
if (this.sessionstarted != 1) {
this.arcade = new LoadVars();
this.sessionvars = new LoadVars();
this.arcade.gamename = "iceracer";
this.arcade.sessdo = "sessionstart";
this.arcade.sendAndLoad("arcade.php", sessionvars, "POST");
if (this.sessionvars.sessiontype != 2) {
_root.is_a_challenge = 0;
} else {
_root.is_a_challenge = 1;
}
this.sessionstarted = 1;
}
if (_root.gameover == 1) {
if ((this.askpermission != 1) && (this.sessionvars.connStatus == 1)) {
this.prequestvars = new LoadVars();
this.pranswer = new LoadVars();
this.prequestvars.gametime = this.sessionvars.gametime;
this.prequestvars.fakekey = this.sessionvars.initbar;
_root.score = int(Number(_root.score));
if (_root.score != 0) {
this.prequestvars.score = _root.score;
} else {
this.prequestvars.score = -1;
}
this.prequestvars.id = this.sessionvars.lastid;
this.prequestvars.sessdo = "permrequest";
this.prequestvars.note = (this.prequestvars.id * this.prequestvars.score) * this.prequestvars.fakekey;
this.prequestvars.sendAndLoad("./arcade.php", this.pranswer, "POST");
this.askpermission = 1;
}
if ((this.pranswer.validate == 1) && (this.finalsent != 1)) {
this.burnscore = new LoadVars();
this.burnscore.microone = this.pranswer.microone;
this.burnscore.gametime = this.prequestvars.gametime;
this.burnscore.id = this.prequestvars.id;
if (_root.score == 0) {
this.burnscore.noscore = 1;
}
this.burnscore.sessdo = "burn";
this.burnscore.send("./arcade.php", "_self", "POST");
this.finalsent = 1;
}
}
Symbol 71 MovieClip Frame 1
x = 0;
z = 200;
y = 0;
Symbol 71 MovieClip Frame 2
devx = -4 * /:angle;
setProperty("/background", _x , 170 + devx);
setProperty("/background", _y , /:basey + (devx * /:xroll));
setProperty("/background", _rotation , /:roll);
if (tttt ne "yes") {
setProperty("/background", _alpha , 100);
tttt = "yes";
}
Symbol 71 MovieClip Frame 3
gotoAndPlay (2);
Symbol 74 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 2
dx2 = 0.015 * (/:fram - 170);
dx = (x - /:x) - dx2;
dz = (z - /:z) - dz2;
dis = Math.sqrt((dx * dx) + (dz * dz));
if (Number(dis) == 0) {
dis = 0.001;
}
sc = 1400 / dis;
setProperty("/seg" add me, _xscale , sc);
setProperty("/seg" add me, _yscale , sc);
angle = Math.atan((1 * dx) / dz) * 57.3;
devx = (angle - (/:angle + (0.2 * /:xmomentum))) * (450 / /:fov);
setProperty("/seg" add me, _x , 170 + devx);
setProperty("/seg" add me, _x , 170 + devx);
setProperty("/seg" add me, _y , /:basey + (devx * /:xroll));
setProperty("/seg" add me, _rotation , /:roll);
tellTarget ("track") {
gotoAndStop(int(((../:angle + 180) - ../:r) / 5) + ../:f);
};
if ((Number(dis) < 5) or (Number(dz) < 0)) {
setProperty("/seg" add me, _visible , 0);
if (/:toremove eq "") {
if (0 < Number(me)) {
Set("/:toremove", me);
Set("/:latest", me);
call("/:anothersegment");
}
}
}
Symbol 73 MovieClip Frame 3
gotoAndPlay (2);
Symbol 73 MovieClip Frame 5
dx2 = 0.015 * (/:fram - 170);
dx = (x - /:x) - dx2;
dz = (z - /:z) - dz2;
dis = Math.sqrt((dx * dx) + (dz * dz));
if (Number(dis) == 0) {
dis = 0.001;
}
sc = 1400 / dis;
setProperty("/seg" add me, _xscale , sc);
setProperty("/seg" add me, _yscale , sc);
angle = Math.atan((1 * dx) / dz) * 57.3;
devx = (angle - (/:angle + (0.2 * /:xmomentum))) * (450 / /:fov);
setProperty("/seg" add me, _x , 170 + devx);
setProperty("/seg" add me, _x , 170 + devx);
setProperty("/seg" add me, _y , /:basey + (devx * /:xroll));
setProperty("/seg" add me, _rotation , /:roll);
if ((Number(dis) < 5) or (Number(dz) < 0)) {
setProperty("/seg" add me, _visible , 0);
if (/:toremove eq "") {
if (0 < Number(me)) {
Set("/:toremove", me);
Set("/:latest", me);
call("/:anothersegment");
}
}
}
Symbol 73 MovieClip Frame 6
gotoAndPlay (5);
Symbol 126 Button
on (press) {
sy = getProperty("/tracker", _y);
st = getTimer();
}
on (release, releaseOutside) {
if (Number(/:speed) < 0.1) {
stopAllSounds();
Set("/:currentsound", "start");
ey = getProperty("/tracker", _y);
et = getTimer();
dy = sy - ey;
dt = et - st;
push = dy / dt;
Set("/:speed", 0.1 + (push * 0.5));
Set("/mask1:message", "");
_quality = "LOW";
gotoAndStop (2);
}
}
Symbol 128 Button
on (press) {
sy = getProperty("/tracker", _y);
st = getTimer();
}
on (release, releaseOutside) {
if (Number(/:speed) < 0.1) {
stopAllSounds();
Set("/:currentsound", "start");
ey = getProperty("/tracker", _y);
et = getTimer();
dy = sy - ey;
dt = et - st;
push = dy / dt;
Set("/:speed", 0.1 + (push * 0.5));
Set("/mask1:message", "");
_quality = "LOW";
gotoAndStop (2);
}
}
Symbol 125 MovieClip Frame 2
gotoAndPlay (1);
Symbol 134 Button
on (release) {
_root.score = /:points;
mykey = /:points;
if (Number(mykey) < 1) {
mykey = 0;
}
_root.gameover = 1;
}
Symbol 140 Button
on (release) {
Set("/:points", 0);
tellTarget ("countdown") {
gotoAndPlay (3);
};
gotoAndPlay (1);
}
Symbol 153 Button
on (release) {
_root.score = /:points;
mykey = /:points;
if (Number(mykey) < 1) {
mykey = 0;
}
_root.gameover = 1;
}
Symbol 154 Button
on (release) {
Set("/:points", 0);
tellTarget ("countdown") {
gotoAndPlay (3);
};
gotoAndPlay (1);
}