Frame 1
fscommand ("trapallkeys", 1);
fscommand ("allowscale", 0);
Stage.showMenu = false;
Stage.scaleMode = "noScale";
fr.swapDepths(200010);
_global.r = this;
Frame 2
onEnterFrame = function () {
if (_framesloaded == _totalframes) {
r.music = 1;
r.udamusik = 0;
delete onEnterFrame;
gotoAndPlay ("menu");
}
};
stop();
Frame 10
MovieClip.prototype.formatnumber = function (amount) {
if (isNaN(amount)) {
return("0");
}
amount = Math.round(amount * 100) / 100;
var _local6 = String(amount);
var _local3 = _local6.split(".");
var _local4 = new Array();
var _local2;
var _local1 = _local3[0].length;
while (_local1 > 0) {
_local2 = Math.max(_local1 - 3, 0);
_local4.unshift(_local3[0].slice(_local2, _local1));
_local1 = _local2;
}
_local3[0] = _local4.join(",");
return(_local3.join("."));
};
MovieClip.prototype.initfronthead = function () {
var t = this;
t.onEnterFrame = function () {
t._rotation = (-t._parent._parent._parent.xs) / 3;
};
};
MovieClip.prototype.initpet = function () {
var t = this;
t.onEnterFrame = function () {
t._rotation = (-t._parent._parent.xs) / 5;
};
};
MovieClip.prototype.initrock = function () {
var t = this;
var pr = t._parent;
t.udahit = 0;
t.onEnterFrame = function () {
if (t._y < (-pr._y)) {
t.removeMovieClip();
} else if (!t.udahit) {
if (t._y < ((-pr._y) + 170)) {
if (Math.abs(pr.p._x - t._x) < 35) {
if (((pr.p._y - t._y) < 20) and ((pr.p._y - t._y) > -40)) {
pr.hit = (t.udahit = 1);
r.zhit.start();
}
}
}
}
};
};
MovieClip.prototype.inittrail = function () {
var t = this;
t.onEnterFrame = function () {
((t._y < (-t._parent._y)) ? (t.removeMovieClip()) : null);
};
};
MovieClip.prototype.initendpop = function (pd) {
var t = this;
t.a.jiggle(125);
t.id = t._parent.id;
r.petfinish++;
t.place._y = -t._y;
t.place._x = (-r.screenwid) / 2;
t.place.createEmptyMovieClip("a", 2);
t.place.createEmptyMovieClip("b", 1);
((!pd) ? ((t.d = 16)(t.val = 1)) : ((t.d = pd)(t.val = 4)));
t.blur = new flash.filters.BlurFilter(t.val, t.val, 2);
((r.gamemode == 1) ? ((xx = 0)) : (((t.id == 1) ? ((xx = 0)) : ((xx = r.screenwid)))));
areashot("snap" + t.id, r, xx, 0, r.screenwid, r.screenhei, 1);
pasteshot(t.place.a, r["snap" + t.id], 0, 0);
pasteshot(t.place.b, r["snap" + t.id], 0, 0);
if (r.petfinish >= 2) {
if (r.ang1 == r.ang2) {
stat.attachMovie("draw", "draw", 100, {_x:0, _y:70});
} else {
((r.ang1 < r.ang2) ? ((xx = r.screenwid / 2)) : ((xx = (-r.screenwid) / 2)));
stat.attachMovie("winner", "winner", 100, {_x:xx, _y:70});
}
delete onEnterFrame;
}
t.onEnterFrame = function () {
t.d--;
((!t.d) ? ((t.a._xscale = (t.a._yscale = 100))delete t.a.onEnterFrame) : null);
if (t.d < 0) {
if (t.val < 15) {
t.val = t.val + 1;
t.blur = new flash.filters.BlurFilter(t.val, t.val, 2);
t.place.a.filters = [t.blur];
((t.val >= 15) ? (((r.petfinish >= 2) ? (popendbutton()) : null)delete t.onEnterFrame) : null);
}
}
};
};
MovieClip.prototype.popendbutton = function () {
stat.attachMovie("endbutton", "endbutton", 202, {_y:430});
};
MovieClip.prototype.initscreen = function () {
var t = this;
t.startx = t._x;
t.p = t.attachMovie("pet", "pet", 50000, {_x:0, _y:100, petno:t.petno});
((r.gamemode == 1) ? ((t.keys = [37, 39])) : (((t.id == 1) ? ((t.keys = [65, 68])) : ((t.keys = [37, 39])))));
(t.stat = stat["stat" + t.id]);
(t.stat.id = t.id);
t.xs = (t.ys = (t.tno = (t.gno = (t.giftnow = (t.finish = (t.nosnowsfx = (t.hit = (t.bumpscreen = 0))))))));
((r.level <= 5) ? ((t.finishpdx = 100)) : ((t.finishpdx = 200)));
t.topspace = (t.topspacenormal = 125);
t.energy = (t.energymax = 3);
(t.trees = []);
(t.gifts = []);
(t.ground = []);
(t.td = 20000);
(t.od = 10000);
(t.gd = 1000);
(t.rd = 2000);
(t.popd = 1000);
(t.popd2 = 5000);
t.makeground(-100);
t.gameoverdelay = 20;
((r.level < 10) ? ((t.bonusenergyleft = 3)) : ((t.bonusenergyleft = 0)));
t.onEnterFrame = function () {
if (r.startrace) {
t.kp = {ki:Key.isDown(t.keys[0]), ka:Key.isDown(t.keys[1])};
if (t.kp.ki) {
((t.p._x > r.xmin) ? ((t.xs = Math.max(-r.xsmax, Math.min(0, t.xs - r.pspeed)))) : null);
} else if (t.kp.ka) {
((t.p._x < r.xmax) ? ((t.xs = Math.min(r.xsmax, Math.max(0, t.xs + r.pspeed)))) : null);
} else if (t.xs > 0) {
t.xs = Math.max(0, t.xs - r.friksi);
} else if (t.xs < 0) {
t.xs = Math.min(0, t.xs + r.friksi);
}
((((t.p._x < r.xmin) and (t.xs < 0)) or ((t.p._x > r.xmax) and (t.xs > 0))) ? ((t.xs = t.xs * 0.6)) : null);
t.p._x = t.p._x + t.xs;
t.ys = Math.min(r.ysmax, t.ys + 1);
t.p._y = t.p._y + t.ys;
((Math.abs(t.xs) >= 16) ? (((!t.nosnowsfx) ? ((t.nosnowsfx = 10)r.zsnow.start()) : null)) : null);
((t.nosnowsfx > 0) ? (t.nosnowsfx--) : null);
((t.ys > 5) ? (t.attachMovie("trail", "trail" + t.rd, t.rd, {_x:t.p._x, _y:t.p._y})) : null);
t.rd++;
}
(t.bumpscreen ? ((t.topspace = t.topspace + t.topdiv1)(t.topdiv1 = t.topdiv1 * 0.9)) : (((t.topspace != t.topspacenormal) ? ((t.topspace = Math.max(t.topspacenormal, t.topspace - t.topdiv2))(t.topdiv2 = t.topdiv2 * 1.1)) : null)));
((!t.finishline) ? ((t._y = (-t.p._y) + t.topspace)) : ((((t.finishline._y - t.p._y) < t.finishpdx) ? ((t._y = t._y + ((((-t.finishline._y) + 200) - t._y) / 5))) : ((t._y = (-t.p._y) + t.topspace)))));
((r.gamemode == 2) ? ((t._x = t.startx - (t.p._x / 2))) : null);
((((-t._y) + 700) > r.treepos[t.tno].yy) ? (t.maketree()t.tno++) : null);
((t.trees[0]._y < (-t._y)) ? (t.trees[0].removeMovieClip()t.trees.shift()) : null);
(((-t._y) > t.lastground._y) ? (t.makeground(t.lastground._y + r.screenhei)) : null);
((t.ground[0]._y < ((-t._y) - 500)) ? (t.ground[0].removeMovieClip()t.ground.shift()) : null);
if (t.gno < r.itempos.length) {
if (((-t._y) + 500) > r.itempos[t.gno].yy) {
if (r.itempos[t.gno].id == 2) {
var _local1 = "rock";
} else if (r.itempos[t.gno].id == 3) {
((((t.energy < t.energymax) and t.bonusenergyleft) and (random(100) > 20)) ? (_local1 = "bonus1"t.bonusenergyleft--) : (_local1 = "bonus2"));
} else {
var _local1 = "gift";
}
t.makeitem(_local1, r.itempos[t.gno].xx, (-t._y) + 500);
t.gno++;
}
} else {
((!t.finishline) ? (t.attachMovie("finishline", "finishline", 50010, {_y:(-t._y) + 1200})) : null);
((((t.p._y - t.finishline._y) > 600) and (!t.stat.finishinfo)) ? (t.stat.attachMovie("finishinfo" + r.gamemode, "finishinfo", 5001, {_y:250, sk:r["ang" + t.id], id:t.id, lev:r.level, petno:t.petno})delete t.onEnterFrame) : null);
((((t.p._y - t.finishline._y) > -80) and (!t.stat.confetti)) ? (t.stat.attachMovie("confetti", "confetti", 5002)r.zfinish.start()) : null);
((((t.p._y - t.finishline._y) > -30) and (!t.finish)) ? ((t.finish = 1)(r["ang" + t.id] = r["ang" + t.id] + (50 * r.nil))(pos = localpos(t.p, t.stat))t.stat.attachMovie("popmessage", "pop" + t.popd, t.popd, {_x:pos.xx, _y:pos.yy + 150, no:3})t.popd++) : null);
}
if (!t.hit) {
} else {
(t.hit = 0);
(t.ys = 0);
(t.topdiv1 = 12);
(t.topdiv2 = 1);
(t.energy = Math.max(0, t.energy - 1));
t.p.tint();
(t.bumpscreen = 10);
r.zhit.start();
(stat["stat" + t.id].energybar.gotoAndPlay(1));// not popped
}
((!t.energy) ? (t.gameoverdelay--((!t.gameoverdelay) ? (t.stat.attachMovie("gameover" + r.gamemode, "gameover", 5003, {_y:250, sk:r["ang" + t.id], id:t.id, lev:r.level, petno:t.petno})delete t.onEnterFrame) : null)) : null);
((t.bumpscreen > 0) ? (t.bumpscreen--) : null);
};
};
MovieClip.prototype.makeground = function (yy) {
var _local2 = this;
_local2.lastground = _local2.attachMovie("ground", "ground" + _local2.gd, _local2.gd, {_y:yy});
_local2.ground.push(_local2.lastground);
_local2.gd++;
};
MovieClip.prototype.maketree = function () {
var _local2 = this;
_local2.attachMovie("tree", "tree" + _local2.td, _local2.td, {_x:r.treepos[_local2.tno].x1, _y:r.treepos[_local2.tno].yy});
_local2.td++;
_local2.attachMovie("tree", "tree" + _local2.td, _local2.td, {_x:r.treepos[_local2.tno].x2, _y:r.treepos[_local2.tno].yy});
_local2.td++;
};
MovieClip.prototype.makegift = function () {
var _local2 = this;
_local2.attachMovie("gift", "gift" + _local2.od, _local2.od, {_x:r.itempos[_local2.gno].xx, _y:r.itempos[_local2.gno].yy});
_local2.od++;
};
MovieClip.prototype.makecake = function () {
var _local2 = this;
var _local3 = localpos(_local2, _local2._parent.stat);
_local2._parent.stat.attachMovie("cake", "cake" + _local2._parent.popd, _local2._parent.popd, {_x:_local3.xx, _y:_local3.yy - 40, id:_local2._parent.id});
_local2._parent.popd++;
};
MovieClip.prototype.makeitem = function (item, xx, yy) {
var _local2 = this;
_local2.attachMovie(item, "item" + _local2.od, _local2.od, {_x:xx, _y:yy});
_local2.od++;
};
MovieClip.prototype.initcake = function () {
var t = this;
t.no = getrandom("caketype" + t.id);
t.a.jiggle(150);
t.ys = 0;
t.d = 20;
t.onEnterFrame = function () {
t._y = t._y + t.ys;
t.ys = t.ys - 1.5;
t.d--;
((!t.d) ? (delete t.a.onEnterFrame) : null);
((t._y < -50) ? (t.removeMovieClip()) : null);
};
};
MovieClip.prototype.inittree = function () {
this._parent.trees.push(this);
};
MovieClip.prototype.initgift = function (id) {
var t = this;
((id > 0) ? ((t.id = id)) : null);
var pr = t._parent;
pr.gifts.push(t);
t.onEnterFrame = function () {
if (t._y < (-pr._y)) {
t.removeit(pr.gifts);
} else if (t._y < ((-pr._y) + 170)) {
if (Math.abs(pr.p._x - t._x) < 44) {
if (((pr.p._y - t._y) < 40) and ((pr.p._y - t._y) > -65)) {
if (t.id == 1) {
pr.energy = Math.min(pr.energymax, pr.energy + 1);
stat["stat" + pr.id].energybar.gotoAndPlay(1);
var _local1 = localpos(t, pr.stat);
pr.stat.attachMovie("popmessage", "pop" + pr.popd, pr.popd, {_x:_local1.xx, _y:_local1.yy, no:1});
pr.popd++;
r.zbonus.start();
} else if (t.id == 2) {
r["ang" + pr.id] = r["ang" + pr.id] + (10 * r.nil);
var _local1 = localpos(t, pr.stat);
pr.stat.attachMovie("popmessage", "pop" + pr.popd2, pr.popd2, {_x:_local1.xx, _y:_local1.yy, no:2});
pr.popd2++;
r.zbonus.start();
} else {
r["ang" + pr.id] = r["ang" + pr.id] + r.nil;
r.ztink.start();
t.makecake();
}
t.removeit(pr.gifts);
}
}
}
};
};
MovieClip.prototype.snapshot = function (dest, sourc, x1, y1, wid, hei, ska, bx, by) {
((!ska) ? (ska = 1) : null);
var _local1 = new flash.display.BitmapData(wid, hei, true, 16777215);
var _local2 = new flash.geom.Matrix();
_local2.scale(ska, ska);
_local2.translate(-x1, -y1);
_local1.draw(sourc, _local2, null, null, new flash.geom.Rectangle(0, 0, wid, hei), true);
(((bx + by) > 0) ? (_local1.applyFilter(_local1, new flash.geom.Rectangle(0, 0, wid, hei), new flash.geom.Point(0, 0), new flash.filters.BlurFilter(bx, by, 2))) : null);
if (dest instanceof MovieClip) {
dest.attachBitmap(_local1, 1, "auto", true);
} else {
dest.copyPixels(_local1, new flash.geom.Rectangle(0, 0, wid, hei), new flash.geom.Point(0, 0));
}
};
MovieClip.prototype.areashot = function (dest, sourc, x0, y0, wid, hei, ska) {
stat._visible = false;
((r[dest] != undefined) ? (dest.dispose()) : null);
r[dest] = new flash.display.BitmapData(ska * wid, ska * hei, true);
snapshot(r[dest], sourc, x0, y0, ska * wid, ska * hei, ska);
stat._visible = true;
};
MovieClip.prototype.screensnapshot = function () {
stat._visible = false;
((r.snap != undefined) ? (r.snap.dispose()) : null);
r.snap = new flash.display.BitmapData(r.screenwid, r.screenhei);
snapshot(r.snap, r, 0, 0, r.screenwid, r.screenhei);
stat._visible = true;
};
MovieClip.prototype.pasteshot = function (dest, sourc, bx, by) {
var _local1 = sourc.clone();
if ((bx + by) > 0) {
_local1.applyFilter(_local1, new flash.geom.Rectangle(0, 0, _local1.width, _local1.height), new flash.geom.Point(0, 0), new flash.filters.BlurFilter(bx, by, 1));
}
dest.attachBitmap(_local1, 1, "auto", true);
};
Frame 11
MovieClip.prototype.cekhitpix = function (a, b, alphatolerance) {
((alphatolerance == undefined) ? (alphatolerance = 255) : null);
var _local2 = a.getBounds(r);
var _local1 = b.getBounds(r);
if ((Stage.width == r.screenwid) and (Stage.height == r.screenhei)) {
var _local5 = (hdif = 0);
} else {
var _local5 = Math.round((Stage.width - r.screenwid) / 2);
var hdif = Math.round((Stage.height - r.screenhei) / 2);
_local2.xMin = _local2.xMin + _local5;
_local2.xMax = _local2.xMax + _local5;
_local1.xMin = _local1.xMin + _local5;
_local1.xMax = _local1.xMax + _local5;
_local2.yMin = _local2.yMin + hdif;
_local2.yMax = _local2.yMax + hdif;
_local1.yMin = _local1.yMin + hdif;
_local1.yMax = _local1.yMax + hdif;
}
if (_local2.xMax > _local1.xMin) {
if (_local1.xMax > _local2.xMin) {
if (_local2.yMax > _local1.yMin) {
if (_local1.yMax > _local2.yMin) {
var _local3 = {xMin:Math.max(_local2.xMin, _local1.xMin), xMax:Math.min(_local2.xMax, _local1.xMax), yMin:Math.max(_local2.yMin, _local1.yMin), yMax:Math.min(_local2.yMax, _local1.yMax)};
var _local7 = new flash.display.BitmapData(_local3.xMax - _local3.xMin, _local3.yMax - _local3.yMin, false);
var _local4 = a.transform.concatenatedMatrix;
_local4.tx = _local4.tx - _local3.xMin;
_local4.ty = _local4.ty - _local3.yMin;
_local7.draw(a, _local4, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, alphatolerance));
_local4 = b.transform.concatenatedMatrix;
_local4.tx = _local4.tx - _local3.xMin;
_local4.ty = _local4.ty - _local3.yMin;
_local7.draw(b, _local4, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, alphatolerance), "difference");
var _local6 = _local7.getColorBoundsRect(4294967295, 4278255615);
_local7.dispose();
if (_local6.width) {
_local6.x = _local6.x + (_local3.xMin - _local5);
_local6.y = _local6.y + (_local3.yMin - hdif);
return(_local6);
}
}
}
}
}
return(false);
};
MovieClip.prototype.globalpos = function (mc) {
var _local1 = {x:0, y:0};
mc.localToGlobal(_local1);
return({xx:_local1.x, yy:_local1.y});
};
MovieClip.prototype.localpos = function (mc, m) {
var _local2 = globalpos(mc);
var _local1 = {x:_local2.xx, y:_local2.yy};
m.globalToLocal(_local1);
return({xx:_local1.x, yy:_local1.y});
};
MovieClip.prototype.jiggle = function (beginska) {
var t = this;
((!beginska) ? (beginska = 200) : null);
t._xscale = (t._yscale = beginska);
t.ska = 100;
t.dx = 0;
t.dv = 0.8;
t.dvstep = 0.6;
t.onEnterFrame = function () {
t.dx = (t.dx * t.dvstep) + ((t.ska - t._xscale) * t.dv);
t._xscale = t._xscale + t.dx;
t._yscale = t._xscale;
};
};
MovieClip.prototype.removeit = function (arr) {
arr.removeValue(this);
this.removeMovieClip();
};
MovieClip.prototype.appear = function (speed, delay) {
var t = this.createEmptyMovieClip("appearmc", this.getNextHighestDepth());
((!delay) ? (delay = 1) : null);
((!speed) ? (speed = 15) : null);
t.d = delay;
t.speed = speed;
t._parent._visible = false;
t._parent._alpha = 0;
t.onEnterFrame = function () {
t.d--;
if (!t.d) {
t.yy = t._parent._y;
t._parent._y = t._parent._y + 25;
t._parent._visible = true;
t.onEnterFrame = function () {
t._parent._y = t._parent._y + ((t.yy - t._parent._y) / 2);
t._parent._alpha = t._parent._alpha + t.speed;
if (t._parent._alpha >= 100) {
t._parent._alpha = 100;
delete t.onEnterFrame;
}
};
}
};
};
MovieClip.prototype.disappear = function (speed, ys) {
var t = this.createEmptyMovieClip("disappearmc", this.getNextHighestDepth());
((!speed) ? (speed = 20) : null);
((ys == undefined) ? (ys = -2) : null);
t.speed = speed;
t.ys = ys;
t.onEnterFrame = function () {
t._parent._y = t._parent._y + t.ys;
t._parent._alpha = t._parent._alpha - t.speed;
if (t._parent._alpha <= 0) {
delete t.onEnterFrame;
t._parent.removeMovieClip();
}
};
t.stop();
};
MovieClip.prototype.appearbright = function (speed, clr) {
var t = this.createEmptyMovieClip("appearmc", this.getNextHighestDepth());
((!speed) ? (speed = 15) : null);
t.yy = t._parent._y - 25;
t.c = new Color(t._parent);
((!clr) ? (clr = 16777215) : null);
t.clr = clr;
t.c.setTint(t.clr, t.br);
t.br = 100;
t.brless = t.br / speed;
t.blur = 12;
t.blurless = t.blur / speed;
t.onEnterFrame = function () {
t._parent._y = t._parent._y + ((t.yy - t._parent._y) / 2);
t.blur = t.blur - t.blurless;
t._parent.filters = [new flash.filters.BlurFilter(t.blur, t.blur, 3)];
t.br = t.br - t.brless;
t.c.resetColor();
t.c.setTint(t.clr, t.br);
if (t.br <= 0) {
t._parent.filters = null;
c.resetColor();
delete t.onEnterFrame;
}
};
};
MovieClip.prototype.disappearbright = function (speed, clr) {
var t = this.createEmptyMovieClip("disappearmc", this.getNextHighestDepth());
((!speed) ? (speed = 8) : null);
t.c = new Color(t._parent);
t.br = 10;
t.bradd = 100 / speed;
((!clr) ? (clr = 16777215) : null);
t.clr = clr;
t.c.setTint(t.clr, t.br);
t.blur = 1;
t.bluradd = 12 / speed;
t.onEnterFrame = function () {
t.blur = t.blur + t.bluradd;
t._parent.filters = [new flash.filters.BlurFilter(t.blur, t.blur, 3)];
t.br = t.br + t.bradd;
t.c.resetColor();
t.c.setTint(t.clr, t.br);
if (t.br >= 100) {
t.onEnterFrame = function () {
t._parent._alpha = t._parent._alpha - 10;
if (t._parent._alpha <= 0) {
t._parent.filters = null;
c.resetColor();
delete t.onEnterFrame;
}
};
}
};
};
Array.prototype.removeElement = function (i) {
if (i == null) {
i = 0;
}
var _local4 = this[i];
var _local2 = i;
while (_local2 < (this.length - 1)) {
this[_local2] = this[_local2 + 1];
_local2++;
}
this.pop();
return(_local4);
};
Array.prototype.removeValue = function (a) {
var _local2 = 0;
while (_local2 < this.length) {
if (a == this[_local2]) {
this.removeElement(_local2);
}
_local2++;
}
};
Array.prototype.randomize = function () {
return(this.sort(function (a, b) {
return(((Math.floor(Math.random() * 2) == 0) ? 1 : -1));
}));
};
Array.prototype.copy = Array.prototype.slice;
Object.prototype.clon = function () {
if (this instanceof Array) {
var _local2 = [];
var _local3 = 0;
while (_local3 < this.length) {
_local2[_local3] = ((typeof(this[_local3]) == "object") ? (this[_local3].clon()) : (this[_local3]));
_local3++;
}
} else if ((this instanceof XML) || (this instanceof MovieClip)) {
var _local2 = null;
trace("Warning! Object.clon can not be used on MovieClip or XML objects");
} else {
var _local2 = {};
for (var _local3 in this) {
_local2[_local3] = ((typeof(this[_local3]) == "object") ? (this[_local3].clon()) : (this[_local3]));
}
}
return(_local2);
};
ASSetPropFlags(Object.prototype, ["clon"], 1);
Array.prototype.contain = function (val) {
var _local3 = this.length;
var _local2 = 0;
while (_local2 < _local3) {
if (this[_local2] == val) {
return(true);
}
_local2++;
}
return(false);
};
MovieClip.prototype.fadescreen = function (speed) {
if (!speed) {
speed = 5;
}
r.createEmptyMovieClip("dark", 100001);
var d = r.dark;
d.speed = speed;
d.lineStyle(1, 0, 100);
d.beginFill(16777215, 100);
d.moveTo(-5000, -5000);
d.lineTo(5000, -5000);
d.lineTo(5000, 5000);
d.lineTo(-5000, 5000);
d.endFill();
d.onEnterFrame = function () {
d._alpha = d._alpha - d.speed;
if (d._alpha <= 0) {
d.removeMovieClip();
d.stop();
}
};
};
MovieClip.prototype.getrandom = function (aray) {
if (r.randomlisting.length > 0) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < r.randomlisting.length) {
if (r.randomlisting[_local1] == aray) {
_local3 = 1;
break;
}
_local1++;
}
if (!_local3) {
r.randomlisting.push(aray);
}
} else {
r.randomlisting = [];
r.randomlisting.push(aray);
}
if (r[aray + "getrandom"].length <= 0) {
r[aray + "getrandom"] = [];
r[aray + "getrandom"] = r[aray].clon();
r[aray + "getrandom"].randomize();
if (r[aray + "getrandom"].length > 1) {
if (r[aray + "lastpop"] == r[aray + "getrandom"][r[aray + "getrandom"].length - 1]) {
r[aray + "getrandom"].pop();
}
}
}
var _local4 = r[aray + "getrandom"].pop();
r[aray + "lastpop"] = _local4;
return(_local4);
};
MovieClip.prototype.resetrandom = function () {
if (r.randomlisting.length > 0) {
var _local1 = 0;
while (_local1 < r.randomlisting.length) {
r[r.randomlisting[_local1] + "getrandom"] = [];
r[r.randomlisting[_local1] + "lastpop"] = undefined;
_local1++;
}
}
};
MovieClip.prototype.tint = function (delay, colr) {
var t = this.createEmptyMovieClip("tintmc", this.getNextHighestDepth());
t.d = delay;
((!t.d) ? ((t.d = 10)) : null);
t.colr = colr;
((!t.colr) ? ((t.colr = 16737792)) : null);
t.c = new Color(t._parent);
t.a = (t.b = 1);
t._parent.filters = [new flash.filters.GlowFilter(t.colr, 1, 7, 7, 1.5, 1, false, false)];
t.onEnterFrame = function () {
t.d--;
t.a--;
if (!t.a) {
t.a = 2;
t.b = !t.b;
if (t.b) {
t.c.setTint(t.colr, 100);
} else {
t.c.setTint(16777215, 100);
}
} else {
t.c.resetColor();
}
if (!t.d) {
t.c.resetColor();
t._parent.filters = null;
t.removeMovieClip();
}
};
};
MovieClip.prototype.rad = function (qdeg) {
return(qdeg * (Math.PI/180));
};
MovieClip.prototype.deg = function (qrad) {
return(qrad * 57.2957795130823);
};
Number.prototype.limit = function (floor, ceil) {
return(Math.min(ceil, Math.max(floor, this)));
};
Number.prototype.isEven = function () {
return(!(this % 2));
};
Number.prototype.isMultipleOf = function (BaseNum) {
return(!(this % BaseNum));
};
Number.prototype.between = function (lo, hi) {
return((this > lo) && (this < hi));
};
Color.prototype.setBrightness = function (value) {
this.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0});
var trans = this.getTransform();
var percent = (Math.abs(value) / 100);
var brightnessColor = ((value > 0) ? 255 : 0);
with (trans) {
ra = ra - (ra * percent);
ga = ga - (ga * percent);
ba = ba - (ba * percent);
rb = rb + ((brightnessColor - rb) * percent);
gb = gb + ((brightnessColor - gb) * percent);
bb = bb + ((brightnessColor - bb) * percent);
}
this.setTransform(trans);
};
Color.prototype.setTint = function (col, percent) {
if (isNaN(col) || (isNaN(percent))) {
return(undefined);
}
col = ((col <= 0) ? 0 : (((col >= 16777215) ? 16777215 : (Math.round(col)))));
percent = ((percent <= 0) ? 0 : (((percent >= 100) ? 1 : (percent / 100))));
var trans = this.getTransform();
with (trans) {
ra = ra - (ra * percent);
ga = ga - (ga * percent);
ba = ba - (ba * percent);
rb = rb + ((((col & 16711680) >> 16) - rb) * percent);
gb = gb + ((((col & 65280) >> 8) - gb) * percent);
bb = bb + (((col & 255) - bb) * percent);
}
this.setTransform(trans);
};
Color.prototype.resetColor = function () {
this.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0});
};
Sound.prototype.fade = function (fadeType, fadeDuration) {
this.fadeDuration = (fadeDuration * 1000) / 100;
this.fadeType = fadeType;
this.currentVolume = this.getVolume();
this.intID = setInterval(function (thisObj) {
thisObj.doFade(thisObj.fadeType);
}, this.fadeDuration, this);
this.doFade = function (fadeType) {
if (fadeType == "out") {
this.setVolume(this.currentVolume--);
if (this.getVolume() <= 0) {
clearInterval(this.intID);
}
} else if (fadeType == "in") {
this.setVolume(this.currentVolume++);
if (this.getVolume() >= 100) {
clearInterval(this.intID);
}
}
};
};
MovieClip.prototype.wait = function (delay) {
var t = this.createEmptyMovieClip("wdl", 55555);
t.delay = delay;
t.onEnterFrame = function () {
t.delay--;
if (t.delay < 0) {
delete t.onEnterFrame;
t._parent.play();
t.removeMovieClip();
}
};
t._parent.stop();
};
MovieClip.prototype.savecookie = function (vari, value) {
var _local1 = SharedObject.getLocal("petsledcookie", "/");
_local1.data[vari] = value;
_local1.flush();
};
MovieClip.prototype.loadcookie = function (vari) {
var _local1 = SharedObject.getLocal("petsledcookie", "/");
if (_local1.data[vari] != null) {
return(_local1.data[vari]);
}
return(false);
};
Frame 18
call("pro2");
fadescreen();
level = (ang1 = (ang2 = 0));
stop();
Frame 25
call("pro2");
fadescreen();
petno1 = (petno2 = 0);
stop();
Frame 31
_global.m = this.map;
_global.stat = this.stat;
_global.p = m.player;
delete onEnterFrame;
call("pro");
call("pro2");
fadescreen();
((!gamemode) ? ((gamemode = 1)) : (((gamemode == 2) ? ((ang1 = (ang2 = 0))) : null)));
((!level) ? ((level = 1)(ang1 = (ang2 = 0))) : null);
startrace = (petfinish = 0);
screenhei = 480;
if (gamemode == 1) {
screenwid = 720;
totalgifts = [0, 16, 23, 31, 40];
((level < 5) ? ((totalgift = totalgifts[level])) : ((totalgift = level * 10)));
((level <= 6) ? ((ysmax = 10 + level)) : ((ysmax = Math.min(40, 14 + (level / 2)))));
((!petno1) ? ((petno1 = 1)) : null);
stat.attachMovie("stat_a", "stat1", 1, {id:1});
} else {
screenwid = 360;
totalgift = 80;
((!petno1) ? ((petno1 = 1)) : null);
((!petno2) ? ((petno2 = 2)) : null);
ysmax = 15;
stat.attachMovie("stat_b", "stat1", 1, {id:1, _x:(-screenwid) / 2});
stat.attachMovie("stat_b", "stat2", 2, {id:2, _x:screenwid / 2});
}
screenhei = 480;
if (gamemode == 2) {
_global.screen1 = m.attachMovie("screen", "screen1", 1, {_x:screenwid / 2, id:1, petno:petno1});
_global.screen2 = m.attachMovie("screen", "screen2", 2, {_x:screenwid + (screenwid / 2), id:2, petno:petno2});
m.attachMovie("screenmask", "screenmask1", 3, {_x:screen1._x});
m.attachMovie("screenmask", "screenmask2", 4, {_x:screen2._x});
screen1.setMask(m.screenmask1);
screen2.setMask(m.screenmask2);
stat.attachMovie("divider", "divider", 11);
} else {
_global.screen1 = m.attachMovie("screen", "screen1", 1, {_x:screenwid / 2, id:1, petno:petno1});
}
itempos = [];
yy = 600;
nextrock = 7 + random(5);
nextbonus = 8 + random(5);
((gamemode == 1) ? ((grange = 150)) : ((grange = 70)));
var i = 0;
while (i < totalgift) {
var item = {xx:((random(100) > 50) ? (random(grange)) : (-random(grange))), yy:yy};
nextrock--;
((!nextrock) ? ((nextrock = 7 + random(5))(item.id = 2)) : (nextbonus--((!nextbonus) ? ((nextbonus = 8 + random(5))(item.id = 3)) : null)));
itempos.push(item);
dx = 50 + random(50);
((((xx + dx) < -150) or ((xx + dx) > 150)) ? ((dx = -dx)) : null);
xx = xx + dx;
yy = yy + (100 + random(100));
i++;
}
treepos = [];
yy = 30;
((gamemode == 1) ? ((trange1 = 250)(trange2 = 100)(xmin = -100)(xmax = 100)) : ((trange1 = 200)(trange2 = 80)(xmin = -80)(xmax = 80)));
var i = 0;
while (i < 300) {
treepos.push({yy:yy, x1:(-trange1) - random(trange2), x2:trange1 + random(trange2)});
yy = yy + (150 + random(80));
i++;
}
caketype1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17];
caketype2 = caketype1.copy();
pspeed = 4;
xsmax = 16;
friksi = 1.5;
nil = 100;
stat.attachMovie("ready", "ready", 12, {_x:0, _y:250});
if (!r.udamusik) {
r.udamusik = 1;
stopAllSounds();
r.createEmptyMovieClip("sfx", 60001);
allsfx = ["zsnow", "zfinish", "zhit", "zbonus", "ztink"];
var i = 0;
while (i < allsfx.length) {
r[allsfx[i]] = new Sound(sfx);
r[allsfx[i]].attachSound(allsfx[i]);
i++;
}
r.createEmptyMovieClip("sfx2", 60002);
r.zloop = new Sound(sfx2);
r.zloop.attachSound("zloop");
r.zloop.start(0, 99999);
}
stop();
Frame 32
delete onEnterFrame;
fadescreen();
stop();
Frame 40
gotoAndPlay ("start");
Symbol 1 MovieClip [fadeout] Frame 1
vs = 5;
vol = r.zloop.getVolume();
if (vol > 0) {
onEnterFrame = function () {
vol = vol - vs;
if (vs > 0.5) {
vs = 0.95 * vs;
}
r.zloop.setVolume(vol);
if (vol <= 0) {
r.zloop.stop();
delete onEnterFrame;
}
};
}
Symbol 2 MovieClip [screen] Frame 1
initscreen();
Symbol 8 MovieClip Frame 1
accel = 0.8;
convert = 0.5;
b._xscale = 1;
xs = 0;
onEnterFrame = function () {
persen = Math.floor((r.getBytesLoaded() / r.getBytesTotal()) * 100);
xs = (xs * accel) + ((persen - b._xscale) * convert);
b._xscale = b._xscale + xs;
};
stop();
Symbol 19 MovieClip Frame 1
stop();
Symbol 20 MovieClip [star] Frame 1
d = 5;
dep = 10;
onEnterFrame = function () {
var _local2 = 0;
while (_local2 < 4) {
var _local3 = 50 + random(50);
var _local5 = this.attachMovie("starani", "starani" + dep, dep, {_rotation:random(360), _xscale:_local3, _yscale:_local3});
dep++;
_local2++;
}
d--;
((!d) ? (delete onEnterFrame) : null);
((d == -7) ? (this.removeMovieClip()) : null);
};
Symbol 25 MovieClip Frame 1
gotoAndStop(_parent.no);
Symbol 26 MovieClip [popmessage] Frame 1
a.jiggle();
onEnterFrame = function () {
_y = (_y - 5);
((_y < -30) ? (this.removeMovieClip()) : null);
};
Symbol 87 MovieClip [item1] Frame 1
gotoAndStop(1 + random(_totalframes));
Symbol 108 MovieClip Frame 1
initfronthead();
Symbol 109 MovieClip Frame 1
initpet();
Symbol 137 MovieClip Frame 1
initfronthead();
Symbol 138 MovieClip Frame 1
initpet();
Symbol 152 MovieClip Frame 1
initfronthead();
Symbol 153 MovieClip Frame 1
initpet();
Symbol 155 MovieClip Frame 1
_global.tail = this;
Symbol 156 MovieClip Frame 1
movingtail();
Symbol 156 MovieClip Frame 18
gotoAndPlay(_currentframe + random(20));
Symbol 176 MovieClip Frame 1
initfronthead();
Symbol 177 MovieClip Frame 1
initpet();
Symbol 179 MovieClip Frame 1
_global.tail = this;
Symbol 180 MovieClip Frame 1
movingtail();
Symbol 180 MovieClip Frame 18
gotoAndPlay(_currentframe + random(20));
Symbol 202 MovieClip Frame 1
initfronthead();
Symbol 203 MovieClip Frame 1
initpet();
Symbol 204 MovieClip [pet] Frame 1
gotoAndStop(petno);
Symbol 208 MovieClip [tree] Frame 1
inittree();
Symbol 213 MovieClip Frame 1
gotoAndStop(1 + random(_totalframes));
_parent.a.setMask(this);
Symbol 221 MovieClip [gift] Frame 1
initgift();
Symbol 228 MovieClip Frame 1
a = "Level " + r.level;
b = _parent._parent.sk;
Symbol 230 MovieClip [gameover1] Frame 1
initendpop(1);
Symbol 230 MovieClip [gameover1] Frame 38
r.gotoAndPlay("end");
stop();
Symbol 251 MovieClip Frame 1
gotoAndStop(_parent.no);
Symbol 252 MovieClip [cake] Frame 1
initcake();
Symbol 258 MovieClip Frame 1
gotoAndStop(1 + random(_totalframes));
Symbol 259 MovieClip [starani] Frame 11
stop();
Symbol 267 MovieClip Frame 1
gotoAndStop(1 + random(_totalframes));
Symbol 268 MovieClip [confetti1] Frame 1
_yscale = (50 + random(100));
_xscale = (50 + random(100));
ys = 5 + random(5);
onEnterFrame = function () {
_y = (_y + 5);
((_y > (r.screenhei + _height)) ? (this.removeMovieClip()) : null);
};
Symbol 269 MovieClip [confetti] Frame 1
od = 10;
no = 0;
tipe = ["confetti1", "confetti2", "confetti3"];
((r.screenwid < 500) ? ((d = (de = 2))) : ((d = (de = 1))));
onEnterFrame = function () {
d--;
if (!d) {
d = de;
place.attachMovie(tipe[no], "confetti1" + od, od, {_x:(-(r.screenwid / 2)) + random(r.screenwid), _y:0});
od++;
no++;
((no >= tipe.length) ? ((no = 0)) : null);
}
};
Symbol 270 MovieClip [confetti2] Frame 1
ys = 3 + (0.1 * random(30));
ro = 10 + random(10);
((random(100) > 50) ? ((ro = -ro)) : null);
_yscale = (50 + random(100));
_xscale = (50 + random(100));
onEnterFrame = function () {
_y = (_y + ys);
ys = ys + 0.1;
a._rotation = a._rotation + ro;
((_y > (r.screenhei + _height)) ? (this.removeMovieClip()) : null);
};
Symbol 280 MovieClip Frame 1
gotoAndStop(1 + random(_totalframes));
Symbol 281 MovieClip Frame 1
((!uda) ? ((uda = 1)gotoAndPlay(1 + random(_totalframes))) : null);
Symbol 283 MovieClip [confetti3] Frame 1
ys = 3 + (0.1 * random(30));
_yscale = (50 + random(100));
_xscale = (50 + random(100));
onEnterFrame = function () {
_y = (_y + ys);
ys = ys + 0.1;
((_y > (r.screenhei + 40)) ? (this.removeMovieClip()) : null);
};
Symbol 287 MovieClip [trail] Frame 1
inittrail();
Symbol 292 MovieClip [rock] Frame 1
initrock();
Symbol 299 MovieClip Frame 1
a = (("Level " + _parent._parent.lev) + newline) + "Finished!";
b = formatnumber(_parent._parent.sk);
Symbol 303 Button
on (press) {
r.zclick.start();
r.level++;
r.gotoAndPlay("next");
}
Symbol 307 MovieClip [finishinfo1] Frame 1
initendpop();
Symbol 309 MovieClip Frame 1
angnow = (a = 0);
onEnterFrame = function () {
((angnow != r["ang" + _parent.id]) ? ((angnow = r["ang" + _parent.id])(a = formatnumber(angnow))) : null);
};
Symbol 312 MovieClip Frame 1
gotoAndStop((m["screen" + _parent.id].energymax + 2) - m["screen" + _parent.id].energy);
Symbol 318 MovieClip [bonus1] Frame 1
initgift(1);
Symbol 322 MovieClip [bonus2] Frame 1
initgift(2);
Symbol 326 MovieClip Frame 1
a = (("Player " + _parent._parent.id) + newline) + "Finished";
b = formatnumber(_parent._parent.sk);
Symbol 389 MovieClip Frame 1
gotoAndStop(_parent.no);
Symbol 391 MovieClip Frame 1
no = _parent._parent.petno;
Symbol 393 MovieClip [finishinfo2] Frame 1
initendpop();
Symbol 401 MovieClip Frame 1
a = "Player " + _parent._parent.id;
b = formatnumber(_parent._parent.sk);
Symbol 403 MovieClip [gameover2] Frame 1
initendpop();
Symbol 411 MovieClip Frame 1
a = (("LEVEL " + _parent._parent.lev) + newline) + "FINISHED!";
b = _parent._parent.sk;
Symbol 417 Button
on (press) {
r.zclick.start();
if (r.gamemode != 1) {
if (r.petno1) {
((r.petno2 = no));// not popped
} else {
(r.petno1 = no);
(_parent.txt.gotoAndStop(3));// not popped
}
} else {
(r.petno1 = no);
(r.gotoAndPlay("start"));// not popped
}
}
on (rollOver) {
na.gotoAndStop(2);
}
on (rollOut) {
na.gotoAndStop(1);
}
Symbol 422 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 1
gotoAndStop(_parent._parent.no);
Symbol 430 MovieClip Frame 1
_yscale = 100;
_xscale = 100;
stop();
Symbol 430 MovieClip Frame 2
jiggle(120);
Symbol 431 MovieClip Frame 1
no = Number(substring(_name, 2, 1));
psign._visible = false;
ska = 45;
onEnterFrame = function () {
if ((r.gamemode == 2) and (!psign._visible)) {
if (r.petno1 == no) {
bu.enabled = false;
psign._visible = true;
instxt.attachMovie("inshead", "inshead1", 1, {_x:-170, no:no, _xscale:ska, _yscale:ska});
}
if (r.petno2 == no) {
bu.enabled = false;
(psign._visible = true);
psign.gotoAndStop(2);
instxt.attachMovie("inshead", "inshead2", 2, {_x:170, no:no, _xscale:ska, _yscale:ska});
d = 30;
onEnterFrame = function () {
d--;
if (d) {
} else {
(r.gotoAndPlay("start"));// not popped
}
};
}
(((r.petno2 > 0) and (r.petno2 != no)) ? ((bu.enabled = false)(na._visible = false)delete onEnterFrame) : null);
}
};
Symbol 435 MovieClip Frame 1
gotoAndStop(_parent.no);
Symbol 436 MovieClip [petselect] Frame 1
((r.gamemode == 1) ? ((no = 1)) : ((no = 2)));
jiggle(125);
Symbol 440 Button
on (press) {
r.zclick.start();
r.ang1 = (r.ang2 = 0);
r.gotoAndPlay("next");
}
Symbol 441 Button
on (press) {
r.zclick.start();
r.gotoAndPlay("menu");
}
Symbol 446 MovieClip [endbutton] Frame 1
jiggle(150);
Symbol 448 MovieClip Frame 1
no = _parent.no;
Symbol 449 MovieClip [inshead] Frame 1
jiggle(150);
Symbol 453 MovieClip Frame 1
jiggle(150);
Symbol 453 MovieClip Frame 25
jiggle(150);
Symbol 453 MovieClip Frame 45
jiggle(150);
stop();
Symbol 454 MovieClip [ready] Frame 1
d = 45;
onEnterFrame = function () {
d--;
((!d) ? ((r.startrace = 1)) : null);
((d < -15) ? (this.removeMovieClip()) : null);
};
Symbol 458 MovieClip Frame 1
a = (("LEVEL " + _parent._parent.lev) + newline) + "FINISHED!";
b = _parent._parent.sk;
Symbol 488 Button
on (press) {
r.zclick.start();
r.gamemode = 1;
r.gotoAndPlay("ins");
}
Symbol 489 Button
on (press) {
r.zclick.start();
r.gamemode = 2;
r.gotoAndPlay("ins");
}
Symbol 522 MovieClip Frame 1
_global.instxt = this;
gotoAndStop(r.gamemode);
Symbol 525 Button
on (press) {
place.attachMovie("petselect", "petselect", 10, {_x:360, _y:373});
bu.enabled = false;
}
Symbol 532 Button
on (release) {
r.music = 0;
r.zloop.setVolume(0);
r.zhit.setVolume(0);
gotoAndStop (2);
}
Symbol 536 Button
on (release) {
r.music = 1;
r.zloop.setVolume(100);
r.zhit.setVolume(100);
gotoAndStop (1);
}
Symbol 537 MovieClip Frame 1
if (r.music) {
stop();
} else {
gotoAndStop (2);
}
Symbol 540 Button
on (press) {
r.level = 0;
r.zclick.start();
r.gotoAndPlay("menu");
}
Symbol 541 Button
on (press) {
r.level = 0;
r.zclick.start();
r.gotoAndPlay("start");
}
Symbol 551 MovieClip Frame 1
no = r.petno1;
ang = r.ang1;
oldang = loadcookie("ang");
ang1 = formatnumber(ang);
oldang1 = formatnumber(oldang);
if (!oldang) {
savecookie("ang", ang);
stop();
} else if (ang > oldang) {
savecookie("ang", ang);
gotoAndStop (3);
} else {
gotoAndStop (2);
}