Frame 1
var cfg = new loadVars();
cfg.onLoad = function () {
};
cfg.load("cfg.txt");
stop();
Instance of Symbol 24 MovieClip in Frame 1
onClipEvent (load) {
bytesTotal = _parent.getBytesTotal();
}
onClipEvent (enterFrame) {
bytesLoaded = _parent.getBytesLoaded();
percent = Math.ceil(bytesLoaded * (100 / bytesTotal));
loader_mc.gotoAndStop(percent);
percent_txt.text = percent + "% loaded";
if (percent >= 99) {
_parent.play();
}
}
Frame 10
stop();
Frame 20
function Plowgame() {
this.map = new Map();
game.init();
this.player1 = new Snowplow();
this.player1.has_pass = false;
this.mc = game.createEmptyMovieClip("gamecontrol", 123);
this.mc.obj = this;
this.scoring = new Scoring();
this.scoring.plowgame = this;
this.audio = new Gameaudio();
game.level = 1;
game.ui.clock.text = "5:00";
game.ui.clock_sha.text = "5:00";
this.doCountDown();
}
function moveBoard(x, y) {
theGame.move_stop();
game.map_mc.transform("easeInOutQuad", 100, "_x", x, "_y", y);
game.over_cont.transform("easeInOutQuad", 100, "_x", x, "_y", y);
_root.pauseAndInvoke(100, "restart_player", _root);
}
function restart_player() {
game.k_rr = 200;
theGame.player1.pos_x = game.met(-game.map_mc._x);
theGame.player1.pos_y = game.met(-game.map_mc._y);
theGame.player1.mc.fadeIn(10);
theGame.player1.control_enable();
theGame.move_start();
this.player1.f_eng = game.f_eng_max;
theGame.player1.vel_x = 1;
theGame.player1.vel_y = 0;
}
function Gameaudio() {
var snd_mc = _root.createEmptyMovieClip("sounds", 9994);
this.music = new Sound(snd_mc);
this.music.attachSound("music1");
this.mint_snd = new Sound(snd_mc);
this.mint_snd.attachSound("mint");
this.timer_snd = new sound(snd_mc);
this.timer_snd.attachSound("timer");
this.crash_snd = new Sound(snd_mc);
this.crash_snd.attachSound("crash");
}
function Scoring() {
this.zeroAll();
}
function Map() {
this.over = game.over_cont.attachMove("overhead", "overhead", 30000);
this.width = game.map_mc._width;
this.height = game.map_mc._height;
this.collisionMap = game.map_mc.collisionMap;
this.iceMap = game.map_mc.iceMap;
this.collectMap = game.map_mc.collectMap;
this.teleportMap = game.map_mc.teleportMap;
}
function Avatar() {
}
function Vehicle() {
this.ang_steer_max = Math.rad(45);
this.ang_steer_jump = Math.rad(15);
this.ang_steer_vel = 3;
this.f_eng_max = 40;
this.f_bra_max = 500;
this.mass = 1250;
this.inertia = 1250;
this.len_f = 0.5;
this.len_r = 0.75;
this.len_wb = this.len_f + this.len_r;
this.wid = 3;
this.k_cs_f = -1;
this.k_cs_r = -1;
this.mc = game.avatar_container;
this.mc.obj = this;
var old_height = this.mc._height;
var new_height = game.px(this.len);
this.sca_0 = (new_height / old_height) * 100;
this.vel_x = (this.vel_y = 0);
this.spd = 0;
this.acc_x = (this.acc_y = 0);
this.ang = Math.norm_ang(Math.rad(this._rotation));
this.ang_vel = 0;
this.ang_steer = 0;
}
function Snowplow() {
this.mc2 = this.mc.attachMovie("truckMC", "truckMC", 2);
this.mc2.obj = this;
this.ang = Math.rad(180);
this.mc._rotation = -90;
this.mc._x = 300;
this.mc._y = 200;
game.map_mc.draw_container._x = this.mc._x;
game.map_mc.draw_container._y = this.mc._y;
game.map_mc.draw_container2._x = this.mc._x;
game.map_mc.draw_container2._y = this.mc._y;
this.k_cs_f = -5;
this.k_cs_r = -5;
this.pos_x_prev2 = (this.pos_x_prev = (this.pos_x = game.met(this.mc._x + 50)));
this.pos_y_prev2 = (this.pos_y_prev = (this.pos_y = game.met(this.mc._y)));
this.pos_x_next;
this.pos_y_next;
this.rot_prev2 = (this.rot_prev = (this.rot = Math.rad(this.mc._rotation)));
this.set_controls();
this.control_enable();
}
Math.linearTween = function (t, b, c, d) {
return(((c * t) / d) + b);
};
Math.easeInQuad = function (t, b, c, d) {
return(((c * ((t = t / d))) * t) + b);
};
Math.easeOutQuad = function (t, b, c, d) {
return((((-c) * ((t = t / d))) * (t - 2)) + b);
};
Math.easeInOutQuad = function (t, b, c, d) {
if (((t = t / (d / 2))) < 1) {
return((((c / 2) * t) * t) + b);
}
return((((-c) / 2) * (((--t) * (t - 2)) - 1)) + b);
};
Math.easeInCubic = function (t, b, c, d) {
return((((c * ((t = t / d))) * t) * t) + b);
};
Math.easeOutCubic = function (t, b, c, d) {
return((c * (((((t = (t / d) - 1)) * t) * t) + 1)) + b);
};
Math.easeInOutCubic = function (t, b, c, d) {
if (((t = t / (d / 2))) < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
return(((c / 2) * (((((t = t - 2)) * t) * t) + 2)) + b);
};
Math.easeInQuart = function (t, b, c, d) {
return(((((c * ((t = t / d))) * t) * t) * t) + b);
};
Math.easeOutQuart = function (t, b, c, d) {
return(((-c) * ((((((t = (t / d) - 1)) * t) * t) * t) - 1)) + b);
};
Math.easeInOutQuart = function (t, b, c, d) {
if (((t = t / (d / 2))) < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
return((((-c) / 2) * ((((((t = t - 2)) * t) * t) * t) - 2)) + b);
};
Math.easeInQuint = function (t, b, c, d) {
return((((((c * ((t = t / d))) * t) * t) * t) * t) + b);
};
Math.easeOutQuint = function (t, b, c, d) {
return((c * (((((((t = (t / d) - 1)) * t) * t) * t) * t) + 1)) + b);
};
Math.easeInOutQuint = function (t, b, c, d) {
if (((t = t / (d / 2))) < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
return(((c / 2) * (((((((t = t - 2)) * t) * t) * t) * t) + 2)) + b);
};
Math.easeInSine = function (t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
};
Math.easeOutSine = function (t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
};
Math.easeInOutSine = function (t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
};
Math.easeInExpo = function (t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
};
Math.easeOutExpo = function (t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
};
Math.easeInOutExpo = function (t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
if (((t = t / (d / 2))) < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
return(((c / 2) * ((-Math.pow(2, -10 * (--t))) + 2)) + b);
};
Math.easeInCirc = function (t, b, c, d) {
return(((-c) * (Math.sqrt(1 - (((t = t / d)) * t)) - 1)) + b);
};
Math.easeOutCirc = function (t, b, c, d) {
return((c * Math.sqrt(1 - (((t = (t / d) - 1)) * t))) + b);
};
Math.easeInOutCirc = function (t, b, c, d) {
if (((t = t / (d / 2))) < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
return(((c / 2) * (Math.sqrt(1 - (((t = t - 2)) * t)) + 1)) + b);
};
Math.easeInElastic = function (t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
if (((t = t / d)) == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if (a < Math.abs(c)) {
a = c;
var s = (p / 4);
} else {
var s = ((p / (Math.PI*2)) * Math.asin(c / a));
}
return((-((a * Math.pow(2, 10 * ((t = t - 1)))) * Math.sin((((t * d) - s) * (Math.PI*2)) / p))) + b);
};
Math.easeOutElastic = function (t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
if (((t = t / d)) == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if (a < Math.abs(c)) {
a = c;
var s = (p / 4);
} else {
var s = ((p / (Math.PI*2)) * Math.asin(c / a));
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - s) * (Math.PI*2)) / p)) + c) + b);
};
Math.easeInOutElastic = function (t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
if (((t = t / (d / 2))) == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if (a < Math.abs(c)) {
a = c;
var s = (p / 4);
} else {
var s = ((p / (Math.PI*2)) * Math.asin(c / a));
}
if (t < 1) {
return((-0.5 * ((a * Math.pow(2, 10 * ((t = t - 1)))) * Math.sin((((t * d) - s) * (Math.PI*2)) / p))) + b);
}
return(((((a * Math.pow(2, -10 * ((t = t - 1)))) * Math.sin((((t * d) - s) * (Math.PI*2)) / p)) * 0.5) + c) + b);
};
Math.easeInBack = function (t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
return((((c * ((t = t / d))) * t) * (((s + 1) * t) - s)) + b);
};
Math.easeOutBack = function (t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
return((c * (((((t = (t / d) - 1)) * t) * (((s + 1) * t) + s)) + 1)) + b);
};
Math.easeInOutBack = function (t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
if (((t = t / (d / 2))) < 1) {
return(((c / 2) * ((t * t) * (((((s = s * 1.525)) + 1) * t) - s))) + b);
}
return(((c / 2) * (((((t = t - 2)) * t) * (((((s = s * 1.525)) + 1) * t) + s)) + 2)) + b);
};
Math.easeInBounce = function (t, b, c, d) {
return((c - Math.easeOutBounce(d - t, 0, c, d)) + b);
};
Math.easeOutBounce = function (t, b, c, d) {
if (((t = t / d)) < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
return((c * (((7.5625 * ((t = t - 0.545454545454545))) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
return((c * (((7.5625 * ((t = t - 0.818181818181818))) * t) + 0.9375)) + b);
}
return((c * (((7.5625 * ((t = t - 0.954545454545455))) * t) + 0.984375)) + b);
};
Math.easeInOutBounce = function (t, b, c, d) {
if (t < (d / 2)) {
return((Math.easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((Math.easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
};
MovieClip.prototype.transform = function (myTween, myDuration, myProperty, myValue) {
var amplitude = 2;
var period = 0.5;
var input = arguments;
var inputLength = ((arguments.length - 3) / 2);
var duration = myDuration;
var property = new Array();
var pStart = new Array();
var pChange = new Array();
var p = null;
var v = null;
var i = 0;
while (i < inputLength) {
p = input[2 + (i * 2)];
v = input[3 + (i * 2)];
property.push(p);
pStart.push(this[p]);
pChange.push(v - this[p]);
i++;
}
this.time = 0;
this.createEmptyMovieClip("controller", 78234);
this.controller.onEnterFrame = function () {
this = this._parent;
tween = myTween;
var i = 0;
while (i < inputLength) {
if (pChange[i] != 0) {
this[property[i]] = Math[tween](this.time, pStart[i], pChange[i], duration, amplitude, period);
}
i++;
}
if (this.time >= duration) {
removeMovieClip(this.controller);
}
this.time++;
};
};
MovieClip.prototype.pauseAndInvoke = function (myDelay, myFunction, myLocation, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39) {
var timerDepth = (++this.nextHighestDepth);
var timerName = ("mcTimer" + timerDepth);
this.createEmptyMovieClip(timerName, timerDepth);
var timer = this[timerName];
timer.time = myDelay;
timer.onEnterFrame = function () {
if (this.time <= 0) {
myLocation[myFunction](p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39);
this.removeMovieClip();
} else {
this.time--;
}
};
};
MovieClip.prototype.fadeOut = function (increment, delay) {
this.createEmptyMovieClip("fadeMC", 763121);
this.fadeMC.alphaTrans = -1 * increment;
this.fadeMC.delay = delay;
this.fadeMC.onEnterFrame = function () {
if (this.delay <= 0) {
if (this._parent._alpha <= 0) {
this._parent._visible = false;
this.removeMovieClip();
} else {
this._parent._alpha = this._parent._alpha + this.alphaTrans;
}
} else {
this.delay--;
}
};
};
MovieClip.prototype.fadeIn = function (increment, delay) {
this._visible = true;
this._alpha = 0;
this.createEmptyMovieClip("fadeMC", 763122);
this.fadeMC.alphaTrans = increment;
this.fadeMC.delay = delay;
this.fadeMC.onEnterFrame = function () {
if (this.delay <= 0) {
if (this._parent._alpha >= 100) {
this.removeMovieClip();
} else {
this._parent._alpha = this._parent._alpha + this.alphaTrans;
}
} else {
this.delay--;
}
};
};
Math.random_in = function (min, max) {
return(min + ((max - min) * Math.random()));
};
Math.random_index = function (arr) {
return(Math.floor(Math.random() * (arr.length - 0.01)));
};
Math.limit_to = function (num, min, max) {
if (num > max) {
num = max;
} else if (num < min) {
num = min;
}
return(num);
};
Math.limit_max = function (num, max) {
if (num > max) {
num = max;
}
return(num);
};
Math.limit_min = function (num, min) {
if (num < min) {
num = min;
}
return(num);
};
Math.deg = function (p_rad) {
return(57.2957795130823 * p_rad);
};
Math.rad = function (p_deg) {
return((Math.PI/180) * p_deg);
};
Math.norm_ang = function (p_ang) {
if (p_ang < 0) {
return(p_ang + (((Math.PI*2) * Math.floor(p_ang / (Math.PI*2))) * -1));
}
return(p_ang % (Math.PI*2));
};
Math.sgn = function (p_num) {
if (p_num < 0) {
return(-1);
}
if (p_num > 0) {
return(1);
}
return(0);
};
Math.dist = function (p_x1, p_y1, p_x2, p_y2) {
var dx = (p_x1 - p_x2);
var dy = (p_y1 - p_y2);
return(Math.sqrt((dx * dx) + (dy * dy)));
};
Math.getMidPoint = function (x1, y1, x2, y2) {
this.midArr = new Array();
this.midArr[0] = (x1 + x2) / 2;
this.midArr[1] = (y1 + y2) / 2;
return(this.midArr);
};
_global.game = _root;
Plowgame.prototype = new MovieClip();
Object.registerclass("Plowgame", Plowgame);
PlowGame.prototype.resetKeepScore = function () {
game.map_mc.draw_container.clear();
this.player1.ang = Math.rad(180);
this.player1.mc._rotation = -90;
this.player1.mc._x = 300;
this.player1.mc._y = 200;
game.map_mc.draw_container._x = this.player1.mc._x;
game.map_mc.draw_container._y = this.player1.mc._y;
game.map_mc.draw_container2._x = this.player1.mc._x;
game.map_mc.draw_container2._y = this.player1.mc._y;
this.player1.pos_x_prev2 = (this.player1.pos_x_prev = (this.player1.pos_x = game.met(this.player1.mc._x + 50)));
this.player1.pos_y_prev2 = (this.player1.pos_y_prev = (this.player1.pos_y = game.met(this.player1.mc._y)));
this.player1.vel_x = (this.player1.vel_y = 0);
};
Plowgame.prototype.placeAvatar = function () {
this.player1.pos_x_prev2 = (this.player1.pos_x_prev = (this.player1.pos_x = game.met(this.player1.mc._x + 50)));
this.player1.pos_y_prev2 = (this.player1.pos_y_prev = (this.player1.pos_y = game.met(this.player1.mc._y)));
};
PlowGame.prototype.replay = function () {
this.resetKeepScore();
this.scoring.zeroAll();
game.ui.time_up.play();
game.map_mc.gotoAndStop(1);
game.gotoAndPlay(15);
this.doCountDown();
};
Plowgame.prototype.doLevel = function () {
this.resetKeepScore();
game.map_mc.gotoAndStop(game.level);
this.scoring.lolliCount = 0;
this.scoring.snowScore = 0;
this.scoring.upd_snow_percent();
this.scoring.stop_timer();
game.ui.clock.text = "5:00";
game.ui.clock_sha.text = "5:00";
game.map_mc.image.setMask(game.map_mc.draw_container);
game.ui["mc_countdown" + game.level].gotoAndPlay(2);
this.control_disable();
this.move_start();
};
Plowgame.prototype.doCountDown = function () {
this.player1.control_disable();
game.map_mc.image.setMask(game.map_mc.draw_container);
game.ui.mc_countdown1.gotoAndPlay(2);
this.move_start();
};
PlowGame.prototype.doStart = function () {
this.player1.ang = Math.rad(180);
this.player1.mc._rotation = -90;
this.player1.mc._x = 300;
this.player1.mc._y = 200;
game.map_mc.draw_container._x = this.player1.mc._x;
game.map_mc.draw_container._y = this.player1.mc._y;
game.map_mc.draw_container2._x = this.player1.mc._x;
game.map_mc.draw_container2._y = this.player1.mc._y;
this.player1.pos_x_prev2 = (this.player1.pos_x_prev = (this.player1.pos_x = game.met(this.player1.mc._x + 50)));
this.player1.pos_y_prev2 = (this.player1.pos_y_prev = (this.player1.pos_y = game.met(this.player1.mc._y)));
this.player1.ang_steer_vel = 0;
this.player1.ang_steer = 0;
this.player1.control_enable();
this.resetKeepScore();
this.scoring.lolliCount = 0;
this.scoring.start_timer();
this.audio.playMusic();
};
PlowGame.prototype.move_start = function () {
this.mc.onEnterFrame = function () {
this.obj.upd_move();
};
};
PlowGame.prototype.move_stop = function () {
this.mc.onEnterFrame = null;
};
Plowgame.prototype.time_up = function () {
this.audio.killMusic();
game.ui.time_up.gotoAndPlay(2);
this.scoring.stop_timer();
this.move_stop();
this.player1.control_disable();
this.player1.f_eng = 0;
};
Plowgame.prototype.on_win = function () {
this.audio.killMusic();
game.ui.win_msg._visible = true;
game.ui.win_msg.play();
game.ui.win_msg.lolliCount = this.scoring.lolliCount;
this.scoring.stop_timer();
this.move_stop();
this.player1.control_disable();
this.player1.f_eng = 0;
};
PlowGame.prototype.doGameOver = function () {
game.ui.game_over.gotoAndPlay(2);
game.ui.game_over.lolliCount = this.scoring.lolliCount;
this.scoring.stop_timer();
this.move_stop();
this.player1.control_disable();
this.player1.f_eng = 0;
};
Plowgame.prototype.checkCollisionsBonus = function () {
var p1 = this.player1;
var p1_x = (game.px(p1.pos_x) + p1.mc._x);
var p1_y = (game.px(p1.pos_y) + p1.mc._y);
if (p1_y < -1250) {
this.doGameOver();
} else {
var i = 1;
while (i < 40) {
var c = this.map.collisionMap["c" + i];
var border = new Array(c._x, c._y, c._x + c._width, c._y + c._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
p1.vel_y = p1.vel_y * -0.2;
p1.vel_x = p1.vel_x * -0.2;
p1.pos_x = p1.pos_x_prev + p1.vel_x;
p1.pos_y = p1.pos_y_prev + p1.vel_y;
p1.pos_x_next = p1.pos_x + p1.vel_x;
p1.pos_y_next = p1.pos_y + p1.vel_y;
p1.ang_vel = 0;
p1.ang_steer = 0;
p1.snowSplash(15, game_px(this.pos_x), game_px(this.pos_y), 100);
}
var d = this.map.collisionMap["d" + i];
border = new Array(d._x, d._y, d._x + d._width, d._y + d._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
p1.vel_y = p1.vel_y * -0.2;
p1.vel_x = p1.vel_x * -0.2;
p1.pos_x = p1.pos_x_prev + p1.vel_x;
p1.pos_y = p1.pos_y_prev + p1.vel_y;
p1.pos_x_next = p1.pos_x + p1.vel_x;
p1.pos_y_next = p1.pos_y + p1.vel_y;
p1.ang_vel = 0;
p1.ang_steer = 0;
p1.snowSplash(15, game_px(this.pos_x), game_px(this.pos_y), 100);
}
i++;
}
var i = 1;
while (i <= 9) {
var c = this.map.collectMap["l" + i];
if (c.collected != 1) {
var border = new Array(c._x, c._y, c._x + c._width, c._y + c._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
this.audio.mint_snd.start();
c.collected = 1;
c.play();
this.scoring.collectLolli(p1);
this.scoring.add_score(p1, 500);
break;
}
border = null;
}
i++;
}
var icecheck = false;
for (i in this.map.iceMap) {
var c = this.map.iceMap[i];
var border = new Array(c._x, c._y, c._x + c._width, c._y + c._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
icecheck = true;
break;
}
border = null;
}
if (icecheck) {
game.k_max_grip = 0.2;
} else {
game.k_max_grip = 80;
}
}
};
Plowgame.prototype.checkCollisions = function () {
var p1 = this.player1;
var p1_x = (game.px(p1.pos_x) + p1.mc._x);
var p1_y = (game.px(p1.pos_y) + p1.mc._y);
var c = this.map.collectMap.pass;
if (c.collected != 1) {
var border = new Array(c._x, c._y, c._x + c._width, c._y + c._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
game.ui.pass.gotoAndStop(2);
game.over_cont.gotoAndStop(2);
this.audio.mint_snd.start();
c.collected = 1;
c.play();
p1.has_pass = true;
}
border = null;
}
if (p1.has_pass) {
for (i in this.map.teleportMap) {
var c = this.map.teleportMap[i];
var border = new Array(c._x, c._y, c._x + c._width, c._y + c._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
c.gotoAndPlay(2);
if (p1_x > 2000) {
this.do_teleport(1);
} else {
this.do_teleport(2);
}
return(undefined);
}
border = null;
}
}
var myRow;
var i = 0;
while (i <= 5) {
var c = this.map.collisionMap["c10" + i];
var border = new Array(c._x, c._y, c._x + c._width, c._y + c._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
this.audio.crash_snd.start();
this.scoring.damage_score(p1);
var c_str = c._name;
var c_index = c_str.substr(1, c_str.length);
if (i == 5) {
if (p1.pos_y < 94) {
p1.pos_y = (p1.pos_y_prev = 88);
} else {
p1.pos_y = (p1.pos_y_prev = 100);
}
p1.vel_y = p1.vel_y * -0.2;
p1.vel_x = p1.vel_x * -0.2;
} else {
p1.vel_y = p1.vel_y * -0.2;
p1.vel_x = p1.vel_x * -0.2;
}
p1.pos_x = p1.pos_x_prev + p1.vel_x;
p1.pos_y = p1.pos_y_prev + p1.vel_y;
p1.pos_x_next = p1.pos_x + p1.vel_x;
p1.pos_y_next = p1.pos_y + p1.vel_y;
p1.ang_vel = 0;
p1.ang_steer = 0;
p1.snowSplash(15, game_px(this.pos_x), game_px(this.pos_y), 100);
}
border = null;
i++;
}
if (p1_y < 625) {
myRow = "a";
} else if (p1_y < 925) {
myRow = "b";
} else if (p1_y < 1450) {
myRow = "c";
} else {
myRow = "d";
}
i = 1;
while (i <= 11) {
var c = this.map.collisionMap[myRow + i];
var border = new Array(c._x, c._y, c._x + c._width, c._y + c._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
this.audio.crash_snd.start();
this.scoring.damage_score(p1);
var c_str = c._name;
var c_index = c_str.substr(1, c_str.length);
p1.vel_y = p1.vel_y * -0.2;
p1.vel_x = p1.vel_x * -0.2;
p1.pos_x = p1.pos_x_prev + p1.vel_x;
p1.pos_y = p1.pos_y_prev + p1.vel_y;
p1.pos_x_next = p1.pos_x + p1.vel_x;
p1.pos_y_next = p1.pos_y + p1.vel_y;
p1.ang_vel = 0;
p1.ang_steer = 0;
p1.snowSplash(15, game_px(this.pos_x), game_px(this.pos_y), 100);
}
border = null;
i++;
}
i = 1;
while (i <= 20) {
var c = this.map.collectMap[(myRow + "i") + i];
if (c.collected != 1) {
var border = new Array(c._x, c._y, c._x + c._width, c._y + c._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
this.audio.mint_snd.start();
c.collected = 1;
c.play();
this.scoring.snowScore++;
this.scoring.upd_snow_percent();
this.scoring.add_score(p1, 100);
if (this.scoring.snowScore == this.scoring.totalSnow) {
this.on_win();
}
break;
}
border = null;
}
i++;
}
var i = 1;
while (i <= 5) {
var c = this.map.collectMap[(myRow + "b") + i];
if (c.collected != 1) {
var border = new Array(c._x, c._y, c._x + c._width, c._y + c._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
this.audio.mint_snd.start();
c.collected = 1;
c.play();
if (random(2) > 0) {
this.scoring.add_time(p1, (random(3) + 1) * 10);
} else {
this.scoring.add_score(p1, (random(4) + 1) * 250);
}
break;
}
border = null;
}
i++;
}
var i = 1;
while (i <= 9) {
var c = this.map.collectMap["l" + i];
if (c.collected != 1) {
var border = new Array(c._x, c._y, c._x + c._width, c._y + c._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
this.audio.mint_snd.start();
c.collected = 1;
c.play();
this.scoring.collectLolli(p1);
break;
}
border = null;
}
i++;
}
var icecheck = false;
for (i in this.map.iceMap) {
var c = this.map.iceMap[i];
var border = new Array(c._x, c._y, c._x + c._width, c._y + c._height);
if ((((p1_x >= border[0]) && (p1_x <= border[2])) && (p1_y >= border[1])) && (p1_y <= border[3])) {
icecheck = true;
break;
}
border = null;
}
if (icecheck) {
game.k_max_grip = 0.2;
} else {
game.k_max_grip = 80;
}
};
PlowGame.prototype.do_teleport = function (hitnum) {
this.player1.control_disable();
this.move_stop();
this.player1.f_eng = 0;
this.player1.f_ang_steer = 0;
this.player1.mc.fadeOut(10);
if (hitnum == 1) {
_root.pauseAndInvoke(20, "moveBoard", _root, 200, -1780);
} else {
_root.pauseAndInvoke(20, "moveBoard", _root, -1690, 75);
}
};
Plowgame.prototype.upd_move = function () {
var p1 = this.player1;
p1.rot_prev = Math.rad(p1.mc._rotation + 90);
p1.upd_pos();
p1.upd_steer_active();
this.upd_gra();
p1.rot = Math.rad(p1.mc._rotation + 90);
p1.draw_gra();
p1.pos_x_prev2 = p1.pos_x_prev;
p1.pos_y_prev2 = p1.pos_y_prev;
p1.rot_prev2 = p1.rot_prev;
p1.pos_x_prev = p1.pos_x;
p1.pos_y_prev = p1.pos_y;
p1.pos_x = p1.pos_x_next;
p1.pos_y = p1.pos_y_next;
if (game.mapType == "bonus") {
this.checkCollisionsBonus();
} else {
this.checkCollisions();
}
};
Plowgame.prototype.move_stop = function () {
this.mc.onEnterFrame = null;
};
Plowgame.prototype.upd_gra = function () {
var p1_x = game.px(this.player1.pos_x);
var p1_y = game.px(this.player1.pos_y);
game.map_mc._x = (game.over_cont._x = -p1_x);
game.map_mc._y = (game.over_cont._y = -p1_y);
this.player1.mc._rotation = Math.deg(-this.player1.ang);
};
GameAudio.prototype.playMusic = function () {
this.music.start();
this.music.onSoundComplete = function () {
this.start();
};
};
Gameaudio.prototype.killMusic = function () {
this.music.onSoundComplete = null;
this.music.stop();
};
Object.registerCalss("Scoring", Scoring);
Scoring.prototype.zeroAll = function () {
this.totalSnow = 30;
this.totalScore = 0;
this.totalScoreStr = "000000";
this.setScoreStr();
this.snowScore = 0;
this.upd_snow_percent();
this.lolliScore = 0;
this.lolliCount = 0;
game.ui.lolli_list.gotoAndStop(1);
};
Scoring.prototype.collectLolli = function (player) {
this.lolliCount++;
this.lolliScore = this.lolliScore + 500;
game.ui.lolli_list.gotoAndStop(this.lolliCount + 1);
};
Scoring.prototype.setScoreStr = function () {
var len = this.totalScore.toString().length;
var add_digits = (6 - len);
var temp_score_str = this.totalScore;
var i = 0;
while (i < add_digits) {
temp_score_str = "0" + temp_score_str;
i++;
}
this.totalScoreStr = temp_score_str;
game.ui.score.text = this.totalScoreStr;
game.ui.score_sha.text = this.totalScoreStr;
};
Scoring.prototype.start_timer = function () {
this.timeLimit = 300;
this.timer_mc = _root.createEmptyMovieClip("timer", 1171);
this.timer_mc.obj = this;
this.timer_mc.start_time = getTimer();
this.timer_mc.onEnterFrame = function () {
var s = (this.obj.timeLimit - Math.floor((getTimer() - this.start_time) / 1000));
var mins = math.floor(s / 60);
var secs = math.floor(s - (mins * 60));
if (secs < 10) {
disp_secs = ":0" + secs;
} else {
disp_secs = ":" + secs;
}
if (((mins == 0) && (secs < 10)) && ((secs % 2) == 0)) {
game.ui.clock.textColor = 16711680 /* 0xFF0000 */;
if (!timersound) {
this.obj.plowgame.audio.timer_snd.start();
timersound = true;
}
}
if ((secs % 2) == 1) {
game.ui.clock.textColor = 26316;
timerSound = false;
}
blink_counter++;
game.ui.clock.text = mins + disp_secs;
game.ui.clock_sha.text = mins + disp_secs;
if (s <= 0) {
game.ui.clock.text = "0:00";
game.ui.clock_sha.text = "0:00";
this.obj.plowgame.time_up();
this.onEnterFrame = null;
}
};
};
Scoring.prototype.stop_timer = function () {
this.timer_mc.onEnterFrame = null;
};
Scoring.prototype.damage_score = function (player) {
var damage = (Math.abs(player.vel_x) + Math.abs(player.vel_y));
damage = Math.ceil(damage / 5);
if (damage > 2) {
game.ui.msg.message.tf.field.text = ("-" + damage) + " sec.";
game.ui.msg.message.tf.field2.text = ("-" + damage) + " sec.";
game.ui.msg._visible = true;
game.ui.msg._alpha = 100;
game.ui.msg.gotoAndPlay(2);
this.timeLimit = this.timeLimit - damage;
}
};
Scoring.prototype.add_score = function (player, score) {
game.ui.msg.message.tf.field.text = "+" + score;
game.ui.msg.message.tf.field2.text = "+" + score;
game.ui.msg._visible = true;
game.ui.msg._alpha = 100;
game.ui.msg.gotoAndPlay(2);
this.totalScore = this.totalScore + score;
this.setScoreStr();
};
Scoring.prototype.add_time = function (player, time) {
game.ui.msg.message.tf.field.text = ("+" + time) + " sec.";
game.ui.msg.message.tf.field2.text = ("+" + time) + " sec.";
game.ui.msg._visible = true;
game.ui.msg._alpha = 100;
game.ui.msg.gotoAndPlay(2);
this.timeLimit = this.timeLimit + time;
};
Scoring.prototype.upd_snow_percent = function () {
game.ui.flakes.text = (game.ui.flakes_sha.text = (this.snowScore + "/") + this.totalSnow);
};
Object.registerclass("Map", Map);
Avatar.prototype = new MovieClip();
Object.registerclass("Avatar", Avatar);
Avatar.prototype.control_enable = function () {
Key.addListener(this);
};
Avatar.prototype.control_disable = function () {
Key.removeListener(this);
};
Avatar.prototype.set_controls = function () {
this.keys = new Object();
this.keys.up_key = 38;
this.keys.down_key = 40;
this.keys.left_key = 37;
this.keys.right_key = 39;
this.keys.action1_key = 32;
};
Vehicle.prototype = new Avatar();
Object.registerclass("Vehicle", Vehicle);
Vehicle.prototype.upd_pos = function () {
this.time_prev = this.time_curr;
this.time_curr = getTimer() / 1000;
var time_elap = 0.1;
var spd = Math.sqrt((this.vel_x * this.vel_x) + (this.vel_y * this.vel_y));
var sn = Math.sin(this.ang);
var cs = Math.cos(this.ang);
this.sn = sn;
this.cs = cs;
var vel_par = Math.floor((cs * this.vel_y) + (sn * this.vel_x));
var vel_nor = Math.floor(((-sn) * this.vel_y) + (cs * this.vel_x));
this.vel_par = vel_par;
this.vel_par_sgn = Math.sgn(vel_par);
var ang_steer_use = this.ang_steer;
var ang_slip_front = (Math.atan2(vel_nor + (this.ang_vel * this.len_f), Math.abs(vel_par)) - (ang_steer_use * this.vel_par_sgn));
var ang_slip_rear = Math.atan2(vel_nor - (this.ang_vel * this.len_r), Math.abs(vel_par));
var wei_axle = ((this.mass * 9.8) * 0.5);
var f_lat_f_par = 0;
var f_lat_f_nor = (wei_axle * Math.limit_to(this.k_cs_f * ang_slip_front, -game.k_max_grip, game.k_max_grip));
var f_lat_r_par = 0;
var f_lat_r_nor = (wei_axle * Math.limit_to(this.k_cs_r * ang_slip_rear, -game.k_max_grip, game.k_max_grip));
if (spd < 3) {
f_lat_f_nor = (f_lat_r_nor = (this.ang_vel = 0));
}
var torque = ((this.len_f * f_lat_f_nor) - (this.len_r * f_lat_r_nor));
var f_tra_par = (100 * (this.f_eng - this.f_bra));
var f_tra_nor = 0;
var f_res_par = (-((game.k_rr * vel_par) + ((game.k_drag * vel_par) * Math.abs(vel_par))));
var f_res_nor = (-((game.k_rr * vel_nor) + ((game.k_drag * vel_nor) * Math.abs(vel_nor))));
var f_tot_par = (((f_tra_par + (Math.sin(ang_steer_use) * f_lat_f_par)) + f_lat_r_par) + f_res_par);
var f_tot_nor = (((f_tra_nor + (Math.cos(ang_steer_use) * f_lat_f_nor)) + f_lat_r_nor) + f_res_nor);
var acc_par = (f_tot_par / this.mass);
var acc_nor = (f_tot_nor / this.mass);
var ang_acc = (torque / this.inertia);
this.acc_x = (cs * acc_nor) + (sn * acc_par);
this.acc_y = ((-sn) * acc_nor) + (cs * acc_par);
this.vel_x = this.vel_x + (this.acc_x * time_elap);
this.vel_y = this.vel_y + (this.acc_y * time_elap);
this.spd = spd;
this.ang_vel = this.ang_vel + (time_elap * ang_acc);
this.ang = Math.norm_ang(this.ang + (time_elap * this.ang_vel));
this.pos_x_next = this.pos_x + (this.vel_x * time_elap);
this.pos_y_next = this.pos_y + (this.vel_y * time_elap);
};
Vehicle.prototype.move_start = function () {
this.time_curr = getTimer() / 1000;
this.mc.onEnterFrame = function () {
this.obj.upd_move();
};
};
Vehicle.prototype.upd_move = function () {
this.upd_pos();
this.upd_gra();
this.upd_steer_active();
this.pos_x = this.pos_x_next;
this.pos_y = this.pos_y_next;
};
Vehicle.prototype.upd_gra = function () {
this.mc._x = game.px(this.pos_x);
this.mc._y = game.px(this.pos_y);
this.mc._rotation = Math.deg(-this.ang);
};
Vehicle.prototype.do_up_key = function () {
this.f_eng = this.f_eng_max;
};
Vehicle.prototype.kill_up_key = function () {
this.f_eng = 0;
};
Vehicle.prototype.do_down_key = function () {
this.f_eng = -this.f_eng_max;
};
Vehicle.prototype.kill_down_key = function () {
this.f_eng = 0;
};
Vehicle.prototype.do_left_key = function () {
this.steer_sign = this.steer_sign + 1;
this.steer_start();
this.steer_stop_l = this.steer_stop;
this.steer_stop_r = null;
this.ang_steer = this.ang_steer + this.ang_steer_jump;
};
Vehicle.prototype.kill_left_key = function () {
this.steer_sign = this.steer_sign - 1;
this.steer_stop_l();
};
Vehicle.prototype.do_right_key = function () {
this.steer_sign = this.steer_sign - 1;
this.steer_start();
this.steer_stop_r = this.steer_stop;
this.steer_stop_l = null;
this.ang_steer = this.ang_steer - this.ang_steer_jump;
};
Vehicle.prototype.kill_right_key = function () {
this.steer_sign = this.steer_sign + 1;
this.steer_stop_r();
};
Vehicle.prototype.steer_start = function () {
this.time_curr = getTimer() / 1000;
this.upd_steer_active = this.upd_steer;
};
Vehicle.prototype.steer_stop = function () {
this.ang_steer = 0;
this.upd_steer_active = null;
};
Vehicle.prototype.upd_steer = function () {
this.time_prev = this.time_curr;
this.time_curr = getTimer() / 1000;
var time_elap = ((this.time_curr - this.time_prev) * ff);
this.ang_steer = Math.limit_to(this.ang_steer + ((this.ang_steer_vel * this.steer_sign) * time_elap), -this.ang_steer_max, this.ang_steer_max);
};
Vehicle.prototype.onKeyDown = function () {
var k = Key.getCode();
for (var i in this.keys) {
if (this.keys[i] == k) {
func = this["do_" + i];
func.call(this);
this["do_" + i] = null;
}
}
};
Vehicle.prototype.onKeyUp = function () {
var k = Key.getCode();
for (var i in this.keys) {
if (this.keys[i] == k) {
func = this["kill_" + i];
func.call(this);
this["do_" + i] = Vehicle.prototype["do_" + i];
}
}
};
Snowplow.prototype = new Vehicle();
Object.registerclass("Snowplow", Snowplow);
Snowplow.prototype.move_start = function () {
this.mc2.onEnterFrame = function () {
this.obj.upd_move();
};
};
Smowplow.prototype.stop_plow_gra = function () {
this.mc2.onEnterFrame = null;
};
Snowplow.prototype.upd_move = function () {
this.rot_prev = Math.rad(this.mc._rotation + 90);
super.upd_pos();
super.upd_gra();
super.upd_steer_active();
this.rot = Math.rad(this.mc._rotation + 90);
this.draw_gra();
this.pos_x_prev2 = this.pos_x_prev;
this.pos_y_prev2 = this.pos_y_prev;
this.rot_prev2 = this.rot_prev;
this.pos_x_prev = this.pos_x;
this.pos_y_prev = this.pos_y;
this.pos_x = this.pos_x_next;
this.pos_y = this.pos_y_next;
};
Snowplow.prototype.draw_gra = function () {
var radius = 30;
var spread = 125;
var offset_x_prev2 = (Math.cos(this.rot_prev2 + spread) * radius);
var offset_y_prev2 = (Math.sin(this.rot_prev2 + spread) * radius);
var offset_x_prev = (Math.cos(this.rot_prev + spread) * radius);
var offset_y_prev = (Math.sin(this.rot_prev + spread) * radius);
var offset_x = (Math.cos(this.rot + spread) * radius);
var offset_y = (Math.sin(this.rot + spread) * radius);
var p1_x = (game.px(this.pos_x_prev2) + offset_x_prev2);
var p1_y = (game.px(this.pos_y_prev2) + offset_y_prev2);
var p2_x = (game.px(this.pos_x_prev) + offset_x_prev);
var p2_y = (game.px(this.pos_y_prev) + offset_y_prev);
var p3_x = (game.px(this.pos_x) + offset_x);
var p3_y = (game.px(this.pos_y) + offset_y);
var anchor1 = Math.getMidPoint(p1_x, p1_y, p2_x, p2_y);
var anchor2 = Math.getMidPoint(p2_x, p2_y, p3_x, p3_y);
var offset_x_prev2 = (Math.cos(this.rot_prev2 - spread) * radius);
var offset_y_prev2 = (Math.sin(this.rot_prev2 - spread) * radius);
var offset_x_prev = (Math.cos(this.rot_prev - spread) * radius);
var offset_y_prev = (Math.sin(this.rot_prev - spread) * radius);
var offset_x = (Math.cos(this.rot - spread) * radius);
var offset_y = (Math.sin(this.rot - spread) * radius);
var p4_x = (game.px(this.pos_x_prev2) + offset_x_prev2);
var p4_y = (game.px(this.pos_y_prev2) + offset_y_prev2);
var p5_x = (game.px(this.pos_x_prev) + offset_x_prev);
var p5_y = (game.px(this.pos_y_prev) + offset_y_prev);
var p6_x = (game.px(this.pos_x) + offset_x);
var p6_y = (game.px(this.pos_y) + offset_y);
var anchor3 = Math.getMidPoint(p4_x, p4_y, p5_x, p5_y);
var anchor4 = Math.getMidPoint(p5_x, p5_y, p6_x, p6_y);
if (this.calc_direction() && (this.spd > 3)) {
game.map_mc.draw_container.linestyle(1, 16711680, 0);
game.map_mc.draw_container.beginFill(16711680, 100);
game.map_mc.draw_container.moveTo(anchor1[0], anchor1[1]);
game.map_mc.draw_container.curveTo(p2_x, p2_y, anchor2[0], anchor2[1]);
game.map_mc.draw_container.lineTo(anchor4[0], anchor4[1]);
game.map_mc.draw_container.curveTo(p5_x, p5_y, anchor3[0], anchor3[1]);
game.map_mc.draw_container.lineTo(anchor1[0], anchor1[1]);
game.map_mc.draw_container.EndFill();
this.snowSplash(1, game_px(this.pos_x), game_px(this.pos_y), 75);
}
if ((game.k_max_grip < 5) && (this.spd > 2)) {
game.map_mc.draw_container2.linestyle(1, 16777215, 20);
game.map_mc.draw_container2.moveTo(anchor1[0], anchor1[1]);
game.map_mc.draw_container2.curveTo(p2_x, p2_y, anchor2[0], anchor2[1]);
game.map_mc.draw_container2.moveTo(anchor4[0], anchor4[1]);
game.map_mc.draw_container2.curveTo(p5_x, p5_y, anchor3[0], anchor3[1]);
}
game.map_mc.image.setMask(game.map_mc.draw_container);
updateAfterEvent();
};
Snowplow.prototype.calc_direction = function () {
var my_rot = Math.deg(Math.norm_ang(Math.rad(-this.mc._rotation)));
var rad_traveled = Math.atan2(this.pos_x - this.pos_x_prev, this.pos_y - this.pos_y_prev);
var deg_traveled = Math.deg(Math.norm_ang(rad_traveled));
var d_ang = (deg_traveled - my_rot);
var d_ang2 = (my_rot - deg_traveled);
var boolOut = true;
if ((Math.abs(d_ang) >= 90) || (Math.abs(d_ang2) >= 90)) {
boolOut = false;
}
if (Math.abs(d_ang) > 270) {
boolOut = true;
}
return(boolOut);
};
Snowplow.prototype.snowSplash = function (numSplash, xPos, yPos, sentScale) {
game.splashDepth = game.splashDepth + 5;
var i = 0;
while (i < numSplash) {
var mySplash_mc = this.mc.attachMovie("splash", "splash" + (game.splashDepth + i), game.splashDepth + i);
mySplash_mc._visible = false;
mySplash_mc.xv = (Math.random() - Math.random()) * 2;
mySplash_mc.yv = (Math.random() * 3) - 5;
mySplash_mc.x = xPos + (mySplash_mc.xv * 5);
mySplash_mc.y = yPos;
mySplash_mc.alpha = 100;
mySplash_mc.scale = sentScale;
mySplash_mc.onEnterFrame = function () {
if (this.alpha <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
} else {
this._visible = true;
this.yv = this.yv + 0.5;
this.x = this.x + this.xv;
this.y = this.y + this.yv;
this._x = this.x;
this._y = this.y;
this._alpha = this.alpha;
this._xscale = (this._yscale = this.scale);
this.alpha = this.alpha - 10;
}
};
i++;
}
};
init = function () {
_quality = "MEDIUM";
sca_def = 9;
k_drag = 5;
k_rr = 200;
k_max_grip = 100;
atan_thresh = 0;
ff = 1.85;
acc_grav = 9.8;
pow_fore = 1.18;
};
px = function (p_m) {
return(p_m * sca_def);
};
met = function (p_p) {
return(p_p / sca_def);
};
fore = function (p_sca_0, p_z) {
if (p_z == 0) {
return(p_sca_0);
}
return(p_sca_0 + Math.pow(p_z, pow_fore));
};
var theGame = new Plowgame();
map_mc._xscale = (map_mc._yscale = 100);
Instance of Symbol 244 MovieClip "over_cont" in Frame 20
onClipEvent (load) {
this._xscale = (this._yscale = 100);
}
Frame 26
stop();
Symbol 20 MovieClip Frame 1
stop();
Symbol 49 Button
on (press) {
_parent.gotoAndPlay("out");
_root.highscores.gotoAndPlay(2);
}
Symbol 60 Button
on (press) {
_root.play();
}
Symbol 62 MovieClip Frame 16
stop();
Symbol 62 MovieClip Frame 26
stop();
Symbol 70 Button
on (press) {
_parent.gotoAndPlay("out");
_root.gotoAndPlay(15);
}
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 2
_parent.displayScores();
Symbol 77 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 2
function displayScores() {
hs.col1.text = (hs.col1_sha.text = (hs.col2.text = (hs.col2_sha.text = "")));
var i = 1;
while (i <= 10) {
if (i < 6) {
hs.col1.text = hs.col1.text + (((((i + ". ") + hs.highscores["name" + i].toUpperCase()) + " - ") + hs.highScores["score" + i]) + newline);
hs.col1_sha.text = hs.col1.text;
} else {
hs.col2.text = hs.col2.text + (((((i + ". ") + hs.highscores["name" + i].toUpperCase()) + " - ") + hs.highScores["score" + i]) + newline);
hs.col2_sha.text = hs.col1.text;
}
i++;
}
}
hs.gotoAndStop(1);
hs.highscores = new loadVars();
hs.highscores.tl = hs;
hs.highscores.onLoad = function (success) {
hs.gotoAndStop(2);
};
if (_root.sendStr.length < 1) {
hs.highscores.load(_root.cfg.scoresURL);
} else {
hs.highscores.load(_root.cfg.scoresURL + _root.sendStr);
}
Symbol 77 MovieClip Frame 16
stop();
Symbol 77 MovieClip Frame 26
stop();
Symbol 87 Button
on (press) {
game.theGame.replay();
}
Symbol 89 Button
on (press) {
initials.submit();
}
Symbol 96 Button
on (press) {
changeLetter(1, "up");
}
Symbol 97 Button
on (press) {
changeLetter(2, "up");
}
Symbol 98 Button
on (press) {
changeLetter(3, "up");
}
Symbol 99 Button
on (press) {
changeLetter(1, "down");
}
Symbol 100 Button
on (press) {
changeLetter(2, "down");
}
Symbol 101 Button
on (press) {
changeLetter(3, "down");
}
Symbol 102 MovieClip Frame 1
function changeLetter(index, dir) {
if (dir == "up") {
this["char" + index] = this["char" + index] + 1;
} else {
this["char" + index] = this["char" + index] - 1;
}
if (this["char" + index] < 0) {
this["char" + index] = 25;
} else if (this["char" + index] > 25) {
this["char" + index] = 0;
}
this["let" + index].text = alphabet[this["char" + index]];
}
function submit() {
var name = ((alphabet[char1] + alphabet[char2]) + alphabet[char3]);
var score = game.theGame.scoring.totalScore;
_root.sendStr = (("?initials=" + name) + "&score=") + score;
_parent._parent.play();
_root.highscores.gotoAndPlay(2);
}
var alphabet = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
char1 = 0;
char2 = 0;
char3 = 0;
Symbol 104 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 2
play();
Symbol 104 MovieClip Frame 20
stop();
Symbol 104 MovieClip Frame 36
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 6
if (_parent.lolliCount == 0) {
_parent.gotoAndStop(21);
stop();
}
Symbol 113 MovieClip Frame 7
score.text = "+500";
score_sha.text = "+500";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 113 MovieClip Frame 20
if (_parent.lolliCount == 1) {
_parent.nextFrame();
stop();
}
Symbol 113 MovieClip Frame 21
score.text = "+1000";
score_sha.text = "+1000";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 113 MovieClip Frame 35
if (_parent.lolliCount == 2) {
_parent.nextFrame();
stop();
}
Symbol 113 MovieClip Frame 36
score.text = "+1500";
score_sha.text = "+1500";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 113 MovieClip Frame 50
if (_parent.lolliCount == 3) {
_parent.nextFrame();
stop();
}
Symbol 113 MovieClip Frame 51
score.text = "+2000";
score_sha.text = "+2000";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 113 MovieClip Frame 65
if (_parent.lolliCount == 4) {
_parent.nextFrame();
stop();
}
Symbol 113 MovieClip Frame 66
score.text = "+2500";
score_sha.text = "+2500";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 113 MovieClip Frame 80
if (_parent.lolliCount == 5) {
_parent.nextFrame();
stop();
}
Symbol 113 MovieClip Frame 81
score.text = "+3000";
score_sha.text = "+3000";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 113 MovieClip Frame 95
if (_parent.lolliCount == 6) {
_parent.nextFrame();
stop();
}
Symbol 113 MovieClip Frame 96
score.text = "+3500";
score_sha.text = "+3500";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 113 MovieClip Frame 110
if (_parent.lolliCount == 7) {
_parent.nextFrame();
stop();
}
Symbol 113 MovieClip Frame 111
score.text = "+4000";
score_sha.text = "+4000";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 113 MovieClip Frame 126
stop();
Symbol 114 Button
on (press) {
initials.submit();
gotoAndPlay (22);
}
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 2
play();
Symbol 115 MovieClip Frame 20
over.candy.gotoAndPlay(2);
stop();
Symbol 115 MovieClip Frame 37
stop();
Symbol 132 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 30
gotoAndStop (1);
Symbol 140 Button
on (press) {
_parent.play();
}
Symbol 144 MovieClip Frame 6
if (_parent.lolliCount == 0) {
stop();
}
Symbol 144 MovieClip Frame 7
score.text = "+500";
score_sha.text = "+500";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 144 MovieClip Frame 20
if (_parent.lolliCount == 1) {
stop();
}
Symbol 144 MovieClip Frame 21
score.text = "+1000";
score_sha.text = "+1000";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 144 MovieClip Frame 35
if (_parent.lolliCount == 2) {
stop();
}
Symbol 144 MovieClip Frame 36
score.text = "+1500";
score_sha.text = "+1500";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 144 MovieClip Frame 50
if (_parent.lolliCount == 3) {
stop();
}
Symbol 144 MovieClip Frame 51
score.text = "+2000";
score_sha.text = "+2000";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 144 MovieClip Frame 65
if (_parent.lolliCount == 4) {
stop();
}
Symbol 144 MovieClip Frame 66
score.text = "+2500";
score_sha.text = "+2500";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 144 MovieClip Frame 80
if (_parent.lolliCount == 5) {
stop();
}
Symbol 144 MovieClip Frame 81
score.text = "+3000";
score_sha.text = "+3000";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 144 MovieClip Frame 95
if (_parent.lolliCount == 6) {
stop();
}
Symbol 144 MovieClip Frame 96
score.text = "+3500";
score_sha.text = "+3500";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 144 MovieClip Frame 110
if (_parent.lolliCount == 7) {
stop();
}
Symbol 144 MovieClip Frame 111
score.text = "+4000";
score_sha.text = "+4000";
_parent._parent.lolli_list.prevFrame();
_root.theGame.scoring.add_score("", 500);
Symbol 144 MovieClip Frame 126
if (_parent.lolliCount == 8) {
stop();
}
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 20
stop();
Symbol 145 MovieClip Frame 36
game.level = game.level + 1;
_root.theGame.doLevel();
Symbol 146 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 1
stop();
Symbol 164 MovieClip Frame 95
_parent.play();
stop();
Symbol 165 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 2
play();
Symbol 165 MovieClip Frame 20
stop();
Symbol 165 MovieClip Frame 21
_root.theGame.doStart();
Symbol 165 MovieClip Frame 36
stop();
Symbol 169 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 2
play();
Symbol 169 MovieClip Frame 20
stop();
Symbol 169 MovieClip Frame 21
_root.theGame.doStart();
Symbol 169 MovieClip Frame 36
stop();
Symbol 175 MovieClip Frame 1
stop();
Symbol 175 MovieClip Frame 2
play();
Symbol 175 MovieClip Frame 20
stop();
Symbol 175 MovieClip Frame 21
_root.theGame.doStart();
Symbol 175 MovieClip Frame 36
stop();
Symbol 181 MovieClip Frame 1
stop();
Symbol 181 MovieClip Frame 2
play();
Symbol 181 MovieClip Frame 20
stop();
Symbol 181 MovieClip Frame 21
_root.theGame.doStart();
Symbol 181 MovieClip Frame 36
stop();
Symbol 194 MovieClip Frame 55
gotoAndStop (1);
Instance of Symbol 201 MovieClip "c105" in Symbol 202 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 8);
if (_x > 2000) {
_x = (-_width);
}
}
Symbol 204 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 11
stop();
Symbol 207 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 11
stop();
Symbol 210 MovieClip Frame 1
stop();
Symbol 210 MovieClip Frame 11
stop();
Symbol 211 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 10
stop();
Symbol 222 MovieClip Frame 1
stop();
Instance of Symbol 201 MovieClip "c105" in Symbol 222 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 8);
if (_x > 2000) {
_x = (-_width);
}
}
Symbol 224 MovieClip Frame 1
stop();
Instance of Symbol 201 MovieClip "c105" in Symbol 224 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 8);
if (_x > 2000) {
_x = (-_width);
}
}
Symbol 230 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 1
game.mapType = "normal";
stop();
Symbol 236 MovieClip Frame 2
game.mapType = "normal";
stop();
Symbol 236 MovieClip Frame 3
game.mapType = "normal";
stop();
Symbol 236 MovieClip Frame 4
game.over_cont.gotoAndStop(3);
game.mapType = "bonus";
Symbol 244 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 2