Frame 1
_global.screen = new Object();
_global.screen._width = 600;
_global.screen._height = 400;
_global.quality = "HIGH";
_global.objects = new Object();
_global.objects.frequence = 50;
_global.objects.prop = 11;
_global.objects.count = 3;
_global.objects.hitdist = 35;
_global.objects.mineforcex = 8;
_global.objects.mineforcey = 2;
_global.objects.megamine = 1.5;
_global.objects.TRAP = 1;
_global.objects.MINE = 2;
_global.objects.MEGAMINE = 3;
_global.scape = new Object();
_global.scape.frequence = 100;
_global.scape.height = 280;
_global.settings = new Object();
_global.settings.maxspeed = 40;
_global.settings.reload = 180;
_global.settings.bounce = 0.9;
_global.settings.friction = 0.9;
_global.settings.sound = true;
_global.helper = new Object();
_global.helper.Q = function (a) {
var _local2 = 0;
while (a > 0) {
_local2 = _local2 + (a % 10);
a = Math.floor(a / 10);
}
return(_local2);
};
_global.helper.W = function (a, b) {
var _local2 = 0;
while (a > 0) {
_local2 = _local2 + ((a % 10) * b);
a = Math.floor(a / 10);
b--;
}
_local2 = ((_local2 < 0) ? (-_local2) : (_local2));
return(_local2);
};
_global.helper.NameConv = function (name) {
a = 0;
s = new String(name);
i = 0;
while (i < s.length) {
a = a + ((s.charCodeAt(i) % (i + 1)) + 15);
i++;
}
return(a);
};
Frame 2
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
_root.Loading.text = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%";
gotoAndPlay ("Loading");
}
Frame 3
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
_root.Loading.text = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%";
gotoAndPlay ("Loading");
}
_root.Music = new Sound();
_root.Music.attachSound("Music");
_root.Music.start(0, 999);
Instance of Symbol 50 MovieClip in Frame 4
onClipEvent (load) {
if (!settings.sound) {
this.gotoAndStop(2);
}
}
Instance of Symbol 58 MovieClip in Frame 4
onClipEvent (load) {
if (settings.quality == "LOW") {
this.gotoAndStop(3);
} else if (settings.quality == "MEDIUM") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Frame 5
stop();
Frame 8
_root._quality = settings.quality;
_root.createEmptyMovieClip("script", 0);
_root.createEmptyMovieClip("data", 1);
_root.createEmptyMovieClip("graphic", 2);
_root.createEmptyMovieClip("mask", 3);
_root.createEmptyMovieClip("sound", 4);
_root.graphic._visible = false;
_root.sound.baah = new Sound();
_root.sound.baah.attachSound("baah");
_root.sound.boom = new Sound();
_root.sound.boom.attachSound("boom");
_root.sound.clack = new Sound();
_root.sound.clack.attachSound("clack");
_root.sound.boing = new Sound();
_root.sound.boing.attachSound("boing");
_root.sound.play = function (name) {
if (!settings.sound) {
return(undefined);
}
_root.sound[name].start();
};
_root.mask.beginFill(0, 100);
_root.mask.lineStyle(0, 0, 100);
_root.mask.moveTo(0, 0);
_root.mask.lineTo(screen._width, 0);
_root.mask.lineTo(screen._width, screen._height);
_root.mask.lineTo(0, screen._height);
_root.mask.lineTo(0, 0);
_root.mask.endFill();
_root.graphic.setMask(_root.mask);
_root.data.game = new Object();
_root.data.game.distance = 0;
_root.data.game.gameover = false;
_root.data.game.score = 0;
_root.data.game.highscore = 0;
_root.data.game.trapcount = 0;
_root.data.game.heightbonus = 0;
_root.data.game.reload = 0;
_root.data.game.stop = true;
_root.data.sheep = new Object();
_root.data.sheep.xspeed = 0;
_root.data.sheep.yspeed = 0;
_root.data.sheep._x = 140;
_root.data.sheep._y = 140;
_root.data.objects = [];
_root.data.objdist = 0;
_root.data.level = [];
_root.data.level[0] = new Object();
_root.data.level[0]._x = 0;
_root.data.level[0]._y = scape.height + ((Math.random() * 100) - 50);
i = 1;
while (i < 25) {
_root.data.level[i] = new Object();
_root.data.level[i]._x = (i * scape.frequence) + (Math.random() * 50);
_root.data.level[i]._y = scape.height + ((Math.random() * 100) - 50);
i++;
}
_root.data.background = [];
_root.data.background[0] = new Object();
_root.data.background[0]._x = 0;
_root.data.background[0]._y = (scape.height / 2) + ((Math.random() * 60) - 30);
i = 1;
while (i < 20) {
_root.data.background[i] = new Object();
_root.data.background[i]._x = (i * scape.frequence) + (Math.random() * 50);
_root.data.background[i]._y = (scape.height / 2) + ((Math.random() * 60) - 30);
i++;
}
_root.graphic._x = (_root.graphic._y = 0);
_root.graphic.createEmptyMovieClip("scape", 0);
_root.graphic.attachMovie("Sheep", "sheep", 1);
_root.graphic.sheep._xscale = (_root.graphic.sheep._yscale = 50);
_root.graphic.sheep._x = _root.data.sheep._x;
_root.graphic.sheep._y = _root.data.sheep._y;
_root.graphic.count = 2;
Frame 9
_root.script.drawLevel = function () {
_root.graphic.scape.clear();
var _local2 = _root.data.background.length;
var _local9 = [4473924, 2236962];
var _local7 = [100, 100];
var _local10 = [0, 255];
var _local8 = {matrixType:"box", x:100, y:100, w:200, h:200, r:(Math.PI/2)};
_root.graphic.scape.beginGradientFill("linear", _local9, _local7, _local10, _local8);
_root.graphic.scape.lineStyle(1, 0, 0);
_root.graphic.scape.moveTo(_root.data.background[0]._x, _root.data.background[0]._y);
i = 1;
while (i < _local2) {
var _local4 = _root.data.background[i]._x;
var _local3 = _root.data.background[i]._y;
_root.graphic.scape.lineTo(_local4, _local3);
if (_local4 > screen._width) {
_local2 = i + 1;
break;
}
i++;
}
_root.graphic.scape.lineTo(_root.data.background[_local2 - 1]._x, _root.data.background[_local2 - 1]._y);
_root.graphic.scape.lineTo(screen._width, screen._height);
_root.graphic.scape.lineTo(0, screen._height);
_root.graphic.scape.endFill();
_local2 = _root.data.level.length - 1;
var _local5 = _root.script.findNode(0);
var _local6 = _root.script.findNode(screen._width) + 2;
_local5 = ((_local5 < 0) ? 0 : (_local5));
_local6 = ((_local6 > _local2) ? (_local2) : (_local6));
_root.graphic.scape.beginFill(16777215, 100);
_root.graphic.scape.lineStyle(1, 16777215, 100);
_root.graphic.scape.moveTo(_root.data.level[_local5]._x, _root.data.level[_local5]._y);
i = _local5 + 1;
while (i < (_local6 - 1)) {
var _local4 = _root.data.level[i]._x;
var _local3 = _root.data.level[i]._y;
_root.graphic.scape.lineTo(_local4, _local3);
i++;
}
_root.graphic.scape.lineTo(screen._width, _root.script.getY(screen._width));
_root.graphic.scape.lineTo(screen._width, screen._height);
_root.graphic.scape.lineTo(0, screen._height);
_root.graphic.scape.endFill();
};
_root.script.scroll = function (amount) {
var _local3 = _root.data.level.length;
i = 0;
while (i < _local3) {
_root.data.level[i]._x = _root.data.level[i]._x + amount;
if ((_root.data.level[i]._x < 0) && (_root.data.level[i + 1]._x < 0)) {
_root.data.level.shift();
_local3--;
_root.data.level[_local3] = new Object();
_root.data.level[_local3]._x = (_root.data.level[_local3 - 1]._x + scape.frequence) + (Math.random() * 50);
_root.data.level[_local3]._y = scape.height + ((Math.random() * 60) - 30);
}
i++;
}
_local3 = _root.data.background.length;
i = 0;
while (i < _local3) {
_root.data.background[i]._x = _root.data.background[i]._x + (amount / 2);
if ((_root.data.background[i]._x < 0) && (_root.data.background[i + 1]._x < 0)) {
_root.data.background.shift();
_local3--;
_root.data.background[_local3] = new Object();
_root.data.background[_local3]._x = (_root.data.background[_local3 - 1]._x + scape.frequence) + (Math.random() * 50);
_root.data.background[_local3]._y = (scape.height / 2) + ((Math.random() * 100) - 50);
}
i++;
}
_local3 = _root.data.objects.length;
i = 0;
while (i < _local3) {
if (_root.graphic[_root.data.objects[i]]._x < -50) {
_root.graphic[_root.data.objects[i]].removeMovieClip();
_root.data.objects.splice(i, 1);
i--;
_local3--;
} else {
_root.graphic[_root.data.objects[i]]._x = _root.graphic[_root.data.objects[i]]._x + amount;
}
i++;
}
_root.data.objdist = _root.data.objdist - amount;
if ((_root.data.objdist >= objects.frequence) && ((Math.random() * 100) < objects.prop)) {
var _local4 = "O" + _root.graphic.count;
_root.graphic.attachMovie("Object", _local4, _root.graphic.count);
_root.graphic[_local4]._x = screen._width + 25;
_root.graphic[_local4]._y = _root.script.getY(_root.graphic[_local4]._x);
var _local5 = Math.round(Math.random() * (objects.count - 1)) + 1;
if ((_local5 == 3) && ((Math.random() * 10) > 5)) {
_local5 = 2;
}
_root.graphic[_local4].id = _local5;
_root.graphic[_local4].gotoAndStop(_local5);
if (_root.script.getM(_root.graphic[_local4]._x) > 0) {
_root.graphic[_local4]._rotation = _root.graphic[_local4]._rotation + (Math.random() * 35);
} else {
_root.graphic[_local4]._rotation = _root.graphic[_local4]._rotation - (Math.random() * 35);
}
_root.data.objects.push(_local4);
_root.graphic.count++;
_root.data.objdist = 0;
}
};
_root.script.findNode = function (x) {
return(_root.script.findNodeRec(0, _root.data.level.length, x));
};
_root.script.findNodeRec = function (a, b, x) {
var _local2 = Math.floor((a + b) / 2);
if ((_root.data.level[_local2]._x <= x) && (_root.data.level[_local2 + 1]._x >= x)) {
return(_local2);
}
if (a == (b - 1)) {
return(_local2);
}
if (_root.data.level[_local2]._x <= x) {
return(_root.script.findNodeRec(_local2, b, x));
}
return(_root.script.findNodeRec(a, _local2, x));
};
_root.script.getY = function (x) {
var _local2 = _root.script.findNode(x);
var _local3 = _root.data.level[_local2]._y - _root.data.level[_local2 + 1]._y;
var _local4 = _root.data.level[_local2]._x - _root.data.level[_local2 + 1]._x;
return(_root.data.level[_local2]._y + ((_local3 / _local4) * (x - _root.data.level[_local2]._x)));
};
_root.script.getM = function (x) {
var _local2 = _root.script.findNode(x);
var _local3 = _root.data.level[_local2]._y - _root.data.level[_local2 + 1]._y;
var _local4 = _root.data.level[_local2]._x - _root.data.level[_local2 + 1]._x;
return(_local3 / _local4);
};
Frame 10
_root.data.sheep.xspeed = 10;
_root.data.sheep.yspeed = -8;
_root.script.onMouseDown = function () {
if ((_root.data.game.reload > 0) || (_root.data.game.stop)) {
return(undefined);
}
_root.attachMovie("Explosion", "Explosion", 5);
_root.Explosion._x = _root._xmouse;
_root.Explosion._y = _root._ymouse;
var _local4 = _root.data.sheep._x - _root._xmouse;
var _local3 = _root.data.sheep._y - _root._ymouse;
var _local2 = Math.atan2(_local3, _local4);
_local2 = ((((_local2 / Math.PI) * 180) > 80) ? 1.39626340159546 : (_local2));
_local2 = ((((_local2 / Math.PI) * 180) < -80) ? -1.39626340159546 : (_local2));
if (((_local4 * _local4) + (_local3 * _local3)) < 200) {
var _local5 = 24;
} else {
var _local5 = 16;
}
_local4 = _local5 * Math.cos(_local2);
_local3 = _local5 * Math.sin(_local2);
_root.data.sheep.xspeed = _root.data.sheep.xspeed + _local4;
if (_root.data.sheep.yspeed > 0) {
_root.data.sheep.yspeed = _local3;
} else {
_root.data.sheep.yspeed = _root.data.sheep.yspeed + _local3;
}
_root.data.game.reload = settings.reload;
_root.sound.play("boom");
_root.sound.play("baah");
};
_root.script.onEnterFrame = function () {
if (_root.data.game.stop) {
return(undefined);
}
if (_root.data.game.reload > 0) {
_root.data.game.reload--;
}
if (_root.data.sheep.xspeed > settings.maxspeed) {
_root.data.sheep.xspeed = settings.maxspeed;
}
if ((_root.data.sheep._x + _root.data.sheep.xspeed) < 200) {
_root.data.sheep._x = _root.data.sheep._x + _root.data.sheep.xspeed;
_root.graphic.sheep._x = _root.data.sheep._x;
} else {
_root.script.scroll(-_root.data.sheep.xspeed);
}
_root.data.game.distance = _root.data.game.distance + _root.data.sheep.xspeed;
_root.data.game.trapcount = ((_root.data.game.trapcount < 0) ? 0 : (_root.data.game.trapcount));
if (((-_root.data.sheep._y) + 200) > _root.data.game.heightbonus) {
_root.data.game.heightbonus = Math.round(-_root.data.sheep._y) + 200;
}
_root.txdistance.text = Math.round(_root.data.game.distance / 10) + " m";
_root.txtraps.text = _root.data.game.trapcount;
_root.txheight.text = _root.data.game.heightbonus;
_root.Reload.gotoAndStop(Math.round(((settings.reload - _root.data.game.reload) / settings.reload) * 100));
var _local6 = _root.script.getY(_root.data.sheep._x);
if ((_root.data.sheep._y + _root.data.sheep.yspeed) < _local6) {
_root.data.sheep._y = _root.data.sheep._y + _root.data.sheep.yspeed;
} else {
_root.sound.play("boing");
_root.data.sheep._y = _local6;
_root.data.sheep.yspeed = (-_root.data.sheep.yspeed) * settings.bounce;
_root.data.sheep.xspeed = _root.data.sheep.xspeed * settings.friction;
if ((_root.data.sheep.xspeed * _root.data.sheep.xspeed) < 0.4) {
_root.data.sheep.xspeed = 0;
_root.data.game.gameover = true;
return(undefined);
}
}
_root.graphic.sheep._y = _root.data.sheep._y;
_root.data.sheep.yspeed++;
var _local4 = Math.round((_local6 - _root.data.sheep._y) / 2);
_local4 = ((_local4 > 40) ? 40 : (_local4));
_local4 = ((_local4 < 1) ? 1 : (_local4));
_root.graphic.sheep.gotoAndStop(_local4);
_root.script.drawLevel();
var _local5 = _root.data.objects.length;
i = 0;
while (i < _local5) {
var _local3 = _root._xmouse - _root.graphic[_root.data.objects[i]]._x;
var _local2 = _root._ymouse - _root.graphic[_root.data.objects[i]]._y;
if ((((_local3 * _local3) + (_local2 * _local2)) < (objects.hitdist * objects.hitdist)) && (!_root.graphic[_root.data.objects[i]].animation.played)) {
_root.graphic[_root.data.objects[i]].animation.activate();
if (_root.graphic[_root.data.objects[i]].id == objects.MINE) {
_root.data.game.trapcount--;
_root.sound.play("boom");
} else if (_root.graphic[_root.data.objects[i]].id == objects.MEGAMINE) {
_root.data.game.trapcount = _root.data.game.trapcount - 5;
_root.sound.play("boom");
} else if (_root.graphic[_root.data.objects[i]].id == objects.TRAP) {
_root.data.game.trapcount++;
_root.sound.play("clack");
}
}
_local3 = _root.data.sheep._x - _root.graphic[_root.data.objects[i]]._x;
_local2 = _root.data.sheep._y - _root.graphic[_root.data.objects[i]]._y;
if ((((_local3 * _local3) + (_local2 * _local2)) < (objects.hitdist * objects.hitdist)) && (!_root.graphic[_root.data.objects[i]].animation.played)) {
_root.graphic[_root.data.objects[i]].animation.activate();
if (_root.graphic[_root.data.objects[i]].id == objects.MINE) {
_root.data.sheep.xspeed = _root.data.sheep.xspeed + objects.mineforcex;
_root.data.sheep.yspeed = ((_root.data.sheep.yspeed > 0) ? (-_root.data.sheep.yspeed) : (_root.data.sheep.yspeed));
_root.data.sheep.yspeed = _root.data.sheep.yspeed + (-objects.mineforcey);
_root.sound.play("boom");
_root.sound.play("baah");
} else if (_root.graphic[_root.data.objects[i]].id == objects.MEGAMINE) {
_root.data.sheep.xspeed = _root.data.sheep.xspeed + (objects.mineforcex * objects.megamine);
_root.data.sheep.yspeed = ((_root.data.sheep.yspeed > 0) ? (-_root.data.sheep.yspeed) : (_root.data.sheep.yspeed));
_root.data.sheep.yspeed = _root.data.sheep.yspeed + ((-objects.mineforcey) * objects.megamine);
_root.sound.play("boom");
_root.sound.play("baah");
} else if (_root.graphic[_root.data.objects[i]].id == objects.TRAP) {
_root.data.sheep._x = (_root.graphic.sheep._x = _root.graphic[_root.data.objects[i]]._x);
_root.data.sheep._y = (_root.graphic.sheep._y = _root.graphic[_root.data.objects[i]]._y);
_root.data.sheep.xspeed = (_root.data.sheep.yspeed = 0);
_root.data.game.gameover = true;
_root.sound.play("clack");
}
}
i++;
}
};
Frame 33
_root.graphic._visible = true;
_root.data.game.stop = false;
Frame 35
if (!_root.data.game.gameover) {
gotoAndPlay ("Loop");
}
Frame 37
_root.script.onEnterFrame = function () {
};
_root.script.onMouseDown = function () {
};
_root.attachMovie("Sign", "Sign", 5);
_root.Sign.distance = Math.round(_root.data.game.distance) / 10;
_root.Sign._x = _root.data.sheep._x;
_root.Sign._y = _root.data.sheep._y - 50;
stop();
Frame 40
_root._quality = "HIGH";
_root.mask.removeMovieClip();
_root.graphic.removeMovieClip();
_root.script.removeMovieClip();
count1 = 0;
count2 = 0;
count3 = 0;
score1 = Math.round(_root.data.game.distance);
score2 = _root.data.game.heightbonus;
score3 = _root.data.game.trapcount;
score = (score1 + (score2 * 5)) + (score3 * 500);
if (score1 < 500) {
step = 10;
} else if (score < 5000) {
step = 100;
} else if (score < 10000) {
step = 250;
} else if (score < 25000) {
step = 500;
} else {
step = 1000;
}
_root.txDistance.text = score1;
_root.txHeight.text = score2;
_root.txBonus.text = score3;
_root.txScore.text = 0;
Frame 42
if (count1 < score1) {
if ((count1 + step) < score1) {
count1 = count1 + step;
} else {
count1 = score1;
}
_root.txScore.text = count1;
_root.txDistance.text = score1 - count1;
_root.gotoAndPlay(_currentframe - 1);
} else if (count2 < score2) {
if ((count2 + 10) < score2) {
count2 = count2 + 10;
} else {
count2 = score2;
}
_root.txScore.text = count1 + (count2 * 5);
_root.txHeight.text = score2 - count2;
_root.gotoAndPlay(_currentframe - 1);
} else if (count3 < score3) {
count3++;
_root.txScore.text = (count1 + (count2 * 5)) + (count3 * 500);
_root.txBonus.text = score3 - count3;
_root.gotoAndPlay(_currentframe - 1);
} else {
stop();
}
Frame 44
_root.createEmptyMovieClip("scores", 1);
_root.attachMovie("Dummy", "Dummy", 2);
random = Math.round(Math.random() * 1000);
_root.Dummy.onData = function () {
i = 0;
while (i < 10) {
_root.scores["name" + i] = this["name" + i];
_root.scores["score" + i] = this["score" + i];
i++;
}
_root.gotoAndPlay("Scoretable");
this.removeMovieClip();
};
_root.Dummy.loadVariables("retrieve_score.php?dummy=" + random, "POST");
stop();
Frame 46
i = 0;
while (i < 10) {
_root["n" + i].text = _root.scores["name" + i];
_root["s" + i].text = _root.scores["score" + i];
i++;
}
_root.scores.removeMovieClip();
stop();
Frame 49
_root.Score.text = _root.score;
Instance of Symbol 136 MovieClip [Highscore Form x] in Frame 49
//component parameters
onClipEvent (construct) {
errorname = "Please enter a valid name";
namemax = 20;
namemin = 3;
scorepath = "_root.score";
}
onClipEvent (load) {
this.onCancel = function () {
_root.gotoAndPlay("Menu");
};
this.onError = function () {
_root.gotoAndPlay("Menu");
};
this.onSuccess = function () {
_root.gotoAndPlay("Menu");
};
}
Frame 50
_root.Score.text = _root.score;
stop();
Symbol 12 Button
on (press) {
_root.gotoAndPlay("Clean");
_parent.removeMovieClip();
}
Instance of Symbol 13 MovieClip "animation" in Symbol 14 MovieClip [Sign] Frame 10
/* no clip actions */
Symbol 14 MovieClip [Sign] Frame 38
gotoAndPlay ("Loop");
Symbol 18 MovieClip Frame 1
stop();
Symbol 18 MovieClip Frame 5
stop();
Symbol 22 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 8
stop();
Symbol 26 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 11
stop();
Instance of Symbol 18 MovieClip "animation" in Symbol 27 MovieClip [Object] Frame 1
onClipEvent (load) {
this.played = false;
this.activate = function () {
if (!played) {
this.gotoAndPlay("action");
this.played = true;
}
};
}
Instance of Symbol 22 MovieClip "animation" in Symbol 27 MovieClip [Object] Frame 2
onClipEvent (load) {
this.played = false;
this.activate = function () {
if (!played) {
this.gotoAndPlay("action");
this.played = true;
}
};
}
Instance of Symbol 26 MovieClip "animation" in Symbol 27 MovieClip [Object] Frame 3
onClipEvent (load) {
this.played = false;
this.activate = function () {
if (!played) {
this.gotoAndPlay("action");
this.played = true;
}
};
}
Symbol 35 MovieClip [Explosion] Frame 9
this.removeMovieClip();
Symbol 137 MovieClip [__Packages.HighscoreConnect] Frame 0
class HighscoreConnect extends MovieClip
{
var blackBox, data, key, url, gotoAndPlay, username, namemin, namemax, errorname, txMessage, score, variables, poststring, __get__name;
function HighscoreConnect () {
super();
var _local4;
var _local3;
((undefined <= _local3) > "c") || (0(false));
blackBox.createEmptyMovieClip("data", 0);
blackBox.data.loadMovie("blackbox.swf");
blackBox._visible = false;
data = [];
}
function setData(__key, __url) {
key = __key;
url = __url;
(gotoAndPlay("Ready"));// not popped
}
function checkName() {
var _local4 = username.length;
if ((_local4 < namemin) || (_local4 > namemax)) {
return(false);
}
var _local2 = ["+", "%", "&"];
for (var _local3 in _local2) {
if (username.indexOf(_local2[_local3]) != -1) {
return(false);
}
}
return(true);
}
function checkSum(__score, __name, __key) {
var _local5 = new String();
if (__score > 999999999) {
__score = __score << 4;
}
var _local6 = __name.length;
var _local7 = __key.length - 1;
var _local2 = 0;
while (__name.length < 64) {
var _local1 = ((__name.charCodeAt(_local2 % _local6) + (_local2 * _local2)) ^ __score) % 128;
_local1 = ((_local1 < 32) ? (_local1 + 64) : (_local1));
__name = __name + String.fromCharCode(_local1);
_local2++;
}
_local2 = 0;
while (_local2 < 64) {
var _local1 = (__name.charCodeAt(_local2) ^ ((__key.charCodeAt(_local2 % _local7) + (_local2 * 7)) + (__score >> 4))) % 128;
_local1 = ((_local1 < 32) ? (_local1 + 64) : (_local1));
_local1 = ((((_local1 == 38) || (_local1 == 37)) || (_local1 == 43)) ? (50 + _local2) : (_local1));
_local5 = _local5 + String.fromCharCode(_local1);
_local2++;
}
return(_local5);
}
function encrypt(__data, __key) {
var _local4 = new String();
var _local5 = new String("_gmq3t\u00B40kaABN<,0sfDa)(X[]!NL5asf");
var _local6 = __data.length;
var _local7 = __key.length;
var _local8 = _local5.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local1 = (__data.charCodeAt(_local2) ^ __key.charCodeAt(_local2 % _local7)) - _local5.charCodeAt(_local2 % _local8);
_local1 = __data.charCodeAt(_local2);
_local1 = ((_local1 > 128) ? (_local1 % 128) : (((_local1 < 0) ? (128 - ((-_local1) % 128)) : (_local1))));
_local4 = _local4 + String.fromCharCode(_local1);
_local2++;
}
return(_local4);
}
function Submit() {
if (!checkName()) {
txMessage.text = errorname;
return(undefined);
}
trace(score);
for (var i in variables) {
var n = variables[i];
addData(eval (n));
}
addData(checkSum(score, username, key));
addData(score);
addData(escape(username));
poststring = new String();
for (var i in data) {
poststring = poststring + (escape(String(data[i])) + "&");
}
poststring = encrypt(poststring, key);
(gotoAndPlay("Submit"));// not popped
}
function set name(__name) {
username = __name;
//return(__get__name());
}
function addData(__data) {
data.unshift(__data);
}
}
Symbol 43 Button
on (press) {
_root.gotoAndPlay("Init");
}
Symbol 47 Button
on (press) {
_root.Music.stop();
gotoAndStop (2);
}
Symbol 49 Button
on (press) {
_root.Music.start(0, 999);
gotoAndStop (1);
}
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 2
stop();
Symbol 52 Button
on (press) {
settings.quality = "medium";
gotoAndStop (2);
}
Symbol 54 Button
on (press) {
settings.quality = "low";
gotoAndStop (3);
}
Symbol 56 Button
on (press) {
settings.quality = "high";
gotoAndStop (1);
}
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 2
stop();
Symbol 58 MovieClip Frame 3
stop();
Symbol 61 Button
on (press) {
_root.gotoAndPlay("Highscore");
}
Symbol 64 Button
on (press) {
settings.sound = false;
gotoAndStop (2);
}
Symbol 66 Button
on (press) {
settings.sound = true;
gotoAndStop (1);
}
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 2
stop();
Symbol 76 MovieClip Frame 1
stop();
Symbol 85 Button
on (press) {
_root.gotoAndPlay("Init");
}
Symbol 88 Button
on (press) {
_root.gotoAndPlay("SetScore");
}
Symbol 94 Button
on (press) {
_root.score.removeMovieClip();
_root.Dummy.removeMovieClip();
_root.gotoAndPlay("Menu");
}
Symbol 115 Button
on (press) {
_root.gotoAndPlay("Menu");
}
Symbol 127 Button
on (press) {
name = txName.text;
Submit();
}
Symbol 129 Button
on (press) {
onCancel();
}
Symbol 132 Button
on (press) {
onError();
}
Symbol 133 Button
on (press) {
this.onSuccess();
}
Symbol 136 MovieClip [Highscore Form x] Frame 1
#initclip 2
Object.registerClass("Highscore Form x", HighscoreConnect);
#endinitclip
score = eval (scorepath);
stop();
Symbol 136 MovieClip [Highscore Form x] Frame 2
txScore.text = score;
stop();
Symbol 136 MovieClip [Highscore Form x] Frame 3
stop();
Symbol 136 MovieClip [Highscore Form x] Frame 4
stop();
Symbol 136 MovieClip [Highscore Form x] Frame 6
var result = new LoadVars();
result.onLoad = function (success) {
if (success) {
trace((this.name + " ") + this.score);
if (this.check == 1) {
gotoAndPlay ("Okay");
} else {
gotoAndPlay ("Error");
}
} else {
gotoAndPlay ("Error");
}
};
var send = new LoadVars();
send.data = this.poststring;
send.sendAndLoad((url + "?sum=") + Math.floor((Math.random() * 1000) + 17), result, "POST");
stop();