Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("680cc66d", this, 10301, true);
Instance of Symbol 187 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (_root.getBytesTotal() > 0) {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.play();
} else {
var progress = Math.round(100 * (_root.getBytesLoaded() / _root.getBytesTotal()));
gotoAndStop(progress);
}
}
}
Frame 7
stop();
Frame 8
stop();
Frame 15
var MochiAd = {getVersion:function () {
return("2.5");
}, showPreGameAd:function (options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = MochiAd._parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = MochiAd._getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}, showClickAwayAd:function (options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = MochiAd._parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = MochiAd._getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}, showInterLevelAd:function (options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = MochiAd._parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = MochiAd._getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}, showPreloaderAd:function (options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(options);
}, showTimedAd:function (options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(options);
}, _allowDomains:function (server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}, load:function (options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = MochiAd.getVersion();
var _local9 = options.clip;
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = MochiAd._getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = MochiAd._allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}, unload:function (clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}, _isNetworkAvailable:function () {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}, _getRes:function (options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}, _parseOptions:function (options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}, rpc:function (clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
MochiAd.setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = MochiAd.getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = MochiAd.runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}, setValue:function (base, objectName, value) {
var _local3 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (nameArray.length - 1)) {
if ((base[nameArray[_local1]] == undefined) || (base[nameArray[_local1]] == null)) {
return(undefined);
}
base = base[nameArray[_local1]];
_local1++;
}
base[nameArray[_local1]] = value;
}, getValue:function (base, objectName) {
var _local3 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (nameArray.length - 1)) {
if ((base[nameArray[_local1]] == undefined) || (base[nameArray[_local1]] == null)) {
return(undefined);
}
base = base[nameArray[_local1]];
_local1++;
}
return(base[nameArray[_local1]]);
}, runMethod:function (base, methodName, _param3) {
var _local3 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (nameArray.length - 1)) {
if ((base[nameArray[_local1]] == undefined) || (base[nameArray[_local1]] == null)) {
return(undefined);
}
base = base[nameArray[_local1]];
_local1++;
}
if (typeof(base[nameArray[_local1]]) == "function") {
return(base[nameArray[_local1]].apply(base, argsArray));
}
return(undefined);
}, _:null};
MochiAd.showPreGameAd({id:"85e6b42d73acf237", res:"600x450"});
Frame 21
stop();
Frame 22
function throwSnow() {
var _local4 = attachMovie("SnowBall", "SnowBall" + snowLevel, snowLevel);
_local4.cacheAsBitmap = true;
var _local3 = new Array();
_local3 = _root.goodKid.throwSpot.startThrow();
_root["SnowBall" + snowLevel]._x = _local3[0];
_root["SnowBall" + snowLevel]._y = _local3[1];
_root["SnowBall" + snowLevel]._rotation = _root.goodKid._rotation;
var _local2 = new Object();
_local2.ball = _root["SnowBall" + snowLevel];
_local2.who = _root.goodkid;
_root.snowBallArray.push(_local2);
snowLevel++;
if (snowLevel > 600) {
snowLevel = 500;
}
}
function throwSnowBadGuy(who, scale) {
var _local4 = attachMovie("bad SnowBall", "SnowBall" + snowLevel, snowLevel);
_local4.cacheAsBitmap = true;
var _local3 = new Array();
_local3 = _root[who].throwSpot.startThrow();
_root["SnowBall" + snowLevel]._x = _local3[0];
_root["SnowBall" + snowLevel]._y = _local3[1];
_root["SnowBall" + snowLevel]._xscale = scale;
_root["SnowBall" + snowLevel]._yscale = scale;
_root["SnowBall" + snowLevel]._rotation = _root[who]._rotation;
var _local2 = new Object();
_local2.ball = _root["SnowBall" + snowLevel];
_local2.who = _root[who];
_root.snowBallArray.push(_local2);
snowLevel++;
if (snowLevel > 600) {
snowLevel = 500;
}
}
function removeSnowBalls() {
var _local2 = 0;
while (_local2 <= _root.snowBallArray.length) {
_root.snowBallArray[_local2].ball.removeMovieClip();
_local2++;
}
}
function endOfGame() {
_root.goodKid.removeMovieClip();
var _local2 = 0;
while (_local2 <= _root.allKidArray.length) {
_root[_root.allKidArray[_local2]].removeMovieClip();
_local2++;
}
removeSnowBalls();
clearInterval(endId);
clearInterval(bigGuyID);
clearInterval(timerMC.timeID);
gotoAndStop (23);
}
function StartXY(startXYArray) {
if ((Math.random() * 2) > 1) {
startXYArray[0] = 20;
} else {
startXYArray[0] = Stage.width - 20;
}
if ((Math.random() * 2) > 1) {
startXYArray[1] = 20;
} else {
startXYArray[1] = Stage.height - 20;
}
return(startXYArray);
}
function newKid(myLevel, kidType) {
if (kidType == "bad") {
var _local4 = Math.floor(Math.random() * 3);
if (_local4 == 0) {
var _local5 = attachMovie("bad", "badKid" + myLevel, myLevel);
_local5.cacheAsBitmap = true;
_root.badKidArray[myLevel] = _root["badKid" + myLevel];
_root.allKidArray.push("badKid" + myLevel);
} else if (_local4 == 1) {
var _local5 = attachMovie("small", "badKid" + myLevel, myLevel);
_local5.cacheAsBitmap = true;
_root.badKidArray[myLevel] = _root["badKid" + myLevel];
_root.allKidArray.push("badKid" + myLevel);
} else {
var _local5 = attachMovie("newKid", "badKid" + myLevel, myLevel);
_local5.cacheAsBitmap = true;
_root.badKidArray[myLevel] = _root["badKid" + myLevel];
_root.allKidArray.push("badKid" + myLevel);
}
} else if (numberOfBigGuys < maxNumberOfBigGuys) {
numberOfBigGuys++;
if (kidType == "big") {
var _local5 = attachMovie("big", "badKid" + myLevel, myLevel);
} else if (kidType == "abd") {
var _local5 = attachMovie("abd", "badKid" + myLevel, myLevel);
} else if (kidType == "rabbit") {
var _local5 = attachMovie("rabbit", "badKid" + myLevel, myLevel);
}
_local5.cacheAsBitmap = true;
_root.bigGuyArray[myLevel] = _root["badKid" + myLevel];
_root.allKidArray.push("badKid" + myLevel);
}
startXYArray = new Array(2);
_root.StartXY(startXYArray);
_root["badKid" + myLevel]._x = startXYArray[0];
_root["badKid" + myLevel]._y = startXYArray[1];
_root["badKid" + myLevel]._rotation = Math.random() * 360;
}
function _Remove_element(whichOne) {
var _local4 = new Array(this.length - 1);
var _local3 = 0;
var _local2 = 0;
while (_local2 < this.length) {
if (_local2 != whichOne) {
_local4[_local3] = this[_local2];
_local3++;
}
_local2++;
}
this.pop();
this.copy(_local4);
}
Array.prototype.RemoveOne = _Remove_element;
Array.prototype.copy = function (oldArray) {
var _local2 = 0;
while (_local2 < oldArray.length) {
this[_local2] = oldArray[_local2];
_local2++;
}
};
function startBigGuy() {
var _local2 = Math.floor(Math.random() * 10);
if (level > 200) {
level = 100;
}
if (_local2 < 4) {
_root.newKid(level++, "big");
} else if ((_local2 > 3) && (_local2 < 8)) {
_root.newKid(level++, "abd");
} else {
_root.newKid(level++, "rabbit");
}
}
numberOfBadKids = 4;
numberOfBigGuys = 0;
maxNumberOfBigGuys = 3;
gameTime = 100;
needNewKid = false;
bigGuyTime = 30;
score = 0;
numberOfLives = 3;
gameLevel = 1;
level = 100;
snowLevel = 500;
deathLevel = 50;
badKidArray = new Array(numberOfBadKids + 1);
bigGuyArray = new Array();
allKidArray = new Array();
snowBallArray = new Array();
var i = 0;
while (i < numberOfBadKids) {
newKid(level++, "bad");
i++;
}
var i = 50;
while (i <= 60) {
var _mc = attachMovie("death", "deathShip" + i, i);
_mc.cacheAsBitmap = true;
_root["deathShip" + i]._visible = false;
i++;
}
bigGuyID = setInterval(startBigGuy, bigGuyTime * 1000);
attachMovie("goodKid", "goodKid", 1000);
goodKid.cacheAsBitmap = true;
goodKid._x = Stage.width / 2;
goodKid._y = Stage.height / 2;
stop();
Instance of Symbol 741 MovieClip "scoreMC" in Frame 22
onClipEvent (load) {
var extraScore = 1;
}
onClipEvent (enterFrame) {
score.text = _root.score;
if (_root.score > (extraScore * 1000)) {
_root.numberOfLives++;
extraScore = extraScore + (extraScore * 2);
}
if ((_root.score >= 1000) && (_root.gameLevel <= 1)) {
_root.gameLevel = 2;
}
if ((_root.score >= 3000) && (_root.gameLevel <= 2)) {
_root.gameLevel = 3;
}
}
Instance of Symbol 746 MovieClip "LivesMC" in Frame 22
onClipEvent (load) {
var numberOfLives = 3;
}
onClipEvent (enterFrame) {
if (numberOfLives != _root.numberOfLives) {
numberOfLives = _root.numberOfLives;
if (numberOfLives >= 3) {
numberOfLives = 3;
_root.numberOfLives = 3;
this.gotoAndStop("three");
} else if (numberOfLives == 2) {
this.gotoAndStop("two");
} else if (numberOfLives == 1) {
this.gotoAndStop("one");
} else if (numberOfLives == 0) {
this.gotoAndStop("none");
} else {
_root.endOfGame();
}
}
if (_root.needNewKid == true) {
_root.needNewKid = false;
_root.newKid(_root.level++, "bad");
}
}
Frame 23
FinalScore.text = score;
stop();
Symbol 108 MovieClip Frame 1
_parent._parent.swapDepths(_root["deathShip" + _root.deathLevel]);
myDeathLevel = _root.deathLevel;
_root.deathLevel++;
if (_root.deathLevel > 60) {
_root.deathLevel = 50;
}
Symbol 108 MovieClip Frame 72
_parent._parent.swapDepths(_root["deathShip" + myDeathLevel]);
var i = 0;
while (i <= _root.allKidArray.length) {
if (_parent._parent._name == _root.allKidArray[i]) {
_root.allKidArray.splice(i, 1);
}
i++;
}
_root.needNewKid = true;
_parent._parent.removeMovieClip();
Symbol 109 MovieClip Frame 1
Hit = false;
state = "walk";
stop();
Instance of Symbol 14 MovieClip [death] "hitSpot" in Symbol 109 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 109 MovieClip Frame 8
state = "walk";
gotoAndStop ("walk");
Symbol 109 MovieClip Frame 20
_root.throwSnowBadGuy(_parent._name, 100);
state = "walk";
gotoAndStop ("walk");
Instance of Symbol 109 MovieClip "kid" in Symbol 110 MovieClip [newKid] Frame 1
onClipEvent (load) {
function throwSnowBall() {
if (state == "walk") {
state = "snowBall";
}
}
var speed = ((5 * Math.random()) + 1);
var xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
var yMove = (-Math.sin((Math.PI/180) * (90 - _parent._rotation)));
var state = "walk";
var make = false;
var bounce = false;
var Hit = false;
var hitCount = 0;
var snowBallFrequency = ((Math.random() * 10) + 15);
badSnowBallID = setInterval(throwSnowBall, snowBallFrequency * 1000);
}
onClipEvent (enterFrame) {
if ((state == "walk") || (state == "bounce")) {
_parent._y = _parent._y + (yMove * speed);
_parent._x = _parent._x + (xMove * speed);
}
if ((Hit == false) && (this.hitSpot.hitTest(_root.goodKid.goodKid.hitSpot))) {
if (_root.goodKid.goodKid.state != "fall") {
_root.goodKid.goodKid.state = "fall";
_root.goodKid.goodKid.gotoAndPlay("fall");
state = "fall";
}
}
if ((Hit == false) && (state == "walk")) {
i = 0;
while (i < _root.allKidArray.length) {
if (_parent._name != _root.allKidArray[i]) {
if (this.hitSpot.hitTest(_root[_root.allKidArray[i]].kid.hitSpot)) {
if (_root.testing == true) {
_root.output.text = "state" + _root[_root.allKidArray[i]].kid.state;
}
if ((_root[_root.allKidArray[i]].kid.state != "fall") && (state != "bounce")) {
state = "bounce";
bounce = false;
_root[_root.allKidArray[i]].kid.state = "bounce";
}
}
}
i++;
}
}
if (state == "walk") {
make = false;
hit = false;
bounce = false;
this.gotoAndStop("walk");
} else if (state == "fall") {
if (hit == false) {
hit = true;
this.gotoAndStop("fall");
}
} else if (state == "snowBall") {
if (make == false) {
make = true;
this.gotoAndPlay("make");
}
} else if (state == "bounce") {
if (bounce == false) {
_parent._y = _parent._y - (25 * yMove);
_parent._x = _parent._x - (25 * xMove);
_parent._rotation = _parent._rotation + 180;
xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
yMove = -Math.sin((Math.PI/180) * (90 - _parent._rotation));
bounce = true;
this.gotoAndPlay("bounce");
}
}
if (_parent._y < 0) {
_parent._y = Stage.height;
} else if (_parent._y > Stage.height) {
_parent._y = 0;
} else if (_parent._x < 0) {
_parent._x = Stage.width;
} else if (_parent._x > Stage.width) {
_parent._x = 0;
}
}
Instance of Symbol 14 MovieClip [death] "throwSpot" in Symbol 110 MovieClip [newKid] Frame 1
onClipEvent (load) {
function startThrow() {
myBounds = this.getBounds(_root);
placeArray = new Array(myBounds.xMin, myBounds.yMin);
return(placeArray);
}
_visible = false;
}
Symbol 181 MovieClip Frame 1
_parent._parent.swapDepths(_root["deathShip" + _root.deathLevel]);
myDeathLevel = _root.deathLevel;
_root.deathLevel++;
if (_root.deathLevel > 60) {
_root.deathLevel = 50;
}
Symbol 181 MovieClip Frame 94
_parent._parent.swapDepths(_root["deathShip" + myDeathLevel]);
var i = 0;
while (i <= _root.allKidArray.length) {
if (_parent._parent._name == _root.allKidArray[i]) {
_root.allKidArray.splice(i, 1);
}
i++;
}
_parent._parent.removeMovieClip();
Symbol 182 MovieClip Frame 1
walking == false;
hit = false;
bounce = false;
Instance of Symbol 14 MovieClip [death] "hitSpot" in Symbol 182 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 182 MovieClip Frame 15
state = "throw";
Symbol 182 MovieClip Frame 20
_root.throwSnowBadGuy(_parent._name, 100);
Symbol 182 MovieClip Frame 25
_root.throwSnowBadGuy(_parent._name, 100);
Symbol 182 MovieClip Frame 30
_root.throwSnowBadGuy(_parent._name, 100);
state = "walk";
_parent._rotation = Math.random() * 360;
xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
yMove = -Math.sin((Math.PI/180) * (90 - _parent._rotation));
_parent.rogotoAndPlay("walk");
Symbol 182 MovieClip Frame 34
state = "walk";
gotoAndPlay ("walk");
Symbol 182 MovieClip Frame 35
_root.numberOfBigGuys--;
stop();
Instance of Symbol 182 MovieClip "kid" in Symbol 183 MovieClip [rabbit] Frame 1
onClipEvent (load) {
var speed = 10;
var xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
var yMove = (-Math.sin((Math.PI/180) * (90 - _parent._rotation)));
var state = "walk";
var bounce = false;
var Hit = false;
var walking = false;
var hitCount = 0;
}
onClipEvent (enterFrame) {
if ((state == "walk") || (state == "bounce")) {
_parent._y = _parent._y + (yMove * speed);
_parent._x = _parent._x + (xMove * speed);
}
if (_root.gameLevel <= 2) {
if (hitCount >= 1) {
if (state != "fall") {
_root.score = _root.score + 500;
state = "fall";
}
} else if (hitCount >= 4) {
if (state != "fall") {
_root.score = _root.score + 500;
state = "fall";
}
}
}
if ((hit == false) && (this.hitSpot.hitTest(_root.goodKid.goodKid.hitSpot))) {
if (_root.goodKid.goodKid.state != "fall") {
_root.goodKid.goodKid.state = "fall";
_root.goodKid.goodKid.gotoAndPlay("fall");
_root.score = _root.score - 25;
hitCount++;
state = "fall";
}
}
if ((Hit == false) && (state == "walk")) {
i = 0;
while (i < _root.allKidArray.length) {
if (_parent._name != _root.allKidArray[i]) {
if (this.hitSpot.hitTest(_root[_root.allKidArray[i]].kid.hitSpot)) {
if (_root[_root.allKidArray[i]].kid.state != "fall") {
state = "bounce";
bounce = false;
_root[_root.allKidArray[i]].kid.state = "bounce";
}
}
}
i++;
}
}
if (state == "walk") {
if (walking == false) {
walking = true;
hit = false;
bounce = false;
this.gotoAndPlay("walk");
}
} else if (state == "fall") {
if (hit == false) {
walking = false;
hit = true;
this.gotoAndStop("fall");
}
} else if (state == "bounce") {
if (bounce == false) {
_parent._y = _parent._y - (25 * yMove);
_parent._x = _parent._x - (25 * xMove);
_parent._rotation = _parent._rotation + ((Math.random() * 90) + 135);
xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
yMove = -Math.sin((Math.PI/180) * (90 - _parent._rotation));
bounce = true;
this.gotoAndPlay("bounce");
}
}
var myBounds = this.getBounds(_root);
if (_parent._y < 0) {
_parent._y = Stage.height;
} else if (_parent._y > Stage.height) {
_parent._y = 0;
} else if (_parent._x < 0) {
_parent._x = Stage.width;
} else if (_parent._x > Stage.width) {
_parent._x = 0;
}
}
Instance of Symbol 14 MovieClip [death] "throwSpot" in Symbol 183 MovieClip [rabbit] Frame 1
onClipEvent (load) {
function startThrow() {
myBounds = this.getBounds(_root);
placeArray = new Array(myBounds.xMin, myBounds.yMin);
return(placeArray);
}
_visible = false;
}
Symbol 212 MovieClip Frame 1
Symbol 212 MovieClip Frame 198
_root.gotoAndStop("splash2");
Symbol 287 MovieClip Frame 1
_parent._parent.swapDepths(_root["deathShip" + _root.deathLevel]);
myDeathLevel = _root.deathLevel;
_root.deathLevel++;
if (_root.deathLevel > 60) {
_root.deathLevel = 50;
}
Symbol 287 MovieClip Frame 78
_parent._parent.swapDepths(_root["deathShip" + myDeathLevel]);
trace("abd snowman remove");
_root.output.text = _root.output.text + "abd snowman remove";
var i = 0;
while (i <= _root.allKidArray.length) {
if (_parent._parent._name == _root.allKidArray[i]) {
_root.allKidArray.splice(i, 1);
}
i++;
}
_parent._parent.removeMovieClip();
Symbol 288 MovieClip Frame 1
walking == false;
hit = false;
bounce = false;
Instance of Symbol 14 MovieClip [death] "hitSpot" in Symbol 288 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 288 MovieClip Frame 22
_root.throwSnowBadGuy(_parent._name, 150);
state = "walk";
gotoAndPlay ("walk");
Symbol 288 MovieClip Frame 26
state = "walk";
gotoAndPlay ("walk");
Symbol 288 MovieClip Frame 27
_root.numberOfBigGuys--;
stop();
Instance of Symbol 288 MovieClip "kid" in Symbol 289 MovieClip [abd] Frame 1
onClipEvent (load) {
var speed = 5;
var xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
var yMove = (-Math.sin((Math.PI/180) * (90 - _parent._rotation)));
var state = "walk";
var bounce = false;
var Hit = false;
var walking = false;
var hitCount = 0;
}
onClipEvent (enterFrame) {
if ((state == "walk") || (state == "bounce")) {
_parent._y = _parent._y + (yMove * speed);
_parent._x = _parent._x + (xMove * speed);
}
if (_root.gameLevel <= 2) {
if (hitCount >= 3) {
if (state != "fall") {
_root.score = _root.score + 500;
state = "fall";
}
} else if (hitCount >= 4) {
if (state != "fall") {
_root.score = _root.score + 500;
state = "fall";
}
}
}
if ((hit == false) && (this.hitSpot.hitTest(_root.goodKid.goodKid.hitSpot))) {
if (_root.goodKid.goodKid.state != "fall") {
_root.goodKid.goodKid.state = "fall";
_root.goodKid.goodKid.gotoAndPlay("fall");
_root.score = _root.score - 25;
hitCount++;
}
}
if ((Hit == false) && (state == "walk")) {
i = 0;
while (i < _root.allKidArray.length) {
if (_parent._name != _root.allKidArray[i]) {
if (this.hitSpot.hitTest(_root[_root.allKidArray[i]].kid.hitSpot)) {
if (_root[_root.allKidArray[i]].kid.state != "fall") {
state = "bounce";
bounce = false;
_root[_root.allKidArray[i]].kid.state = "bounce";
}
}
}
i++;
}
}
if (state == "walk") {
if (walking == false) {
walking = true;
hit = false;
bounce = false;
this.gotoAndPlay("walk");
}
} else if (state == "fall") {
if (hit == false) {
walking = false;
hit = true;
this.gotoAndStop("fall");
}
} else if (state == "bounce") {
if (bounce == false) {
_parent._y = _parent._y - (25 * yMove);
_parent._x = _parent._x - (25 * xMove);
_parent._rotation = _parent._rotation + ((Math.random() * 90) + 135);
xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
yMove = -Math.sin((Math.PI/180) * (90 - _parent._rotation));
bounce = true;
this.gotoAndPlay("bounce");
}
}
var myBounds = this.getBounds(_root);
if (_parent._y < 0) {
_parent._y = Stage.height;
} else if (_parent._y > Stage.height) {
_parent._y = 0;
} else if (_parent._x < 0) {
_parent._x = Stage.width;
} else if (_parent._x > Stage.width) {
_parent._x = 0;
}
}
Instance of Symbol 14 MovieClip [death] "throwSpot" in Symbol 289 MovieClip [abd] Frame 1
onClipEvent (load) {
function startThrow() {
myBounds = this.getBounds(_root);
placeArray = new Array(myBounds.xMin, myBounds.yMin);
return(placeArray);
}
_visible = false;
}
Symbol 448 MovieClip Frame 1
_parent._parent.swapDepths(_root["deathShip" + _root.deathLevel]);
myDeathLevel = _root.deathLevel;
_root.deathLevel++;
if (_root.deathLevel > 60) {
_root.deathLevel = 50;
}
Symbol 448 MovieClip Frame 81
_parent._parent.swapDepths(_root["deathShip" + myDeathLevel]);
var i = 0;
while (i <= _root.allKidArray.length) {
if (_parent._parent._name == _root.allKidArray[i]) {
_root.allKidArray.splice(i, 1);
}
i++;
}
_root.needNewKid = true;
_parent._parent.removeMovieClip();
Symbol 491 MovieClip Frame 1
_parent._parent.swapDepths(_root["deathShip" + _root.deathLevel]);
myDeathLevel = _root.deathLevel;
_root.deathLevel++;
if (_root.deathLevel > 60) {
_root.deathLevel = 50;
}
Symbol 491 MovieClip Frame 98
_parent._parent.swapDepths(_root["deathShip" + myDeathLevel]);
var i = 0;
while (i <= _root.allKidArray.length) {
if (_parent._parent._name == _root.allKidArray[i]) {
_root.allKidArray.splice(i, 1);
}
i++;
}
_root.needNewKid = true;
_parent._parent.removeMovieClip();
Symbol 492 MovieClip Frame 1
Hit = false;
state = "walk";
stop();
Instance of Symbol 14 MovieClip [death] "hitSpot" in Symbol 492 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 492 MovieClip Frame 7
state = "walk";
gotoAndStop ("walk");
Symbol 492 MovieClip Frame 19
_root.throwSnowBadGuy(_parent._name, 100);
state = "walk";
gotoAndStop ("walk");
Instance of Symbol 492 MovieClip "kid" in Symbol 493 MovieClip [bad] Frame 1
onClipEvent (load) {
function throwSnowBall() {
if (state == "walk") {
state = "snowBall";
}
}
var speed = ((5 * Math.random()) + 1);
var xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
var yMove = (-Math.sin((Math.PI/180) * (90 - _parent._rotation)));
var state = "walk";
var make = false;
var bounce = false;
var Hit = false;
var hitCount = 0;
var snowBallFrequency = ((Math.random() * 10) + 15);
badSnowBallID = setInterval(throwSnowBall, snowBallFrequency * 1000);
}
onClipEvent (enterFrame) {
if (_parent._rotation < 0) {
_parent._rotation = _parent._rotation + 360;
} else if (_parent._rotation >= 360) {
_parent._rotation = _parent._rotation - 360;
}
if ((state == "walk") || (state == "bounce")) {
_parent._y = _parent._y + (yMove * speed);
_parent._x = _parent._x + (xMove * speed);
}
if ((Hit == false) && (this.hitSpot.hitTest(_root.goodKid.goodKid.hitSpot))) {
if (_root.goodKid.goodKid.state != "fall") {
_root.goodKid.goodKid.state = "fall";
_root.goodKid.goodKid.gotoAndPlay("fall");
state = "fall";
}
}
if ((Hit == false) && (state == "walk")) {
var found = false;
i = 0;
while ((i < _root.allKidArray.length) && (found == false)) {
if (_parent._name != _root.allKidArray[i]) {
if (this.hitTest(_root[_root.allKidArray[i]])) {
if (_root[_root.allKidArray[i]].kid.state != "fall") {
found = true;
state = "bounce";
bounce = false;
_root[_root.allKidArray[i]].kid.state = "bounce";
}
}
}
i++;
}
}
if (state == "walk") {
make = false;
Hit = false;
bounce = false;
this.gotoAndStop("walk");
} else if (state == "fall") {
if (Hit == false) {
Hit = true;
if ((Math.random() * 2) <= 1) {
this.gotoAndStop("fall1");
} else {
this.gotoAndStop("fall2");
}
}
} else if (state == "snowBall") {
if (make == false) {
make = true;
this.gotoAndPlay("make");
}
} else if (state == "bounce") {
if (bounce == false) {
_parent._rotation = _parent._rotation + (135 + (Math.random() * 90));
xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
yMove = -Math.sin((Math.PI/180) * (90 - _parent._rotation));
_parent._y = _parent._y + ((speed * yMove) * 5);
_parent._x = _parent._x + ((speed * xMove) * 5);
bounce = true;
this.gotoAndPlay("bounce");
}
}
if (_parent._y < 0) {
_parent._y = Stage.height;
} else if (_parent._y > Stage.height) {
_parent._y = 0;
} else if (_parent._x < 0) {
_parent._x = Stage.width;
} else if (_parent._x > Stage.width) {
_parent._x = 0;
}
}
Instance of Symbol 14 MovieClip [death] "throwSpot" in Symbol 493 MovieClip [bad] Frame 1
onClipEvent (load) {
function startThrow() {
myBounds = this.getBounds(_root);
placeArray = new Array(myBounds.xMin, myBounds.yMin);
return(placeArray);
}
_visible = false;
}
Symbol 566 MovieClip Frame 1
_parent._parent.swapDepths(_root["deathShip" + _root.deathLevel]);
myDeathLevel = _root.deathLevel;
_root.deathLevel++;
if (_root.deathLevel > 60) {
_root.deathLevel = 50;
}
Symbol 566 MovieClip Frame 101
_parent._parent.swapDepths(_root["deathShip" + myDeathLevel]);
var i = 0;
while (i <= _root.allKidArray.length) {
if (_parent._parent._name == _root.allKidArray[i]) {
_root.allKidArray.splice(i, 1);
}
i++;
}
trace("big guy finishe");
_root.output.text = _root.output.text + "big guy finishe";
_parent._parent.removeMovieClip();
Symbol 567 MovieClip Frame 1
walking == false;
hit = false;
bounce = false;
Instance of Symbol 14 MovieClip [death] "hitSpot" in Symbol 567 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 567 MovieClip Frame 19
_root.throwSnowBadGuy(_parent._name, 150);
state("walk");
gotoAndPlay ("walk");
Symbol 567 MovieClip Frame 24
state = "walk";
gotoAndPlay ("walk");
Symbol 567 MovieClip Frame 25
_root.numberOfBigGuys--;
stop();
Instance of Symbol 567 MovieClip "kid" in Symbol 568 MovieClip [big] Frame 1
onClipEvent (load) {
var speed = 5;
var xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
var yMove = (-Math.sin((Math.PI/180) * (90 - _parent._rotation)));
var state = "walk";
var Hit = false;
var bounce = false;
var walking = false;
var hitCount = 0;
}
onClipEvent (enterFrame) {
if ((state == "walk") || (state == "bounce")) {
_parent._y = _parent._y + (yMove * speed);
_parent._x = _parent._x + (xMove * speed);
}
if (_root.gameLevel <= 2) {
if (hitCount >= 3) {
if (state != "fall") {
_root.score = _root.score + 500;
state = "fall";
}
} else if (hitCount >= 4) {
if (state != "fall") {
_root.score = _root.score + 500;
state = "fall";
}
}
}
if ((hit == false) && (this.hitSpot.hitTest(_root.goodKid.goodKid.hitSpot))) {
if (_root.goodKid.goodKid.state != "fall") {
_root.goodKid.goodKid.state = "fall";
_root.goodKid.goodKid.gotoAndPlay("fall");
_root.score = _root.score - 25;
hitCount++;
}
}
if ((Hit == false) && (state == "walk")) {
i = 0;
while (i < _root.allKidArray.length) {
if (_parent._name != _root.allKidArray[i]) {
if (this.hitSpot.hitTest(_root[_root.allKidArray[i]].kid.hitSpot)) {
if (_root[_root.allKidArray[i]].kid.state != "fall") {
state = "bounce";
bounce = false;
_root[_root.allKidArray[i]].kid.state = "bounce";
}
}
}
i++;
}
}
if (state == "walk") {
if (walking == false) {
walking = true;
hit = false;
bounce = false;
this.gotoAndPlay("walk");
}
} else if (state == "fall") {
if (hit == false) {
walking = false;
hit = true;
this.gotoAndStop("fall");
}
} else if (state == "bounce") {
if (bounce == false) {
_parent._y = _parent._y - (25 * yMove);
_parent._x = _parent._x - (25 * xMove);
_parent._rotation = _parent._rotation + ((Math.random() * 135) + 90);
xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
yMove = -Math.sin((Math.PI/180) * (90 - _parent._rotation));
bounce = true;
this.gotoAndPlay("bounce");
}
}
if (_parent._y < 0) {
_parent._y = Stage.height;
} else if (_parent._y > Stage.height) {
_parent._y = 0;
} else if (_parent._x < 0) {
_parent._x = Stage.width;
} else if (_parent._x > Stage.width) {
_parent._x = 0;
}
}
Instance of Symbol 14 MovieClip [death] "throwSpot" in Symbol 568 MovieClip [big] Frame 1
onClipEvent (load) {
function startThrow() {
myBounds = this.getBounds(_root);
placeArray = new Array(myBounds.xMin, myBounds.yMin);
return(placeArray);
}
_visible = false;
}
Symbol 572 MovieClip Frame 1
stop();
Symbol 572 MovieClip Frame 9
this.removeMe();
Instance of Symbol 572 MovieClip "snowBallBase" in Symbol 573 MovieClip [bad SnowBall] Frame 1
onClipEvent (load) {
function removeMe() {
var _local3 = 0;
while (_local3 < _root.snowBallArray.length) {
if (myName == new String(_root.snowBallArray[_local3].ball)) {
_root.snowBallArray.RemoveOne(_local3);
break;
}
_local3++;
}
_parent.removeMovieClip();
}
var temp = new String(this);
var myName = temp.slice(0, -13);
var snowBallSpeed = 20;
var hit = false;
}
onClipEvent (enterFrame) {
_y = (_y - snowBallSpeed);
if ((hit == false) && (this.hitTest(_root.goodKid.goodKid.hitSpot))) {
if (_root.goodKid.goodKid.state != "fall") {
_root.goodKid.goodKid.state = "fall";
_root.score = _root.score - 5;
_root.goodKid.goodKid.gotoAndPlay("fall");
var i = 0;
while (i < _root.snowBallArray.length) {
if (myName == new String(_root.snowBallArray[i].ball)) {
eval (_root.snowBallArray[i].who).kid.state = "bounce";
}
i++;
}
this.gotoAndPlay("splash");
}
}
var i = 0;
while (i < _root.badKidArray.length) {
if ((hit == false) && (this.hitTest(_root.badKidArray[i].kid.hitSpot))) {
if (origin != _root.badKidArray[i]) {
if (_root.badKidArray[i].kid.state != "fall") {
hit = true;
this.gotoAndPlay("splash");
}
}
}
i++;
}
var i = 0;
while (i < _root.bigGuyArray.length) {
if ((hit == false) && (this.hitTest(_root.bigGuyArray[i].kid.hitSpot))) {
if (_root.bigGuyArray[i].kid.state != "fall") {
hit = true;
this.gotoAndPlay("splash");
}
}
i++;
}
var snowBallBounds = this.getBounds(_root);
if ((snowBallBounds.yMax < 0) || (snowBallBounds.yMin > Stage.height)) {
this.removeMe();
}
if ((snowBallBounds.xMax < 0) || (snowBallBounds.xMin > Stage.width)) {
this.removeMe();
}
}
Instance of Symbol 572 MovieClip "goodBallBase" in Symbol 574 MovieClip [SnowBall] Frame 1
onClipEvent (load) {
function removeMe() {
var _local3 = 0;
while (_local3 < _root.snowBallArray.length) {
if (myName == new String(_root.snowBallArray[_local3].ball)) {
_root.snowBallArray.RemoveOne(_local3);
break;
}
_local3++;
}
_parent.removeMovieClip();
}
var snowBallSpeed = 20;
var hit = false;
var temp = new String(this);
var myName = temp.slice(0, -13);
}
onClipEvent (enterFrame) {
_y = (_y - snowBallSpeed);
var i = 0;
while (i < _root.badKidArray.length) {
if ((hit == false) && (this.hitTest(_root.badKidArray[i].kid.hitSpot))) {
if (_root.badKidArray[i].kid.state != "fall") {
_root.badKidArray[i].kid.hitCount++;
if (_root.gameLevel <= 2) {
_root.score = _root.score + 100;
_root.badKidArray[i].kid.state = "fall";
_root.badKidArray[i].kid.gotoAndStop("fall");
} else if (_root.gameLevel <= 3) {
if (_root.badKidArray[i].kid.hitCount >= 3) {
_root.score = _root.score + 100;
_root.badKidArray[i].kid.state = "fall";
_root.badKidArray[i].kid.gotoAndStop("fall");
}
}
hit = true;
this.gotoAndPlay("splash");
}
}
i++;
}
var i = 0;
while (i < _root.bigGuyArray.length) {
if ((hit == false) && (this.hitTest(_root.bigGuyArray[i].kid.hitSpot))) {
if (_root.bigGuyArray[i].kid.state != "fall") {
_root.bigGuyArray[i].kid.hitCount++;
hit = true;
this.gotoAndPlay("splash");
}
}
i++;
}
var snowBallBounds = this.getBounds(_root);
if ((snowBallBounds.yMax < 0) || (snowBallBounds.yMin > Stage.height)) {
this.removeMe();
}
if ((snowBallBounds.xMax < 0) || (snowBallBounds.xMin > Stage.width)) {
this.removeMe();
}
}
Symbol 611 MovieClip Frame 5
_root.throwSnow();
Symbol 647 MovieClip Frame 1
state = "make";
hit = false;
make = false;
throwing = false;
stop();
Instance of Symbol 14 MovieClip [death] "hitSpot" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 647 MovieClip Frame 15
state = "stand";
stop();
Symbol 647 MovieClip Frame 25
state = "stand";
gotoAndStop ("stand");
Symbol 647 MovieClip Frame 32
state = "stand";
gotoAndStop ("stand");
Symbol 647 MovieClip Frame 39
state = "make";
throwing = false;
gotoAndPlay ("make");
Symbol 647 MovieClip Frame 40
state = "fall";
hit = true;
_parent.swapDepths(_root["deathShip" + _root.deathLevel]);
myDeathLevel = _root.deathLevel;
_root.deathLevel++;
if (_root.deathLevel > 60) {
_root.deathLevel = 50;
}
_root.score = _root.score - 25;
_root.numberOfLives--;
play();
Symbol 647 MovieClip Frame 46
_parent.swapDepths(_root["deathShip" + myDeathLevel]);
_parent.swapDepths(1000);
state = "make";
hit = false;
gotoAndPlay ("make");
Instance of Symbol 647 MovieClip "goodKid" in Symbol 648 MovieClip [goodKid] Frame 1
onClipEvent (load) {
var xSpeed = 0;
var ySpeed = 0;
var speed = 5;
var rotateRate = 15;
var newKey = false;
var state = "make";
var hit = false;
var make = false;
var throwing = false;
var walking = false;
keyListener = new Object();
var oldState = state;
var stateCount = 0;
keyListener.onKeyDown = function () {
newKey = true;
};
Key.addListener(keyListener);
}
onClipEvent (enterFrame) {
if (((state == "stand") || (state == "walk")) || (state == "turn")) {
if (newKey) {
newKey = false;
var keyPressed = Key.getCode();
switch (keyPressed) {
case 38 :
xSpeed = speed * Math.cos((Math.PI/180) * (90 - _parent._rotation));
ySpeed = (-speed) * Math.sin((Math.PI/180) * (90 - _parent._rotation));
state = "walk";
walking = false;
break;
case 40 :
xSpeed = (-speed) * Math.cos((Math.PI/180) * (90 - _parent._rotation));
ySpeed = speed * Math.sin((Math.PI/180) * (90 - _parent._rotation));
state = "walk";
walking = false;
break;
case 39 :
_parent._rotation = _parent._rotation + rotateRate;
state = "turn";
turning = false;
break;
case 37 :
_parent._rotation = _parent._rotation - rotateRate;
state = "turn";
turning = false;
break;
case 32 :
state = "throw";
}
}
}
if (state == "walk") {
_parent._x = _parent._x + xSpeed;
_parent._y = _parent._y + ySpeed;
}
if (_parent._y < 0) {
_parent._y = Stage.height;
} else if (_parent._y > Stage.height) {
_parent._y = 0;
}
if (_parent._x < 0) {
_parent._x = Stage.width;
} else if (_parent._x > Stage.width) {
_parent._x = 0;
}
if (state == "walk") {
if (walking == false) {
walking = true;
this.gotoAndPlay("walk");
}
} else if (state == "stand") {
walking = false;
hit = false;
make = false;
throwing = false;
xSpeed = 0;
ySpeed = 0;
this.gotoAndStop("stand");
} else if (state == "fall") {
if (hit == false) {
hit = true;
this.gotoAndPlay("fall");
}
} else if (state == "make") {
if (make == false) {
throwing = false;
make = true;
this.gotoAndPlay("make");
}
} else if (state == "throw") {
if (throwing == false) {
throwing = true;
this.gotoAndPlay("throw");
}
} else if (state == "turn") {
if (turning == false) {
turning = true;
this.gotoAndPlay("turn");
}
}
}
Instance of Symbol 14 MovieClip [death] "throwSpot" in Symbol 648 MovieClip [goodKid] Frame 1
onClipEvent (load) {
function startThrow() {
myBounds = this.getBounds(_root);
placeArray = new Array(myBounds.xMin, myBounds.yMin);
return(placeArray);
}
_visible = false;
}
Symbol 682 MovieClip Frame 1
_parent._parent.swapDepths(_root["deathShip" + _root.deathLevel]);
myDeathLevel = _root.deathLevel;
_root.deathLevel++;
if (_root.deathLevel > 60) {
_root.deathLevel = 50;
}
Symbol 682 MovieClip Frame 75
_parent._parent.swapDepths(_root["deathShip" + myDeathLevel]);
var i = 0;
while (i <= _root.allKidArray.length) {
if (_parent._parent._name == _root.allKidArray[i]) {
_root.allKidArray.splice(i, 1);
}
i++;
}
_root.needNewKid = true;
_parent._parent.removeMovieClip();
Symbol 683 MovieClip Frame 1
Hit = false;
state = "walk";
stop();
Instance of Symbol 14 MovieClip [death] "hitSpot" in Symbol 683 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 683 MovieClip Frame 8
state = "walk";
gotoAndStop ("walk");
Symbol 683 MovieClip Frame 20
_root.throwSnowBadGuy(_parent._name, 100);
state = "walk";
gotoAndStop ("walk");
Instance of Symbol 683 MovieClip "kid" in Symbol 684 MovieClip [small] Frame 1
onClipEvent (load) {
function throwSnowBall() {
if (state == "walk") {
state = "snowBall";
}
}
var speed = ((5 * Math.random()) + 1);
var xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
var yMove = (-Math.sin((Math.PI/180) * (90 - _parent._rotation)));
var state = "walk";
var make = false;
var bounce = false;
var Hit = false;
var hitCount = 0;
var snowBallFrequency = ((Math.random() * 10) + 15);
badSnowBallID = setInterval(throwSnowBall, snowBallFrequency * 1000);
}
onClipEvent (enterFrame) {
if ((state == "walk") || (state == "bounce")) {
_parent._y = _parent._y + (yMove * speed);
_parent._x = _parent._x + (xMove * speed);
}
if ((Hit == false) && (this.hitSpot.hitTest(_root.goodKid.goodKid.hitSpot))) {
if (_root.goodKid.goodKid.state != "fall") {
_root.goodKid.goodKid.state = "fall";
_root.goodKid.goodKid.gotoAndPlay("fall");
state = "fall";
}
}
if ((Hit == false) && (state == "walk")) {
i = 0;
while (i < _root.allKidArray.length) {
if (_parent._name != _root.allKidArray[i]) {
if (this.hitSpot.hitTest(_root[_root.allKidArray[i]].kid.hitSpot)) {
if (_root.testing == true) {
_root.output.text = "state" + _root[_root.allKidArray[i]].kid.state;
}
if ((_root[_root.allKidArray[i]].kid.state != "fall") && (state != "bounce")) {
state = "bounce";
bounce = false;
_root[_root.allKidArray[i]].kid.state = "bounce";
}
}
}
i++;
}
}
if (state == "walk") {
make = false;
hit = false;
bounce = false;
this.gotoAndStop("walk");
} else if (state == "fall") {
if (hit == false) {
hit = true;
this.gotoAndStop("fall");
}
} else if (state == "snowBall") {
if (make == false) {
make = true;
this.gotoAndPlay("make");
}
} else if (state == "bounce") {
if (bounce == false) {
_parent._y = _parent._y - (25 * yMove);
_parent._x = _parent._x - (25 * xMove);
_parent._rotation = _parent._rotation + 180;
xMove = Math.cos((Math.PI/180) * (90 - _parent._rotation));
yMove = -Math.sin((Math.PI/180) * (90 - _parent._rotation));
bounce = true;
this.gotoAndPlay("bounce");
}
}
if (_parent._y < 0) {
_parent._y = Stage.height;
} else if (_parent._y > Stage.height) {
_parent._y = 0;
} else if (_parent._x < 0) {
_parent._x = Stage.width;
} else if (_parent._x > Stage.width) {
_parent._x = 0;
}
}
Instance of Symbol 14 MovieClip [death] "throwSpot" in Symbol 684 MovieClip [small] Frame 1
onClipEvent (load) {
function startThrow() {
myBounds = this.getBounds(_root);
placeArray = new Array(myBounds.xMin, myBounds.yMin);
return(placeArray);
}
_visible = false;
}
Symbol 691 Button
on (release) {
play();
}
Symbol 722 MovieClip Frame 1
stop();
Symbol 722 MovieClip Frame 2
stop();
Symbol 725 Button
on (release) {
_root.instruct.gotoAndStop(2);
gotoAndStop (2);
}
Symbol 726 Button
on (release) {
_root.instruct.gotoAndStop(1);
gotoAndStop (1);
}
Symbol 727 MovieClip Frame 1
stop();
Symbol 727 MovieClip Frame 2
stop();
Symbol 731 Button
on (release) {
getURL ("http://www.yougame.com", "_top");
}
Symbol 735 Button
on (release) {
getURL ("http://www.yougame.com", "_top");
}
Symbol 746 MovieClip Frame 1
stop();
Symbol 746 MovieClip Frame 5
stop();
Symbol 746 MovieClip Frame 10
stop();
Symbol 746 MovieClip Frame 15
stop();
Symbol 760 MovieClip Frame 47
stop();
Symbol 764 Button
on (release) {
gotoAndStop (22);
}